undowidget.h
来自「Qt4源代码,详细介绍了Qt4编程中的范例」· C头文件 代码 · 共 41 行
H
41 行
#ifndef UNDOWIDGET_H_
#define UNDOWIDGET_H_
#include <QTableWidget>
#include <QUndoStack>
class UndoWidget : public QTableWidget
{
Q_OBJECT
public:
QUndoStack *undoStack;
UndoWidget(QWidget * parent = 0);
virtual ~UndoWidget();
public slots:
void undo();
void redo();
protected slots:
void changeFrgColor();
void changeBkgColor();
void changeFont();
//void recordText(QTableWidgetItem *current, QTableWidgetItem* /*previous*/);
void recordText(QTableWidgetItem *current);
void itemEdited(QTableWidgetItem* item);
private:
QAction *actFrgColor;
QAction *actBkgColor;
QAction *actFont;
QString currentText;
bool ignore;
void populateTable();
void createActions();
};
#endif /*UNDOWIDGET_H_*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?