core: make context and widget IContext data members

This commit is contained in:
hjk
2011-04-13 13:00:30 +02:00
parent cbfaea1ed3
commit 70d392d235
55 changed files with 135 additions and 490 deletions

View File

@@ -56,19 +56,18 @@ namespace Internal {
class HelloMode : public Core::IMode
{
public:
HelloMode() : m_widget(new QPushButton(tr("Hello World PushButton!"))) {}
HelloMode()
{
setWidget(new QPushButton(tr("Hello World PushButton!")));
setContext(Core::Context("HelloWorld.MainView"));
}
QString displayName() const { return tr("Hello world!"); }
QIcon icon() const { return QIcon(); }
int priority() const { return 0; }
QWidget *widget() { return m_widget; }
QString id() const { return QLatin1String("HelloWorld.HelloWorldMode"); }
QString type() const { return QLatin1String("HelloWorld.HelloWorldMode"); }
Core::Context context() const { return Core::Context("HelloWorld.MainView"); };
QString contextHelpId() const { return QString(); }
private:
QWidget *m_widget;
};