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