mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-13 02:39:37 +00:00
Changed: #1307 Update the plugin to work with the latest plugin system
--HG-- branch : gsoc2011-translationovqt
This commit is contained in:
parent
f90215a550
commit
624cb70813
8 changed files with 26 additions and 7 deletions
|
@ -36,6 +36,7 @@ vector<string> Filters;
|
||||||
static CLigoConfig LigoConfig;
|
static CLigoConfig LigoConfig;
|
||||||
static bool RemoveOlds = false;
|
static bool RemoveOlds = false;
|
||||||
|
|
||||||
|
|
||||||
struct TCreatureInfo
|
struct TCreatureInfo
|
||||||
{
|
{
|
||||||
CSheetId SheetId;
|
CSheetId SheetId;
|
||||||
|
|
|
@ -37,6 +37,8 @@ CSimpleViewer::CSimpleViewer(QWidget *parent)
|
||||||
gridLayout->setContentsMargins(0, 0, 0, 0);
|
gridLayout->setContentsMargins(0, 0, 0, 0);
|
||||||
NLQT::QNLWidget *_nelWidget = new NLQT::QNLWidget(this);
|
NLQT::QNLWidget *_nelWidget = new NLQT::QNLWidget(this);
|
||||||
gridLayout->addWidget(_nelWidget, 0, 0, 1, 1);
|
gridLayout->addWidget(_nelWidget, 0, 0, 1, 1);
|
||||||
|
|
||||||
|
m_undoStack = new QUndoStack(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CCoreListener::closeMainWindow() const
|
bool CCoreListener::closeMainWindow() const
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
// Qt includes
|
// Qt includes
|
||||||
#include <QtCore/QObject>
|
#include <QtCore/QObject>
|
||||||
|
#include <QtGui/QUndoStack>
|
||||||
class QWidget;
|
class QWidget;
|
||||||
|
|
||||||
namespace Plugin
|
namespace Plugin
|
||||||
|
@ -37,6 +37,8 @@ class CSimpleViewer : public QWidget
|
||||||
public:
|
public:
|
||||||
CSimpleViewer(QWidget *parent = 0);
|
CSimpleViewer(QWidget *parent = 0);
|
||||||
virtual ~CSimpleViewer() {}
|
virtual ~CSimpleViewer() {}
|
||||||
|
|
||||||
|
QUndoStack *m_undoStack;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CCoreListener : public Core::ICoreListener
|
class CCoreListener : public Core::ICoreListener
|
||||||
|
|
|
@ -57,10 +57,10 @@ void TranslationManagerPlugin::extensionsInitialized()
|
||||||
helpMenu->addSeparator();
|
helpMenu->addSeparator();
|
||||||
helpMenu->insertAction(aboutQtAction, aboutTManPlugin);
|
helpMenu->insertAction(aboutQtAction, aboutTManPlugin);
|
||||||
QMenu *transMenu = menuManager->menuBar()->addMenu("Translation Manager");
|
QMenu *transMenu = menuManager->menuBar()->addMenu("Translation Manager");
|
||||||
/* Words extraction*/
|
// Words extraction
|
||||||
QAction *botnamesAct = new QAction("Extract bot_names", this);
|
QAction *botnamesAct = new QAction("Extract bot_names", this);
|
||||||
connect(botnamesAct, SIGNAL(triggered()), this, SLOT(extractBotNames()));
|
connect(botnamesAct, SIGNAL(triggered()), this, SLOT(extractBotNames()));
|
||||||
transMenu->addAction(botnamesAct);
|
transMenu->addAction(botnamesAct);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TranslationManagerPlugin::extractBotNames()
|
void TranslationManagerPlugin::extractBotNames()
|
||||||
|
|
|
@ -92,6 +92,14 @@ public:
|
||||||
{
|
{
|
||||||
return m_simpleViewer;
|
return m_simpleViewer;
|
||||||
}
|
}
|
||||||
|
virtual QUndoStack *undoStack()
|
||||||
|
{
|
||||||
|
return m_simpleViewer->m_undoStack;
|
||||||
|
}
|
||||||
|
virtual void open()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
CSimpleViewer *m_simpleViewer;
|
CSimpleViewer *m_simpleViewer;
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,11 @@ QString CTranslationManagerSettingsPage::trCategory() const
|
||||||
return tr("General");
|
return tr("General");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QIcon CTranslationManagerSettingsPage::categoryIcon() const
|
||||||
|
{
|
||||||
|
return QIcon();
|
||||||
|
}
|
||||||
|
|
||||||
QWidget *CTranslationManagerSettingsPage::createPage(QWidget *parent)
|
QWidget *CTranslationManagerSettingsPage::createPage(QWidget *parent)
|
||||||
{
|
{
|
||||||
_currentPage = new QWidget(parent);
|
_currentPage = new QWidget(parent);
|
||||||
|
|
|
@ -43,8 +43,9 @@ 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;
|
||||||
|
virtual QIcon categoryIcon() const;
|
||||||
virtual QWidget *createPage(QWidget *parent);
|
virtual QWidget *createPage(QWidget *parent);
|
||||||
|
|
||||||
virtual void apply();
|
virtual void apply();
|
||||||
virtual void finish() {}
|
virtual void finish() {}
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>490</width>
|
<width>490</width>
|
||||||
<height>495</height>
|
<height>482</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
|
Loading…
Reference in a new issue