Changed: Merged in latest API changes to OVQT plugin system.
This commit is contained in:
parent
4dd8f89943
commit
37dc120e69
5 changed files with 43 additions and 26 deletions
|
@ -77,7 +77,7 @@ ZonePainterMainWindow::ZonePainterMainWindow(QWidget *parent) :
|
|||
|
||||
Core::ICore::instance()->mainWindow()->statusBar()->addPermanentWidget(m_statusInfo);
|
||||
|
||||
|
||||
m_undoStack = new QUndoStack(this);
|
||||
}
|
||||
|
||||
void ZonePainterMainWindow::showEvent(QShowEvent *showEvent)
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <QTimer>
|
||||
#include <QLabel>
|
||||
#include <QAction>
|
||||
#include <QtGui/QUndoStack>
|
||||
|
||||
namespace NLQT {
|
||||
class QNLWidget;
|
||||
|
@ -26,7 +27,7 @@ public:
|
|||
|
||||
void loadConfig();
|
||||
void saveConfig();
|
||||
|
||||
QUndoStack *getUndoStack() { return m_undoStack; }
|
||||
public Q_SLOTS:
|
||||
void setToolMode(int value);
|
||||
void setToolMode();
|
||||
|
@ -49,7 +50,7 @@ private:
|
|||
QAction *_toolSelectModeAction;
|
||||
QAction *_toolPickModeAction;
|
||||
QMenu *_toolModeMenu;
|
||||
|
||||
QUndoStack *m_undoStack;
|
||||
//QAction *m_setBackColorAction;
|
||||
};
|
||||
|
||||
|
|
|
@ -79,28 +79,38 @@ class CZonePainterContext: public Core::IContext
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CZonePainterContext(QObject *parent = 0): IContext(parent)
|
||||
{
|
||||
m_zonePainterMainWindow = new ZonePainterMainWindow();
|
||||
}
|
||||
virtual ~CZonePainterContext() {}
|
||||
|
||||
virtual QString id() const
|
||||
{
|
||||
return QLatin1String("ZonePainterContext");
|
||||
}
|
||||
virtual QString trName() const
|
||||
{
|
||||
return tr("Zone Painter");
|
||||
}
|
||||
virtual QIcon icon() const
|
||||
{
|
||||
return QIcon();
|
||||
}
|
||||
virtual QWidget *widget()
|
||||
{
|
||||
return m_zonePainterMainWindow;
|
||||
}
|
||||
CZonePainterContext(QObject *parent = 0): IContext(parent)
|
||||
{
|
||||
m_zonePainterMainWindow = new ZonePainterMainWindow();
|
||||
}
|
||||
virtual ~CZonePainterContext() {}
|
||||
|
||||
virtual QString id() const
|
||||
{
|
||||
return QLatin1String("ZonePainterContext");
|
||||
}
|
||||
virtual QString trName() const
|
||||
{
|
||||
return tr("Zone Painter");
|
||||
}
|
||||
virtual QIcon icon() const
|
||||
{
|
||||
return QIcon();
|
||||
}
|
||||
virtual QWidget *widget()
|
||||
{
|
||||
return m_zonePainterMainWindow;
|
||||
}
|
||||
|
||||
virtual QUndoStack *undoStack()
|
||||
{
|
||||
return m_zonePainterMainWindow->getUndoStack();
|
||||
}
|
||||
virtual void open()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ZonePainterMainWindow *m_zonePainterMainWindow;
|
||||
};
|
||||
|
||||
|
|
|
@ -53,6 +53,11 @@ QString CZonePainterSettingsPage::trCategory() const
|
|||
return tr("General");
|
||||
}
|
||||
|
||||
QIcon CZonePainterSettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon();
|
||||
}
|
||||
|
||||
QWidget *CZonePainterSettingsPage::createPage(QWidget *parent)
|
||||
{
|
||||
_currentPage = new QWidget(parent);
|
||||
|
@ -64,4 +69,4 @@ void CZonePainterSettingsPage::apply()
|
|||
{
|
||||
}
|
||||
|
||||
} /* namespace Plugin */
|
||||
} /* namespace Plugin */
|
||||
|
|
|
@ -43,6 +43,7 @@ public:
|
|||
virtual QString trName() const;
|
||||
virtual QString category() const;
|
||||
virtual QString trCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
virtual QWidget *createPage(QWidget *parent);
|
||||
|
||||
virtual void apply();
|
||||
|
|
Loading…
Reference in a new issue