📄 tip.cpp
字号:
/** tip.cpp*/#include "tip.h"#include "board.h"#include "qgo.h"/** Tip*//* UNUSEDTip::Tip(QWidget *parent): QToolTip(parent){}Tip::~Tip(){}void Tip::maybeTip(const QPoint &pos){ if (!setting->readBoolEntry("BOARD_COORDS_TIP")) return; int x = ((Board*)parentWidget())->getCurrentX(), y = ((Board*)parentWidget())->getCurrentY(); if (x == -1 || y == -1) return; tip(QRect(pos.x(), pos.y(), 1, 1), QString(QChar(static_cast<const char>('A' + (x<9?x:x+1) - 1))) + // A -> T (skip I) " " + QString::number(((Board*)parentWidget())->getBoardSize()-y+1)); // 19 -> 1}*//** StatusTip*/StatusTip::StatusTip(QWidget *parent): QLabel(parent){ setAlignment(AlignCenter | SingleLine);}StatusTip::~StatusTip(){}void StatusTip::slotStatusTipCoords(int x, int y, int board_size, bool SGFCoords){ emit clearStatusBar(); QString t1,t2; if(SGFCoords) { t1 = QString(QChar(static_cast<const char>('a' + x-1))); t2 = QString(QChar(static_cast<const char>('a' + y-1))); } else { t1 = QString(QChar(static_cast<const char>('A' + (x<9?x:x+1) - 1))); t2 = QString::number(board_size - y+1); } setText(" " + t1 + //QString(QChar(static_cast<const char>('A' + (x<9?x:x+1) - 1))) + // A -> T (skip I) " " + t2 +//QString::number(board_size-y+1) + " "); // 19 -> 1}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -