blob: b5bd3c7125d12c2b04e27cc2c443dc4bf16b1a9f (
plain)
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
40
41
42
43
44
45
46
|
#ifndef DICTIONARYTABWIDGET_H
#define DICTIONARYTABWIDGET_H
#include <QtCore>
#include <QtWidgets>
class MainWindow;
class FilterBar;
class DictTableModel;
class DictTableView;
class Dictionary;
class DictionaryTabWidget : public QTabWidget
{
Q_OBJECT
public:
DictionaryTabWidget(MainWindow* aMainWin);
int addDictTab( DictTableModel* aDictModel );
void setCurrentIndex( int aTabIx );
void goToDictionaryRecord( int aDictIx, int aRecordRow );
void cleanUndoStack();
void showContinueSearch();
const DictTableView* curDictView() const;
QUndoGroup* undoGroup() const { return m_undoGroup; }
bool undoStackIsClean() const;
bool isInEditingState() const { return createdEditorsNum > 0; }
public slots:
void closeTab( int aIndex = -1 );
private slots:
void createEditor();
void destroyEditor();
signals:
void editingStateChanged();
private:
MainWindow* m_mainWin; // parent, now own
QUndoGroup* m_undoGroup;
QLabel* m_continueLbl; // Continue search icon
int createdEditorsNum;
};
#endif // DICTIONARYTABWIDGET_H
|