Commit afc9f2a9 authored by hjk's avatar hjk
Browse files

ProjectExplorer: Cleanup ToolChainOptionPage

Using a (local) widget derived class for the main page all
keeps the .h cleaner and removes the need for the custom
model plus related signaling.

Change-Id: If1b118b56cc1cd06d459fd5491de673e2436dd77
Reviewed-by: default avatarChristian Stenger <>
Reviewed-by: default avatarTobias Hunger <>
parent 58c69457
......@@ -32,69 +32,13 @@
#include <coreplugin/dialogs/ioptionspage.h>
#include <utils/treemodel.h>
#include <QAbstractItemModel>
#include <QPointer>
class QItemSelectionModel;
class QPushButton;
class QTreeView;
namespace Utils { class DetailsWidget; }
namespace ProjectExplorer {
class ToolChain;
class ToolChainConfigWidget;
class ToolChainFactory;
namespace Internal {
class ToolChainNode;
// --------------------------------------------------------------------------
// ToolChainModel
// --------------------------------------------------------------------------
class ToolChainModel : public Utils::TreeModel
explicit ToolChainModel(QObject *parent = 0);
QModelIndex index(ToolChain *) const;
ToolChain *toolChain(const QModelIndex &);
ToolChainConfigWidget *widget(const QModelIndex &);
bool isDirty() const;
bool isDirty(ToolChain *) const;
void apply();
void markForRemoval(ToolChain *);
void markForAddition(ToolChain *);
void toolChainStateChanged();
private slots:
void addToolChain(ProjectExplorer::ToolChain *);
void removeToolChain(ProjectExplorer::ToolChain *);
void setDirty();
ToolChainNode *createNode(ToolChain *tc, bool changed);
Utils::TreeItem *m_autoRoot;
Utils::TreeItem *m_manualRoot;
QList<ToolChainNode *> m_toAddList;
QList<ToolChainNode *> m_toRemoveList;
class ToolChainOptionsWidget;
// --------------------------------------------------------------------------
// ToolChainOptionsPage
......@@ -111,25 +55,8 @@ public:
void apply();
void finish();
private slots:
void toolChainSelectionChanged();
void createToolChain(QObject *);
void removeToolChain();
void updateState();
QModelIndex currentIndex() const;
QPointer<QWidget> m_configWidget;
ToolChainModel *m_model;
QList<ToolChainFactory *> m_factories;
QItemSelectionModel * m_selectionModel;
QTreeView *m_toolChainView;
Utils::DetailsWidget *m_container;
QPushButton *m_addButton;
QPushButton *m_cloneButton;
QPushButton *m_delButton;
QPointer<ToolChainOptionsWidget> m_widget;
} // namespace Internal
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment