-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmainwindow.h
More file actions
151 lines (101 loc) · 3.05 KB
/
Copy pathmainwindow.h
File metadata and controls
151 lines (101 loc) · 3.05 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <qtreewidget.h>
#include <qtablewidget.h>
#include <idatabasepp.hpp>
#include <QLabel>
#include <QProgressBar>
#include "framelesswindow.h"
#include "StrTable/GStringTable.h"
#include "ext/ZCharScanner.h"
#include "ext/ZDFS.h"
#include <utility>
#include "searchwindow.h"
namespace ZTUtil{
template<typename Tp>
Tp IStrStreamConv(const std::wstring& Arg);
}
namespace Ui {
class MainWindow;
}
struct cabvr
{
GString abvr;
GString cname;
};
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
const char* args;
void OpenFromArgs(const char* path);
FramelessWindow* pParent;
int findTab(const QString& name);
void uprog(int in);
void umax(int in);
void ResetEntry(QTableWidgetItem* pItem);
private slots:
void on_actionOpen_triggered();
void on_treeTables_itemDoubleClicked(QTreeWidgetItem *item, int column);
void on_actionSave_triggered();
void on_actionAdd_triggered();
void on_actionDuplicate_triggered();
void on_actionRemove_triggered();
void on_tabWidget_currentChanged(int index);
void on_tabWidget_tabCloseRequested(int index);
void on_actionEdit_Columns_triggered();
void on_actionSearch_triggered();
void on_actionClear_triggered();
void on_actionICSV_triggered();
void on_actionECSV_triggered();
void on_actionSave_As_triggered();
void on_actVtable_triggered();
void on_actAMulCol_triggered();
void on_actionAssociate_file_format_triggered();
void on_actGoToStrT_triggered();
void on_actionExport_Region_Control_triggered();
private:
DBManager Database;
ZDFS FileSys;
void LoadAbvrs();
vector<cabvr> Abrs;
int maxstrid;
QTableWidget* twStrTb;
QString GetStrID(const QString& ids);
pair<FramelessWindow*,SearchWindow*> pSearchWindow;
ZTable ZTFromStrEntry(const GString& strename,vector<StrEntry>& strev);
vector<StrEntry> StrEntryFromZT(ZTable & ztstr);
GStringTable m_StringTable;
// ID of the current TAB that holds the table.
int ctid;
void SetControls(bool ctrls);
bool Associate();
void CheckForAssoc();
GString PDelim;
QStringList nullh;
void BuildDatabaseTree();
QString CurrentFileName;
QString CurrentFullFilePath;
void LoadTable(ZTable &tab);
void Save();
std::vector<ZTable> OpenTables;
int GetOpenTable(const GString& tbnam);
bool GetTable(const GString& TableName,ZTable& table_out);
GString ctName;
ZTable& GetCurrentTable();
void SaveCTChanges();
bool loading;
QTreeWidgetItem* addTreeRoot(QString name,QIcon ico);
QTreeWidgetItem* addTreeChild(QTreeWidgetItem *parent,QString name,QIcon ico);
QLabel* statusLabel;
QProgressBar* statusProgressBar;
QTreeWidget* treeUndo;
void SError(const QString& caption,const QString& title = "Error" );
Ui::MainWindow *ui;
QTreeWidget* treeTables;
QTableWidget* Table;
};
#endif // MAINWINDOW_H