Changed: Merged in latest API changes to OVQT plugin system.

This commit is contained in:
sfb 2011-05-31 07:34:42 -05:00
parent 2039038973
commit 14e41c2c07
5 changed files with 43 additions and 26 deletions

View file

@ -77,7 +77,7 @@ ZonePainterMainWindow::ZonePainterMainWindow(QWidget *parent) :
Core::ICore::instance()->mainWindow()->statusBar()->addPermanentWidget(m_statusInfo); Core::ICore::instance()->mainWindow()->statusBar()->addPermanentWidget(m_statusInfo);
m_undoStack = new QUndoStack(this);
} }
void ZonePainterMainWindow::showEvent(QShowEvent *showEvent) void ZonePainterMainWindow::showEvent(QShowEvent *showEvent)

View file

@ -5,6 +5,7 @@
#include <QTimer> #include <QTimer>
#include <QLabel> #include <QLabel>
#include <QAction> #include <QAction>
#include <QtGui/QUndoStack>
namespace NLQT { namespace NLQT {
class QNLWidget; class QNLWidget;
@ -26,7 +27,7 @@ public:
void loadConfig(); void loadConfig();
void saveConfig(); void saveConfig();
QUndoStack *getUndoStack() { return m_undoStack; }
public Q_SLOTS: public Q_SLOTS:
void setToolMode(int value); void setToolMode(int value);
void setToolMode(); void setToolMode();
@ -49,7 +50,7 @@ private:
QAction *_toolSelectModeAction; QAction *_toolSelectModeAction;
QAction *_toolPickModeAction; QAction *_toolPickModeAction;
QMenu *_toolModeMenu; QMenu *_toolModeMenu;
QUndoStack *m_undoStack;
//QAction *m_setBackColorAction; //QAction *m_setBackColorAction;
}; };

View file

@ -101,6 +101,16 @@ public:
{ {
return m_zonePainterMainWindow; return m_zonePainterMainWindow;
} }
virtual QUndoStack *undoStack()
{
return m_zonePainterMainWindow->getUndoStack();
}
virtual void open()
{
}
ZonePainterMainWindow *m_zonePainterMainWindow; ZonePainterMainWindow *m_zonePainterMainWindow;
}; };

View file

@ -53,6 +53,11 @@ QString CZonePainterSettingsPage::trCategory() const
return tr("General"); return tr("General");
} }
QIcon CZonePainterSettingsPage::categoryIcon() const
{
return QIcon();
}
QWidget *CZonePainterSettingsPage::createPage(QWidget *parent) QWidget *CZonePainterSettingsPage::createPage(QWidget *parent)
{ {
_currentPage = new QWidget(parent); _currentPage = new QWidget(parent);

View file

@ -43,6 +43,7 @@ public:
virtual QString trName() const; virtual QString trName() const;
virtual QString category() const; virtual QString category() const;
virtual QString trCategory() const; virtual QString trCategory() const;
QIcon categoryIcon() const;
virtual QWidget *createPage(QWidget *parent); virtual QWidget *createPage(QWidget *parent);
virtual void apply(); virtual void apply();