├── QRC.qrc
├── README.md
├── about_us.h
├── acanoe_brower.pro
├── acanoe_brower.pro.user
├── backup
├── 20131221133903267
├── 20131223161424097
├── 20131223173549305
├── 20131224092413208
├── 20131226143316031
├── 20131226144907088
├── 20131226145621986
├── 20131230100234966
├── 20131230105146124
├── 20140108153711466
├── 20140317160704277
├── init20131230110431434
└── init20131230111633915
├── configure.cpp
├── configure.h
├── content_widget.cpp
├── content_widget.h
├── excelengine.cpp
├── excelengine.h
├── excelengine_1.cpp
├── excelengine_1.h
├── git_push.sh
├── gmpmath.cpp
├── gmpmath.h
├── img
├── heart.svg
├── safe - 副本.png
├── safe.ico
├── safe.png
├── storage.ico
├── storage.svg
└── sysButton
│ ├── arrow_down.png
│ ├── close.png
│ ├── close_button.png
│ ├── main_menu.png
│ ├── max_button.png
│ ├── min_button.png
│ └── skin_button.png
├── include
├── gmp.h
└── gmpxx.h
├── input_dialg.cpp
├── lib
├── libgmp.a
├── libgmp.la
├── libgmpxx.a
└── libgmpxx.la
├── main.cpp
├── main_menu.cpp
├── main_menu.h
├── mainwindow.cpp
├── mainwindow.h
├── push_button.cpp
├── push_button.h
├── release
├── acanoe_brower.exe
├── configure.o
├── content_widget.o
├── excelengine.o
├── excelengine_1.o
├── gmpmath.o
├── input_dialg.o
├── main.o
├── main_menu.o
├── mainwindow.o
├── moc_about_us.cpp
├── moc_about_us.o
├── moc_configure.cpp
├── moc_configure.o
├── moc_content_widget.cpp
├── moc_content_widget.o
├── moc_excelengine.cpp
├── moc_excelengine.o
├── moc_excelengine_1.cpp
├── moc_excelengine_1.o
├── moc_main_menu.cpp
├── moc_main_menu.o
├── moc_mainwindow.cpp
├── moc_mainwindow.o
├── moc_push_button.cpp
├── moc_push_button.o
├── moc_system_tray.cpp
├── moc_system_tray.o
├── moc_test.cpp
├── moc_test.o
├── moc_title_widget.cpp
├── moc_title_widget.o
├── moc_toolswidget.cpp
├── moc_toolswidget.o
├── push_button.o
├── qrc_QRC.cpp
├── qrc_QRC.o
├── sqlapi.o
├── storage_back.exe
├── storage_res.o
├── system_tray.o
├── test.o
├── title_widget.o
└── toolswidget.o
├── skin
├── style0.qss
├── style1.qss
├── style2.qss
├── style3.qss
├── style4.qss
└── style5.qss
├── sql
├── nbut - 副本.zh
└── nbut.zh
├── sqlapi.cpp
├── sqlapi.h
├── storage.ico
├── storage.rc
├── storageconfigure.xml
├── system_tray.cpp
├── system_tray.h
├── test.cpp
├── test.h
├── title_widget.cpp
├── title_widget.h
├── toolswidget.cpp
└── toolswidget.h
/QRC.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | img/sysButton/skin_button.png
4 | img/sysButton/main_menu.png
5 | img/sysButton/min_button.png
6 | img/sysButton/max_button.png
7 | img/sysButton/close_button.png
8 | img/sysButton/close.png
9 |
10 |
11 | img/safe.png
12 | img/heart.svg
13 | img/storage.svg
14 | img/storage.ico
15 |
16 |
17 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | stroage
2 | =======
3 |
4 | qt stroage manage
5 |
--------------------------------------------------------------------------------
/about_us.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/about_us.h
--------------------------------------------------------------------------------
/acanoe_brower.pro:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------
2 | #
3 | # Project created by QtCreator 2013-11-18T17:56:49
4 | #
5 | #-------------------------------------------------
6 |
7 |
8 | QT += core gui
9 | QT += sql
10 |
11 | QT += core gui
12 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
13 |
14 | win32:LIBS += -lsetupapi
15 | LIBS += -lws2_32
16 |
17 |
18 | INCLUDEPATH += $$quote(Z:\share\code\qt\acanoe_brower\include)
19 | INCLUDEPATH += C:\inc
20 |
21 | LIBS += $$quote(Z:\share\code\qt\acanoe_brower\lib\libgmp.a)
22 | LIBS += $$quote(Z:\share\code\qt\acanoe_brower\lib\libgmpxx.a)
23 |
24 | CONFIG += qaxcontainer
25 |
26 |
27 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
28 |
29 | TARGET = acanoe_brower
30 | TEMPLATE = app
31 |
32 |
33 | SOURCES += main.cpp\
34 | mainwindow.cpp \
35 | title_widget.cpp \
36 | content_widget.cpp \
37 | push_button.cpp \
38 | sqlapi.cpp \
39 | configure.cpp \
40 | toolswidget.cpp \
41 | system_tray.cpp \
42 | input_dialg.cpp \
43 | gmpmath.cpp \
44 | main_menu.cpp \
45 | test.cpp \
46 | excelengine.cpp
47 |
48 | HEADERS += mainwindow.h \
49 | title_widget.h \
50 | content_widget.h \
51 | push_button.h \
52 | sqlapi.h \
53 | configure.h \
54 | toolswidget.h \
55 | system_tray.h \
56 | about_us.h \
57 | gmpmath.h \
58 | main_menu.h \
59 | test.h \
60 | excelengine.h
61 |
62 | RESOURCES += \
63 | QRC.qrc
64 |
65 | OTHER_FILES += \
66 | storage.rc
67 | RC_FILE = \
68 | storage.rc
69 |
--------------------------------------------------------------------------------
/acanoe_brower.pro.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ProjectExplorer.Project.ActiveTarget
7 | 0
8 |
9 |
10 | ProjectExplorer.Project.EditorSettings
11 |
12 | true
13 | false
14 | true
15 |
16 | Cpp
17 |
18 | CppGlobal
19 |
20 |
21 |
22 | QmlJS
23 |
24 | QmlJSGlobal
25 |
26 |
27 | 2
28 | UTF-8
29 | false
30 | 4
31 | false
32 | true
33 | 1
34 | true
35 | 0
36 | true
37 | 0
38 | 8
39 | true
40 | 1
41 | true
42 | true
43 | true
44 | false
45 |
46 |
47 |
48 | ProjectExplorer.Project.PluginSettings
49 |
50 |
51 |
52 | ProjectExplorer.Project.Target.0
53 |
54 | Desktop Qt 5.2.1 MinGW 32bit
55 | Desktop Qt 5.2.1 MinGW 32bit
56 | qt.521.win32_mingw48.essentials_kit
57 | 0
58 | 0
59 | 0
60 |
61 | Z:/share/code/qt/build-acanoe_brower-Desktop_Qt_5_2_1_MinGW_32bit-Debug
62 |
63 |
64 | true
65 | qmake
66 |
67 | QtProjectManager.QMakeBuildStep
68 | false
69 | true
70 |
71 | false
72 |
73 |
74 | true
75 | Make
76 |
77 | Qt4ProjectManager.MakeStep
78 |
79 | false
80 |
81 |
82 |
83 | 2
84 | 构建
85 |
86 | ProjectExplorer.BuildSteps.Build
87 |
88 |
89 |
90 | true
91 | Make
92 |
93 | Qt4ProjectManager.MakeStep
94 |
95 | true
96 | clean
97 |
98 |
99 | 1
100 | 清理
101 |
102 | ProjectExplorer.BuildSteps.Clean
103 |
104 | 2
105 | false
106 |
107 | Debug
108 |
109 | Qt4ProjectManager.Qt4BuildConfiguration
110 | 2
111 | true
112 |
113 |
114 | Z:/share/code/qt/build-acanoe_brower-Desktop_Qt_5_2_1_MinGW_32bit-Release
115 |
116 |
117 | true
118 | qmake
119 |
120 | QtProjectManager.QMakeBuildStep
121 | false
122 | true
123 |
124 | false
125 |
126 |
127 | true
128 | Make
129 |
130 | Qt4ProjectManager.MakeStep
131 |
132 | false
133 |
134 |
135 |
136 | 2
137 | 构建
138 |
139 | ProjectExplorer.BuildSteps.Build
140 |
141 |
142 |
143 | true
144 | Make
145 |
146 | Qt4ProjectManager.MakeStep
147 |
148 | true
149 | clean
150 |
151 |
152 | 1
153 | 清理
154 |
155 | ProjectExplorer.BuildSteps.Clean
156 |
157 | 2
158 | false
159 |
160 | Release
161 |
162 | Qt4ProjectManager.Qt4BuildConfiguration
163 | 0
164 | true
165 |
166 | 2
167 |
168 |
169 | 0
170 | 部署
171 |
172 | ProjectExplorer.BuildSteps.Deploy
173 |
174 | 1
175 | 在本地部署
176 |
177 | ProjectExplorer.DefaultDeployConfiguration
178 |
179 | 1
180 |
181 |
182 |
183 | false
184 | false
185 | false
186 | false
187 | true
188 | 0.01
189 | 10
190 | true
191 | 1
192 | 25
193 |
194 | 1
195 | true
196 | false
197 | true
198 | valgrind
199 |
200 | 0
201 | 1
202 | 2
203 | 3
204 | 4
205 | 5
206 | 6
207 | 7
208 | 8
209 | 9
210 | 10
211 | 11
212 | 12
213 | 13
214 | 14
215 |
216 | 2
217 |
218 | acanoe_brower
219 |
220 | Qt4ProjectManager.Qt4RunConfiguration:Z:/share/code/qt/acanoe_brower/acanoe_brower.pro
221 |
222 | acanoe_brower.pro
223 | false
224 | false
225 |
226 | 3768
227 | true
228 | false
229 | false
230 | false
231 | true
232 |
233 | 1
234 |
235 |
236 |
237 | ProjectExplorer.Project.TargetCount
238 | 1
239 |
240 |
241 | ProjectExplorer.Project.Updater.EnvironmentId
242 | {527b96c5-6b5d-425a-bdc4-ba80c3db4010}
243 |
244 |
245 | ProjectExplorer.Project.Updater.FileVersion
246 | 15
247 |
248 |
249 |
--------------------------------------------------------------------------------
/backup/20131221133903267:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/backup/20131221133903267
--------------------------------------------------------------------------------
/backup/20131223161424097:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/backup/20131223161424097
--------------------------------------------------------------------------------
/backup/20131223173549305:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/backup/20131223173549305
--------------------------------------------------------------------------------
/backup/20131224092413208:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/backup/20131224092413208
--------------------------------------------------------------------------------
/backup/20131226143316031:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/backup/20131226143316031
--------------------------------------------------------------------------------
/backup/20131226144907088:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/backup/20131226144907088
--------------------------------------------------------------------------------
/backup/20131226145621986:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/backup/20131226145621986
--------------------------------------------------------------------------------
/backup/20131230100234966:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/backup/20131230100234966
--------------------------------------------------------------------------------
/backup/20131230105146124:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/backup/20131230105146124
--------------------------------------------------------------------------------
/backup/20140108153711466:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/backup/20140108153711466
--------------------------------------------------------------------------------
/backup/20140317160704277:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/backup/20140317160704277
--------------------------------------------------------------------------------
/backup/init20131230110431434:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/backup/init20131230110431434
--------------------------------------------------------------------------------
/backup/init20131230111633915:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/backup/init20131230111633915
--------------------------------------------------------------------------------
/configure.cpp:
--------------------------------------------------------------------------------
1 | #include "configure.h"
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 |
9 |
10 | Configure::Configure(QObject *parent) :
11 | QObject(parent)
12 | {
13 | }
14 |
15 |
16 | xmlconfigure_t Configure::readconfigure()
17 | {
18 | xmlconfigure_t xml;
19 | QDir dir(QDir::currentPath());
20 | QString tmp = dir.absolutePath();
21 | qDebug() << "QDir::currentPath()" << tmp;
22 | QSettings settings("huachen","display");
23 | // QFile file("D:\\testftpconfigure.xml");
24 | QFile file(tmp + "/" +"storageconfigure.xml");
25 | if(file.open(QIODevice::ReadOnly | QIODevice::Text))
26 | {
27 | QXmlStreamReader reader(&file);
28 | while (!reader.atEnd())
29 | {
30 | if(reader.isStartElement())
31 | {
32 | if(reader.name() == "FromCapPath")
33 | {
34 | xml.FromCapPath = reader.readElementText();
35 | settings.setValue("FromCapPath",xml.FromCapPath);
36 | qDebug() << "1" << xml.FromCapPath;
37 | }else if(reader.name() == "FromCivilPath")
38 | {
39 | xml.FromCivilPath = reader.readElementText();
40 | settings.setValue("FromCivilPath",xml.FromCivilPath);
41 | qDebug() << "2" << xml.FromCivilPath;
42 | }else if(reader.name() == "FromEarthquakePath")
43 | {
44 | xml.FromEarthquakePath = reader.readElementText();
45 | settings.setValue("FromEarthquakePath",xml.FromEarthquakePath);
46 | qDebug() << "3" << xml.FromEarthquakePath;
47 | }else if(reader.name() == "FromForestryPath")
48 | {
49 | xml.FromForestryPath = reader.readElementText();
50 | settings.setValue("FromForestryPath",xml.FromForestryPath);
51 | qDebug() << "4" << xml.FromForestryPath;
52 | }else if(reader.name() == "FromSeaPath")
53 | {
54 | xml.FromSeaPath = reader.readElementText();
55 | settings.setValue("FromSeaPath",xml.FromSeaPath);
56 | qDebug() << "5" << xml.FromSeaPath;
57 | }else if(reader.name() == "FromWaterPath")
58 | {
59 | xml.FromWaterPath = reader.readElementText();
60 | settings.setValue("FromWaterPath",xml.FromWaterPath );
61 | qDebug() << "6" << xml.FromWaterPath ;
62 | }else if(reader.name() == "FromWeatherPath")
63 | {
64 | xml.FromWeatherPath = reader.readElementText();
65 | settings.setValue("FromWeatherPath",xml.FromWeatherPath);
66 | qDebug() << "7" << xml.FromWeatherPath;
67 | }else if(reader.name() == "UpCapPath")
68 | {
69 | xml.UpCapPath = reader.readElementText();
70 | settings.setValue("UpCapPath",xml.UpCapPath);
71 | qDebug() << "1" << xml.UpCapPath;
72 | }else if(reader.name() == "UpCivilPath")
73 | {
74 | xml.UpCivilPath = reader.readElementText();
75 | settings.setValue("UpCivilPath",xml.UpCivilPath);
76 | qDebug() <<"2" << xml.UpCivilPath;
77 | }else if(reader.name() == "UpEarthquakePath")
78 | {
79 | xml.UpEarthquakePath = reader.readElementText();
80 | settings.setValue("UpEarthquakePath",xml.UpEarthquakePath);
81 | qDebug() <<"3" << xml.UpEarthquakePath;
82 | }else if(reader.name() == "UpForestryPath")
83 | {
84 | xml.UpForestryPath = reader.readElementText();
85 | settings.setValue("UpForestryPath",xml.UpForestryPath);
86 | qDebug() << "4" <setText(QString("open \"./displayconfigure.xml\" error\n please chack the configure file"));
143 | test->setGeometry(500,200,400,100);
144 | test->show();
145 |
146 | xml.FTPIP = "";
147 | return xml;
148 | // emit->error();
149 | }
150 |
151 | }
152 |
153 | //by hanqiang
154 | /*
155 | xmlconfigure_t Configure::GetReadConfigure()
156 | {
157 | }
158 | */
159 |
--------------------------------------------------------------------------------
/configure.h:
--------------------------------------------------------------------------------
1 | #ifndef CONFIGURE_H
2 | #define CONFIGURE_H
3 |
4 | #include
5 | #include
6 |
7 | typedef struct __xmlconfigure{
8 | QString FTPIP;
9 | QString FTPPORT;
10 | QString FTPUSER;
11 | QString FTPPASSWORD;
12 | QString UpCapPath;
13 | QString UpCivilPath;
14 | QString UpEarthquakePath;
15 | QString UpForestryPath;
16 | QString UpSeaPath;
17 | QString UpWaterPath;
18 | QString UpWeatherPath;
19 |
20 | QString FromCapPath;
21 | QString FromCivilPath;
22 | QString FromEarthquakePath;
23 | QString FromForestryPath;
24 | QString FromSeaPath;
25 | QString FromWaterPath;
26 | QString FromWeatherPath;
27 | QString WebserviceIP;
28 | QString WebservicePort;
29 |
30 |
31 | }xmlconfigure_t;
32 |
33 | class Configure : public QObject
34 | {
35 | Q_OBJECT
36 | public:
37 | explicit Configure(QObject *parent = 0);
38 | xmlconfigure_t readconfigure();
39 |
40 | private:
41 |
42 | xmlconfigure_t GetReadConfigure();
43 |
44 |
45 | signals:
46 | // void error();
47 |
48 | private slots:
49 |
50 | };
51 |
52 | #endif // CONFIGURE_H
53 |
--------------------------------------------------------------------------------
/content_widget.h:
--------------------------------------------------------------------------------
1 | #ifndef CONTENT_WIDGET_H
2 | #define CONTENT_WIDGET_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 |
9 | #include "excelengine.h"
10 | #include "sqlapi.h"
11 | #include "configure.h"
12 | #include "QSplitter"
13 | #include "about_us.h"
14 | #include "gmpmath.h"
15 |
16 | //name ,amount ,state ,price ,total_price ,controller ,remark ,time
17 | typedef struct __storage_t{
18 | QString name;
19 | QString price;
20 | QString amount;
21 | QString total_price;
22 | QString state;
23 | QString controller;
24 | QString remark;
25 | QString v_id;
26 | QString signature;
27 | QString time;
28 |
29 | int total_goods;
30 | int total_amount;
31 | QString f_total_price;
32 | }storage_t;
33 |
34 | class ContentWidget : public QWidget
35 | {
36 | Q_OBJECT
37 | public:
38 | explicit ContentWidget(QWidget *parent = 0);
39 | private:
40 | QMap tablewidget_map;
41 | ExcelEngine *excelengine;
42 | QTableWidget *storage_table;
43 | QTableWidget *product_table;
44 | SqlApi *sqlapi;
45 | Configure *configure;
46 |
47 | QWidget *tools_widget;
48 | QWidget *main_widget;
49 | QWidget *left_widget;
50 | QWidget *show_widget;
51 |
52 | QSplitter *main_splitter;
53 | QSplitter *right_splitter;
54 | QSplitter *up_splitter;
55 | QSplitter *down_splitter;
56 | QSqlDatabase db;
57 | QPushButton *btn_plus;
58 | QPushButton *btn_minus;
59 | QPushButton *btn_add;
60 | QPushButton *btn_cancel;
61 | QPushButton *btn_outinto;
62 | QPushButton *btn_delete;
63 | QPushButton *btn_detail;
64 | QPushButton *btn_return;
65 |
66 | QLineEdit * E_name;
67 | QLineEdit * E_price;
68 | QLineEdit * E_amount;
69 | QLineEdit * E_controller;
70 | QLineEdit * E_search;
71 |
72 | AboutUsDialog * inputdialog;
73 | GmpMath *gmpmath;
74 |
75 | int sql_x;
76 | int sql_y;
77 |
78 | bool tab_page; // table 切换标志
79 | bool search_page; // 搜索页标志
80 |
81 | void setToolsWidget();
82 | void setTabWidget();
83 | void setProductTab();
84 | void setStorageTab();
85 | bool sqlInit(bool);
86 |
87 |
88 | bool sqlupdate(storage_t);
89 | void tabShow();
90 | bool sqlminus(storage_t); // 出库
91 | void showwidget(int ,QString);
92 | void slotStyleChange(int StyleString); //透明度
93 | QString gettime();
94 | void backup();
95 |
96 | signals:
97 | void saveExecl(QMap);
98 |
99 | public slots:
100 | storage_t sqlsearch(storage_t);
101 |
102 | bool product_add(storage_t tmp);
103 | void product_show(storage_t tmp);
104 | bool sqlplus(storage_t tmp_tmp); // 入库
105 | bool sqladd(storage_t); // 新增商品
106 | void sqldelete(); // 删除商品
107 | void sqlcancel(); // 撤销操作
108 | void excelSave(); // 导出execl 表格
109 |
110 | void addwidget();
111 | void minuswidget();
112 | void pluswidget();
113 | void saveas();
114 | void product_table_clicked(int,int);
115 | void storage_table_clicked(int,int);
116 | void search();
117 | void back_1();
118 | void detail_1();
119 | void setinput(QStringList,int);
120 | void sqlinit_slot();
121 | void changepasswd_slot();
122 | void btnEnable(bool enabled);
123 |
124 | protected:
125 | virtual void resizeEvent(QResizeEvent *event);
126 | };
127 |
128 | #endif // CONTENT_WIDGET_H
129 |
--------------------------------------------------------------------------------
/excelengine.cpp:
--------------------------------------------------------------------------------
1 | #include "excelengine.h"
2 |
3 | ExcelEngine::ExcelEngine(QObject *parent) :
4 | QObject(parent)
5 | {
6 | pExcel = NULL;
7 | pWorkbooks = NULL;
8 | pWorkbook = NULL;
9 | pWorksheet = NULL;
10 |
11 | sXlsFile = "";
12 | nRowCount = 0;
13 | nColumnCount = 0;
14 | nStartRow = 0;
15 | nStartColumn = 0;
16 |
17 | bIsOpen = false;
18 | bIsValid = false;
19 | bIsANewFile = false;
20 | bIsSaveAlready = false;
21 |
22 | HRESULT r = OleInitialize(0);
23 | if (r != S_OK && r != S_FALSE)
24 | {
25 | qDebug("Qt: Could not initialize OLE (error %x)", (unsigned int)r);
26 | }
27 | // connect(this, SIGNAL(signals_saveExecl(QMap)),this, SLOT(saveExecl(QMap)));
28 | }
29 |
30 | ExcelEngine::ExcelEngine(QString xlsFile)
31 | {
32 | pExcel = NULL;
33 | pWorkbooks = NULL;
34 | pWorkbook = NULL;
35 | pWorksheet = NULL;
36 |
37 | sXlsFile = xlsFile;
38 | nRowCount = 0;
39 | nColumnCount = 0;
40 | nStartRow = 0;
41 | nStartColumn = 0;
42 |
43 | bIsOpen = false;
44 | bIsValid = false;
45 | bIsANewFile = false;
46 | bIsSaveAlready = false;
47 |
48 | HRESULT r = OleInitialize(0);
49 | if (r != S_OK && r != S_FALSE)
50 | {
51 | qDebug("Qt: Could not initialize OLE (error %x)", (unsigned int)r);
52 | }
53 | }
54 |
55 |
56 | ExcelEngine::~ExcelEngine()
57 | {
58 | if ( bIsOpen )
59 | {
60 | //析构前,先保存数据,然后关闭workbook
61 | Close();
62 | }
63 | OleUninitialize();
64 | }
65 |
66 | /**
67 | *@brief 打开sXlsFile指定的excel报表
68 | *@return true : 打开成功
69 | * false: 打开失败
70 | */
71 | bool ExcelEngine::Open(UINT nSheet, bool visible)
72 | {
73 |
74 | if ( bIsOpen )
75 | {
76 | //return bIsOpen;
77 | Close();
78 | }
79 |
80 | nCurrSheet = nSheet;
81 | bIsVisible = visible;
82 |
83 | if ( NULL == pExcel )
84 | {
85 | pExcel = new QAxObject("Excel.Application");
86 | if ( pExcel )
87 | {
88 | bIsValid = true;
89 | }
90 | else
91 | {
92 | bIsValid = false;
93 | bIsOpen = false;
94 | return bIsOpen;
95 | }
96 |
97 | pExcel->dynamicCall("SetVisible(bool)", bIsVisible);
98 | }
99 |
100 | if ( !bIsValid )
101 | {
102 | bIsOpen = false;
103 | return bIsOpen;
104 | }
105 |
106 | if ( sXlsFile.isEmpty() )
107 | {
108 | bIsOpen = false;
109 | return bIsOpen;
110 | }
111 |
112 | /*如果指向的文件不存在,则需要新建一个*/
113 | QFile f(sXlsFile);
114 | if (!f.exists())
115 | {
116 | bIsANewFile = true;
117 | }
118 | else
119 | {
120 | bIsANewFile = false;
121 | }
122 |
123 | if (!bIsANewFile)
124 | {
125 | pWorkbooks = pExcel->querySubObject("WorkBooks"); //获取工作簿
126 | pWorkbook = pWorkbooks->querySubObject("Open(QString, QVariant)",sXlsFile,QVariant(0)); //打开xls对应的工作簿
127 | }
128 | else
129 | {
130 | pWorkbooks = pExcel->querySubObject("WorkBooks"); //获取工作簿
131 | pWorkbooks->dynamicCall("Add"); //添加一个新的工作薄
132 | pWorkbook = pExcel->querySubObject("ActiveWorkBook"); //新建一个xls
133 | }
134 |
135 | pWorksheet = pWorkbook->querySubObject("WorkSheets(int)", nCurrSheet);//打开第一个sheet
136 |
137 | //至此已打开,开始获取相应属性
138 | QAxObject *usedrange = pWorksheet->querySubObject("UsedRange");//获取该sheet的使用范围对象
139 | QAxObject *rows = usedrange->querySubObject("Rows");
140 | QAxObject *columns = usedrange->querySubObject("Columns");
141 |
142 | //因为excel可以从任意行列填数据而不一定是从0,0开始,因此要获取首行列下标
143 | nStartRow = usedrange->property("Row").toInt(); //第一行的起始位置
144 | nStartColumn = usedrange->property("Column").toInt(); //第一列的起始位置
145 |
146 | nRowCount = rows->property("Count").toInt(); //获取行数
147 | nColumnCount = columns->property("Count").toInt(); //获取列数
148 |
149 | bIsOpen = true;
150 | return bIsOpen;
151 | }
152 |
153 | /**
154 | *@brief Open()的重载函数
155 | */
156 | bool ExcelEngine::Open(QString xlsFile, UINT nSheet, bool visible)
157 | {
158 | sXlsFile = xlsFile;
159 | nCurrSheet = nSheet;
160 | bIsVisible = visible;
161 |
162 | return Open(nCurrSheet,bIsVisible);
163 | }
164 |
165 | void ExcelEngine::saveExecl(QMap tmp)
166 | {
167 | if(!Open("test.xls",1,false))
168 | qDebug() << "open xls error";
169 | qDebug() << "ExcelEngine::saveExecl";
170 | if(!SaveDataFrTable(tmp[1])){
171 | qDebug() << "output execl error";
172 | }
173 | this->Close();
174 | // if(!excelengine->Open("test.xls",1,false))
175 | // qDebug() << "open xls error";
176 | }
177 |
178 |
179 | /**
180 | *@brief 保存表格数据,把数据写入文件
181 | */
182 | void ExcelEngine::Save()
183 | {
184 | if ( pWorkbook )
185 | {
186 | if (bIsSaveAlready)
187 | {
188 | return ;
189 | }
190 | // qDebug() << "save as" << sXlsFile;
191 | // pWorkbook->dynamicCall("SaveAs (const QString&,int,const QString&,const QString&,bool,bool)",
192 | // sXlsFile,56,QString(""),QString(""),false,false);
193 |
194 | if (!bIsANewFile)
195 | {
196 | qDebug() << "Save is new file " << sXlsFile;
197 | pWorkbook->dynamicCall("Save()");
198 | }
199 | else /*如果该文档是新建出来的,则使用另存为COM接口*/
200 | {
201 | qDebug() << "save as" << sXlsFile;
202 | // pWorkbook->dynamicCall("SaveAs (const QString&)",
203 | // "d:/code/svn/acanoe_brower/test.xls");
204 |
205 | pWorkbook->dynamicCall("SaveAs (const QString&,int,const QString&,const QString&,bool,bool)",
206 | sXlsFile,56,QString(""),QString(""),false,false);
207 |
208 | }
209 |
210 | bIsSaveAlready = true;
211 | }
212 | }
213 |
214 | /**
215 | *@brief 关闭前先保存数据,然后关闭当前Excel COM对象,并释放内存
216 | */
217 | void ExcelEngine::Close()
218 | {
219 | //关闭前先保存数据
220 | Save();
221 |
222 | if ( pExcel && pWorkbook )
223 | {
224 | pWorkbook->dynamicCall("Close(bool)", true);
225 | pExcel->dynamicCall("Quit()");
226 |
227 | delete pExcel;
228 | pExcel = NULL;
229 |
230 | bIsOpen = false;
231 | bIsValid = false;
232 | bIsANewFile = false;
233 | bIsSaveAlready = true;
234 | }
235 | }
236 |
237 | /**
238 | *@brief 把tableWidget中的数据保存到excel中
239 | *@param tableWidget : 指向GUI中的tablewidget指针
240 | *@return 保存成功与否 true : 成功
241 | * false: 失败
242 | */
243 | bool ExcelEngine::SaveDataFrTable(QTableWidget *tableWidget)
244 | {
245 | if ( NULL == tableWidget )
246 | {
247 | return false;
248 | }
249 | if ( !bIsOpen )
250 | {
251 | return false;
252 | }
253 |
254 | int tableR = tableWidget->rowCount();
255 | int tableC = tableWidget->columnCount();
256 |
257 | //获取表头写做第一行
258 | for (int i=0; ihorizontalHeaderItem(i) != NULL )
261 | {
262 | this->SetCellData(1,i+1,tableWidget->horizontalHeaderItem(i)->text());
263 | }
264 | }
265 |
266 | //写数据
267 | for (int i=0; iitem(i,j) != NULL )
272 | {
273 | this->SetCellData(i+2,j+1,tableWidget->item(i,j)->text());
274 | }
275 | }
276 | }
277 |
278 | qDebug() << " ExcelEngine::SaveDataFrTable " << sXlsFile;
279 | //保存
280 | Save();
281 |
282 | return true;
283 | }
284 |
285 | /**
286 | *@brief 从指定的xls文件中把数据导入到tableWidget中
287 | *@param tableWidget : 执行要导入到的tablewidget指针
288 | *@return 导入成功与否 true : 成功
289 | * false: 失败
290 | */
291 | bool ExcelEngine::ReadDataToTable(QTableWidget *tableWidget)
292 | {
293 | if ( NULL == tableWidget )
294 | {
295 | return false;
296 | }
297 |
298 | //先把table的内容清空
299 | int tableColumn = tableWidget->columnCount();
300 | tableWidget->clear();
301 | for (int n=0; nremoveColumn(0);
304 | }
305 |
306 | int rowcnt = nStartRow + nRowCount;
307 | int columncnt = nStartColumn + nColumnCount;
308 |
309 | //获取excel中的第一行数据作为表头
310 | QStringList headerList;
311 | for (int n = nStartColumn; nquerySubObject("Cells(int,int)",nStartRow, n);
314 | if ( cell )
315 | {
316 | headerList<dynamicCall("Value2()").toString();
317 | }
318 | }
319 |
320 | //重新创建表头
321 | tableWidget->setColumnCount(nColumnCount);
322 | tableWidget->setHorizontalHeaderLabels(headerList);
323 |
324 |
325 | //插入新数据
326 | for (int i = nStartRow+1, r = 0; i < rowcnt; i++, r++ ) //行
327 | {
328 | tableWidget->insertRow(r); //插入新行
329 | for (int j = nStartColumn, c = 0; j < columncnt; j++, c++ ) //列
330 | {
331 | QAxObject * cell = pWorksheet->querySubObject("Cells(int,int)", i, j );//获取单元格
332 |
333 | //在r新行中添加子项数据
334 | if ( cell )
335 | {
336 | tableWidget->setItem(r,c,new QTableWidgetItem(cell->dynamicCall("Value2()").toString()));
337 | }
338 | }
339 | }
340 |
341 | return true;
342 | }
343 |
344 | /**
345 | *@brief 获取指定单元格的数据
346 | *@param row : 单元格的行号
347 | *@param column : 单元格的列号
348 | *@return [row,column]单元格对应的数据
349 | */
350 | QVariant ExcelEngine::GetCellData(UINT row, UINT column)
351 | {
352 | QVariant data;
353 |
354 | QAxObject *cell = pWorksheet->querySubObject("Cells(int,int)",row,column);//获取单元格对象
355 | if ( cell )
356 | {
357 | data = cell->dynamicCall("Value2()");
358 | }
359 |
360 | return data;
361 | }
362 |
363 | /**
364 | *@brief 修改指定单元格的数据
365 | *@param row : 单元格的行号
366 | *@param column : 单元格指定的列号
367 | *@param data : 单元格要修改为的新数据
368 | *@return 修改是否成功 true : 成功
369 | * false: 失败
370 | */
371 | bool ExcelEngine::SetCellData(UINT row, UINT column, QVariant data)
372 | {
373 | bool op = false;
374 |
375 | QAxObject *cell = pWorksheet->querySubObject("Cells(int,int)",row,column);//获取单元格对象
376 | if ( cell )
377 | {
378 | QString strData = data.toString(); //excel 居然只能插入字符串和整型,浮点型无法插入
379 | cell->dynamicCall("SetValue(const QVariant&)",strData); //修改单元格的数据
380 | op = true;
381 | }
382 | else
383 | {
384 | op = false;
385 | }
386 |
387 | return op;
388 | }
389 |
390 | /**
391 | *@brief 清空除报表之外的数据
392 | */
393 | void ExcelEngine::Clear()
394 | {
395 | sXlsFile = "";
396 | nRowCount = 0;
397 | nColumnCount = 0;
398 | nStartRow = 0;
399 | nStartColumn = 0;
400 | }
401 |
402 | /**
403 | *@brief 判断excel是否已被打开
404 | *@return true : 已打开
405 | * false: 未打开
406 | */
407 | bool ExcelEngine::IsOpen()
408 | {
409 | return bIsOpen;
410 | }
411 |
412 | /**
413 | *@brief 判断excel COM对象是否调用成功,excel是否可用
414 | *@return true : 可用
415 | * false: 不可用
416 | */
417 | bool ExcelEngine::IsValid()
418 | {
419 | return bIsValid;
420 | }
421 |
422 | /**
423 | *@brief 获取excel的行数
424 | */
425 | UINT ExcelEngine::GetRowCount()const
426 | {
427 | return nRowCount;
428 | }
429 |
430 | /**
431 | *@brief 获取excel的列数
432 | */
433 | UINT ExcelEngine::GetColumnCount()const
434 | {
435 | return nColumnCount;
436 | }
437 |
--------------------------------------------------------------------------------
/excelengine.h:
--------------------------------------------------------------------------------
1 | #ifndef EXCELENGINE_H
2 | #define EXCELENGINE_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 |
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include "qt_windows.h"
20 |
21 | class ExcelEngine : public QObject
22 | {
23 | Q_OBJECT
24 | public:
25 | explicit ExcelEngine(QObject *parent = 0);
26 | ExcelEngine(QString xlsFile);
27 | ~ExcelEngine();
28 |
29 |
30 | public:
31 | bool Open(UINT nSheet = 1, bool visible = false);//打开xls文件
32 | bool Open(QString xlsFile, UINT nSheet = 1, bool visible = false);
33 | void Save(); //保存xls报表
34 | void Close(); //关闭xls报表
35 |
36 | bool SaveDataFrTable(QTableWidget *tableWidget); //保存数据到xls
37 | bool ReadDataToTable(QTableWidget *tableWidget); //从xls读取数据到ui
38 |
39 | QVariant GetCellData(UINT row, UINT column); //获取指定单元数据
40 | bool SetCellData(UINT row, UINT column, QVariant data); //修改指定单元数据
41 |
42 | UINT GetRowCount()const;
43 | UINT GetColumnCount()const;
44 |
45 | bool IsOpen();
46 | bool IsValid();
47 |
48 | void saveExecl(QMap);
49 |
50 | protected:
51 | void Clear();
52 |
53 | private:
54 | QAxObject *pExcel; //指向整个excel应用程序
55 | QAxObject *pWorkbooks; //指向工作簿集,excel有很多工作簿
56 | QAxObject *pWorkbook; //指向sXlsFile对应的工作簿
57 | QAxObject *pWorksheet; //指向工作簿中的某个sheet表单
58 |
59 | QString sXlsFile; //xls文件路径
60 | UINT nCurrSheet; //当前打开的第几个sheet
61 | bool bIsVisible; //excel是否可见
62 | int nRowCount; //行数
63 | int nColumnCount; //列数
64 | int nStartRow; //开始有数据的行下标值
65 | int nStartColumn; //开始有数据的列下标值
66 | bool bIsOpen; //是否已打开
67 | bool bIsValid; //是否有效
68 | bool bIsANewFile; //是否是一个新建xls文件,用来区分打开的excel是已存在文件还是有本类新建的
69 | bool bIsSaveAlready;//防止重复保存
70 | private slots:
71 | // void saveExecl(QMap);
72 | signals:
73 | void signals_saveExecl(QMap);
74 |
75 |
76 | signals:
77 |
78 | public slots:
79 |
80 | };
81 | #endif // EXCELENGINE_H
82 |
--------------------------------------------------------------------------------
/excelengine_1.cpp:
--------------------------------------------------------------------------------
1 | #include "excelengine_1.h"
2 |
3 | ExcelEngine::ExcelEngine(QWidget *parent) :
4 | QWidget(parent)
5 | {
6 | pExcel = NULL;
7 | pWorkbooks = NULL;
8 | pWorkbook = NULL;
9 | pWorksheet = NULL;
10 |
11 | sXlsFile = "";
12 | nRowCount = 0;
13 | nColumnCount = 0;
14 | nStartRow = 0;
15 | nStartColumn = 0;
16 |
17 | bIsOpen = false;
18 | bIsValid = false;
19 | bIsANewFile = false;
20 | bIsSaveAlready = false;
21 |
22 | HRESULT r = OleInitialize(0);
23 | if (r != S_OK && r != S_FALSE)
24 | {
25 | qDebug("Qt: Could not initialize OLE (error %x)", (unsigned int)r);
26 | }
27 | connect(this, SIGNAL(signals_saveExecl(QMap)),this, SLOT(saveExecl(QMap)));
28 | }
29 |
30 | ExcelEngine::ExcelEngine(QString xlsFile)
31 | {
32 | pExcel = NULL;
33 | pWorkbooks = NULL;
34 | pWorkbook = NULL;
35 | pWorksheet = NULL;
36 |
37 | sXlsFile = xlsFile;
38 | nRowCount = 0;
39 | nColumnCount = 0;
40 | nStartRow = 0;
41 | nStartColumn = 0;
42 |
43 | bIsOpen = false;
44 | bIsValid = false;
45 | bIsANewFile = false;
46 | bIsSaveAlready = false;
47 |
48 | HRESULT r = OleInitialize(0);
49 | if (r != S_OK && r != S_FALSE)
50 | {
51 | qDebug("Qt: Could not initialize OLE (error %x)", (unsigned int)r);
52 | }
53 | }
54 |
55 |
56 | ExcelEngine::~ExcelEngine()
57 | {
58 | if ( bIsOpen )
59 | {
60 | //析构前,先保存数据,然后关闭workbook
61 | Close();
62 | }
63 | OleUninitialize();
64 | }
65 |
66 | /**
67 | *@brief 打开sXlsFile指定的excel报表
68 | *@return true : 打开成功
69 | * false: 打开失败
70 | */
71 | bool ExcelEngine::Open(UINT nSheet, bool visible)
72 | {
73 |
74 | if ( bIsOpen )
75 | {
76 | //return bIsOpen;
77 | Close();
78 | }
79 |
80 | nCurrSheet = nSheet;
81 | bIsVisible = visible;
82 |
83 | if ( NULL == pExcel )
84 | {
85 | pExcel = new QAxObject("Excel.Application");
86 | if ( pExcel )
87 | {
88 | bIsValid = true;
89 | }
90 | else
91 | {
92 | bIsValid = false;
93 | bIsOpen = false;
94 | return bIsOpen;
95 | }
96 |
97 | pExcel->dynamicCall("SetVisible(bool)", bIsVisible);
98 | }
99 |
100 | if ( !bIsValid )
101 | {
102 | bIsOpen = false;
103 | return bIsOpen;
104 | }
105 |
106 | if ( sXlsFile.isEmpty() )
107 | {
108 | bIsOpen = false;
109 | return bIsOpen;
110 | }
111 |
112 | /*如果指向的文件不存在,则需要新建一个*/
113 | QFile f(sXlsFile);
114 | if (!f.exists())
115 | {
116 | bIsANewFile = true;
117 | }
118 | else
119 | {
120 | bIsANewFile = false;
121 | }
122 |
123 | if (!bIsANewFile)
124 | {
125 | pWorkbooks = pExcel->querySubObject("WorkBooks"); //获取工作簿
126 | pWorkbook = pWorkbooks->querySubObject("Open(QString, QVariant)",sXlsFile,QVariant(0)); //打开xls对应的工作簿
127 | }
128 | else
129 | {
130 | pWorkbooks = pExcel->querySubObject("WorkBooks"); //获取工作簿
131 | pWorkbooks->dynamicCall("Add"); //添加一个新的工作薄
132 | pWorkbook = pExcel->querySubObject("ActiveWorkBook"); //新建一个xls
133 | }
134 |
135 | pWorksheet = pWorkbook->querySubObject("WorkSheets(int)", nCurrSheet);//打开第一个sheet
136 |
137 | //至此已打开,开始获取相应属性
138 | QAxObject *usedrange = pWorksheet->querySubObject("UsedRange");//获取该sheet的使用范围对象
139 | QAxObject *rows = usedrange->querySubObject("Rows");
140 | QAxObject *columns = usedrange->querySubObject("Columns");
141 |
142 | //因为excel可以从任意行列填数据而不一定是从0,0开始,因此要获取首行列下标
143 | nStartRow = usedrange->property("Row").toInt(); //第一行的起始位置
144 | nStartColumn = usedrange->property("Column").toInt(); //第一列的起始位置
145 |
146 | nRowCount = rows->property("Count").toInt(); //获取行数
147 | nColumnCount = columns->property("Count").toInt(); //获取列数
148 |
149 | bIsOpen = true;
150 | return bIsOpen;
151 | }
152 |
153 | /**
154 | *@brief Open()的重载函数
155 | */
156 | bool ExcelEngine::Open(QString xlsFile, UINT nSheet, bool visible)
157 | {
158 | sXlsFile = xlsFile;
159 | nCurrSheet = nSheet;
160 | bIsVisible = visible;
161 |
162 | return Open(nCurrSheet,bIsVisible);
163 | }
164 |
165 | void ExcelEngine::saveExecl(QMap tmp)
166 | {
167 | if(!Open("test.xls",1,false))
168 | qDebug() << "open xls error";
169 | qDebug() << "ExcelEngine::saveExecl";
170 | if(!SaveDataFrTable(tmp[1])){
171 | qDebug() << "output execl error";
172 | }
173 | this->Close();
174 | // if(!excelengine->Open("test.xls",1,false))
175 | // qDebug() << "open xls error";
176 | }
177 |
178 |
179 | /**
180 | *@brief 保存表格数据,把数据写入文件
181 | */
182 | void ExcelEngine::Save()
183 | {
184 | if ( pWorkbook )
185 | {
186 | if (bIsSaveAlready)
187 | {
188 | return ;
189 | }
190 | // qDebug() << "save as" << sXlsFile;
191 | // pWorkbook->dynamicCall("SaveAs (const QString&,int,const QString&,const QString&,bool,bool)",
192 | // sXlsFile,56,QString(""),QString(""),false,false);
193 |
194 | if (!bIsANewFile)
195 | {
196 | qDebug() << "Save is new file " << sXlsFile;
197 | pWorkbook->dynamicCall("Save()");
198 | }
199 | else /*如果该文档是新建出来的,则使用另存为COM接口*/
200 | {
201 | qDebug() << "save as" << sXlsFile;
202 | // pWorkbook->dynamicCall("SaveAs (const QString&)",
203 | // "d:/code/svn/acanoe_brower/test.xls");
204 |
205 | pWorkbook->dynamicCall("SaveAs (const QString&,int,const QString&,const QString&,bool,bool)",
206 | sXlsFile,56,QString(""),QString(""),false,false);
207 |
208 | }
209 |
210 | bIsSaveAlready = true;
211 | }
212 | }
213 |
214 | /**
215 | *@brief 关闭前先保存数据,然后关闭当前Excel COM对象,并释放内存
216 | */
217 | void ExcelEngine::Close()
218 | {
219 | //关闭前先保存数据
220 | Save();
221 |
222 | if ( pExcel && pWorkbook )
223 | {
224 | pWorkbook->dynamicCall("Close(bool)", true);
225 | pExcel->dynamicCall("Quit()");
226 |
227 | delete pExcel;
228 | pExcel = NULL;
229 |
230 | bIsOpen = false;
231 | bIsValid = false;
232 | bIsANewFile = false;
233 | bIsSaveAlready = true;
234 | }
235 | }
236 |
237 | /**
238 | *@brief 把tableWidget中的数据保存到excel中
239 | *@param tableWidget : 指向GUI中的tablewidget指针
240 | *@return 保存成功与否 true : 成功
241 | * false: 失败
242 | */
243 | bool ExcelEngine::SaveDataFrTable(QTableWidget *tableWidget)
244 | {
245 | if ( NULL == tableWidget )
246 | {
247 | return false;
248 | }
249 | if ( !bIsOpen )
250 | {
251 | return false;
252 | }
253 |
254 | int tableR = tableWidget->rowCount();
255 | int tableC = tableWidget->columnCount();
256 |
257 | //获取表头写做第一行
258 | for (int i=0; ihorizontalHeaderItem(i) != NULL )
261 | {
262 | this->SetCellData(1,i+1,tableWidget->horizontalHeaderItem(i)->text());
263 | }
264 | }
265 |
266 | //写数据
267 | for (int i=0; iitem(i,j) != NULL )
272 | {
273 | this->SetCellData(i+2,j+1,tableWidget->item(i,j)->text());
274 | }
275 | }
276 | }
277 |
278 | qDebug() << " ExcelEngine::SaveDataFrTable " << sXlsFile;
279 | //保存
280 | Save();
281 |
282 | return true;
283 | }
284 |
285 | /**
286 | *@brief 从指定的xls文件中把数据导入到tableWidget中
287 | *@param tableWidget : 执行要导入到的tablewidget指针
288 | *@return 导入成功与否 true : 成功
289 | * false: 失败
290 | */
291 | bool ExcelEngine::ReadDataToTable(QTableWidget *tableWidget)
292 | {
293 | if ( NULL == tableWidget )
294 | {
295 | return false;
296 | }
297 |
298 | //先把table的内容清空
299 | int tableColumn = tableWidget->columnCount();
300 | tableWidget->clear();
301 | for (int n=0; nremoveColumn(0);
304 | }
305 |
306 | int rowcnt = nStartRow + nRowCount;
307 | int columncnt = nStartColumn + nColumnCount;
308 |
309 | //获取excel中的第一行数据作为表头
310 | QStringList headerList;
311 | for (int n = nStartColumn; nquerySubObject("Cells(int,int)",nStartRow, n);
314 | if ( cell )
315 | {
316 | headerList<dynamicCall("Value2()").toString();
317 | }
318 | }
319 |
320 | //重新创建表头
321 | tableWidget->setColumnCount(nColumnCount);
322 | tableWidget->setHorizontalHeaderLabels(headerList);
323 |
324 |
325 | //插入新数据
326 | for (int i = nStartRow+1, r = 0; i < rowcnt; i++, r++ ) //行
327 | {
328 | tableWidget->insertRow(r); //插入新行
329 | for (int j = nStartColumn, c = 0; j < columncnt; j++, c++ ) //列
330 | {
331 | QAxObject * cell = pWorksheet->querySubObject("Cells(int,int)", i, j );//获取单元格
332 |
333 | //在r新行中添加子项数据
334 | if ( cell )
335 | {
336 | tableWidget->setItem(r,c,new QTableWidgetItem(cell->dynamicCall("Value2()").toString()));
337 | }
338 | }
339 | }
340 |
341 | return true;
342 | }
343 |
344 | /**
345 | *@brief 获取指定单元格的数据
346 | *@param row : 单元格的行号
347 | *@param column : 单元格的列号
348 | *@return [row,column]单元格对应的数据
349 | */
350 | QVariant ExcelEngine::GetCellData(UINT row, UINT column)
351 | {
352 | QVariant data;
353 |
354 | QAxObject *cell = pWorksheet->querySubObject("Cells(int,int)",row,column);//获取单元格对象
355 | if ( cell )
356 | {
357 | data = cell->dynamicCall("Value2()");
358 | }
359 |
360 | return data;
361 | }
362 |
363 | /**
364 | *@brief 修改指定单元格的数据
365 | *@param row : 单元格的行号
366 | *@param column : 单元格指定的列号
367 | *@param data : 单元格要修改为的新数据
368 | *@return 修改是否成功 true : 成功
369 | * false: 失败
370 | */
371 | bool ExcelEngine::SetCellData(UINT row, UINT column, QVariant data)
372 | {
373 | bool op = false;
374 |
375 | QAxObject *cell = pWorksheet->querySubObject("Cells(int,int)",row,column);//获取单元格对象
376 | if ( cell )
377 | {
378 | QString strData = data.toString(); //excel 居然只能插入字符串和整型,浮点型无法插入
379 | cell->dynamicCall("SetValue(const QVariant&)",strData); //修改单元格的数据
380 | op = true;
381 | }
382 | else
383 | {
384 | op = false;
385 | }
386 |
387 | return op;
388 | }
389 |
390 | /**
391 | *@brief 清空除报表之外的数据
392 | */
393 | void ExcelEngine::Clear()
394 | {
395 | sXlsFile = "";
396 | nRowCount = 0;
397 | nColumnCount = 0;
398 | nStartRow = 0;
399 | nStartColumn = 0;
400 | }
401 |
402 | /**
403 | *@brief 判断excel是否已被打开
404 | *@return true : 已打开
405 | * false: 未打开
406 | */
407 | bool ExcelEngine::IsOpen()
408 | {
409 | return bIsOpen;
410 | }
411 |
412 | /**
413 | *@brief 判断excel COM对象是否调用成功,excel是否可用
414 | *@return true : 可用
415 | * false: 不可用
416 | */
417 | bool ExcelEngine::IsValid()
418 | {
419 | return bIsValid;
420 | }
421 |
422 | /**
423 | *@brief 获取excel的行数
424 | */
425 | UINT ExcelEngine::GetRowCount()const
426 | {
427 | return nRowCount;
428 | }
429 |
430 | /**
431 | *@brief 获取excel的列数
432 | */
433 | UINT ExcelEngine::GetColumnCount()const
434 | {
435 | return nColumnCount;
436 | }
437 |
--------------------------------------------------------------------------------
/excelengine_1.h:
--------------------------------------------------------------------------------
1 | #ifndef EXCELENGINE_1_H
2 | #define EXCELENGINE_1_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 |
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include "qt_windows.h"
19 |
20 | class ExcelEngine : public QWidget
21 | {
22 | Q_OBJECT
23 | public:
24 | explicit ExcelEngine(QWidget *parent = 0);
25 | ExcelEngine(QString xlsFile);
26 | ~ExcelEngine();
27 |
28 |
29 | public:
30 | bool Open(UINT nSheet = 1, bool visible = false);//打开xls文件
31 | bool Open(QString xlsFile, UINT nSheet = 1, bool visible = false);
32 | void Save(); //保存xls报表
33 | void Close(); //关闭xls报表
34 |
35 | bool SaveDataFrTable(QTableWidget *tableWidget); //保存数据到xls
36 | bool ReadDataToTable(QTableWidget *tableWidget); //从xls读取数据到ui
37 |
38 | QVariant GetCellData(UINT row, UINT column); //获取指定单元数据
39 | bool SetCellData(UINT row, UINT column, QVariant data); //修改指定单元数据
40 |
41 | UINT GetRowCount()const;
42 | UINT GetColumnCount()const;
43 |
44 | bool IsOpen();
45 | bool IsValid();
46 |
47 | protected:
48 | void Clear();
49 |
50 | private:
51 | QAxObject *pExcel; //指向整个excel应用程序
52 | QAxObject *pWorkbooks; //指向工作簿集,excel有很多工作簿
53 | QAxObject *pWorkbook; //指向sXlsFile对应的工作簿
54 | QAxObject *pWorksheet; //指向工作簿中的某个sheet表单
55 |
56 | QString sXlsFile; //xls文件路径
57 | UINT nCurrSheet; //当前打开的第几个sheet
58 | bool bIsVisible; //excel是否可见
59 | int nRowCount; //行数
60 | int nColumnCount; //列数
61 | int nStartRow; //开始有数据的行下标值
62 | int nStartColumn; //开始有数据的列下标值
63 | bool bIsOpen; //是否已打开
64 | bool bIsValid; //是否有效
65 | bool bIsANewFile; //是否是一个新建xls文件,用来区分打开的excel是已存在文件还是有本类新建的
66 | bool bIsSaveAlready;//防止重复保存
67 | private slots:
68 | void saveExecl(QMap);
69 | signals:
70 | void signals_saveExecl(QMap);
71 |
72 |
73 | signals:
74 |
75 | public slots:
76 |
77 | };
78 |
79 | #endif // EXCELENGINE_1_H
80 |
--------------------------------------------------------------------------------
/git_push.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | git init
3 | git add .
4 | git commit -m 'qt storage manager'
5 | git remote add origin git@github.com:acanoe/stroage.git
6 | git push -f git@github.com:acanoe/stroage.git master
7 |
--------------------------------------------------------------------------------
/gmpmath.cpp:
--------------------------------------------------------------------------------
1 | #include "gmpmath.h"
2 | #include "gmpxx.h"
3 | #include
4 |
5 |
6 | GmpMath::GmpMath()
7 | {
8 | }
9 | QString GmpMath::math(QString a, QString op,QString b)
10 | {
11 | qDebug() << "gmpmath " << a << op << b;
12 | mpf_class a_g(a.toLatin1().data()), b_g(b.toLatin1().data()), f_g;
13 | mp_exp_t leng;
14 |
15 |
16 | if(op == "+")
17 | {
18 | f_g = a_g + b_g;
19 |
20 | }else if(op == "-")
21 | {
22 | f_g = a_g - b_g;
23 | }else if(op == "*")
24 | {
25 | // qDebug() << "get * math";
26 | f_g = a_g * b_g;
27 | }else if(op == "/")
28 | {
29 | f_g = a_g / b_g;
30 | }else {
31 | return "-1";
32 | }
33 |
34 | QString tmpx = QString::fromLocal8Bit(f_g.get_str(leng,10,20).c_str());
35 | count = 0;
36 | count = tmpx.count();
37 | if((int)leng >= count){
38 |
39 | for(int i = 0;i < ((int)leng - count);i ++){
40 | tmpx.append("0");
41 | }
42 | qDebug() << "leng = " << leng << "tmpx = " << tmpx << "count = " << count;
43 | if(tmpx == ""){
44 | tmpx = "0";
45 | }
46 | return tmpx;
47 | }else {
48 | qDebug() << "leng = " << leng << "tmpx = " << QString(tmpx.left((int)leng) + "." + tmpx.mid((int)leng, 4));
49 | return QString(tmpx.left((int)leng) + "." + tmpx.mid((int)leng, 4));
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/gmpmath.h:
--------------------------------------------------------------------------------
1 | #ifndef GMPMATH_H
2 | #define GMPMATH_H
3 | #include
4 |
5 | class GmpMath
6 | {
7 | public:
8 | GmpMath();
9 | QString math(QString a, QString op,QString b);
10 | int count;
11 | };
12 |
13 | #endif // GMPMATH_H
14 |
--------------------------------------------------------------------------------
/img/heart.svg:
--------------------------------------------------------------------------------
1 |
2 |
56 |
--------------------------------------------------------------------------------
/img/safe - 副本.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/img/safe - 副本.png
--------------------------------------------------------------------------------
/img/safe.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/img/safe.ico
--------------------------------------------------------------------------------
/img/safe.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/img/safe.png
--------------------------------------------------------------------------------
/img/storage.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/img/storage.ico
--------------------------------------------------------------------------------
/img/sysButton/arrow_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/img/sysButton/arrow_down.png
--------------------------------------------------------------------------------
/img/sysButton/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/img/sysButton/close.png
--------------------------------------------------------------------------------
/img/sysButton/close_button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/img/sysButton/close_button.png
--------------------------------------------------------------------------------
/img/sysButton/main_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/img/sysButton/main_menu.png
--------------------------------------------------------------------------------
/img/sysButton/max_button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/img/sysButton/max_button.png
--------------------------------------------------------------------------------
/img/sysButton/min_button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/img/sysButton/min_button.png
--------------------------------------------------------------------------------
/img/sysButton/skin_button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/img/sysButton/skin_button.png
--------------------------------------------------------------------------------
/input_dialg.cpp:
--------------------------------------------------------------------------------
1 |
2 | #include
3 | #include
4 | #include
5 |
6 |
7 | #include "about_us.h"
8 |
9 | AboutUsDialog::AboutUsDialog(QWidget *parent,int index_tmp,QString name_tmp)
10 | :QDialog(parent)
11 | {
12 |
13 | this->resize(520, 290);
14 | index = index_tmp;
15 | name = name_tmp;
16 | qDebug() << index << name;
17 |
18 | QPalette palette;
19 | this->setAutoFillBackground(true);
20 | palette.setColor(QPalette::Background,QColor(155,225,123));
21 | this->setPalette(palette);
22 |
23 |
24 | //初始化为未按下鼠标左键
25 | mouse_press = false;
26 |
27 | //设置标题栏隐藏
28 | this->setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog);
29 |
30 | title_label = new QLabel();
31 | title_icon_label = new QLabel();
32 | title_info_label = new QLabel();
33 | info_label = new QLabel();
34 | version_label = new QLabel();
35 | mummy_label = new QLabel();
36 | copyright_label = new QLabel();
37 | icon_label = new QLabel();
38 | close_button = new PushButton();
39 | ok_button = new QPushButton();
40 |
41 | QPixmap title_pixmap(":/img/safe");
42 | title_icon_label->setPixmap(title_pixmap);
43 | title_icon_label->setFixedSize(16, 16);
44 | title_icon_label->setScaledContents(true);
45 |
46 | close_button->loadPixmap(":/sysButton/close");
47 |
48 | title_label->setFixedHeight(30);
49 | ok_button->setFixedSize(75, 25);
50 | QPixmap pixmap(":/img/360safe");
51 | icon_label->setPixmap(pixmap);
52 | icon_label->setFixedSize(pixmap.size());
53 |
54 | QFont title_info_font("微软雅黑", 20, QFont::Bold, false);
55 |
56 |
57 | QHBoxLayout *input1 = new QHBoxLayout();
58 | QHBoxLayout *input2 = new QHBoxLayout();
59 | QHBoxLayout *input3 = new QHBoxLayout();
60 | switch(index_tmp){
61 | case 1:
62 | {
63 | QLabel *L_name = new QLabel(tr("商品名 "));
64 | E_name = new QLineEdit;
65 |
66 | QLabel *L_Price = new QLabel(tr("商品价格"));
67 | E_Price = new QLineEdit;
68 |
69 | QLabel *L_amount = new QLabel(tr("数量 "));
70 | E_amount = new QLineEdit;
71 |
72 | QLabel *L_person = new QLabel(tr("管理员 "));
73 | E_person = new QLineEdit;
74 |
75 | QLabel *L_sign = new QLabel(tr("签字人 "));
76 | E_sign = new QLineEdit;
77 |
78 | QLabel *L_remark = new QLabel(tr("备注 "));
79 | E_remark = new QLineEdit;
80 |
81 |
82 |
83 | input1->addWidget(L_name);
84 | input1->addWidget(E_name);
85 | input1->addWidget(L_Price);
86 | input1->addWidget(E_Price);
87 | input1->setSpacing(10);
88 | input1->setContentsMargins(10, 0, 10, 0);
89 |
90 |
91 | input2->addWidget(L_amount);
92 | input2->addWidget(E_amount);
93 | input2->addWidget(L_person);
94 | input2->addWidget(E_person);
95 | input2->setSpacing(10);
96 | input2->setContentsMargins(10, 0, 10, 0);
97 |
98 | input3->addWidget(L_sign);
99 | input3->addWidget(E_sign);
100 | input3->addWidget(L_remark);
101 | input3->addWidget(E_remark);
102 | input3->setSpacing(10);
103 | input3->setContentsMargins(10, 0, 10, 0);
104 | break;
105 | }
106 | case 2:
107 | {
108 | QLabel *L_name = new QLabel(QString("商品 ") + name + " 出库");
109 | L_name ->setFont(title_info_font);
110 | E_name = new QLineEdit;
111 |
112 | // QLabel *L_Price = new QLabel(tr("商品价格"));
113 | // E_Price = new QLineEdit;
114 |
115 | QLabel *L_amount = new QLabel(tr("数量 "));
116 | E_amount = new QLineEdit;
117 |
118 | QLabel *L_person = new QLabel(tr("管理员 "));
119 | E_person = new QLineEdit;
120 |
121 | QLabel *L_sign = new QLabel(tr("签字人 "));
122 | E_sign = new QLineEdit;
123 |
124 | QLabel *L_remark = new QLabel(tr("备注 "));
125 | E_remark = new QLineEdit;
126 |
127 | input1->addWidget(L_name);
128 | // input1->addWidget(E_name);
129 | // input1->addWidget(L_Price);
130 | // input1->addWidget(E_Price);
131 | input1->setSpacing(10);
132 | input1->setContentsMargins(10, 0, 10, 0);
133 |
134 | input2->addWidget(L_amount);
135 | input2->addWidget(E_amount);
136 | input2->addWidget(L_person);
137 | input2->addWidget(E_person);
138 | input2->setSpacing(10);
139 | input2->setContentsMargins(10, 0, 10, 0);
140 |
141 |
142 | input3->addWidget(L_sign);
143 | input3->addWidget(E_sign);
144 | input3->addWidget(L_remark);
145 | input3->addWidget(E_remark);
146 | input3->setSpacing(10);
147 | input3->setContentsMargins(10, 0, 10, 0);
148 | break;
149 | }
150 | case 3:
151 | {
152 | QLabel *L_name = new QLabel(QString("商品 ") + name + " 入库");
153 | L_name ->setFont(title_info_font);
154 | E_name = new QLineEdit;
155 |
156 | QSpacerItem *horizontalSpacer = new QSpacerItem(10, 10, QSizePolicy::Expanding, QSizePolicy::Minimum);
157 | QLabel *L_Price = new QLabel(tr("入库价格"));
158 | E_Price = new QLineEdit;
159 |
160 | QLabel *L_amount = new QLabel(tr("数量 "));
161 | E_amount = new QLineEdit;
162 |
163 | QLabel *L_person = new QLabel(tr("管理员 "));
164 | E_person = new QLineEdit;
165 |
166 | QLabel *L_sign = new QLabel(tr("签字人 "));
167 | E_sign = new QLineEdit;
168 |
169 | QLabel *L_remark = new QLabel(tr("备注 "));
170 | E_remark = new QLineEdit;
171 |
172 |
173 |
174 |
175 | input1->addWidget(L_name);
176 | // input1->addWidget(E_name);
177 | input1->addItem(horizontalSpacer);
178 | input1->addWidget(L_Price);
179 | input1->addWidget(E_Price);
180 | input1->setSpacing(10);
181 | input1->setContentsMargins(10, 0, 10, 0);
182 |
183 |
184 | input2->addWidget(L_amount);
185 | input2->addWidget(E_amount);
186 | input2->addWidget(L_person);
187 | input2->addWidget(E_person);
188 | input2->setSpacing(10);
189 | input2->setContentsMargins(10, 0, 10, 0);
190 |
191 | input3->addWidget(L_sign);
192 | input3->addWidget(E_sign);
193 | input3->addWidget(L_remark);
194 | input3->addWidget(E_remark);
195 | input3->setSpacing(10);
196 | input3->setContentsMargins(10, 0, 10, 0);
197 | break;
198 | }
199 | case 4:
200 | {
201 | QLabel *L_name = new QLabel();
202 | L_name->setText(name);
203 | L_name ->setFont(title_info_font);
204 |
205 | input2->addWidget(L_name);
206 | input2->setSpacing(10);
207 | input2->setContentsMargins(10, 0, 10, 0);
208 | break;
209 | }
210 | case 5:
211 | {
212 | QLabel *L_name = new QLabel();
213 | L_name->setText("请输入管理员密码:");
214 | L_name ->setFont(title_info_font);
215 | E_Price = new QLineEdit;
216 |
217 | input2->addWidget(L_name);
218 | input2->addWidget(E_Price);
219 | input2->setSpacing(10);
220 | input2->setContentsMargins(10, 0, 10, 0);
221 | break;
222 | }
223 | case 6:
224 | {
225 | QLabel *L_name = new QLabel(tr("现在密码 "));
226 | E_name = new QLineEdit;
227 |
228 | QLabel *L_Price = new QLabel(tr("修改为 "));
229 | E_Price = new QLineEdit;
230 |
231 | QLabel *L_amount = new QLabel(tr("再次确认"));
232 | E_amount = new QLineEdit;
233 |
234 | input1->addWidget(L_name);
235 | input1->addWidget(E_name);
236 | input1->setSpacing(10);
237 | input1->setContentsMargins(10, 0, 10, 0);
238 |
239 |
240 | input2->addWidget(L_Price);
241 | input2->addWidget(E_Price );
242 | input2->setSpacing(10);
243 | input2->setContentsMargins(10, 0, 10, 0);
244 |
245 | input3->addWidget(L_amount);
246 | input3->addWidget(E_amount);
247 | input3->setSpacing(10);
248 | input3->setContentsMargins(10, 0, 10, 0);
249 | break;
250 | }
251 |
252 |
253 | default:
254 | {
255 | return;
256 | }
257 | }
258 | QHBoxLayout *title_layout = new QHBoxLayout();
259 | title_layout->addWidget(title_icon_label, 0, Qt::AlignVCenter);
260 | title_layout->addWidget(title_label, 0, Qt::AlignVCenter);
261 | title_layout->addStretch();
262 | title_layout->addWidget(close_button, 0, Qt::AlignTop);
263 | title_layout->setSpacing(5);
264 | title_layout->setContentsMargins(10, 0, 5, 0);
265 |
266 |
267 |
268 | QHBoxLayout *bottom_layout = new QHBoxLayout();
269 | bottom_layout->addStretch();
270 | bottom_layout->addWidget(ok_button);
271 | bottom_layout->setSpacing(0);
272 | bottom_layout->setContentsMargins(0, 0, 30, 20);
273 |
274 | QVBoxLayout *main_layout = new QVBoxLayout();
275 | main_layout->addLayout(title_layout);
276 | main_layout->addStretch(); /// 添加格挡
277 | main_layout->addLayout(input1);
278 | main_layout->addStretch();
279 | main_layout->addLayout(input2);
280 | main_layout->addStretch();
281 | main_layout->addLayout(input3);
282 | main_layout->addStretch();
283 | main_layout->addLayout(bottom_layout);
284 | main_layout->setSpacing(0);
285 | main_layout->setContentsMargins(0, 0, 0, 0);
286 |
287 | setLayout(main_layout);
288 |
289 | title_label->setStyleSheet("color:white;");
290 | copyright_label->setStyleSheet("color:gray;");
291 | title_info_label->setStyleSheet("color:rgb(30,170,60);");
292 | info_label->setStyleSheet("color:rgb(30,170,60);");
293 | ok_button->setStyleSheet("QPushButton{border:1px solid lightgray;background:rgb(230,230,230);}" "QPushButton:hover{border-color:green; background:transparent;}");
294 |
295 |
296 |
297 | QFont info_font = info_label->font();
298 | info_font.setBold(true);
299 | info_label->setFont(info_font);
300 | ok_button->setText(tr("OK"));
301 |
302 | connect(ok_button, SIGNAL(clicked()), this, SLOT(getinput()));
303 | connect(close_button, SIGNAL(clicked()), this, SLOT(hide()));
304 | }
305 |
306 | void AboutUsDialog::getinput()
307 | {
308 | QStringList tmp;
309 | switch(index){
310 | case 1:
311 | {
312 | if(E_amount->text().toInt() == 0 ){
313 | E_amount->setText("数量必须为大于0的整数");
314 | return;
315 | }
316 | if(E_Price->text().toFloat() <= 0 ){
317 | E_Price->setText("单品价格必须是数字可以含小数");
318 | return;
319 | }
320 | tmp.append(E_name->text());
321 | tmp.append(E_Price->text());
322 | tmp.append(E_amount->text());
323 | tmp.append(E_person->text());
324 | tmp.append(E_sign->text());
325 | tmp.append(E_remark->text());
326 |
327 | emit setinput(tmp,index);
328 | break;
329 | }
330 | case 2:
331 | if(E_amount->text().toInt() == 0 ){
332 | E_amount->setText("数量必须为大于0的整数");
333 | return;
334 | }
335 | tmp.append(name);
336 | tmp.append(E_amount->text());
337 | tmp.append(E_person->text());
338 | tmp.append(E_sign->text());
339 | tmp.append(E_remark->text());
340 | emit setinput(tmp,index);
341 | break;
342 | case 3:
343 | if(E_amount->text().toInt() == 0 ){
344 | E_amount->setText("数量必须为大于0的整数");
345 | return;
346 | }
347 | if(E_Price->text().toFloat() <= 0 ){
348 | E_Price->setText("单品价格必须是数字可以含小数");
349 | return;
350 | }
351 | tmp.append(name);
352 | tmp.append(E_Price->text());
353 | tmp.append(E_amount->text());
354 | tmp.append(E_person->text());
355 | tmp.append(E_sign->text());
356 | tmp.append(E_remark->text());
357 | emit setinput(tmp,index);
358 | break;
359 | case 5:
360 | {
361 | // QSqlQuery query;
362 | // query.exec("create table sql_users_table (id integer primary key,user varchar(15),passwd varchar(100)");
363 |
364 | int i = 0;
365 | QSqlQuery querylist;
366 | // qDebug() << querylist.exec(QString("select * from sql_users_table order by id desc"));
367 | qDebug() << querylist.exec(QString("select * from sql_users_table where user_name=\"admin\"" ));
368 | while(querylist.next())
369 | {
370 | i++;
371 | if(querylist.value(2).toString() == E_Price->text()){
372 | emit setinput(tmp,index);
373 |
374 | }else {
375 | E_Price->setText("密码错误");
376 | return;
377 | }
378 | // tmp.v_id = querylist.value(0).toString();
379 | // tmp.name = querylist.value(1).toString();
380 |
381 | // tmp.state = querylist.value(2).toString();
382 | // tmp.amount = querylist.value(3).toString();
383 | // tmp.price = querylist.value(4).toString();
384 | // tmp.total_price = querylist.value(5).toString();
385 | // tmp.controller = querylist.value(6).toString();
386 | // tmp.remark = querylist.value(7).toString();
387 | // tmp.time = querylist.value(8).toString();
388 | }
389 | if(i == 0){
390 | E_Price->setText("密码错误");
391 | return;
392 | }
393 | break;
394 | }
395 | case 6:
396 | {
397 | int i = 0;
398 | QSqlQuery querylist;
399 | // qDebug() << querylist.exec(QString("select * from sql_users_table order by id desc"));
400 | qDebug() << querylist.exec(QString("select * from sql_users_table where user_name=\"admin\"" ));
401 | while(querylist.next())
402 | {
403 | i++;
404 | if(querylist.value(2).toString() == E_name->text()){
405 | if(E_Price->text() == E_amount->text()){
406 | if(querylist.exec(QString("UPDATE sql_users_table SET user_passwd='" + E_Price->text() + "' WHERE user_name='admin'")))
407 | {
408 | qDebug() << "change passwd is crrect";
409 | }else{
410 | E_Price->setText("密码数据更新失败");
411 | qDebug() << "change passwd is error";
412 | return;
413 | }
414 | emit setinput(tmp,index);
415 | }else {
416 | E_amount->setText("输入不匹配,请重新输入");
417 | return;
418 | }
419 |
420 | }else {
421 | E_name->setText("密码错误");
422 | return;
423 | }
424 | // tmp.v_id = querylist.value(0).toString();
425 | // tmp.name = querylist.value(1).toString();
426 |
427 | // tmp.state = querylist.value(2).toString();
428 | // tmp.amount = querylist.value(3).toString();
429 | // tmp.price = querylist.value(4).toString();
430 | // tmp.total_price = querylist.value(5).toString();
431 | // tmp.controller = querylist.value(6).toString();
432 | // tmp.remark = querylist.value(7).toString();
433 | // tmp.time = querylist.value(8).toString();
434 | }
435 | break;
436 | }
437 | default:
438 | break;
439 | }
440 |
441 | this->close();
442 | }
443 |
444 | void AboutUsDialog::translateLanguage()
445 | {
446 |
447 |
448 | }
449 |
450 | AboutUsDialog::~AboutUsDialog()
451 | {
452 |
453 | }
454 |
455 | void AboutUsDialog::paintEvent(QPaintEvent *)
456 | {
457 | }
458 |
459 | void AboutUsDialog::mousePressEvent( QMouseEvent * event )
460 | {
461 | //只能是鼠标左键移动和改变大小
462 | if(event->button() == Qt::LeftButton)
463 | {
464 | mouse_press = true;
465 | }
466 |
467 | //窗口移动距离
468 | move_point = event->globalPos() - pos();
469 | }
470 |
471 | void AboutUsDialog::mouseReleaseEvent(QMouseEvent *)
472 | {
473 | mouse_press = false;
474 | }
475 |
476 | void AboutUsDialog::mouseMoveEvent(QMouseEvent *event)
477 | {
478 | //移动窗口
479 | if(mouse_press)
480 | {
481 | QPoint move_pos = event->globalPos();
482 | move(move_pos - move_point);
483 | }
484 | }
485 |
--------------------------------------------------------------------------------
/lib/libgmp.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/lib/libgmp.a
--------------------------------------------------------------------------------
/lib/libgmp.la:
--------------------------------------------------------------------------------
1 | # libgmp.la - a libtool library file
2 | # Generated by libtool (GNU libtool) 2.4.2
3 | #
4 | # Please DO NOT delete this file!
5 | # It is necessary for linking the library.
6 |
7 | # The name that we can dlopen(3).
8 | dlname=''
9 |
10 | # Names of this library.
11 | library_names=''
12 |
13 | # The name of the static archive.
14 | old_library='libgmp.a'
15 |
16 | # Linker flags that can not go in dependency_libs.
17 | inherited_linker_flags=''
18 |
19 | # Libraries that this one depends upon.
20 | dependency_libs=''
21 |
22 | # Names of additional weak libraries provided by this library
23 | weak_library_names=''
24 |
25 | # Version information for libgmp.
26 | current=11
27 | age=1
28 | revision=3
29 |
30 | # Is this an already installed library?
31 | installed=yes
32 |
33 | # Should we warn about portability when linking against -modules?
34 | shouldnotlink=no
35 |
36 | # Files to dlopen/dlpreopen
37 | dlopen=''
38 | dlpreopen=''
39 |
40 | # Directory that this library needs to be installed in:
41 | libdir='/d/test/lib'
42 |
--------------------------------------------------------------------------------
/lib/libgmpxx.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/lib/libgmpxx.a
--------------------------------------------------------------------------------
/lib/libgmpxx.la:
--------------------------------------------------------------------------------
1 | # libgmpxx.la - a libtool library file
2 | # Generated by libtool (GNU libtool) 2.4.2
3 | #
4 | # Please DO NOT delete this file!
5 | # It is necessary for linking the library.
6 |
7 | # The name that we can dlopen(3).
8 | dlname=''
9 |
10 | # Names of this library.
11 | library_names=''
12 |
13 | # The name of the static archive.
14 | old_library='libgmpxx.a'
15 |
16 | # Linker flags that can not go in dependency_libs.
17 | inherited_linker_flags=''
18 |
19 | # Libraries that this one depends upon.
20 | dependency_libs=' /d/test/lib/libgmp.la /mingw/lib/gcc/mingw32/4.4.0/libstdc++.la'
21 |
22 | # Names of additional weak libraries provided by this library
23 | weak_library_names=''
24 |
25 | # Version information for libgmpxx.
26 | current=7
27 | age=3
28 | revision=3
29 |
30 | # Is this an already installed library?
31 | installed=yes
32 |
33 | # Should we warn about portability when linking against -modules?
34 | shouldnotlink=no
35 |
36 | # Files to dlopen/dlpreopen
37 | dlopen=''
38 | dlpreopen=''
39 |
40 | # Directory that this library needs to be installed in:
41 | libdir='/d/test/lib'
42 |
--------------------------------------------------------------------------------
/main.cpp:
--------------------------------------------------------------------------------
1 | #include "mainwindow.h"
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 |
9 | int main(int argc, char *argv[])
10 | {
11 |
12 | QApplication a(argc, argv);
13 |
14 |
15 | // QTextCodec *codec = QTextCodec::codecForName("UTF8"); //鑾峰彇绯荤粺缂栫爜
16 | // QTextCodec::setCodecForLocale(codec);
17 | // QTextCodec::setCodecForCStrings(codec);
18 | // QTextCodec::setCodecForTr(codec);
19 | // QTextCodec::setCodecForCStrings(QTextCodec::codecForName("GB18030"));
20 | // QTextCodec::setCodecForLocale(QTextCodec::codecForName("GB18030"));
21 | // QTextCodec::setCodecForTr(QTextCodec::codecForName("GB18030"));
22 | MainWindow w;
23 | w.show();
24 | return a.exec();
25 |
26 |
27 | // QApplication a(argc, argv);
28 | // //设置字体
29 | // QFont font("ZYSong18030",12);
30 | // a.setFont(font);
31 | // QTextCodec::setCodecForTr(QTextCodec::codecForLocale());
32 | // //主splitter,以下填充text和子splitter
33 | // QSplitter *splitterMain=new QSplitter(Qt::Horizontal,0);
34 | // QTextEdit *textLeft=new QTextEdit(QObject::tr("Left Widget"),splitterMain);
35 | // textLeft->setAlignment(Qt::AlignCenter);
36 | // QSplitter *splitterRight=new QSplitter(Qt::Vertical,splitterMain);
37 | // splitterRight->setOpaqueResize(false);
38 | // //开始填充右边的splitter,放上两个text
39 | // QTextEdit *textTop=new QTextEdit(QObject::tr("Right Top Widget"),splitterRight);
40 | // textTop->setAlignment(Qt::AlignCenter);
41 | // QTextEdit *textBottom=new QTextEdit(QObject::tr("Right Bottom Widget"),splitterRight);
42 | // textBottom->setAlignment(Qt::AlignCenter);
43 | // //设置主splitter
44 | // splitterMain->setStretchFactor(1,1);
45 | // splitterMain->setWindowTitle(QObject::tr("Splitter"));
46 | // splitterMain->show();
47 | // return a.exec();
48 |
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/main_menu.cpp:
--------------------------------------------------------------------------------
1 | #include "main_menu.h"
2 |
3 | MainMenu::MainMenu(QWidget *widget)
4 | : QMenu(widget)
5 | {
6 | this->createActions();
7 | this->translateActions();
8 | }
9 |
10 | void MainMenu::createActions()
11 | {
12 | //创建菜单项
13 | action_sqlinit = new QAction(this);
14 | action_changepasswd = new QAction(this);
15 | action_sqlinit->setIcon(QIcon("img/safe.png"));
16 |
17 | //添加菜单项
18 | this->addAction(action_sqlinit);
19 | this->addAction(action_changepasswd);
20 |
21 |
22 | //设置信号连接
23 | QObject::connect(action_sqlinit, SIGNAL(triggered()), this, SIGNAL(sqlinit_signal()));
24 | QObject::connect(action_changepasswd, SIGNAL(triggered()), this, SIGNAL(changepasswd_signal()));
25 | }
26 |
27 | void MainMenu::translateActions()
28 | {
29 | action_sqlinit->setText(tr("初始化数据库"));
30 | action_changepasswd->setText(tr("修改管理员密码"));
31 | }
32 |
--------------------------------------------------------------------------------
/main_menu.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @文件名 main_menu.h
3 | * @版本信息 copyright 2012-2013 Sugon. All rights reserved.
4 | * @功能描述
5 | * MainMenu类包含主菜单,主要包括:关于我们、退出等
6 | * @作者 王亮
7 | * @日期 2012-01-07
8 | */
9 |
10 | #ifndef MAINMENU_H
11 | #define MAINMENU_H
12 |
13 | #include
14 |
15 | class MainMenu : public QMenu
16 | {
17 | Q_OBJECT
18 |
19 | public:
20 |
21 | explicit MainMenu(QWidget *parent = 0);
22 |
23 | void translateActions();
24 |
25 | signals:
26 |
27 | void sqlinit_signal();
28 | void changepasswd_signal();
29 |
30 | private:
31 |
32 | void createActions();
33 |
34 | private:
35 |
36 | QAction *action_sqlinit; // 数据库初始化
37 | QAction *action_changepasswd;
38 |
39 | QAction *action_setting; //设置
40 | QAction *action_new_character; //新版特性
41 | QAction *action_check_update; //检查更新
42 | QAction *action_change_company; //切换为企业版
43 | QAction *action_help_online; //在线帮助
44 | QAction *action_platform_help; //论坛求助
45 | QAction *action_login_home; //360网站
46 | QAction *action_protect; //隐私保护
47 | QAction *action_about_us; //关于我们
48 |
49 | };
50 |
51 | #endif //MAINMENU_H
52 |
--------------------------------------------------------------------------------
/mainwindow.cpp:
--------------------------------------------------------------------------------
1 | #include "mainwindow.h"
2 | //#include "tlq_api.h"
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 |
9 |
10 | MainWindow::MainWindow(QWidget *parent) :
11 | QWidget(parent)
12 | {
13 | systemtray = new SystemTray();
14 | connect(systemtray, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(iconIsActived(QSystemTrayIcon::ActivationReason)));
15 | systemtray->show();
16 |
17 | setMinimumSize(900, 600);
18 | // setWindowIcon(QIcon(":/img/safe.ico"));
19 | setWindowFlags(Qt::FramelessWindowHint);
20 | // setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint); // 窗口一直置顶
21 | title_widget = new TitleWidget();
22 | content_widget = new ContentWidget();
23 | main_menu = new MainMenu();
24 | location = this->geometry();
25 |
26 | title_widget->setAutoFillBackground(true);
27 | QPalette palette;
28 | palette.setColor(QPalette::Background, QColor(192,253,123));
29 | //palette.setBrush(QPalette::Background, QBrush(QPixmap(":/background.png")));
30 | title_widget->setPalette(palette);
31 |
32 | QVBoxLayout *center_layout = new QVBoxLayout();
33 | center_layout->addWidget(content_widget);
34 | center_layout->setSpacing(0);
35 | center_layout->setContentsMargins(1, 0, 1, 1);
36 |
37 | QVBoxLayout *main_layout = new QVBoxLayout();
38 | main_layout->addWidget(title_widget);
39 | main_layout->addLayout(center_layout);
40 | main_layout->setSpacing(0);
41 | main_layout->setContentsMargins(0, 0, 0, 0);
42 |
43 | setLayout(main_layout);
44 |
45 | // connect(title_widget, SIGNAL(showSkin()), this, SLOT(showSkinWidget()));
46 | connect(title_widget, SIGNAL(showMainMenu()), this, SLOT(showMainMenu()));
47 | connect(title_widget, SIGNAL(showMax()), this, SLOT(showMax()));
48 | connect(title_widget, SIGNAL(showMin()), this, SLOT(showMinimized()));
49 | connect(title_widget, SIGNAL(closeWidget()), this, SLOT(hide()));
50 | connect(main_menu, SIGNAL(sqlinit_signal()), content_widget, SLOT(sqlinit_slot()));
51 | connect(main_menu, SIGNAL(changepasswd_signal()), content_widget, SLOT(changepasswd_slot()));
52 | // connect(title_widget, SIGNAL(closeWidget()), qApp, SLOT(quit()));
53 | testTong();
54 |
55 | setWindowIcon(QIcon(QLatin1String("img/safe.png"))); // 设置应用 在任务栏窗口上的图标。
56 | // slotStyleChange(2);
57 | }
58 |
59 | MainWindow::~MainWindow()
60 | {
61 |
62 | }
63 |
64 |
65 | void MainWindow::showMainMenu()
66 | {
67 | //设置主菜单出现的位置
68 | QPoint p = rect().topRight();
69 | p.setX(p.x() - 150);
70 | p.setY(p.y() + 22);
71 | main_menu->exec(this->mapToGlobal(p));
72 | }
73 |
74 | bool MainWindow::winEvent(MSG *message, long *result)
75 | {
76 | // switch(message->message)
77 | // {
78 | // case WM_NCHITTEST:
79 | // int xPos = GET_X_LPARAM(message->lParam) - this->frameGeometry().x();
80 | // int yPos = GET_Y_LPARAM(message->lParam) - this->frameGeometry().y();
81 | // if(this->childAt(xPos,yPos) == 0)
82 | // {
83 | // *result = HTCAPTION;
84 | // }else{
85 | // return false;
86 | // }
87 | // if(xPos > 18 && xPos < 22)
88 | // *result = HTLEFT;
89 | // if(xPos > (this->width() - 22) && xPos < (this->width() - 18))
90 | // *result = HTRIGHT;
91 | // if(yPos > 18 && yPos < 22)
92 | // *result = HTTOP;
93 | // if(yPos > (this->height() - 22) && yPos < (this->height() - 18))
94 | // *result = HTBOTTOM;
95 | // if(xPos > 18 && xPos < 22 && yPos > 18 && yPos < 22)
96 | // *result = HTTOPLEFT;
97 | // if(xPos > (this->width() - 22) && xPos < (this->width() - 18) && yPos > 18 && yPos < 22)
98 | // *result = HTTOPRIGHT;
99 | // if(xPos > 18 && xPos < 22 && yPos > (this->height() - 22) && yPos < (this->height() - 18))
100 | // *result = HTBOTTOMLEFT;
101 | // if(xPos > (this->width() - 22) && xPos < (this->width() - 18) && yPos > (this->height() - 22) && yPos < (this->height() - 18))
102 | // *result = HTBOTTOMRIGHT;
103 |
104 | // return true;
105 | // }
106 | return false;
107 | }
108 | void MainWindow::iconIsActived(QSystemTrayIcon::ActivationReason reason)
109 | {
110 | switch(reason)
111 | {
112 | //点击托盘图标之后松开
113 | case QSystemTrayIcon::Trigger:
114 | {
115 | showWidget();
116 | break;
117 | }
118 | //双击托盘图标
119 | case QSystemTrayIcon::DoubleClick:
120 | {
121 | showWidget();
122 | break;
123 | }
124 | default:
125 | break;
126 | }
127 | }
128 |
129 | void MainWindow::testTong()
130 | {
131 | // Tlq_Conn(TLQ_ID *gid,TLQError *err);
132 | }
133 |
134 | void MainWindow::showMax()
135 | {
136 | static bool is_max=false;
137 | if(is_max)
138 | {
139 | this->setGeometry(location);
140 | }
141 | else
142 | {
143 | //获取当前界面的位置
144 | location = this->geometry();
145 | this->setGeometry(QApplication::desktop()->availableGeometry());
146 | }
147 | is_max = !is_max;
148 | }
149 |
150 | void MainWindow::showWidget()
151 | {
152 | this->showNormal();
153 | this->raise();
154 | this->activateWindow();
155 | }
156 |
157 | void MainWindow::slotStyleChange(int StyleString) //透明度
158 | {
159 | // QFile file0("./etc/qss/abc.qss");
160 | QFile file0("skin//style0.qss");
161 | QFile file1("skin//style1.qss");
162 | QFile file2("skin//style2.qss");
163 | QFile file3("skin//style3.qss");
164 | QFile file4("skin//style4.qss");
165 | QFile file5("skin//style5.qss");
166 |
167 | QSettings *settings;
168 | settings = new QSettings("muyi","storage");
169 | QString styleSheet;
170 |
171 | switch(StyleString)
172 | {
173 | case 0:
174 | file0.open(QFile::ReadOnly);
175 | styleSheet = QLatin1String(file0.readAll());
176 | this->setStyleSheet(styleSheet);
177 | file0.close();
178 | settings->setValue( "skin", 0);
179 | break;
180 | case 1:
181 | file1.open(QFile::ReadOnly);
182 | styleSheet = QLatin1String(file1.readAll());
183 | this->setStyleSheet(styleSheet);
184 | file1.close();
185 | settings->setValue( "skin", 1);
186 | break;
187 | case 2:
188 |
189 | file2.open(QFile::ReadOnly);
190 | styleSheet = QLatin1String(file2.readAll());
191 | this->setStyleSheet(styleSheet);
192 |
193 | file2.close();
194 | settings->setValue( "skin", 2);
195 | break;
196 | case 3:
197 | file3.open(QFile::ReadOnly);
198 | styleSheet = QLatin1String(file3.readAll());
199 | this->setStyleSheet(styleSheet);
200 |
201 | file3.close();
202 | settings->setValue( "skin", 3);
203 | break;
204 | case 4:
205 | file4.open(QFile::ReadOnly);
206 | styleSheet = QLatin1String(file4.readAll());
207 | this->setStyleSheet(styleSheet);
208 |
209 | file4.close();
210 | settings->setValue( "skin", 4);
211 | break;
212 | case 5:
213 | file5.open(QFile::ReadOnly);
214 | styleSheet = QLatin1String(file5.readAll());
215 | this->setStyleSheet(styleSheet);
216 |
217 | file5.close();
218 | settings->setValue( "skin", 5);
219 | break;
220 | default:
221 | break;
222 | }
223 | }
224 |
--------------------------------------------------------------------------------
/mainwindow.h:
--------------------------------------------------------------------------------
1 | #ifndef MAINWINDOW_H
2 | #define MAINWINDOW_H
3 |
4 | //#include
5 | #include
6 | #include
7 |
8 | #include "main_menu.h"
9 | #include "title_widget.h"
10 | #include "content_widget.h"
11 | #include "system_tray.h"
12 |
13 |
14 | class MainWindow : public QWidget
15 | {
16 | Q_OBJECT
17 |
18 | public:
19 | MainWindow(QWidget *parent = 0);
20 | ~MainWindow();
21 | private:
22 | TitleWidget *title_widget;
23 | ContentWidget *content_widget;
24 | SystemTray * systemtray;
25 | MainMenu * main_menu;
26 |
27 | void testTong();
28 | QRect location;
29 | void slotStyleChange(int StyleString); //透明度
30 | void showWidget();
31 | private slots:
32 | void showMax();
33 | void iconIsActived(QSystemTrayIcon::ActivationReason reason);
34 | void showMainMenu();
35 | protected:
36 | bool winEvent(MSG *message, long *result);
37 | };
38 |
39 | #endif // MAINWINDOW_H
40 |
--------------------------------------------------------------------------------
/push_button.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/push_button.cpp
--------------------------------------------------------------------------------
/push_button.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/push_button.h
--------------------------------------------------------------------------------
/release/acanoe_brower.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/acanoe_brower.exe
--------------------------------------------------------------------------------
/release/configure.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/configure.o
--------------------------------------------------------------------------------
/release/content_widget.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/content_widget.o
--------------------------------------------------------------------------------
/release/excelengine.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/excelengine.o
--------------------------------------------------------------------------------
/release/excelengine_1.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/excelengine_1.o
--------------------------------------------------------------------------------
/release/gmpmath.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/gmpmath.o
--------------------------------------------------------------------------------
/release/input_dialg.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/input_dialg.o
--------------------------------------------------------------------------------
/release/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/main.o
--------------------------------------------------------------------------------
/release/main_menu.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/main_menu.o
--------------------------------------------------------------------------------
/release/mainwindow.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/mainwindow.o
--------------------------------------------------------------------------------
/release/moc_about_us.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'about_us.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.1.0)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include "../about_us.h"
10 | #include
11 | #include
12 | #if !defined(Q_MOC_OUTPUT_REVISION)
13 | #error "The header file 'about_us.h' doesn't include ."
14 | #elif Q_MOC_OUTPUT_REVISION != 67
15 | #error "This file was generated using the moc from 5.1.0. It"
16 | #error "cannot be used with the include files from this version of Qt."
17 | #error "(The moc has changed too much.)"
18 | #endif
19 |
20 | QT_BEGIN_MOC_NAMESPACE
21 | struct qt_meta_stringdata_AboutUsDialog_t {
22 | QByteArrayData data[4];
23 | char stringdata[34];
24 | };
25 | #define QT_MOC_LITERAL(idx, ofs, len) \
26 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
27 | offsetof(qt_meta_stringdata_AboutUsDialog_t, stringdata) + ofs \
28 | - idx * sizeof(QByteArrayData) \
29 | )
30 | static const qt_meta_stringdata_AboutUsDialog_t qt_meta_stringdata_AboutUsDialog = {
31 | {
32 | QT_MOC_LITERAL(0, 0, 13),
33 | QT_MOC_LITERAL(1, 14, 8),
34 | QT_MOC_LITERAL(2, 23, 0),
35 | QT_MOC_LITERAL(3, 24, 8)
36 | },
37 | "AboutUsDialog\0setinput\0\0getinput\0"
38 | };
39 | #undef QT_MOC_LITERAL
40 |
41 | static const uint qt_meta_data_AboutUsDialog[] = {
42 |
43 | // content:
44 | 7, // revision
45 | 0, // classname
46 | 0, 0, // classinfo
47 | 2, 14, // methods
48 | 0, 0, // properties
49 | 0, 0, // enums/sets
50 | 0, 0, // constructors
51 | 0, // flags
52 | 1, // signalCount
53 |
54 | // signals: name, argc, parameters, tag, flags
55 | 1, 2, 24, 2, 0x05,
56 |
57 | // slots: name, argc, parameters, tag, flags
58 | 3, 0, 29, 2, 0x08,
59 |
60 | // signals: parameters
61 | QMetaType::Void, QMetaType::QStringList, QMetaType::Int, 2, 2,
62 |
63 | // slots: parameters
64 | QMetaType::Void,
65 |
66 | 0 // eod
67 | };
68 |
69 | void AboutUsDialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
70 | {
71 | if (_c == QMetaObject::InvokeMetaMethod) {
72 | AboutUsDialog *_t = static_cast(_o);
73 | switch (_id) {
74 | case 0: _t->setinput((*reinterpret_cast< QStringList(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
75 | case 1: _t->getinput(); break;
76 | default: ;
77 | }
78 | } else if (_c == QMetaObject::IndexOfMethod) {
79 | int *result = reinterpret_cast(_a[0]);
80 | void **func = reinterpret_cast(_a[1]);
81 | {
82 | typedef void (AboutUsDialog::*_t)(QStringList , int );
83 | if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&AboutUsDialog::setinput)) {
84 | *result = 0;
85 | }
86 | }
87 | }
88 | }
89 |
90 | const QMetaObject AboutUsDialog::staticMetaObject = {
91 | { &QDialog::staticMetaObject, qt_meta_stringdata_AboutUsDialog.data,
92 | qt_meta_data_AboutUsDialog, qt_static_metacall, 0, 0}
93 | };
94 |
95 |
96 | const QMetaObject *AboutUsDialog::metaObject() const
97 | {
98 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
99 | }
100 |
101 | void *AboutUsDialog::qt_metacast(const char *_clname)
102 | {
103 | if (!_clname) return 0;
104 | if (!strcmp(_clname, qt_meta_stringdata_AboutUsDialog.stringdata))
105 | return static_cast(const_cast< AboutUsDialog*>(this));
106 | return QDialog::qt_metacast(_clname);
107 | }
108 |
109 | int AboutUsDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
110 | {
111 | _id = QDialog::qt_metacall(_c, _id, _a);
112 | if (_id < 0)
113 | return _id;
114 | if (_c == QMetaObject::InvokeMetaMethod) {
115 | if (_id < 2)
116 | qt_static_metacall(this, _c, _id, _a);
117 | _id -= 2;
118 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
119 | if (_id < 2)
120 | *reinterpret_cast(_a[0]) = -1;
121 | _id -= 2;
122 | }
123 | return _id;
124 | }
125 |
126 | // SIGNAL 0
127 | void AboutUsDialog::setinput(QStringList _t1, int _t2)
128 | {
129 | void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)), const_cast(reinterpret_cast(&_t2)) };
130 | QMetaObject::activate(this, &staticMetaObject, 0, _a);
131 | }
132 | QT_END_MOC_NAMESPACE
133 |
--------------------------------------------------------------------------------
/release/moc_about_us.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/moc_about_us.o
--------------------------------------------------------------------------------
/release/moc_configure.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'configure.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.1.0)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include "../configure.h"
10 | #include
11 | #include
12 | #if !defined(Q_MOC_OUTPUT_REVISION)
13 | #error "The header file 'configure.h' doesn't include ."
14 | #elif Q_MOC_OUTPUT_REVISION != 67
15 | #error "This file was generated using the moc from 5.1.0. It"
16 | #error "cannot be used with the include files from this version of Qt."
17 | #error "(The moc has changed too much.)"
18 | #endif
19 |
20 | QT_BEGIN_MOC_NAMESPACE
21 | struct qt_meta_stringdata_Configure_t {
22 | QByteArrayData data[1];
23 | char stringdata[11];
24 | };
25 | #define QT_MOC_LITERAL(idx, ofs, len) \
26 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
27 | offsetof(qt_meta_stringdata_Configure_t, stringdata) + ofs \
28 | - idx * sizeof(QByteArrayData) \
29 | )
30 | static const qt_meta_stringdata_Configure_t qt_meta_stringdata_Configure = {
31 | {
32 | QT_MOC_LITERAL(0, 0, 9)
33 | },
34 | "Configure\0"
35 | };
36 | #undef QT_MOC_LITERAL
37 |
38 | static const uint qt_meta_data_Configure[] = {
39 |
40 | // content:
41 | 7, // revision
42 | 0, // classname
43 | 0, 0, // classinfo
44 | 0, 0, // methods
45 | 0, 0, // properties
46 | 0, 0, // enums/sets
47 | 0, 0, // constructors
48 | 0, // flags
49 | 0, // signalCount
50 |
51 | 0 // eod
52 | };
53 |
54 | void Configure::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
55 | {
56 | Q_UNUSED(_o);
57 | Q_UNUSED(_id);
58 | Q_UNUSED(_c);
59 | Q_UNUSED(_a);
60 | }
61 |
62 | const QMetaObject Configure::staticMetaObject = {
63 | { &QObject::staticMetaObject, qt_meta_stringdata_Configure.data,
64 | qt_meta_data_Configure, qt_static_metacall, 0, 0}
65 | };
66 |
67 |
68 | const QMetaObject *Configure::metaObject() const
69 | {
70 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
71 | }
72 |
73 | void *Configure::qt_metacast(const char *_clname)
74 | {
75 | if (!_clname) return 0;
76 | if (!strcmp(_clname, qt_meta_stringdata_Configure.stringdata))
77 | return static_cast(const_cast< Configure*>(this));
78 | return QObject::qt_metacast(_clname);
79 | }
80 |
81 | int Configure::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
82 | {
83 | _id = QObject::qt_metacall(_c, _id, _a);
84 | if (_id < 0)
85 | return _id;
86 | return _id;
87 | }
88 | QT_END_MOC_NAMESPACE
89 |
--------------------------------------------------------------------------------
/release/moc_configure.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/moc_configure.o
--------------------------------------------------------------------------------
/release/moc_content_widget.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'content_widget.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.1.0)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include "../content_widget.h"
10 | #include
11 | #include
12 | #if !defined(Q_MOC_OUTPUT_REVISION)
13 | #error "The header file 'content_widget.h' doesn't include ."
14 | #elif Q_MOC_OUTPUT_REVISION != 67
15 | #error "This file was generated using the moc from 5.1.0. It"
16 | #error "cannot be used with the include files from this version of Qt."
17 | #error "(The moc has changed too much.)"
18 | #endif
19 |
20 | QT_BEGIN_MOC_NAMESPACE
21 | struct qt_meta_stringdata_ContentWidget_t {
22 | QByteArrayData data[29];
23 | char stringdata[317];
24 | };
25 | #define QT_MOC_LITERAL(idx, ofs, len) \
26 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
27 | offsetof(qt_meta_stringdata_ContentWidget_t, stringdata) + ofs \
28 | - idx * sizeof(QByteArrayData) \
29 | )
30 | static const qt_meta_stringdata_ContentWidget_t qt_meta_stringdata_ContentWidget = {
31 | {
32 | QT_MOC_LITERAL(0, 0, 13),
33 | QT_MOC_LITERAL(1, 14, 9),
34 | QT_MOC_LITERAL(2, 24, 0),
35 | QT_MOC_LITERAL(3, 25, 23),
36 | QT_MOC_LITERAL(4, 49, 9),
37 | QT_MOC_LITERAL(5, 59, 9),
38 | QT_MOC_LITERAL(6, 69, 11),
39 | QT_MOC_LITERAL(7, 81, 3),
40 | QT_MOC_LITERAL(8, 85, 12),
41 | QT_MOC_LITERAL(9, 98, 7),
42 | QT_MOC_LITERAL(10, 106, 7),
43 | QT_MOC_LITERAL(11, 114, 6),
44 | QT_MOC_LITERAL(12, 121, 9),
45 | QT_MOC_LITERAL(13, 131, 9),
46 | QT_MOC_LITERAL(14, 141, 9),
47 | QT_MOC_LITERAL(15, 151, 9),
48 | QT_MOC_LITERAL(16, 161, 11),
49 | QT_MOC_LITERAL(17, 173, 10),
50 | QT_MOC_LITERAL(18, 184, 6),
51 | QT_MOC_LITERAL(19, 191, 21),
52 | QT_MOC_LITERAL(20, 213, 21),
53 | QT_MOC_LITERAL(21, 235, 6),
54 | QT_MOC_LITERAL(22, 242, 6),
55 | QT_MOC_LITERAL(23, 249, 8),
56 | QT_MOC_LITERAL(24, 258, 8),
57 | QT_MOC_LITERAL(25, 267, 12),
58 | QT_MOC_LITERAL(26, 280, 17),
59 | QT_MOC_LITERAL(27, 298, 9),
60 | QT_MOC_LITERAL(28, 308, 7)
61 | },
62 | "ContentWidget\0saveExecl\0\0"
63 | "QMap\0sqlsearch\0"
64 | "storage_t\0product_add\0tmp\0product_show\0"
65 | "sqlplus\0tmp_tmp\0sqladd\0sqldelete\0"
66 | "sqlcancel\0excelSave\0addwidget\0minuswidget\0"
67 | "pluswidget\0saveas\0product_table_clicked\0"
68 | "storage_table_clicked\0search\0back_1\0"
69 | "detail_1\0setinput\0sqlinit_slot\0"
70 | "changepasswd_slot\0btnEnable\0enabled\0"
71 | };
72 | #undef QT_MOC_LITERAL
73 |
74 | static const uint qt_meta_data_ContentWidget[] = {
75 |
76 | // content:
77 | 7, // revision
78 | 0, // classname
79 | 0, 0, // classinfo
80 | 22, 14, // methods
81 | 0, 0, // properties
82 | 0, 0, // enums/sets
83 | 0, 0, // constructors
84 | 0, // flags
85 | 1, // signalCount
86 |
87 | // signals: name, argc, parameters, tag, flags
88 | 1, 1, 124, 2, 0x05,
89 |
90 | // slots: name, argc, parameters, tag, flags
91 | 4, 1, 127, 2, 0x0a,
92 | 6, 1, 130, 2, 0x0a,
93 | 8, 1, 133, 2, 0x0a,
94 | 9, 1, 136, 2, 0x0a,
95 | 11, 1, 139, 2, 0x0a,
96 | 12, 0, 142, 2, 0x0a,
97 | 13, 0, 143, 2, 0x0a,
98 | 14, 0, 144, 2, 0x0a,
99 | 15, 0, 145, 2, 0x0a,
100 | 16, 0, 146, 2, 0x0a,
101 | 17, 0, 147, 2, 0x0a,
102 | 18, 0, 148, 2, 0x0a,
103 | 19, 2, 149, 2, 0x0a,
104 | 20, 2, 154, 2, 0x0a,
105 | 21, 0, 159, 2, 0x0a,
106 | 22, 0, 160, 2, 0x0a,
107 | 23, 0, 161, 2, 0x0a,
108 | 24, 2, 162, 2, 0x0a,
109 | 25, 0, 167, 2, 0x0a,
110 | 26, 0, 168, 2, 0x0a,
111 | 27, 1, 169, 2, 0x0a,
112 |
113 | // signals: parameters
114 | QMetaType::Void, 0x80000000 | 3, 2,
115 |
116 | // slots: parameters
117 | 0x80000000 | 5, 0x80000000 | 5, 2,
118 | QMetaType::Bool, 0x80000000 | 5, 7,
119 | QMetaType::Void, 0x80000000 | 5, 7,
120 | QMetaType::Bool, 0x80000000 | 5, 10,
121 | QMetaType::Bool, 0x80000000 | 5, 2,
122 | QMetaType::Void,
123 | QMetaType::Void,
124 | QMetaType::Void,
125 | QMetaType::Void,
126 | QMetaType::Void,
127 | QMetaType::Void,
128 | QMetaType::Void,
129 | QMetaType::Void, QMetaType::Int, QMetaType::Int, 2, 2,
130 | QMetaType::Void, QMetaType::Int, QMetaType::Int, 2, 2,
131 | QMetaType::Void,
132 | QMetaType::Void,
133 | QMetaType::Void,
134 | QMetaType::Void, QMetaType::QStringList, QMetaType::Int, 2, 2,
135 | QMetaType::Void,
136 | QMetaType::Void,
137 | QMetaType::Void, QMetaType::Bool, 28,
138 |
139 | 0 // eod
140 | };
141 |
142 | void ContentWidget::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
143 | {
144 | if (_c == QMetaObject::InvokeMetaMethod) {
145 | ContentWidget *_t = static_cast(_o);
146 | switch (_id) {
147 | case 0: _t->saveExecl((*reinterpret_cast< QMap(*)>(_a[1]))); break;
148 | case 1: { storage_t _r = _t->sqlsearch((*reinterpret_cast< storage_t(*)>(_a[1])));
149 | if (_a[0]) *reinterpret_cast< storage_t*>(_a[0]) = _r; } break;
150 | case 2: { bool _r = _t->product_add((*reinterpret_cast< storage_t(*)>(_a[1])));
151 | if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break;
152 | case 3: _t->product_show((*reinterpret_cast< storage_t(*)>(_a[1]))); break;
153 | case 4: { bool _r = _t->sqlplus((*reinterpret_cast< storage_t(*)>(_a[1])));
154 | if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break;
155 | case 5: { bool _r = _t->sqladd((*reinterpret_cast< storage_t(*)>(_a[1])));
156 | if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break;
157 | case 6: _t->sqldelete(); break;
158 | case 7: _t->sqlcancel(); break;
159 | case 8: _t->excelSave(); break;
160 | case 9: _t->addwidget(); break;
161 | case 10: _t->minuswidget(); break;
162 | case 11: _t->pluswidget(); break;
163 | case 12: _t->saveas(); break;
164 | case 13: _t->product_table_clicked((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
165 | case 14: _t->storage_table_clicked((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
166 | case 15: _t->search(); break;
167 | case 16: _t->back_1(); break;
168 | case 17: _t->detail_1(); break;
169 | case 18: _t->setinput((*reinterpret_cast< QStringList(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
170 | case 19: _t->sqlinit_slot(); break;
171 | case 20: _t->changepasswd_slot(); break;
172 | case 21: _t->btnEnable((*reinterpret_cast< bool(*)>(_a[1]))); break;
173 | default: ;
174 | }
175 | } else if (_c == QMetaObject::IndexOfMethod) {
176 | int *result = reinterpret_cast(_a[0]);
177 | void **func = reinterpret_cast(_a[1]);
178 | {
179 | typedef void (ContentWidget::*_t)(QMap );
180 | if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&ContentWidget::saveExecl)) {
181 | *result = 0;
182 | }
183 | }
184 | }
185 | }
186 |
187 | const QMetaObject ContentWidget::staticMetaObject = {
188 | { &QWidget::staticMetaObject, qt_meta_stringdata_ContentWidget.data,
189 | qt_meta_data_ContentWidget, qt_static_metacall, 0, 0}
190 | };
191 |
192 |
193 | const QMetaObject *ContentWidget::metaObject() const
194 | {
195 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
196 | }
197 |
198 | void *ContentWidget::qt_metacast(const char *_clname)
199 | {
200 | if (!_clname) return 0;
201 | if (!strcmp(_clname, qt_meta_stringdata_ContentWidget.stringdata))
202 | return static_cast(const_cast< ContentWidget*>(this));
203 | return QWidget::qt_metacast(_clname);
204 | }
205 |
206 | int ContentWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
207 | {
208 | _id = QWidget::qt_metacall(_c, _id, _a);
209 | if (_id < 0)
210 | return _id;
211 | if (_c == QMetaObject::InvokeMetaMethod) {
212 | if (_id < 22)
213 | qt_static_metacall(this, _c, _id, _a);
214 | _id -= 22;
215 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
216 | if (_id < 22)
217 | *reinterpret_cast(_a[0]) = -1;
218 | _id -= 22;
219 | }
220 | return _id;
221 | }
222 |
223 | // SIGNAL 0
224 | void ContentWidget::saveExecl(QMap _t1)
225 | {
226 | void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)) };
227 | QMetaObject::activate(this, &staticMetaObject, 0, _a);
228 | }
229 | QT_END_MOC_NAMESPACE
230 |
--------------------------------------------------------------------------------
/release/moc_content_widget.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/moc_content_widget.o
--------------------------------------------------------------------------------
/release/moc_excelengine.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'excelengine.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.1.0)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include "../excelengine.h"
10 | #include
11 | #include
12 | #if !defined(Q_MOC_OUTPUT_REVISION)
13 | #error "The header file 'excelengine.h' doesn't include ."
14 | #elif Q_MOC_OUTPUT_REVISION != 67
15 | #error "This file was generated using the moc from 5.1.0. It"
16 | #error "cannot be used with the include files from this version of Qt."
17 | #error "(The moc has changed too much.)"
18 | #endif
19 |
20 | QT_BEGIN_MOC_NAMESPACE
21 | struct qt_meta_stringdata_ExcelEngine_t {
22 | QByteArrayData data[4];
23 | char stringdata[56];
24 | };
25 | #define QT_MOC_LITERAL(idx, ofs, len) \
26 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
27 | offsetof(qt_meta_stringdata_ExcelEngine_t, stringdata) + ofs \
28 | - idx * sizeof(QByteArrayData) \
29 | )
30 | static const qt_meta_stringdata_ExcelEngine_t qt_meta_stringdata_ExcelEngine = {
31 | {
32 | QT_MOC_LITERAL(0, 0, 11),
33 | QT_MOC_LITERAL(1, 12, 17),
34 | QT_MOC_LITERAL(2, 30, 0),
35 | QT_MOC_LITERAL(3, 31, 23)
36 | },
37 | "ExcelEngine\0signals_saveExecl\0\0"
38 | "QMap\0"
39 | };
40 | #undef QT_MOC_LITERAL
41 |
42 | static const uint qt_meta_data_ExcelEngine[] = {
43 |
44 | // content:
45 | 7, // revision
46 | 0, // classname
47 | 0, 0, // classinfo
48 | 1, 14, // methods
49 | 0, 0, // properties
50 | 0, 0, // enums/sets
51 | 0, 0, // constructors
52 | 0, // flags
53 | 1, // signalCount
54 |
55 | // signals: name, argc, parameters, tag, flags
56 | 1, 1, 19, 2, 0x05,
57 |
58 | // signals: parameters
59 | QMetaType::Void, 0x80000000 | 3, 2,
60 |
61 | 0 // eod
62 | };
63 |
64 | void ExcelEngine::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
65 | {
66 | if (_c == QMetaObject::InvokeMetaMethod) {
67 | ExcelEngine *_t = static_cast(_o);
68 | switch (_id) {
69 | case 0: _t->signals_saveExecl((*reinterpret_cast< QMap(*)>(_a[1]))); break;
70 | default: ;
71 | }
72 | } else if (_c == QMetaObject::IndexOfMethod) {
73 | int *result = reinterpret_cast(_a[0]);
74 | void **func = reinterpret_cast(_a[1]);
75 | {
76 | typedef void (ExcelEngine::*_t)(QMap );
77 | if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&ExcelEngine::signals_saveExecl)) {
78 | *result = 0;
79 | }
80 | }
81 | }
82 | }
83 |
84 | const QMetaObject ExcelEngine::staticMetaObject = {
85 | { &QObject::staticMetaObject, qt_meta_stringdata_ExcelEngine.data,
86 | qt_meta_data_ExcelEngine, qt_static_metacall, 0, 0}
87 | };
88 |
89 |
90 | const QMetaObject *ExcelEngine::metaObject() const
91 | {
92 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
93 | }
94 |
95 | void *ExcelEngine::qt_metacast(const char *_clname)
96 | {
97 | if (!_clname) return 0;
98 | if (!strcmp(_clname, qt_meta_stringdata_ExcelEngine.stringdata))
99 | return static_cast(const_cast< ExcelEngine*>(this));
100 | return QObject::qt_metacast(_clname);
101 | }
102 |
103 | int ExcelEngine::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
104 | {
105 | _id = QObject::qt_metacall(_c, _id, _a);
106 | if (_id < 0)
107 | return _id;
108 | if (_c == QMetaObject::InvokeMetaMethod) {
109 | if (_id < 1)
110 | qt_static_metacall(this, _c, _id, _a);
111 | _id -= 1;
112 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
113 | if (_id < 1)
114 | *reinterpret_cast(_a[0]) = -1;
115 | _id -= 1;
116 | }
117 | return _id;
118 | }
119 |
120 | // SIGNAL 0
121 | void ExcelEngine::signals_saveExecl(QMap _t1)
122 | {
123 | void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)) };
124 | QMetaObject::activate(this, &staticMetaObject, 0, _a);
125 | }
126 | QT_END_MOC_NAMESPACE
127 |
--------------------------------------------------------------------------------
/release/moc_excelengine.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/moc_excelengine.o
--------------------------------------------------------------------------------
/release/moc_excelengine_1.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'excelengine_1.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.1.0)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include "../excelengine_1.h"
10 | #include
11 | #include
12 | #if !defined(Q_MOC_OUTPUT_REVISION)
13 | #error "The header file 'excelengine_1.h' doesn't include ."
14 | #elif Q_MOC_OUTPUT_REVISION != 67
15 | #error "This file was generated using the moc from 5.1.0. It"
16 | #error "cannot be used with the include files from this version of Qt."
17 | #error "(The moc has changed too much.)"
18 | #endif
19 |
20 | QT_BEGIN_MOC_NAMESPACE
21 | struct qt_meta_stringdata_ExcelEngine_t {
22 | QByteArrayData data[5];
23 | char stringdata[66];
24 | };
25 | #define QT_MOC_LITERAL(idx, ofs, len) \
26 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
27 | offsetof(qt_meta_stringdata_ExcelEngine_t, stringdata) + ofs \
28 | - idx * sizeof(QByteArrayData) \
29 | )
30 | static const qt_meta_stringdata_ExcelEngine_t qt_meta_stringdata_ExcelEngine = {
31 | {
32 | QT_MOC_LITERAL(0, 0, 11),
33 | QT_MOC_LITERAL(1, 12, 17),
34 | QT_MOC_LITERAL(2, 30, 0),
35 | QT_MOC_LITERAL(3, 31, 23),
36 | QT_MOC_LITERAL(4, 55, 9)
37 | },
38 | "ExcelEngine\0signals_saveExecl\0\0"
39 | "QMap\0saveExecl\0"
40 | };
41 | #undef QT_MOC_LITERAL
42 |
43 | static const uint qt_meta_data_ExcelEngine[] = {
44 |
45 | // content:
46 | 7, // revision
47 | 0, // classname
48 | 0, 0, // classinfo
49 | 2, 14, // methods
50 | 0, 0, // properties
51 | 0, 0, // enums/sets
52 | 0, 0, // constructors
53 | 0, // flags
54 | 1, // signalCount
55 |
56 | // signals: name, argc, parameters, tag, flags
57 | 1, 1, 24, 2, 0x05,
58 |
59 | // slots: name, argc, parameters, tag, flags
60 | 4, 1, 27, 2, 0x08,
61 |
62 | // signals: parameters
63 | QMetaType::Void, 0x80000000 | 3, 2,
64 |
65 | // slots: parameters
66 | QMetaType::Void, 0x80000000 | 3, 2,
67 |
68 | 0 // eod
69 | };
70 |
71 | void ExcelEngine::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
72 | {
73 | if (_c == QMetaObject::InvokeMetaMethod) {
74 | ExcelEngine *_t = static_cast(_o);
75 | switch (_id) {
76 | case 0: _t->signals_saveExecl((*reinterpret_cast< QMap(*)>(_a[1]))); break;
77 | case 1: _t->saveExecl((*reinterpret_cast< QMap(*)>(_a[1]))); break;
78 | default: ;
79 | }
80 | } else if (_c == QMetaObject::IndexOfMethod) {
81 | int *result = reinterpret_cast(_a[0]);
82 | void **func = reinterpret_cast(_a[1]);
83 | {
84 | typedef void (ExcelEngine::*_t)(QMap );
85 | if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&ExcelEngine::signals_saveExecl)) {
86 | *result = 0;
87 | }
88 | }
89 | }
90 | }
91 |
92 | const QMetaObject ExcelEngine::staticMetaObject = {
93 | { &QWidget::staticMetaObject, qt_meta_stringdata_ExcelEngine.data,
94 | qt_meta_data_ExcelEngine, qt_static_metacall, 0, 0}
95 | };
96 |
97 |
98 | const QMetaObject *ExcelEngine::metaObject() const
99 | {
100 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
101 | }
102 |
103 | void *ExcelEngine::qt_metacast(const char *_clname)
104 | {
105 | if (!_clname) return 0;
106 | if (!strcmp(_clname, qt_meta_stringdata_ExcelEngine.stringdata))
107 | return static_cast(const_cast< ExcelEngine*>(this));
108 | return QWidget::qt_metacast(_clname);
109 | }
110 |
111 | int ExcelEngine::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
112 | {
113 | _id = QWidget::qt_metacall(_c, _id, _a);
114 | if (_id < 0)
115 | return _id;
116 | if (_c == QMetaObject::InvokeMetaMethod) {
117 | if (_id < 2)
118 | qt_static_metacall(this, _c, _id, _a);
119 | _id -= 2;
120 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
121 | if (_id < 2)
122 | *reinterpret_cast(_a[0]) = -1;
123 | _id -= 2;
124 | }
125 | return _id;
126 | }
127 |
128 | // SIGNAL 0
129 | void ExcelEngine::signals_saveExecl(QMap _t1)
130 | {
131 | void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)) };
132 | QMetaObject::activate(this, &staticMetaObject, 0, _a);
133 | }
134 | QT_END_MOC_NAMESPACE
135 |
--------------------------------------------------------------------------------
/release/moc_excelengine_1.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/moc_excelengine_1.o
--------------------------------------------------------------------------------
/release/moc_main_menu.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'main_menu.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.1.0)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include "../main_menu.h"
10 | #include
11 | #include
12 | #if !defined(Q_MOC_OUTPUT_REVISION)
13 | #error "The header file 'main_menu.h' doesn't include ."
14 | #elif Q_MOC_OUTPUT_REVISION != 67
15 | #error "This file was generated using the moc from 5.1.0. It"
16 | #error "cannot be used with the include files from this version of Qt."
17 | #error "(The moc has changed too much.)"
18 | #endif
19 |
20 | QT_BEGIN_MOC_NAMESPACE
21 | struct qt_meta_stringdata_MainMenu_t {
22 | QByteArrayData data[4];
23 | char stringdata[46];
24 | };
25 | #define QT_MOC_LITERAL(idx, ofs, len) \
26 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
27 | offsetof(qt_meta_stringdata_MainMenu_t, stringdata) + ofs \
28 | - idx * sizeof(QByteArrayData) \
29 | )
30 | static const qt_meta_stringdata_MainMenu_t qt_meta_stringdata_MainMenu = {
31 | {
32 | QT_MOC_LITERAL(0, 0, 8),
33 | QT_MOC_LITERAL(1, 9, 14),
34 | QT_MOC_LITERAL(2, 24, 0),
35 | QT_MOC_LITERAL(3, 25, 19)
36 | },
37 | "MainMenu\0sqlinit_signal\0\0changepasswd_signal\0"
38 | };
39 | #undef QT_MOC_LITERAL
40 |
41 | static const uint qt_meta_data_MainMenu[] = {
42 |
43 | // content:
44 | 7, // revision
45 | 0, // classname
46 | 0, 0, // classinfo
47 | 2, 14, // methods
48 | 0, 0, // properties
49 | 0, 0, // enums/sets
50 | 0, 0, // constructors
51 | 0, // flags
52 | 2, // signalCount
53 |
54 | // signals: name, argc, parameters, tag, flags
55 | 1, 0, 24, 2, 0x05,
56 | 3, 0, 25, 2, 0x05,
57 |
58 | // signals: parameters
59 | QMetaType::Void,
60 | QMetaType::Void,
61 |
62 | 0 // eod
63 | };
64 |
65 | void MainMenu::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
66 | {
67 | if (_c == QMetaObject::InvokeMetaMethod) {
68 | MainMenu *_t = static_cast(_o);
69 | switch (_id) {
70 | case 0: _t->sqlinit_signal(); break;
71 | case 1: _t->changepasswd_signal(); break;
72 | default: ;
73 | }
74 | } else if (_c == QMetaObject::IndexOfMethod) {
75 | int *result = reinterpret_cast(_a[0]);
76 | void **func = reinterpret_cast(_a[1]);
77 | {
78 | typedef void (MainMenu::*_t)();
79 | if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&MainMenu::sqlinit_signal)) {
80 | *result = 0;
81 | }
82 | }
83 | {
84 | typedef void (MainMenu::*_t)();
85 | if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&MainMenu::changepasswd_signal)) {
86 | *result = 1;
87 | }
88 | }
89 | }
90 | Q_UNUSED(_a);
91 | }
92 |
93 | const QMetaObject MainMenu::staticMetaObject = {
94 | { &QMenu::staticMetaObject, qt_meta_stringdata_MainMenu.data,
95 | qt_meta_data_MainMenu, qt_static_metacall, 0, 0}
96 | };
97 |
98 |
99 | const QMetaObject *MainMenu::metaObject() const
100 | {
101 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
102 | }
103 |
104 | void *MainMenu::qt_metacast(const char *_clname)
105 | {
106 | if (!_clname) return 0;
107 | if (!strcmp(_clname, qt_meta_stringdata_MainMenu.stringdata))
108 | return static_cast(const_cast< MainMenu*>(this));
109 | return QMenu::qt_metacast(_clname);
110 | }
111 |
112 | int MainMenu::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
113 | {
114 | _id = QMenu::qt_metacall(_c, _id, _a);
115 | if (_id < 0)
116 | return _id;
117 | if (_c == QMetaObject::InvokeMetaMethod) {
118 | if (_id < 2)
119 | qt_static_metacall(this, _c, _id, _a);
120 | _id -= 2;
121 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
122 | if (_id < 2)
123 | *reinterpret_cast(_a[0]) = -1;
124 | _id -= 2;
125 | }
126 | return _id;
127 | }
128 |
129 | // SIGNAL 0
130 | void MainMenu::sqlinit_signal()
131 | {
132 | QMetaObject::activate(this, &staticMetaObject, 0, 0);
133 | }
134 |
135 | // SIGNAL 1
136 | void MainMenu::changepasswd_signal()
137 | {
138 | QMetaObject::activate(this, &staticMetaObject, 1, 0);
139 | }
140 | QT_END_MOC_NAMESPACE
141 |
--------------------------------------------------------------------------------
/release/moc_main_menu.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/moc_main_menu.o
--------------------------------------------------------------------------------
/release/moc_mainwindow.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'mainwindow.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.1.0)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include "../mainwindow.h"
10 | #include
11 | #include
12 | #if !defined(Q_MOC_OUTPUT_REVISION)
13 | #error "The header file 'mainwindow.h' doesn't include ."
14 | #elif Q_MOC_OUTPUT_REVISION != 67
15 | #error "This file was generated using the moc from 5.1.0. It"
16 | #error "cannot be used with the include files from this version of Qt."
17 | #error "(The moc has changed too much.)"
18 | #endif
19 |
20 | QT_BEGIN_MOC_NAMESPACE
21 | struct qt_meta_stringdata_MainWindow_t {
22 | QByteArrayData data[7];
23 | char stringdata[89];
24 | };
25 | #define QT_MOC_LITERAL(idx, ofs, len) \
26 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
27 | offsetof(qt_meta_stringdata_MainWindow_t, stringdata) + ofs \
28 | - idx * sizeof(QByteArrayData) \
29 | )
30 | static const qt_meta_stringdata_MainWindow_t qt_meta_stringdata_MainWindow = {
31 | {
32 | QT_MOC_LITERAL(0, 0, 10),
33 | QT_MOC_LITERAL(1, 11, 7),
34 | QT_MOC_LITERAL(2, 19, 0),
35 | QT_MOC_LITERAL(3, 20, 13),
36 | QT_MOC_LITERAL(4, 34, 33),
37 | QT_MOC_LITERAL(5, 68, 6),
38 | QT_MOC_LITERAL(6, 75, 12)
39 | },
40 | "MainWindow\0showMax\0\0iconIsActived\0"
41 | "QSystemTrayIcon::ActivationReason\0"
42 | "reason\0showMainMenu\0"
43 | };
44 | #undef QT_MOC_LITERAL
45 |
46 | static const uint qt_meta_data_MainWindow[] = {
47 |
48 | // content:
49 | 7, // revision
50 | 0, // classname
51 | 0, 0, // classinfo
52 | 3, 14, // methods
53 | 0, 0, // properties
54 | 0, 0, // enums/sets
55 | 0, 0, // constructors
56 | 0, // flags
57 | 0, // signalCount
58 |
59 | // slots: name, argc, parameters, tag, flags
60 | 1, 0, 29, 2, 0x08,
61 | 3, 1, 30, 2, 0x08,
62 | 6, 0, 33, 2, 0x08,
63 |
64 | // slots: parameters
65 | QMetaType::Void,
66 | QMetaType::Void, 0x80000000 | 4, 5,
67 | QMetaType::Void,
68 |
69 | 0 // eod
70 | };
71 |
72 | void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
73 | {
74 | if (_c == QMetaObject::InvokeMetaMethod) {
75 | MainWindow *_t = static_cast(_o);
76 | switch (_id) {
77 | case 0: _t->showMax(); break;
78 | case 1: _t->iconIsActived((*reinterpret_cast< QSystemTrayIcon::ActivationReason(*)>(_a[1]))); break;
79 | case 2: _t->showMainMenu(); break;
80 | default: ;
81 | }
82 | }
83 | }
84 |
85 | const QMetaObject MainWindow::staticMetaObject = {
86 | { &QWidget::staticMetaObject, qt_meta_stringdata_MainWindow.data,
87 | qt_meta_data_MainWindow, qt_static_metacall, 0, 0}
88 | };
89 |
90 |
91 | const QMetaObject *MainWindow::metaObject() const
92 | {
93 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
94 | }
95 |
96 | void *MainWindow::qt_metacast(const char *_clname)
97 | {
98 | if (!_clname) return 0;
99 | if (!strcmp(_clname, qt_meta_stringdata_MainWindow.stringdata))
100 | return static_cast(const_cast< MainWindow*>(this));
101 | return QWidget::qt_metacast(_clname);
102 | }
103 |
104 | int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
105 | {
106 | _id = QWidget::qt_metacall(_c, _id, _a);
107 | if (_id < 0)
108 | return _id;
109 | if (_c == QMetaObject::InvokeMetaMethod) {
110 | if (_id < 3)
111 | qt_static_metacall(this, _c, _id, _a);
112 | _id -= 3;
113 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
114 | if (_id < 3)
115 | *reinterpret_cast(_a[0]) = -1;
116 | _id -= 3;
117 | }
118 | return _id;
119 | }
120 | QT_END_MOC_NAMESPACE
121 |
--------------------------------------------------------------------------------
/release/moc_mainwindow.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/moc_mainwindow.o
--------------------------------------------------------------------------------
/release/moc_push_button.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'push_button.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.1.0)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include "../push_button.h"
10 | #include
11 | #include
12 | #if !defined(Q_MOC_OUTPUT_REVISION)
13 | #error "The header file 'push_button.h' doesn't include ."
14 | #elif Q_MOC_OUTPUT_REVISION != 67
15 | #error "This file was generated using the moc from 5.1.0. It"
16 | #error "cannot be used with the include files from this version of Qt."
17 | #error "(The moc has changed too much.)"
18 | #endif
19 |
20 | QT_BEGIN_MOC_NAMESPACE
21 | struct qt_meta_stringdata_PushButton_t {
22 | QByteArrayData data[1];
23 | char stringdata[12];
24 | };
25 | #define QT_MOC_LITERAL(idx, ofs, len) \
26 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
27 | offsetof(qt_meta_stringdata_PushButton_t, stringdata) + ofs \
28 | - idx * sizeof(QByteArrayData) \
29 | )
30 | static const qt_meta_stringdata_PushButton_t qt_meta_stringdata_PushButton = {
31 | {
32 | QT_MOC_LITERAL(0, 0, 10)
33 | },
34 | "PushButton\0"
35 | };
36 | #undef QT_MOC_LITERAL
37 |
38 | static const uint qt_meta_data_PushButton[] = {
39 |
40 | // content:
41 | 7, // revision
42 | 0, // classname
43 | 0, 0, // classinfo
44 | 0, 0, // methods
45 | 0, 0, // properties
46 | 0, 0, // enums/sets
47 | 0, 0, // constructors
48 | 0, // flags
49 | 0, // signalCount
50 |
51 | 0 // eod
52 | };
53 |
54 | void PushButton::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
55 | {
56 | Q_UNUSED(_o);
57 | Q_UNUSED(_id);
58 | Q_UNUSED(_c);
59 | Q_UNUSED(_a);
60 | }
61 |
62 | const QMetaObject PushButton::staticMetaObject = {
63 | { &QPushButton::staticMetaObject, qt_meta_stringdata_PushButton.data,
64 | qt_meta_data_PushButton, qt_static_metacall, 0, 0}
65 | };
66 |
67 |
68 | const QMetaObject *PushButton::metaObject() const
69 | {
70 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
71 | }
72 |
73 | void *PushButton::qt_metacast(const char *_clname)
74 | {
75 | if (!_clname) return 0;
76 | if (!strcmp(_clname, qt_meta_stringdata_PushButton.stringdata))
77 | return static_cast(const_cast< PushButton*>(this));
78 | return QPushButton::qt_metacast(_clname);
79 | }
80 |
81 | int PushButton::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
82 | {
83 | _id = QPushButton::qt_metacall(_c, _id, _a);
84 | if (_id < 0)
85 | return _id;
86 | return _id;
87 | }
88 | QT_END_MOC_NAMESPACE
89 |
--------------------------------------------------------------------------------
/release/moc_push_button.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/moc_push_button.o
--------------------------------------------------------------------------------
/release/moc_system_tray.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'system_tray.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.1.0)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include "../system_tray.h"
10 | #include
11 | #include
12 | #if !defined(Q_MOC_OUTPUT_REVISION)
13 | #error "The header file 'system_tray.h' doesn't include ."
14 | #elif Q_MOC_OUTPUT_REVISION != 67
15 | #error "This file was generated using the moc from 5.1.0. It"
16 | #error "cannot be used with the include files from this version of Qt."
17 | #error "(The moc has changed too much.)"
18 | #endif
19 |
20 | QT_BEGIN_MOC_NAMESPACE
21 | struct qt_meta_stringdata_SystemTray_t {
22 | QByteArrayData data[3];
23 | char stringdata[21];
24 | };
25 | #define QT_MOC_LITERAL(idx, ofs, len) \
26 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
27 | offsetof(qt_meta_stringdata_SystemTray_t, stringdata) + ofs \
28 | - idx * sizeof(QByteArrayData) \
29 | )
30 | static const qt_meta_stringdata_SystemTray_t qt_meta_stringdata_SystemTray = {
31 | {
32 | QT_MOC_LITERAL(0, 0, 10),
33 | QT_MOC_LITERAL(1, 11, 7),
34 | QT_MOC_LITERAL(2, 19, 0)
35 | },
36 | "SystemTray\0exitlog\0\0"
37 | };
38 | #undef QT_MOC_LITERAL
39 |
40 | static const uint qt_meta_data_SystemTray[] = {
41 |
42 | // content:
43 | 7, // revision
44 | 0, // classname
45 | 0, 0, // classinfo
46 | 1, 14, // methods
47 | 0, 0, // properties
48 | 0, 0, // enums/sets
49 | 0, 0, // constructors
50 | 0, // flags
51 | 0, // signalCount
52 |
53 | // slots: name, argc, parameters, tag, flags
54 | 1, 0, 19, 2, 0x08,
55 |
56 | // slots: parameters
57 | QMetaType::Void,
58 |
59 | 0 // eod
60 | };
61 |
62 | void SystemTray::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
63 | {
64 | if (_c == QMetaObject::InvokeMetaMethod) {
65 | SystemTray *_t = static_cast(_o);
66 | switch (_id) {
67 | case 0: _t->exitlog(); break;
68 | default: ;
69 | }
70 | }
71 | Q_UNUSED(_a);
72 | }
73 |
74 | const QMetaObject SystemTray::staticMetaObject = {
75 | { &QSystemTrayIcon::staticMetaObject, qt_meta_stringdata_SystemTray.data,
76 | qt_meta_data_SystemTray, qt_static_metacall, 0, 0}
77 | };
78 |
79 |
80 | const QMetaObject *SystemTray::metaObject() const
81 | {
82 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
83 | }
84 |
85 | void *SystemTray::qt_metacast(const char *_clname)
86 | {
87 | if (!_clname) return 0;
88 | if (!strcmp(_clname, qt_meta_stringdata_SystemTray.stringdata))
89 | return static_cast(const_cast< SystemTray*>(this));
90 | return QSystemTrayIcon::qt_metacast(_clname);
91 | }
92 |
93 | int SystemTray::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
94 | {
95 | _id = QSystemTrayIcon::qt_metacall(_c, _id, _a);
96 | if (_id < 0)
97 | return _id;
98 | if (_c == QMetaObject::InvokeMetaMethod) {
99 | if (_id < 1)
100 | qt_static_metacall(this, _c, _id, _a);
101 | _id -= 1;
102 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
103 | if (_id < 1)
104 | *reinterpret_cast(_a[0]) = -1;
105 | _id -= 1;
106 | }
107 | return _id;
108 | }
109 | QT_END_MOC_NAMESPACE
110 |
--------------------------------------------------------------------------------
/release/moc_system_tray.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/moc_system_tray.o
--------------------------------------------------------------------------------
/release/moc_test.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'test.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.1.0)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include "../test.h"
10 | #include
11 | #include
12 | #if !defined(Q_MOC_OUTPUT_REVISION)
13 | #error "The header file 'test.h' doesn't include ."
14 | #elif Q_MOC_OUTPUT_REVISION != 67
15 | #error "This file was generated using the moc from 5.1.0. It"
16 | #error "cannot be used with the include files from this version of Qt."
17 | #error "(The moc has changed too much.)"
18 | #endif
19 |
20 | QT_BEGIN_MOC_NAMESPACE
21 | struct qt_meta_stringdata_test_t {
22 | QByteArrayData data[1];
23 | char stringdata[6];
24 | };
25 | #define QT_MOC_LITERAL(idx, ofs, len) \
26 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
27 | offsetof(qt_meta_stringdata_test_t, stringdata) + ofs \
28 | - idx * sizeof(QByteArrayData) \
29 | )
30 | static const qt_meta_stringdata_test_t qt_meta_stringdata_test = {
31 | {
32 | QT_MOC_LITERAL(0, 0, 4)
33 | },
34 | "test\0"
35 | };
36 | #undef QT_MOC_LITERAL
37 |
38 | static const uint qt_meta_data_test[] = {
39 |
40 | // content:
41 | 7, // revision
42 | 0, // classname
43 | 0, 0, // classinfo
44 | 0, 0, // methods
45 | 0, 0, // properties
46 | 0, 0, // enums/sets
47 | 0, 0, // constructors
48 | 0, // flags
49 | 0, // signalCount
50 |
51 | 0 // eod
52 | };
53 |
54 | void test::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
55 | {
56 | Q_UNUSED(_o);
57 | Q_UNUSED(_id);
58 | Q_UNUSED(_c);
59 | Q_UNUSED(_a);
60 | }
61 |
62 | const QMetaObject test::staticMetaObject = {
63 | { &QObject::staticMetaObject, qt_meta_stringdata_test.data,
64 | qt_meta_data_test, qt_static_metacall, 0, 0}
65 | };
66 |
67 |
68 | const QMetaObject *test::metaObject() const
69 | {
70 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
71 | }
72 |
73 | void *test::qt_metacast(const char *_clname)
74 | {
75 | if (!_clname) return 0;
76 | if (!strcmp(_clname, qt_meta_stringdata_test.stringdata))
77 | return static_cast(const_cast< test*>(this));
78 | return QObject::qt_metacast(_clname);
79 | }
80 |
81 | int test::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
82 | {
83 | _id = QObject::qt_metacall(_c, _id, _a);
84 | if (_id < 0)
85 | return _id;
86 | return _id;
87 | }
88 | QT_END_MOC_NAMESPACE
89 |
--------------------------------------------------------------------------------
/release/moc_test.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/moc_test.o
--------------------------------------------------------------------------------
/release/moc_title_widget.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'title_widget.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.1.0)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include "../title_widget.h"
10 | #include
11 | #include
12 | #if !defined(Q_MOC_OUTPUT_REVISION)
13 | #error "The header file 'title_widget.h' doesn't include ."
14 | #elif Q_MOC_OUTPUT_REVISION != 67
15 | #error "This file was generated using the moc from 5.1.0. It"
16 | #error "cannot be used with the include files from this version of Qt."
17 | #error "(The moc has changed too much.)"
18 | #endif
19 |
20 | QT_BEGIN_MOC_NAMESPACE
21 | struct qt_meta_stringdata_TitleWidget_t {
22 | QByteArrayData data[7];
23 | char stringdata[64];
24 | };
25 | #define QT_MOC_LITERAL(idx, ofs, len) \
26 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
27 | offsetof(qt_meta_stringdata_TitleWidget_t, stringdata) + ofs \
28 | - idx * sizeof(QByteArrayData) \
29 | )
30 | static const qt_meta_stringdata_TitleWidget_t qt_meta_stringdata_TitleWidget = {
31 | {
32 | QT_MOC_LITERAL(0, 0, 11),
33 | QT_MOC_LITERAL(1, 12, 8),
34 | QT_MOC_LITERAL(2, 21, 0),
35 | QT_MOC_LITERAL(3, 22, 7),
36 | QT_MOC_LITERAL(4, 30, 7),
37 | QT_MOC_LITERAL(5, 38, 12),
38 | QT_MOC_LITERAL(6, 51, 11)
39 | },
40 | "TitleWidget\0showSkin\0\0showMin\0showMax\0"
41 | "showMainMenu\0closeWidget\0"
42 | };
43 | #undef QT_MOC_LITERAL
44 |
45 | static const uint qt_meta_data_TitleWidget[] = {
46 |
47 | // content:
48 | 7, // revision
49 | 0, // classname
50 | 0, 0, // classinfo
51 | 5, 14, // methods
52 | 0, 0, // properties
53 | 0, 0, // enums/sets
54 | 0, 0, // constructors
55 | 0, // flags
56 | 5, // signalCount
57 |
58 | // signals: name, argc, parameters, tag, flags
59 | 1, 0, 39, 2, 0x05,
60 | 3, 0, 40, 2, 0x05,
61 | 4, 0, 41, 2, 0x05,
62 | 5, 0, 42, 2, 0x05,
63 | 6, 0, 43, 2, 0x05,
64 |
65 | // signals: parameters
66 | QMetaType::Void,
67 | QMetaType::Void,
68 | QMetaType::Void,
69 | QMetaType::Void,
70 | QMetaType::Void,
71 |
72 | 0 // eod
73 | };
74 |
75 | void TitleWidget::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
76 | {
77 | if (_c == QMetaObject::InvokeMetaMethod) {
78 | TitleWidget *_t = static_cast(_o);
79 | switch (_id) {
80 | case 0: _t->showSkin(); break;
81 | case 1: _t->showMin(); break;
82 | case 2: _t->showMax(); break;
83 | case 3: _t->showMainMenu(); break;
84 | case 4: _t->closeWidget(); break;
85 | default: ;
86 | }
87 | } else if (_c == QMetaObject::IndexOfMethod) {
88 | int *result = reinterpret_cast(_a[0]);
89 | void **func = reinterpret_cast(_a[1]);
90 | {
91 | typedef void (TitleWidget::*_t)();
92 | if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&TitleWidget::showSkin)) {
93 | *result = 0;
94 | }
95 | }
96 | {
97 | typedef void (TitleWidget::*_t)();
98 | if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&TitleWidget::showMin)) {
99 | *result = 1;
100 | }
101 | }
102 | {
103 | typedef void (TitleWidget::*_t)();
104 | if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&TitleWidget::showMax)) {
105 | *result = 2;
106 | }
107 | }
108 | {
109 | typedef void (TitleWidget::*_t)();
110 | if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&TitleWidget::showMainMenu)) {
111 | *result = 3;
112 | }
113 | }
114 | {
115 | typedef void (TitleWidget::*_t)();
116 | if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&TitleWidget::closeWidget)) {
117 | *result = 4;
118 | }
119 | }
120 | }
121 | Q_UNUSED(_a);
122 | }
123 |
124 | const QMetaObject TitleWidget::staticMetaObject = {
125 | { &QWidget::staticMetaObject, qt_meta_stringdata_TitleWidget.data,
126 | qt_meta_data_TitleWidget, qt_static_metacall, 0, 0}
127 | };
128 |
129 |
130 | const QMetaObject *TitleWidget::metaObject() const
131 | {
132 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
133 | }
134 |
135 | void *TitleWidget::qt_metacast(const char *_clname)
136 | {
137 | if (!_clname) return 0;
138 | if (!strcmp(_clname, qt_meta_stringdata_TitleWidget.stringdata))
139 | return static_cast(const_cast< TitleWidget*>(this));
140 | return QWidget::qt_metacast(_clname);
141 | }
142 |
143 | int TitleWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
144 | {
145 | _id = QWidget::qt_metacall(_c, _id, _a);
146 | if (_id < 0)
147 | return _id;
148 | if (_c == QMetaObject::InvokeMetaMethod) {
149 | if (_id < 5)
150 | qt_static_metacall(this, _c, _id, _a);
151 | _id -= 5;
152 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
153 | if (_id < 5)
154 | *reinterpret_cast(_a[0]) = -1;
155 | _id -= 5;
156 | }
157 | return _id;
158 | }
159 |
160 | // SIGNAL 0
161 | void TitleWidget::showSkin()
162 | {
163 | QMetaObject::activate(this, &staticMetaObject, 0, 0);
164 | }
165 |
166 | // SIGNAL 1
167 | void TitleWidget::showMin()
168 | {
169 | QMetaObject::activate(this, &staticMetaObject, 1, 0);
170 | }
171 |
172 | // SIGNAL 2
173 | void TitleWidget::showMax()
174 | {
175 | QMetaObject::activate(this, &staticMetaObject, 2, 0);
176 | }
177 |
178 | // SIGNAL 3
179 | void TitleWidget::showMainMenu()
180 | {
181 | QMetaObject::activate(this, &staticMetaObject, 3, 0);
182 | }
183 |
184 | // SIGNAL 4
185 | void TitleWidget::closeWidget()
186 | {
187 | QMetaObject::activate(this, &staticMetaObject, 4, 0);
188 | }
189 | QT_END_MOC_NAMESPACE
190 |
--------------------------------------------------------------------------------
/release/moc_title_widget.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/moc_title_widget.o
--------------------------------------------------------------------------------
/release/moc_toolswidget.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'toolswidget.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.1.0)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include "../toolswidget.h"
10 | #include
11 | #include
12 | #if !defined(Q_MOC_OUTPUT_REVISION)
13 | #error "The header file 'toolswidget.h' doesn't include ."
14 | #elif Q_MOC_OUTPUT_REVISION != 67
15 | #error "This file was generated using the moc from 5.1.0. It"
16 | #error "cannot be used with the include files from this version of Qt."
17 | #error "(The moc has changed too much.)"
18 | #endif
19 |
20 | QT_BEGIN_MOC_NAMESPACE
21 | struct qt_meta_stringdata_ToolsWidget_t {
22 | QByteArrayData data[1];
23 | char stringdata[13];
24 | };
25 | #define QT_MOC_LITERAL(idx, ofs, len) \
26 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
27 | offsetof(qt_meta_stringdata_ToolsWidget_t, stringdata) + ofs \
28 | - idx * sizeof(QByteArrayData) \
29 | )
30 | static const qt_meta_stringdata_ToolsWidget_t qt_meta_stringdata_ToolsWidget = {
31 | {
32 | QT_MOC_LITERAL(0, 0, 11)
33 | },
34 | "ToolsWidget\0"
35 | };
36 | #undef QT_MOC_LITERAL
37 |
38 | static const uint qt_meta_data_ToolsWidget[] = {
39 |
40 | // content:
41 | 7, // revision
42 | 0, // classname
43 | 0, 0, // classinfo
44 | 0, 0, // methods
45 | 0, 0, // properties
46 | 0, 0, // enums/sets
47 | 0, 0, // constructors
48 | 0, // flags
49 | 0, // signalCount
50 |
51 | 0 // eod
52 | };
53 |
54 | void ToolsWidget::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
55 | {
56 | Q_UNUSED(_o);
57 | Q_UNUSED(_id);
58 | Q_UNUSED(_c);
59 | Q_UNUSED(_a);
60 | }
61 |
62 | const QMetaObject ToolsWidget::staticMetaObject = {
63 | { &QWidget::staticMetaObject, qt_meta_stringdata_ToolsWidget.data,
64 | qt_meta_data_ToolsWidget, qt_static_metacall, 0, 0}
65 | };
66 |
67 |
68 | const QMetaObject *ToolsWidget::metaObject() const
69 | {
70 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
71 | }
72 |
73 | void *ToolsWidget::qt_metacast(const char *_clname)
74 | {
75 | if (!_clname) return 0;
76 | if (!strcmp(_clname, qt_meta_stringdata_ToolsWidget.stringdata))
77 | return static_cast(const_cast< ToolsWidget*>(this));
78 | return QWidget::qt_metacast(_clname);
79 | }
80 |
81 | int ToolsWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
82 | {
83 | _id = QWidget::qt_metacall(_c, _id, _a);
84 | if (_id < 0)
85 | return _id;
86 | return _id;
87 | }
88 | QT_END_MOC_NAMESPACE
89 |
--------------------------------------------------------------------------------
/release/moc_toolswidget.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/moc_toolswidget.o
--------------------------------------------------------------------------------
/release/push_button.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/push_button.o
--------------------------------------------------------------------------------
/release/qrc_QRC.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/qrc_QRC.o
--------------------------------------------------------------------------------
/release/sqlapi.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/sqlapi.o
--------------------------------------------------------------------------------
/release/storage_back.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/storage_back.exe
--------------------------------------------------------------------------------
/release/storage_res.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/storage_res.o
--------------------------------------------------------------------------------
/release/system_tray.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/system_tray.o
--------------------------------------------------------------------------------
/release/test.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/test.o
--------------------------------------------------------------------------------
/release/title_widget.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/title_widget.o
--------------------------------------------------------------------------------
/release/toolswidget.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/release/toolswidget.o
--------------------------------------------------------------------------------
/skin/style0.qss:
--------------------------------------------------------------------------------
1 | /* 黄-绿 */
2 | /*{
3 | font-size:13px;
4 | color:back;
5 | font-family:"宋体";
6 | }*/
7 |
8 | CallWidget QLineEdit#telEdt
9 | {
10 | font-size:24px;
11 |
12 | }
13 |
14 |
15 | QMainWindow,QDialog,QTableView,QFileDialog,QListView{
16 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
17 | stop: 0 #BFEF8F,stop: 0.2 #9FE758, stop: 0.4 #80DF20,stop: 0.6 #60A718,stop: 0.8 #407010,stop: 1.0 #203808);
18 | }
19 |
20 |
21 | QMenu, QMenuBar,QMessageBox,QProgressBar{
22 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
23 | stop: 0 #BFEF8F,stop: 1.0 #BFEF8F);
24 | border: 1px solid white;
25 | border-radius:5px; /* 圆角优化 值 = 弧度 */
26 | }
27 |
28 |
29 | QMenu::item:selected {
30 |
31 | border-radius:5px; /* 圆角优化 值 = 弧度 */
32 | border: 1px solid white;
33 | border-width:1px;
34 | border-color: #516589;
35 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
36 | stop: 0 #1E293A,
37 | stop: 1.0 #2C547E);
38 | color:#E6FFFF;
39 | }
40 |
41 |
42 | QMenu::icon:checked { /* appearance of a 'checked' icon */
43 | background: gray;
44 | border: 1px inset gray;
45 | position: absolute;
46 | top: 1px;
47 | right: 1px;
48 | bottom: 1px;
49 | left: 1px;
50 | }
51 |
52 | QMenu::separator {
53 | height: 1px;
54 | background: #1D99A9;
55 | /*margin-left: 10px;*/
56 | /*margin-right: 5px;*/
57 | }
58 |
59 | QMenu::indicator {
60 | width: 13px;
61 | height: 13px;
62 | }
63 |
64 | /* non-exclusive indicator = check box style indicator (see QActionGroup::setExclusive) */
65 | QMenu::indicator:non-exclusive:unchecked {
66 | image: url(qss/checkbox_unchecked.png);
67 | }
68 |
69 | QMenu::indicator:non-exclusive:unchecked:selected {
70 | image: url(qss/checkbox_unchecked_hover.png);
71 | }
72 |
73 | QMenu::indicator:non-exclusive:checked {
74 | image: url(qss/checkbox_checked.png);
75 | }
76 |
77 | QMenu::indicator:non-exclusive:checked:selected {
78 | image: url(qss/checkbox_checked_hover.png);
79 | }
80 |
81 | /* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */
82 | QMenu::indicator:exclusive:unchecked {
83 | image: url(qss/radiobutton_unchecked.png);
84 | }
85 |
86 | QMenu::indicator:exclusive:unchecked:selected {
87 | image: url(qss/radiobutton_unchecked_hover.png);
88 | }
89 |
90 |
91 | QLabel{
92 | background:transparent;
93 | }
94 | /*
95 | QCheckBox{
96 | border-style: outset;
97 | border-width: 1px;
98 |
99 | border: 2px solid back;
100 | border-radius:1px;
101 | padding:2px 4px;
102 | }
103 | */
104 |
105 |
106 | QDialog QPushButton,QDialog QToolButton{
107 | min-width:30px;
108 | min-height:23px;
109 | }
110 |
111 | QLineEdit{
112 | border-style: outset;
113 | border-width: 1px;
114 |
115 | border: 2px solid white; /* 边框 */
116 | /* border:groove gray;*/
117 | border-radius:10px; /* 圆角优化 值 = 弧度 */
118 | padding:1px 1px; /* btn 边界大小 */
119 |
120 | }
121 | QPushButton{
122 | border-style: outset;
123 | border-width: 1px;
124 |
125 | border: 2px solid white; /* 边框 */
126 | /* border:groove gray;*/
127 | border-radius:10px; /* 圆角优化 值 = 弧度 */
128 | padding:0px 0px; /* btn 边界大小 */
129 | }
130 |
131 | QPushButton{ color: back;}
132 |
133 | QPushButton::hover{background-color:green;} /* 光标在btn 时为grenn */
134 | QPushButton::pressed{ background:qlineargradient(x1:0,y1:0.5,x2:1,y2:0.5,
135 | stop:0 green,stop:0.5 cyan stop: 1 darkcyan);}
136 |
137 |
138 |
139 | DailForm QLineEdit#phoneLineEdt{
140 | font-size:36px;
141 | font-weight: bold;
142 | }
143 |
144 | QComboBox{
145 | color: rgb(0, 0, 0);
146 | font: 75 11pt "Bitstream Charter";
147 | border-width: 2px;
148 | background-color: rgb(170, 170, 0);
149 | border-color: rgb(255, 255, 255);
150 | border-style: solid;
151 | border-radius: 5;
152 | }
153 | QComboBox:hover{
154 |
155 | }
156 |
157 | QComboBox QAbstractItemView {
158 | border: 2px solid #32435E;
159 | selection-background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
160 | stop: 0 #506B79,stop: 1.0 #0D95A6);
161 | background: #80DF20;
162 | }
163 | QDoubleSpinBox {
164 | color: rgb(0, 0, 0);
165 | font: 75 11pt "Bitstream Charter";
166 | border-width: 2px;
167 | background-color: rgb(170, 170, 0);
168 | border-color: rgb(255, 255, 255);
169 | border-style: solid;
170 | border-radius: 5;
171 |
172 | }
173 |
174 |
175 |
176 |
--------------------------------------------------------------------------------
/skin/style1.qss:
--------------------------------------------------------------------------------
1 | /* 绿-青 */
2 |
3 | /*{
4 | font-size:13px;
5 | color:back;
6 | font-family:"宋体";
7 | }*/
8 |
9 | CallWidget QLineEdit#telEdt
10 | {
11 | font-size:24px;
12 |
13 | }
14 |
15 |
16 | QMainWindow,QDialog,QTableView {
17 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
18 | stop: 0 #8FEFBF,stop: 0.2 #58E79F, stop: 0.4 #20DF80,stop: 0.6 #18A760,stop: 0.8 #107040,stop: 1.0 #083820);
19 | }
20 |
21 |
22 |
23 | QMenu, QMenuBar,QMessageBox,QProgressBar{
24 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
25 | stop: 0 #8FEFBF,stop: 1.0 #8FEFBF);
26 | border: 1px solid white;
27 | border-radius:5px; /* 圆角优化 值 = 弧度 */
28 | }
29 |
30 |
31 | QMenu::item:selected {
32 |
33 | border-radius:5px; /* 圆角优化 值 = 弧度 */
34 | border: 1px solid white;
35 | border-width:1px;
36 | border-color: #516589;
37 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
38 | stop: 0 #1E293A,
39 | stop: 1.0 #2C547E);
40 | color:#E6FFFF;
41 | }
42 |
43 |
44 | QMenu::icon:checked { /* appearance of a 'checked' icon */
45 | background: gray;
46 | border: 1px inset gray;
47 | position: absolute;
48 | top: 1px;
49 | right: 1px;
50 | bottom: 1px;
51 | left: 1px;
52 | }
53 |
54 | QMenu::separator {
55 | height: 1px;
56 | background: #1D99A9;
57 | /*margin-left: 10px;*/
58 | /*margin-right: 5px;*/
59 | }
60 |
61 | QMenu::indicator {
62 | width: 13px;
63 | height: 13px;
64 | }
65 |
66 | /* non-exclusive indicator = check box style indicator (see QActionGroup::setExclusive) */
67 | QMenu::indicator:non-exclusive:unchecked {
68 | image: url(qss/checkbox_unchecked.png);
69 | }
70 |
71 | QMenu::indicator:non-exclusive:unchecked:selected {
72 | image: url(qss/checkbox_unchecked_hover.png);
73 | }
74 |
75 | QMenu::indicator:non-exclusive:checked {
76 | image: url(qss/checkbox_checked.png);
77 | }
78 |
79 | QMenu::indicator:non-exclusive:checked:selected {
80 | image: url(qss/checkbox_checked_hover.png);
81 | }
82 |
83 | /* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */
84 | QMenu::indicator:exclusive:unchecked {
85 | image: url(qss/radiobutton_unchecked.png);
86 | }
87 |
88 | QMenu::indicator:exclusive:unchecked:selected {
89 | image: url(qss/radiobutton_unchecked_hover.png);
90 | }
91 |
92 |
93 | QLabel{
94 | background:transparent;
95 | }
96 |
97 |
98 |
99 | QDialog QPushButton,QDialog QToolButton{
100 | min-width:30px;
101 | min-height:23px;
102 | }
103 | QPushButton{
104 | border-style: outset;
105 | border-width: 1px;
106 |
107 | border: 2px solid white; /* 边框 */
108 | /* border:groove gray;*/
109 | border-radius:10px; /* 圆角优化 值 = 弧度 */
110 | padding:0px 0px; /* btn 边界大小 */
111 | }
112 |
113 | QPushButton{ color: back;}
114 |
115 | QPushButton::hover{background-color:green;} /* 光标在btn 时为grenn */
116 | QPushButton::pressed{ background:qlineargradient(x1:0,y1:0.5,x2:1,y2:0.5,
117 | stop:0 green,stop:0.5 cyan stop: 1 darkcyan);}
118 |
119 | QLineEdit{
120 | border-style: outset;
121 | border-width: 1px;
122 |
123 | border: 2px solid white; /* 边框 */
124 | /* border:groove gray;*/
125 | border-radius:10px; /* 圆角优化 值 = 弧度 */
126 | padding:1px 1px; /* btn 边界大小 */
127 |
128 | }
129 |
130 |
131 | DailForm QLineEdit#phoneLineEdt{
132 | font-size:36px;
133 | font-weight: bold;
134 | }
135 |
136 | QComboBox{
137 | color: rgb(0, 0, 0);
138 | font: 75 11pt "Bitstream Charter";
139 | border-width: 2px;
140 | background-color: rgb(170, 170, 0);
141 | border-color: rgb(255, 255, 255);
142 | border-style: solid;
143 | border-radius: 5;
144 | }
145 | QComboBox:hover{
146 |
147 | }
148 |
149 | QComboBox QAbstractItemView {
150 | border: 2px solid #32435E;
151 | selection-background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
152 | stop: 0 #506B79,stop: 1.0 #0D95A6);
153 | background: #58E79F;
154 | }
155 | QDoubleSpinBox {
156 | color: rgb(0, 0, 0);
157 | font: 75 11pt "Bitstream Charter";
158 | border-width: 2px;
159 | background-color: rgb(170, 170, 0);
160 | border-color: rgb(255, 255, 255);
161 | border-style: solid;
162 | border-radius: 5;
163 |
164 | }
165 |
--------------------------------------------------------------------------------
/skin/style2.qss:
--------------------------------------------------------------------------------
1 | /* 绿-青 */
2 |
3 | /*{
4 | font-size:13px;
5 | color:back;
6 | font-family:"宋体";
7 | }*/
8 |
9 | CallWidget QLineEdit#telEdt
10 | {
11 | font-size:24px;
12 |
13 | }
14 |
15 | QMainWindow,QDialog,QTableView{
16 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
17 | stop: 0 #8FEFEF,stop: 0.2 #58E7E7, stop: 0.4 #20DFDF,stop: 0.6 #18A7A7,stop: 0.8 #107070,stop: 1.0 #083838);
18 | }
19 |
20 |
21 | QMenu, QMenuBar,QMessageBox,QProgressBar{
22 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
23 | stop: 0 #8FEFEF,stop: 1.0 #8FEFEF);
24 | border: 1px solid white;
25 | border-radius:5px; /* 圆角优化 值 = 弧度 */
26 | }
27 |
28 |
29 | QMenu::item:selected {
30 |
31 | border-radius:5px; /* 圆角优化 值 = 弧度 */
32 | border: 1px solid white;
33 | border-width:1px;
34 | border-color: #516589;
35 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
36 | stop: 0 #1E293A,
37 | stop: 1.0 #2C547E);
38 | color:#E6FFFF;
39 | }
40 |
41 |
42 | QMenu::icon:checked { /* appearance of a 'checked' icon */
43 | background: gray;
44 | border: 1px inset gray;
45 | position: absolute;
46 | top: 1px;
47 | right: 1px;
48 | bottom: 1px;
49 | left: 1px;
50 | }
51 |
52 | QMenu::separator {
53 | height: 1px;
54 | background: #1D99A9;
55 | /*margin-left: 10px;*/
56 | /*margin-right: 5px;*/
57 | }
58 |
59 | QMenu::indicator {
60 | width: 13px;
61 | height: 13px;
62 | }
63 |
64 | /* non-exclusive indicator = check box style indicator (see QActionGroup::setExclusive) */
65 | QMenu::indicator:non-exclusive:unchecked {
66 | image: url(qss/checkbox_unchecked.png);
67 | }
68 |
69 | QMenu::indicator:non-exclusive:unchecked:selected {
70 | image: url(qss/checkbox_unchecked_hover.png);
71 | }
72 |
73 | QMenu::indicator:non-exclusive:checked {
74 | image: url(qss/checkbox_checked.png);
75 | }
76 |
77 | QMenu::indicator:non-exclusive:checked:selected {
78 | image: url(qss/checkbox_checked_hover.png);
79 | }
80 |
81 | /* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */
82 | QMenu::indicator:exclusive:unchecked {
83 | image: url(qss/radiobutton_unchecked.png);
84 | }
85 |
86 | QMenu::indicator:exclusive:unchecked:selected {
87 | image: url(qss/radiobutton_unchecked_hover.png);
88 | }
89 |
90 |
91 | QLabel{
92 | background:transparent;
93 | }
94 |
95 |
96 |
97 | QDialog QPushButton,QDialog QToolButton{
98 | min-width:30px;
99 | min-height:23px;
100 | }
101 | QPushButton{
102 | border-style: outset;
103 | border-width: 1px;
104 |
105 | border: 2px solid white; /* 边框 */
106 | /* border:groove gray;*/
107 | border-radius:10px; /* 圆角优化 值 = 弧度 */
108 | padding:0px 0px; /* btn 边界大小 */
109 | }
110 |
111 | QPushButton{ color: back;}
112 |
113 | QPushButton::hover{background-color:green;} /* 光标在btn 时为grenn */
114 | QPushButton::pressed{ background:qlineargradient(x1:0,y1:0.5,x2:1,y2:0.5,
115 | stop:0 green,stop:0.5 cyan stop: 1 darkcyan);}
116 |
117 | QLineEdit{
118 | border-style: outset;
119 | border-width: 1px;
120 |
121 | border: 2px solid white; /* 边框 */
122 | /* border:groove gray;*/
123 | border-radius:10px; /* 圆角优化 值 = 弧度 */
124 | padding:1px 1px; /* btn 边界大小 */
125 |
126 | }
127 |
128 |
129 | DailForm QLineEdit#phoneLineEdt{
130 | font-size:36px;
131 | font-weight: bold;
132 | }
133 |
134 | QComboBox{
135 | color: rgb(0, 0, 0);
136 | font: 75 11pt "Bitstream Charter";
137 | border-width: 2px;
138 | background-color: rgb(170, 170, 0);
139 | border-color: rgb(255, 255, 255);
140 | border-style: solid;
141 | border-radius: 5;
142 | }
143 | QComboBox:hover{
144 |
145 | }
146 |
147 | QComboBox QAbstractItemView {
148 | border: 2px solid #32435E;
149 | selection-background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
150 | stop: 0 #506B79,stop: 1.0 #0D95A6);
151 | background: #58E7E7;
152 | }
153 | QDoubleSpinBox {
154 | color: rgb(0, 0, 0);
155 | font: 75 11pt "Bitstream Charter";
156 | border-width: 2px;
157 | background-color: rgb(170, 170, 0);
158 | border-color: rgb(255, 255, 255);
159 | border-style: solid;
160 | border-radius: 5;
161 |
162 | }
163 |
--------------------------------------------------------------------------------
/skin/style3.qss:
--------------------------------------------------------------------------------
1 | /* 青-蓝 */
2 | /*
3 | QFrame {
4 | background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0.960396, y2:0.949, stop:0 rgba(88, 245, 227, 255), stop:0.0940594 rgba(132, 246, 239, 255), stop:0.143564 rgba(130, 246, 233, 255), stop:0.222772 rgba(158, 249, 234, 255), stop:0.25 rgba(144, 248, 248, 255), stop:0.292079 rgba(173, 251, 252, 255), stop:0.326733 rgba(156, 248, 241, 255), stop:0.475248 rgba(158, 230, 226, 255), stop:0.554455 rgba(135, 251, 242, 255), stop:0.628713 rgba(139, 226, 226, 255), stop:0.805 rgba(150, 245, 242, 255), stop:0.866337 rgba(186, 254, 243, 255), stop:0.915842 rgba(188, 254, 250, 255), stop:1 rgba(190, 255, 248, 255));
5 | color: rgb(0, 0, 0);
6 | font: 75 11pt "Bitstream Charter";
7 |
8 | }
9 | */
10 |
11 |
12 | QMainWindow,QDialog,QTableView{
13 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
14 | stop: 0 #8FBFEF,stop: 0.2 #589FE7, stop: 0.4 #2080DF,stop: 0.6 #1860A7,stop: 0.8 #104070,stop: 1.0 #082038);
15 | }
16 |
17 |
18 |
19 | QMenu, QMenuBar,QMessageBox,QProgressBar{
20 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
21 | stop: 0 #8FBFEF,stop: 1.0 #8FBFEF);
22 | border: 1px solid white;
23 | border-radius:5px; /* 圆角优化 值 = 弧度 */
24 | }
25 |
26 |
27 | QMenu::item:selected {
28 |
29 | border-radius:5px; /* 圆角优化 值 = 弧度 */
30 | border: 1px solid white;
31 | border-width:1px;
32 | border-color: #516589;
33 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
34 | stop: 0 #1E293A,
35 | stop: 1.0 #2C547E);
36 | color:#E6FFFF;
37 | }
38 |
39 |
40 | QMenu::icon:checked { /* appearance of a 'checked' icon */
41 | background: gray;
42 | border: 1px inset gray;
43 | position: absolute;
44 | top: 1px;
45 | right: 1px;
46 | bottom: 1px;
47 | left: 1px;
48 | }
49 |
50 | QMenu::separator {
51 | height: 1px;
52 | background: #1D99A9;
53 | /*margin-left: 10px;*/
54 | /*margin-right: 5px;*/
55 | }
56 |
57 | QMenu::indicator {
58 | width: 13px;
59 | height: 13px;
60 | }
61 |
62 | /* non-exclusive indicator = check box style indicator (see QActionGroup::setExclusive) */
63 | QMenu::indicator:non-exclusive:unchecked {
64 | image: url(qss/checkbox_unchecked.png);
65 | }
66 |
67 | QMenu::indicator:non-exclusive:unchecked:selected {
68 | image: url(qss/checkbox_unchecked_hover.png);
69 | }
70 |
71 | QMenu::indicator:non-exclusive:checked {
72 | image: url(qss/checkbox_checked.png);
73 | }
74 |
75 | QMenu::indicator:non-exclusive:checked:selected {
76 | image: url(qss/checkbox_checked_hover.png);
77 | }
78 |
79 | /* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */
80 | QMenu::indicator:exclusive:unchecked {
81 | image: url(qss/radiobutton_unchecked.png);
82 | }
83 |
84 | QMenu::indicator:exclusive:unchecked:selected {
85 | image: url(qss/radiobutton_unchecked_hover.png);
86 | }
87 |
88 |
89 | QLabel{
90 | background:transparent;
91 | }
92 |
93 |
94 |
95 | QDialog QPushButton,QDialog QToolButton{
96 | min-width:30px;
97 | min-height:23px;
98 | }
99 | QPushButton{
100 | border-style: outset;
101 | border-width: 1px;
102 |
103 | border: 2px solid white; /* 边框 */
104 | /* border:groove gray;*/
105 | border-radius:10px; /* 圆角优化 值 = 弧度 */
106 | padding:0px 0px; /* btn 边界大小 */
107 | }
108 |
109 | QPushButton{ color: back;}
110 |
111 | QPushButton::hover{background-color:green;} /* 光标在btn 时为grenn */
112 | QPushButton::pressed{ background:qlineargradient(x1:0,y1:0.5,x2:1,y2:0.5,
113 | stop:0 green,stop:0.5 cyan stop: 1 darkcyan);}
114 |
115 |
116 | QLineEdit{
117 | border-style: outset;
118 | border-width: 1px;
119 |
120 | border: 2px solid white; /* 边框 */
121 | /* border:groove gray;*/
122 | border-radius:10px; /* 圆角优化 值 = 弧度 */
123 | padding:1px 1px; /* btn 边界大小 */
124 |
125 | }
126 |
127 | DailForm QLineEdit#phoneLineEdt{
128 | font-size:36px;
129 | font-weight: bold;
130 | }
131 |
132 | QComboBox{
133 | color: rgb(0, 0, 0);
134 | font: 75 11pt "Bitstream Charter";
135 | border-width: 2px;
136 | background-color: rgb(170, 170, 0);
137 | border-color: rgb(255, 255, 255);
138 | border-style: solid;
139 | border-radius: 5;
140 | }
141 | QComboBox:hover{
142 |
143 | }
144 |
145 | QComboBox QAbstractItemView {
146 | border: 2px solid #32435E;
147 | selection-background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
148 | stop: 0 #506B79,stop: 1.0 #0D95A6);
149 | background: #589FE7;
150 | }
151 | QDoubleSpinBox {
152 | color: rgb(0, 0, 0);
153 | font: 75 11pt "Bitstream Charter";
154 | border-width: 2px;
155 | background-color: rgb(170, 170, 0);
156 | border-color: rgb(255, 255, 255);
157 | border-style: solid;
158 | border-radius: 5;
159 |
160 | }
161 |
--------------------------------------------------------------------------------
/skin/style4.qss:
--------------------------------------------------------------------------------
1 | /* 蓝-紫 */
2 | /*
3 | QFrame {
4 | background-color: rgb(79, 149, 255);
5 | color:black;
6 | font: 75 12pt "Century Schoolbook L";
7 |
8 | }
9 | */
10 |
11 |
12 | QMainWindow,QDialog,QTableView{
13 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
14 | stop: 0 #BFAFCF,stop: 0.2 #9F87B7, stop: 0.4 #80609F,stop: 0.6 #604878,stop: 0.8 #403050,stop: 1.0 #201828);
15 | }
16 |
17 |
18 | QMenu, QMenuBar,QMessageBox,QProgressBar{
19 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
20 | stop: 0 #BFAFCF,stop: 1.0 #BFAFCF);
21 | border: 1px solid white;
22 | border-radius:5px; /* 圆角优化 值 = 弧度 */
23 | }
24 |
25 |
26 | QMenu::item:selected {
27 |
28 | border-radius:5px; /* 圆角优化 值 = 弧度 */
29 | border: 1px solid white;
30 | border-width:1px;
31 | border-color: #516589;
32 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
33 | stop: 0 #1E293A,
34 | stop: 1.0 #2C547E);
35 | color:#E6FFFF;
36 | }
37 |
38 |
39 | QMenu::icon:checked { /* appearance of a 'checked' icon */
40 | background: gray;
41 | border: 1px inset gray;
42 | position: absolute;
43 | top: 1px;
44 | right: 1px;
45 | bottom: 1px;
46 | left: 1px;
47 | }
48 |
49 | QMenu::separator {
50 | height: 1px;
51 | background: #1D99A9;
52 | /*margin-left: 10px;*/
53 | /*margin-right: 5px;*/
54 | }
55 |
56 | QMenu::indicator {
57 | width: 13px;
58 | height: 13px;
59 | }
60 |
61 | /* non-exclusive indicator = check box style indicator (see QActionGroup::setExclusive) */
62 | QMenu::indicator:non-exclusive:unchecked {
63 | image: url(qss/checkbox_unchecked.png);
64 | }
65 |
66 | QMenu::indicator:non-exclusive:unchecked:selected {
67 | image: url(qss/checkbox_unchecked_hover.png);
68 | }
69 |
70 | QMenu::indicator:non-exclusive:checked {
71 | image: url(qss/checkbox_checked.png);
72 | }
73 |
74 | QMenu::indicator:non-exclusive:checked:selected {
75 | image: url(qss/checkbox_checked_hover.png);
76 | }
77 |
78 | /* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */
79 | QMenu::indicator:exclusive:unchecked {
80 | image: url(qss/radiobutton_unchecked.png);
81 | }
82 |
83 | QMenu::indicator:exclusive:unchecked:selected {
84 | image: url(qss/radiobutton_unchecked_hover.png);
85 | }
86 |
87 |
88 | QLabel{
89 | background:transparent;
90 | }
91 |
92 |
93 |
94 | QDialog QPushButton,QDialog QToolButton{
95 | min-width:30px;
96 | min-height:23px;
97 | }
98 | QPushButton{
99 | border-style: outset;
100 | border-width: 1px;
101 |
102 | border: 2px solid white; /* 边框 */
103 | /* border:groove gray;*/
104 | border-radius:10px; /* 圆角优化 值 = 弧度 */
105 | padding:0px 0px; /* btn 边界大小 */
106 | }
107 |
108 | QPushButton{ color: back;}
109 |
110 | QPushButton::hover{background-color:green;} /* 光标在btn 时为grenn */
111 | QPushButton::pressed{ background:qlineargradient(x1:0,y1:0.5,x2:1,y2:0.5,
112 | stop:0 green,stop:0.5 cyan stop: 1 darkcyan);}
113 |
114 | QLineEdit{
115 | border-style: outset;
116 | border-width: 1px;
117 |
118 | border: 2px solid white; /* 边框 */
119 | /* border:groove gray;*/
120 | border-radius:10px; /* 圆角优化 值 = 弧度 */
121 | padding:1px 1px; /* btn 边界大小 */
122 |
123 | }
124 |
125 |
126 | DailForm QLineEdit{
127 | border-style: outset;
128 | border-width: 1px;
129 |
130 | border: 2px solid white; /* 边框 */
131 | /* border:groove gray;*/
132 | border-radius:10px; /* 圆角优化 值 = 弧度 */
133 | padding:1px 1px; /* btn 边界大小 */
134 |
135 | }
136 | QLineEdit#phoneLineEdt{
137 | font-size:36px;
138 | font-weight: bold;
139 | }
140 |
141 | QComboBox{
142 | color: rgb(0, 0, 0);
143 | font: 75 11pt "Bitstream Charter";
144 | border-width: 2px;
145 | background-color: rgb(170, 170, 0);
146 | border-color: rgb(255, 255, 255);
147 | border-style: solid;
148 | border-radius: 5;
149 | }
150 | QComboBox:hover{
151 |
152 | }
153 |
154 | QComboBox QAbstractItemView {
155 | border: 2px solid #32435E;
156 | selection-background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
157 | stop: 0 #506B79,stop: 1.0 #0D95A6);
158 | background: #9F87B7;
159 | }
160 | QDoubleSpinBox {
161 | color: rgb(0, 0, 0);
162 | font: 75 11pt "Bitstream Charter";
163 | border-width: 2px;
164 | background-color: rgb(170, 170, 0);
165 | border-color: rgb(255, 255, 255);
166 | border-style: solid;
167 | border-radius: 5;
168 |
169 | }
170 |
--------------------------------------------------------------------------------
/skin/style5.qss:
--------------------------------------------------------------------------------
1 | /* 紫 */
2 | /*{
3 | font-size:13px;
4 | color:back;
5 | font-family:"宋体";
6 | }*/
7 |
8 | QMainWindow,QDialog,QTableView{
9 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
10 | stop: 0 #DF9FDF,stop: 0.2 #CF70CF, stop: 0.4 #BF40BF,stop: 0.6 #8F308F,stop: 0.8 #602060,stop: 1.0 #301030);
11 | }
12 |
13 |
14 | QMenu, QMenuBar,QMessageBox,QProgressBar{
15 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
16 | stop: 0 #DF9FDF,stop: 1.0 #DF9FDF);
17 | border: 1px solid white;
18 | border-radius:5px; /* 圆角优化 值 = 弧度 */
19 | }
20 |
21 |
22 | QMenu::item:selected {
23 |
24 | border-radius:5px; /* 圆角优化 值 = 弧度 */
25 | border: 1px solid white;
26 | border-width:1px;
27 | border-color: #516589;
28 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
29 | stop: 0 #1E293A,
30 | stop: 1.0 #2C547E);
31 | color:#E6FFFF;
32 | }
33 |
34 |
35 | QMenu::icon:checked { /* appearance of a 'checked' icon */
36 | background: gray;
37 | border: 1px inset gray;
38 | position: absolute;
39 | top: 1px;
40 | right: 1px;
41 | bottom: 1px;
42 | left: 1px;
43 | }
44 |
45 | QMenu::separator {
46 | height: 1px;
47 | background: #1D99A9;
48 | /*margin-left: 10px;*/
49 | /*margin-right: 5px;*/
50 | }
51 |
52 | QMenu::indicator {
53 | width: 13px;
54 | height: 13px;
55 | }
56 |
57 | /* non-exclusive indicator = check box style indicator (see QActionGroup::setExclusive) */
58 | QMenu::indicator:non-exclusive:unchecked {
59 | image: url(qss/checkbox_unchecked.png);
60 | }
61 |
62 | QMenu::indicator:non-exclusive:unchecked:selected {
63 | image: url(qss/checkbox_unchecked_hover.png);
64 | }
65 |
66 | QMenu::indicator:non-exclusive:checked {
67 | image: url(qss/checkbox_checked.png);
68 | }
69 |
70 | QMenu::indicator:non-exclusive:checked:selected {
71 | image: url(qss/checkbox_checked_hover.png);
72 | }
73 |
74 | /* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */
75 | QMenu::indicator:exclusive:unchecked {
76 | image: url(qss/radiobutton_unchecked.png);
77 | }
78 |
79 | QMenu::indicator:exclusive:unchecked:selected {
80 | image: url(qss/radiobutton_unchecked_hover.png);
81 | }
82 |
83 |
84 | QLabel{
85 | background:transparent;
86 | }
87 |
88 |
89 |
90 | QDialog QPushButton,QDialog QToolButton{
91 | min-width:30px;
92 | min-height:23px;
93 | }
94 | QPushButton{
95 | border-style: outset;
96 | border-width: 1px;
97 |
98 | border: 2px solid white; /* 边框 */
99 | /* border:groove gray;*/
100 | border-radius:10px; /* 圆角优化 值 = 弧度 */
101 | padding:0px 0px; /* btn 边界大小 */
102 | }
103 |
104 | QPushButton{ color: back;}
105 |
106 | QPushButton::hover{background-color:green;} /* 光标在btn 时为grenn */
107 | QPushButton::pressed{ background:qlineargradient(x1:0,y1:0.5,x2:1,y2:0.5,
108 | stop:0 green,stop:0.5 cyan stop: 1 darkcyan);}
109 |
110 |
111 | QLineEdit{
112 | border-style: outset;
113 | border-width: 1px;
114 |
115 | border: 2px solid white; /* 边框 */
116 | /* border:groove gray;*/
117 | border-radius:10px; /* 圆角优化 值 = 弧度 */
118 | padding:1px 1px; /* btn 边界大小 */
119 |
120 | }
121 |
122 | DailForm QLineEdit{
123 | border-style: outset;
124 | border-width: 1px;
125 |
126 | border: 2px solid white; /* 边框 */
127 | /* border:groove gray;*/
128 | border-radius:10px; /* 圆角优化 值 = 弧度 */
129 | padding:1px 1px; /* btn 边界大小 */
130 |
131 | }
132 | QLineEdit#phoneLineEdt{
133 | font-size:36px;
134 | font-weight: bold;
135 | }
136 |
137 | QComboBox{
138 | color: rgb(0, 0, 0);
139 | font: 75 11pt "Bitstream Charter";
140 | border-width: 2px;
141 | background-color: rgb(170, 170, 0);
142 | border-color: rgb(255, 255, 255);
143 | border-style: solid;
144 | border-radius: 5;
145 | }
146 | QComboBox:hover{
147 |
148 | }
149 |
150 | QComboBox QAbstractItemView {
151 | border: 2px solid #32435E;
152 | selection-background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
153 | stop: 0 #506B79,stop: 1.0 #0D95A6);
154 | background: #CF70CF;
155 | }
156 | QDoubleSpinBox {
157 | color: rgb(0, 0, 0);
158 | font: 75 11pt "Bitstream Charter";
159 | border-width: 2px;
160 | background-color: rgb(170, 170, 0);
161 | border-color: rgb(255, 255, 255);
162 | border-style: solid;
163 | border-radius: 5;
164 |
165 | }
166 |
--------------------------------------------------------------------------------
/sql/nbut - 副本.zh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/sql/nbut - 副本.zh
--------------------------------------------------------------------------------
/sql/nbut.zh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/sql/nbut.zh
--------------------------------------------------------------------------------
/sqlapi.cpp:
--------------------------------------------------------------------------------
1 | #include "sqlapi.h"
2 |
3 | SqlApi::SqlApi()
4 | {
5 |
6 | }
7 |
8 | void SqlApi::search()
9 | {
10 | }
11 |
12 | void SqlApi::update()
13 | {
14 | }
15 |
16 | void SqlApi::add()
17 | {
18 | }
19 |
20 | void SqlApi::sqldelete()
21 | {
22 | }
23 |
--------------------------------------------------------------------------------
/sqlapi.h:
--------------------------------------------------------------------------------
1 | #ifndef SQLAPI_H
2 | #define SQLAPI_H
3 |
4 | #include
5 |
6 |
7 |
8 | typedef struct __storagedetail_t{
9 |
10 | }storagedetail_t;
11 |
12 | class SqlApi
13 | {
14 | public:
15 | SqlApi();
16 | private:
17 | QSqlDatabase db;
18 |
19 | void search();
20 | void add();
21 | void sqldelete();
22 | void update();
23 |
24 |
25 | };
26 |
27 | #endif // SQLAPI_H
28 |
--------------------------------------------------------------------------------
/storage.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/storage.ico
--------------------------------------------------------------------------------
/storage.rc:
--------------------------------------------------------------------------------
1 | IDI_ICON1 ICON DISCARDABLE "storage.ico"
2 |
--------------------------------------------------------------------------------
/storageconfigure.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | SQ002
4 | 99998888880001
5 | 99998888887777666666
6 | root
7 | acanoe11
8 | zezhong
9 | 6666
10 | 10
11 | 0
12 | 0
13 |
14 |
15 |
--------------------------------------------------------------------------------
/system_tray.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/system_tray.cpp
--------------------------------------------------------------------------------
/system_tray.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/francescoyang/stroage/0b2f0d1c2824d6a3bbc9459df080156cf86b85ff/system_tray.h
--------------------------------------------------------------------------------
/test.cpp:
--------------------------------------------------------------------------------
1 | #include "test.h"
2 |
3 | test::test(QObject *parent) :
4 | QObject(parent)
5 | {
6 | }
7 |
--------------------------------------------------------------------------------
/test.h:
--------------------------------------------------------------------------------
1 | #ifndef TEST_H
2 | #define TEST_H
3 |
4 | #include
5 |
6 | class test : public QObject
7 | {
8 | Q_OBJECT
9 | public:
10 | explicit test(QObject *parent = 0);
11 |
12 | signals:
13 |
14 | public slots:
15 |
16 | };
17 |
18 | #endif // TEST_H
19 |
--------------------------------------------------------------------------------
/title_widget.cpp:
--------------------------------------------------------------------------------
1 | #include "title_widget.h"
2 | #include
3 | #include
4 |
5 | TitleWidget::TitleWidget(QWidget *parent) :
6 | QWidget(parent)
7 | {
8 | QLabel * lab = new QLabel();
9 | lab->setText("test by acanoe");
10 | lab->setStyleSheet("color:red;");
11 | // lab->setStyleSheet("backcolor:red;");
12 |
13 |
14 | version_title = new QLabel();
15 | skin_button = new PushButton();
16 | main_menu_button = new PushButton();
17 | min_button = new PushButton();
18 | max_button = new PushButton();
19 | close_button = new PushButton();
20 | // medal_button = new QPushButton();
21 |
22 | //设置图片
23 | skin_button->loadPixmap(":/sysButton/skin_button");
24 | main_menu_button->loadPixmap(":/sysButton/main_menu");
25 | min_button->loadPixmap(":/sysButton/min_button");
26 | max_button->loadPixmap(":/sysButton/max_button");
27 | close_button->loadPixmap(":/sysButton/close_button");
28 |
29 | version_title->setStyleSheet("color:white;");
30 |
31 |
32 | connect(skin_button, SIGNAL(clicked()), this, SIGNAL(showSkin()));
33 | connect(main_menu_button, SIGNAL(clicked()), this, SIGNAL(showMainMenu()));
34 | connect(min_button, SIGNAL(clicked()), this, SIGNAL(showMin()));
35 | connect(max_button, SIGNAL(clicked()), this, SIGNAL(showMax()));
36 | connect(close_button, SIGNAL(clicked()), this, SIGNAL(closeWidget()));
37 |
38 |
39 |
40 | QHBoxLayout *title_layout = new QHBoxLayout();
41 | title_layout->addWidget(version_title,0,Qt::AlignVCenter);
42 | title_layout->addStretch();
43 | // title_layout->addWidget(medal_button, 0, Qt::AlignTop);
44 | title_layout->addWidget(skin_button, 0, Qt::AlignTop);
45 | title_layout->addWidget(main_menu_button, 0, Qt::AlignTop);
46 | title_layout->addWidget(min_button, 0, Qt::AlignTop);
47 | title_layout->addWidget(max_button, 0, Qt::AlignTop);
48 | title_layout->addWidget(close_button, 0, Qt::AlignTop);
49 | title_layout->setSpacing(0);
50 | title_layout->setContentsMargins(0, 0, 5, 0);
51 | version_title->setContentsMargins(15, 0, 0, 0);
52 | skin_button->setContentsMargins(0, 0, 10, 0);
53 |
54 | setLayout(title_layout);
55 |
56 | // this->setMinimumSize(900, 50);
57 | this->setFixedHeight(45);
58 |
59 |
60 | // QVBoxLayout *main_layout = new QVBoxLayout();
61 | // main_layout->addLayout(title_layout);
62 | //// main_layout->addLayout(button_layout);
63 | // main_layout->setSpacing(0);
64 | // main_layout->setContentsMargins(0, 0, 0, 0);
65 | }
66 |
67 |
68 | void TitleWidget::mousePressEvent(QMouseEvent *e)
69 | {
70 | press_point = e->pos();
71 | is_move = true;
72 | }
73 |
74 | void TitleWidget::mouseMoveEvent(QMouseEvent *e)
75 | {
76 | if((e->buttons() == Qt::LeftButton) && is_move)
77 | {
78 | static QWidget* parent_widget = this->parentWidget();
79 | QPoint parent_point = parent_widget->pos();
80 | parent_point.setX(parent_point.x() + e->x() - press_point.x());
81 | parent_point.setY(parent_point.y() + e->y() - press_point.y());
82 | parent_widget->move(parent_point);
83 | }
84 | }
85 |
86 | void TitleWidget::mouseReleaseEvent(QMouseEvent *)
87 | {
88 | if(is_move)
89 | {
90 | is_move = false;
91 | }
92 | }
93 |
94 | void TitleWidget::mouseDoubleClickEvent(QMouseEvent *)
95 | {
96 | emit showMax();
97 | }
98 |
--------------------------------------------------------------------------------
/title_widget.h:
--------------------------------------------------------------------------------
1 | #ifndef TITLE_WIDGET_H
2 | #define TITLE_WIDGET_H
3 |
4 | #include
5 | #include
6 | #include "push_button.h"
7 |
8 | class TitleWidget : public QWidget
9 | {
10 | Q_OBJECT
11 | public:
12 | explicit TitleWidget(QWidget *parent = 0);
13 | private:
14 | QLabel *version_title; //标题
15 | QPushButton *medal_button; //勋章墙
16 | PushButton *skin_button; //换肤
17 | PushButton *main_menu_button; //主菜单
18 | PushButton *min_button; //最小化
19 | PushButton *max_button; //最大化
20 | PushButton *close_button; //关闭
21 |
22 | QPoint press_point;//鼠标按下去的点
23 | bool is_move;
24 |
25 |
26 | signals:
27 | void showSkin();
28 | void showMin();
29 | void showMax();
30 | void showMainMenu();
31 | void closeWidget();
32 |
33 | public slots:
34 |
35 | protected:
36 | void mousePressEvent(QMouseEvent *);
37 | void mouseMoveEvent(QMouseEvent *);
38 | void mouseReleaseEvent(QMouseEvent *);
39 | void mouseDoubleClickEvent(QMouseEvent *);
40 |
41 | };
42 |
43 | #endif // TITLE_WIDGET_H
44 |
--------------------------------------------------------------------------------
/toolswidget.cpp:
--------------------------------------------------------------------------------
1 | #include "toolswidget.h"
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 |
9 |
10 | ToolsWidget::ToolsWidget(QWidget *parent) :
11 | QWidget(parent)
12 | {
13 |
14 | QWidget *tools_widget;
15 | QWidget *main_widget;
16 | QSplitter * main_splitter;
17 |
18 | tools_widget = new QWidget(this);
19 | main_widget = new QWidget(this);
20 |
21 |
22 | QPalette palette;
23 |
24 | tools_widget->setAutoFillBackground(true);
25 | main_widget->setAutoFillBackground(true);
26 | palette.setColor(QPalette::Background,QColor(155,225,123));
27 |
28 | tools_widget->setPalette(palette);
29 | tools_widget->setFixedHeight(20);
30 |
31 | main_splitter = new QSplitter(this);
32 | main_splitter->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
33 | main_splitter->setOrientation(Qt::Vertical);
34 | main_splitter->setHandleWidth(0);
35 | main_splitter->setStyleSheet("QSplitter::handle{background:lightgray;}");
36 |
37 | main_splitter->addWidget(tools_widget);
38 | main_splitter->addWidget(main_widget);
39 | for(int i = 0; icount();i++)
40 | {
41 | QSplitterHandle *handle = main_splitter->handle(i);
42 | handle->setEnabled(false);
43 | }
44 | qDebug() << "content_ widget ok";
45 |
46 | QHBoxLayout *main_layout = new QHBoxLayout();
47 | main_layout->addWidget(main_splitter);
48 | main_layout->setSpacing(0);
49 | main_layout->setContentsMargins(0, 0, 0, 0);
50 |
51 |
52 | setLayout(main_layout);
53 |
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/toolswidget.h:
--------------------------------------------------------------------------------
1 | #ifndef TOOLSWIDGET_H
2 | #define TOOLSWIDGET_H
3 |
4 | #include
5 |
6 | class ToolsWidget : public QWidget
7 | {
8 | Q_OBJECT
9 | public:
10 | explicit ToolsWidget(QWidget *parent = 0);
11 |
12 | signals:
13 |
14 | public slots:
15 |
16 | };
17 |
18 | #endif // TOOLSWIDGET_H
19 |
--------------------------------------------------------------------------------