|
中国象棋控件 v2.0.13
|
中国象棋窗体,完成中国象棋的界面 更多...
#include <FrmChineseChess.h>
信号 | |
| void | sigGoChess (int i, int j, CPiece::ENUM_QiZi chess) |
Public 成员函数 | |
| CFrmChineseChess (QWidget *parent=nullptr) | |
| QDateTime | GetStartTime () |
| int | SetStartTime (const QDateTime &t) |
| QDateTime | GetEndTime () |
| int | SetEndTime (const QDateTime &t) |
| QString | GetRedName () |
| int | SetRedName (const QString &name) |
| QString | GetBlackName () |
| int | SetBlackName (const QString &name) |
| void | AboutBox () |
Public 成员函数 继承自 CChineseChess | |
| int | SetBoardLayout (ENUM_BoardLayout layout) |
| ENUM_BoardLayout | GetBoardLayout () |
| bool | GoChess (int i, int j, bool bNext=false) |
| 走棋 | |
| int | NextStep () |
| 函数名:NextStep 功 能:下步棋 参 数:无 返回值:走棋步数 作 者:康 林 版 本:1.0.0.1 日 期:2004-10-5 时 间:10:19:33 | |
| int | PreviouStep () |
| 函数名:PreviouStep 功 能:上步棋 参 数:无 返回值:走棋步数 作 者:康 林 版 本:1.0.0.1 日 期:2004-10-5 时 间:10:19:51 | |
| virtual int | SaveChessGame (const char *pszFile) |
| 保存棋局。 根据文件扩展名来保存为相应的格式。 当前支持自定义格式、PGN格式 | |
| virtual int | LoadChessGame (const char *pszFile) |
| 加载棋局。 根据文件扩展名来解析文件的格式。 当前支持自定义格式、PGN格式 | |
| time_t | GetStartTime () |
| int | SetStartTime (const time_t &t) |
| time_t | GetEndTime () |
| int | SetEndTime (const time_t &t) |
| std::string | GetRedName () |
| int | SetRedName (const char *pszName) |
| std::string | GetBlackName () |
| int | SetBlackName (const char *pszName) |
| std::string | GetGameTag (const std::string &tag) |
| int | AddGameTag (const std::string &szTag, const std::string &szVal) |
| int | EnablePromptSound (bool sound=true) |
| bool | getEnablePromptSound () |
| int | EnablePromptMessage (bool bMsg=true) |
| bool | getEnablePromptMessage () |
静态 Public 成员函数 | |
| static int | InitResource (const QString szLanguage) |
| 初始化资源,仅在程序开始时调用一次 | |
| static int | CleanResource () |
| 清理资源,仅在程序结束时调用一次 | |
Protected 成员函数 | |
| virtual void | mouseReleaseEvent (QMouseEvent *event) override |
| virtual void | paintEvent (QPaintEvent *event) override |
| virtual void | resizeEvent (QResizeEvent *event) override |
| virtual int | onPromptSound (PROMPT_SOUND sound) override |
| virtual int | onPromptMessage (CGoRule::ENUM_ReturnValue val) override |
| 提示错误消息 | |
| virtual int | onCleanPrompt (int i, int j) override |
| 清除提示框 | |
| virtual int | onDrawPrompt (int i, int j) override |
| 画提示框 | |
| virtual int | onGoChess (int i, int j, CPiece::ENUM_QiZi chess) override |
| 走棋事件 | |
Protected 成员函数 继承自 CChineseChess | |
| int | CleanPrompt (int &i, int &j) |
| 清理提示,并把提示框位置设置成无效值 | |
| bool | IsValidPosition (int i, int j) |
| int | Initial () |
| int | ConvertQiPang (const int &i, const int &j, int &x, int &y) |
属性 | |
| QString | RedName |
| QString | BlackName |
| QDateTime | StartTime |
| QDateTime | EndTime |
额外继承的成员函数 | |
Public 类型 继承自 CChineseChess | |
| enum | _ENUM_BoardLayout { NoQi = 0 , OnlyTopBlack = 1 , OnlyBottomRed = 2 , SwapRedBetweenBlack = 4 , OnlyTopRed = OnlyBottomRed | SwapRedBetweenBlack , OnlyBottomBlack = OnlyTopBlack | SwapRedBetweenBlack , TopBlackAndBottomRed = OnlyTopBlack | OnlyBottomRed , TopRedAndBottomBlack = TopBlackAndBottomRed | SwapRedBetweenBlack } |
| 标准棋盘布局:详见《象棋竞赛规则(2011)》第一章 第1条。红棋在下,黑棋在上。 界面可以支持非标准棋盘布局(红在上,黑在下) 更多... | |
| typedef enum CChineseChess::_ENUM_BoardLayout | ENUM_BoardLayout |
| 标准棋盘布局:详见《象棋竞赛规则(2011)》第一章 第1条。红棋在下,黑棋在上。 界面可以支持非标准棋盘布局(红在上,黑在下) | |
Protected 类型 继承自 CChineseChess | |
| enum | PROMPT_SOUND { JiangJun , Eat , Go , NoGo , Select } |
| 提示音 更多... | |
| enum | _ENUM_WalkState { RedReadly , RedWalked , BlackReadly , BlackWalked } |
| typedef enum CChineseChess::_ENUM_WalkState | ENUM_WalkState |
Protected 属性 继承自 CChineseChess | |
| CPiece::ENUM_QiZi | m_ChessBoard [9][10] |
| 棋盘描述 | |
| ENUM_BoardLayout | m_BoardLayout |
| ENUM_WalkState | m_WalkState |
| int | m_PreviouPositionX |
| int | m_PreviouPositionY |
| int | m_CurrentPositionX |
| int | m_CurrentPositionY |
中国象棋窗体,完成中国象棋的界面
在文件 FrmChineseChess.h 第 23 行定义.
|
explicit |
在文件 FrmChineseChess.cpp 第 18 行定义.
|
overridevirtual |
在文件 FrmChineseChess.cpp 第 72 行定义.
| void CFrmChineseChess::AboutBox | ( | ) |
在文件 FrmChineseChess.cpp 第 214 行定义.
|
static |
清理资源,仅在程序结束时调用一次
在文件 FrmChineseChess.cpp 第 94 行定义.
| QString CFrmChineseChess::GetBlackName | ( | ) |
在文件 FrmChineseChess.cpp 第 258 行定义.
| QDateTime CFrmChineseChess::GetEndTime | ( | ) |
在文件 FrmChineseChess.cpp 第 236 行定义.
| QString CFrmChineseChess::GetRedName | ( | ) |
在文件 FrmChineseChess.cpp 第 248 行定义.
| QDateTime CFrmChineseChess::GetStartTime | ( | ) |
在文件 FrmChineseChess.cpp 第 223 行定义.
|
static |
|
overrideprotectedvirtual |
在文件 FrmChineseChess.cpp 第 105 行定义.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
实现了 CChineseChess.
在文件 FrmChineseChess.cpp 第 135 行定义.
|
overrideprotectedvirtual |
在文件 FrmChineseChess.cpp 第 119 行定义.
|
overrideprotectedvirtual |
在文件 FrmChineseChess.cpp 第 129 行定义.
| int CFrmChineseChess::SetBlackName | ( | const QString & | name | ) |
在文件 FrmChineseChess.cpp 第 263 行定义.
| int CFrmChineseChess::SetEndTime | ( | const QDateTime & | t | ) |
在文件 FrmChineseChess.cpp 第 243 行定义.
| int CFrmChineseChess::SetRedName | ( | const QString & | name | ) |
在文件 FrmChineseChess.cpp 第 253 行定义.
| int CFrmChineseChess::SetStartTime | ( | const QDateTime & | t | ) |
在文件 FrmChineseChess.cpp 第 231 行定义.
|
readwrite |
在文件 FrmChineseChess.h 第 28 行定义.
|
readwrite |
在文件 FrmChineseChess.h 第 30 行定义.
|
readwrite |
在文件 FrmChineseChess.h 第 27 行定义.
|
readwrite |
在文件 FrmChineseChess.h 第 29 行定义.