refs #641, improvements/fixes of orderable lists / models / views

* set sort order automatically to IndexOrder when changing order of items
* call onChanged when model is changed and then update view (needed when model is changed directly, not via view)
* support for digest signal so redundant updates can be avoided
* renamed rowCountChanged (signal) to modelDataChanged - detecting row count changes only was useless
* updated Doxygen / fixed typos
This commit is contained in:
Klaus Basan
2016-05-05 12:24:22 +02:00
parent 2da14e3b62
commit 1a62de8dc3
21 changed files with 175 additions and 62 deletions

View File

@@ -18,8 +18,7 @@
namespace BlackMisc
{
//! Receive 1..n signal, collect them over time, and resend afer n milliseconds
//! Receive 1..n signals, collect them over time, and resend afer n milliseconds
class BLACKMISC_EXPORT CDigestSignal : public QObject
{
Q_OBJECT

View File

@@ -18,6 +18,7 @@
namespace BlackMisc
{
//! List of orderable IOrderable objects
//! \remark Orerable objects shall implement BlackMisc::IOrderable
template<class OBJ, class CONTAINER>
class IOrderableList
{
@@ -71,8 +72,8 @@ namespace BlackMisc
extern template class BLACKMISC_EXPORT_TEMPLATE IOrderableList<BlackMisc::Simulation::CAircraftModel, BlackMisc::Simulation::CAircraftModelList>;
extern template class BLACKMISC_EXPORT_TEMPLATE IOrderableList<BlackMisc::Simulation::CDistributor, BlackMisc::Simulation::CDistributorList>;
//! \endcond
} //namespace
#endif //guard

View File

@@ -26,9 +26,9 @@ namespace BlackMisc
{
//! Value object encapsulating a list of aircraft models
class BLACKMISC_EXPORT CAircraftModelList :
public CSequence<CAircraftModel>,
public IDatastoreObjectList<CAircraftModel, CAircraftModelList, int>,
public IOrderableList<CAircraftModel, CAircraftModelList>,
public BlackMisc::CSequence<CAircraftModel>,
public BlackMisc::IDatastoreObjectList<CAircraftModel, CAircraftModelList, int>,
public BlackMisc::IOrderableList<CAircraftModel, CAircraftModelList>,
public BlackMisc::Mixin::MetaType<CAircraftModelList>
{
public: