-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtabcontents.h
101 lines (83 loc) · 2.3 KB
/
tabcontents.h
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#ifndef TABCONTENTS_H
#define TABCONTENTS_H
#include <QWidget>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlRelationalTableModel>
#include <QAction>
#include <QModelIndex>
#include "dictglobalattributes.h"
#include "dictentry.h"
#include "editablesqlmodel.h"
namespace Ui {
class TabContents;
}
class TabContents : public QWidget
{
protected:
Q_OBJECT
DictGlobalAttributes dictAttrs;
QSqlDatabase db;
QSqlTableModel *dictModel;
QSqlTableModel *soundsModel;
QSqlTableModel *praatModel;
bool soundChosen;
bool praatChosen;
bool praatRightChosen;
QString soundFilename;
QString praatFilenameMarkup;
QString praatFilenameSound;
QString praatRightFormFilenameMarkup;
QString praatRightFormFilenameSound;
QString praatRightFormDescription;
QAction* copyAction;
QList <QPair <QVariant, QString> > praatListToSave;
QModelIndexList lastSearchResults;
QListIterator <QModelIndex> * currentResult;
QSet<DictGlobalAttributes> * dictsOpened;
public:
explicit TabContents(DictGlobalAttributes _dictAttrs, QSet<DictGlobalAttributes> * _dictsOpened, QWidget *parent = 0);
~TabContents();
DictGlobalAttributes & getDictAttrs();
signals:
void search_activated();
public slots:
bool submitWord();
bool showLegend();
bool showEtimology();
bool showParadigm();
bool showPlay();
bool showPhonology();
bool showTales();
bool filterBlobs();
bool chooseSound();
bool choosePraat();
bool choosePraatRight();
bool checkPraatRightDescription();
bool submitRightPraat();
bool sendToPraat();
bool saveChangesInPraat();
bool updateModel();
virtual bool showFiles(bool isShown=true);
virtual bool showForms(bool isShown=true);
virtual bool showActionsOnDict(bool isShown=true);
virtual bool showActionsOnWord(bool isShown=true);
bool copySelectedToClipboard();
bool simpleSearch();
bool simpleSearchNext();
bool simpleSearchPrevious();
bool simpleReplaceCurrent();
bool deletePraat();
bool deleteSound();
bool deleteEntry();
bool goToWord(QVariant id);
protected:
Ui::TabContents *ui;
DictEntry readFields();
void clearForms(void);
void initializeDictModel(QSqlTableModel *model);
void initializeSoundsModel(QSqlTableModel *model);
void initializePraatModel(QSqlTableModel *model);
bool isValidInput(void);
};
#endif // TABCONTENTS_H