中国象棋控件 v2.0.13
载入中...
搜索中...
未找到
FrmChineseChessPlugin.cpp
1#include "FrmChineseChess.h"
2#include "FrmChineseChessPlugin.h"
3
4#include <QtPlugin>
5#include <QIcon>
6
7CFrmChineseChessPlugin::CFrmChineseChessPlugin(QObject *parent)
8 : QObject(parent),
9 QDesignerCustomWidgetInterface()
10{
11 m_initialized = false;
12}
13
14void CFrmChineseChessPlugin::initialize(QDesignerFormEditorInterface * /* core */)
15{
16 if (m_initialized)
17 return;
18
19 // Add extension registrations, etc. here
20
21 m_initialized = true;
22}
23
24bool CFrmChineseChessPlugin::isInitialized() const
25{
26 return m_initialized;
27}
28
29QWidget *CFrmChineseChessPlugin::createWidget(QWidget *parent)
30{
31 return new CFrmChineseChess(parent);
32}
33
34QString CFrmChineseChessPlugin::name() const
35{
36 return tr("Chinese chess");
37}
38
39QString CFrmChineseChessPlugin::group() const
40{
41 return QLatin1String("");
42}
43
44QIcon CFrmChineseChessPlugin::icon() const
45{
46 return QIcon(QLatin1String(":/image/Chess"));
47}
48
49QString CFrmChineseChessPlugin::toolTip() const
50{
51 return tr("Chinese chess");
52}
53
54QString CFrmChineseChessPlugin::whatsThis() const
55{
56 return tr("Chinese chess");
57}
58
59bool CFrmChineseChessPlugin::isContainer() const
60{
61 return false;
62}
63
64QString CFrmChineseChessPlugin::domXml() const
65{
66 return QLatin1String("<widget class=\"CFrmChineseChess\" name=\"frmChineseChess\">\n</widget>\n");
67}
68
69QString CFrmChineseChessPlugin::includeFile() const
70{
71 return QLatin1String("FrmChineseChess.h");
72}
73#if QT_VERSION < 0x050000
74Q_EXPORT_PLUGIN2(FrmChineseChessPlugin, CFrmChineseChessPlugin)
75#endif // QT_VERSION < 0x050000
QtCreator 中国象棋插件 作者:康林
中国象棋窗体,完成中国象棋的界面