summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/iprojectproperties.h
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2011-04-14 13:32:30 +0200
committerhjk <qtc-committer@nokia.com>2011-04-14 13:32:30 +0200
commit61700c16e1bde0dc1caa398f3fc80e5ce626d45c (patch)
treeda1c868e8ae04e1c1d9526ca379c6c07e9ceb3b6 /src/plugins/projectexplorer/iprojectproperties.h
parent3ac9bee144a5c9ce422e3d4954ef29ae22ef2506 (diff)
downloadqt-creator-61700c16e1bde0dc1caa398f3fc80e5ce626d45c.tar.gz
projectexplorer: s/IPropertiesPanel/PropertiesPanel. No need for subclassing.
Diffstat (limited to 'src/plugins/projectexplorer/iprojectproperties.h')
-rw-r--r--src/plugins/projectexplorer/iprojectproperties.h33
1 files changed, 21 insertions, 12 deletions
diff --git a/src/plugins/projectexplorer/iprojectproperties.h b/src/plugins/projectexplorer/iprojectproperties.h
index 2665c124a3..ef04c06279 100644
--- a/src/plugins/projectexplorer/iprojectproperties.h
+++ b/src/plugins/projectexplorer/iprojectproperties.h
@@ -36,8 +36,8 @@
#include "projectexplorer_export.h"
#include <QtCore/QObject>
-
-QT_FORWARD_DECLARE_CLASS(QIcon)
+#include <QtGui/QIcon>
+#include <QtGui/QWidget>
namespace ProjectExplorer {
class Project;
@@ -47,17 +47,26 @@ namespace Constants {
const int PANEL_LEFT_MARGIN = 70;
}
-class PROJECTEXPLORER_EXPORT IPropertiesPanel
+class PROJECTEXPLORER_EXPORT PropertiesPanel
{
+ Q_DISABLE_COPY(PropertiesPanel)
+
public:
- IPropertiesPanel()
- { }
- virtual ~IPropertiesPanel()
- { }
+ PropertiesPanel() {}
+ ~PropertiesPanel() { delete m_widget; }
- virtual QString displayName() const = 0;
- virtual QIcon icon() const = 0;
- virtual QWidget *widget() const = 0;
+ QString displayName() const { return m_displayName; }
+ QIcon icon() const { return m_icon; }
+ QWidget *widget() const { return m_widget; }
+
+ void setDisplayName(const QString &name) { m_displayName = name; }
+ void setIcon(const QIcon &icon) { m_icon = icon; }
+ void setWidget(QWidget *widget) { m_widget = widget; }
+
+private:
+ QString m_displayName;
+ QWidget *m_widget;
+ QIcon m_icon;
};
class PROJECTEXPLORER_EXPORT IPanelFactory : public QObject
@@ -73,7 +82,7 @@ class PROJECTEXPLORER_EXPORT IProjectPanelFactory : public IPanelFactory
Q_OBJECT
public:
virtual bool supports(Project *project) = 0;
- virtual IPropertiesPanel *createPanel(Project *project) = 0;
+ virtual PropertiesPanel *createPanel(Project *project) = 0;
};
class PROJECTEXPLORER_EXPORT ITargetPanelFactory : public IPanelFactory
@@ -81,7 +90,7 @@ class PROJECTEXPLORER_EXPORT ITargetPanelFactory : public IPanelFactory
Q_OBJECT
public:
virtual bool supports(Target *target) = 0;
- virtual IPropertiesPanel *createPanel(Target *target) = 0;
+ virtual PropertiesPanel *createPanel(Target *target) = 0;
};
} // namespace ProjectExplorer