/
Application.cpp
75 lines (58 loc) · 2.73 KB
/
Application.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/* filename: Application.cpp 2008/12/26 */
/*************************************************************************
LuLu Messenger: A LAN Instant Messenger For Chatting and File Exchanging.
Copyright (C) 2008,2009 Wu Weisheng <wwssir@gmail.com>
This file is part of LuLu Messenger.
LuLu Messenger is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
LuLu Messenger is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*************************************************************************/
/*************************************************************************
LuLu 信使: 局域网络即时对话与文件交换通讯工具。
著作权所有 (C) 2008,2009 武维生 <wwssir@gmail.com>
此文件是 LuLu 信使源文件的一部分。
LuLu 信使为自由软件;您可依据自由软件基金会所发表的GNU通用公共授权条款,
对本程序再次发布和/或修改;无论您依据的是本授权的第三版,或(您可选的)
任一日后发行的版本。
LuLu 信使是基于使用目的而加以发布,然而不负任何担保责任;亦无对适售性或
特定目的适用性所为的默示性担保。详情请参照GNU通用公共授权。
您应已收到附随于本程序的GNU通用公共授权的副本;如果没有,请参照
<http://www.gnu.org/licenses/>.
*************************************************************************/
// 说明:
// 修改:
#include "Application.h"
#include "FormMain.h"
#include "DataAccess.h"
QString PROGRAM_NAME;
QString PROGRAM_VER = "2.1.0";
QString COMPUTER_OS;
QString COMPUTER_UserName;
QString COMPUTER_UserDomain;
Application::Application(int &argc, char **argv)
: QApplication(argc, argv)
{
QString locale = QLocale::system().name();
m_DataAccess = new DataAccess();
//QTranslator* translator = new QTranslator;
//translator->load(":/config/" + QString("IPM_") + locale + ".qm");
//installTranslator(translator);
//translator = new QTranslator;
//translator->load(":/config/" + QString("qt_") + locale + ".qm");
//installTranslator(translator);
mainWindow = new FormMain(*m_DataAccess);
mainWindow->show();
setStyleSheet(m_DataAccess->readSSTFile());
}
Application::~Application(void)
{
delete mainWindow;
delete m_DataAccess;
}