diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-08-26 06:30:11 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-08-26 06:30:11 +0200 |
commit | a63c7340a632c634733271332a43aac82bc73799 (patch) | |
tree | 6ee5760f8a61ed40b657701a523cd69996a64688 /gui/instancemodel.h | |
parent | 392c58c4b0db7ac5a826a16557712dc005f3705e (diff) | |
download | PrismLauncher-a63c7340a632c634733271332a43aac82bc73799.tar.gz PrismLauncher-a63c7340a632c634733271332a43aac82bc73799.tar.bz2 PrismLauncher-a63c7340a632c634733271332a43aac82bc73799.zip |
Nuke the old instance model, LONG LIVE THE NEW ONE
Diffstat (limited to 'gui/instancemodel.h')
-rw-r--r-- | gui/instancemodel.h | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/gui/instancemodel.h b/gui/instancemodel.h deleted file mode 100644 index 52b58081..00000000 --- a/gui/instancemodel.h +++ /dev/null @@ -1,43 +0,0 @@ -#pragma once - -#include <QAbstractListModel> -#include "categorizedsortfilterproxymodel.h" -#include "logic/lists/InstanceList.h" -#include <QIcon> - -class InstanceModel : public QAbstractListModel -{ - Q_OBJECT -public: - enum AdditionalRoles - { - InstancePointerRole = 0x34B1CB48 ///< Return pointer to real instance - }; - explicit InstanceModel ( const InstanceList& instances, - QObject *parent = 0 ); - - QModelIndex index ( int row, int column = 0, - const QModelIndex& parent = QModelIndex() ) const; - int rowCount ( const QModelIndex& parent = QModelIndex() ) const; - QVariant data ( const QModelIndex& index, int role ) const; - Qt::ItemFlags flags ( const QModelIndex& index ) const; - -public slots: - void onInstanceAdded(int index); - void onInstanceChanged(int index); - void onInvalidated(); - -private: - const InstanceList* m_instances; - int currentInstancesNumber; -}; - -class InstanceProxyModel : public KCategorizedSortFilterProxyModel -{ -public: - explicit InstanceProxyModel ( QObject *parent = 0 ); - -protected: - virtual bool subSortLessThan ( const QModelIndex& left, const QModelIndex& right ) const; -}; - |