-
Notifications
You must be signed in to change notification settings - Fork 1
/
etimologywindow.h
47 lines (40 loc) · 1.09 KB
/
etimologywindow.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
#ifndef ETIMOLOGYWINDOW_H
#define ETIMOLOGYWINDOW_H
#include <QWidget>
#include <QDialog>
#include <QSqlDatabase>
#include <QSqlQueryModel>
#include "dictglobalattributes.h"
namespace Ui {
class EtimologyWindow;
}
class EtimologyWindow : public QDialog
{
Q_OBJECT
QVariant wordid;
QVariant wordtranscription;
QVariant tag;
QSqlDatabase db;
QSqlQueryModel *model;
QSqlQueryModel *wordsmodel;
QSet<DictGlobalAttributes> * dictsOpened;
QSet<QString> connectionNamesForDicts;
QList<QPair<QString, QVariant> > wordsToConnect;
QString wordsModelQuery;
public:
explicit EtimologyWindow(QVariant _wordid, QVariant _word_transcription, QVariant _etimology_tag, QSqlDatabase _currentDb, QSet<DictGlobalAttributes> * _dictsOpened, QWidget *parent = 0);
~EtimologyWindow();
signals:
bool goToWordInDict(QString dict, QVariant id);
private slots:
bool findWords();
bool openDbAndAddConnection();
bool unlink();
bool goToSelected();
private:
Ui::EtimologyWindow *ui;
void setupModel();
bool checkConnectedDatabases();
bool prepareForConnection();
};
#endif // ETIMOLOGYWINDOW_H