-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathchessmanualwidget.cpp
More file actions
39 lines (33 loc) · 969 Bytes
/
chessmanualwidget.cpp
File metadata and controls
39 lines (33 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "chessmanualwidget.h"
#include "chessmanual.h"
#include "chesslog.h"
#include <QLabel>
#include <QTextEdit>
#include <QVBoxLayout>
ChessManualWidget * ChessManualWidget::INSTANCE = 0;
ChessManualWidget * ChessManualWidget::instance()
{
if(!INSTANCE)
{
INSTANCE = new ChessManualWidget;
}
return INSTANCE;
}
ChessManualWidget::ChessManualWidget(QWidget *parent) :
QWidget(parent)
{
// 棋谱
titleLabel = new QLabel(QString::fromUtf8("\xe6\xa3\x8b\xe8\xb0\xb1"));
manualTextEdit = new QTextEdit;
manualTextEdit->setReadOnly(true);
manualTextEdit->document()->setMaximumBlockCount(1200);
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(titleLabel);
layout->addWidget(manualTextEdit);
setLayout(layout);
Chess_Trace(tr("new ChessManualWidget"));
}
ChessManualWidget::~ChessManualWidget()
{
Chess_Trace(tr("delete ChessManualWidget"));
}