60
|
1 |
/****************************************************************************
|
|
2 |
**
|
|
3 |
** Trolltech hereby grants a license to use the Qt/Eclipse Integration
|
|
4 |
** plug-in (the software contained herein), in binary form, solely for the
|
|
5 |
** purpose of creating code to be used with Trolltech's Qt software.
|
|
6 |
**
|
|
7 |
** Qt Designer is licensed under the terms of the GNU General Public
|
|
8 |
** License versions 2.0 and 3.0 ("GPL License"). Trolltech offers users the
|
|
9 |
** right to use certain no GPL licensed software under the terms of its GPL
|
|
10 |
** Exception version 1.2 (http://trolltech.com/products/qt/gplexception).
|
|
11 |
**
|
|
12 |
** THIS SOFTWARE IS PROVIDED BY TROLLTECH AND ITS CONTRIBUTORS (IF ANY) "AS
|
|
13 |
** IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
14 |
** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
|
15 |
** PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
|
16 |
** OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
17 |
** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
18 |
** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
19 |
** PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
20 |
** LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
21 |
** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
22 |
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
|
23 |
**
|
|
24 |
** Since we now have the GPL exception I think that the "special exception
|
|
25 |
** is no longer needed. The license text proposed above (other than the
|
|
26 |
** special exception portion of it) is the BSD license and we have added
|
|
27 |
** the BSD license as a permissible license under the exception.
|
|
28 |
**
|
|
29 |
****************************************************************************/
|
|
30 |
|
|
31 |
#include <QtGui>
|
|
32 |
|
|
33 |
#include <hbmainwindow.h>
|
|
34 |
#include <hbapplication.h>
|
|
35 |
#include "qtsyncstatusview.h"
|
|
36 |
#include "qtsyncstatuslogview.h"
|
|
37 |
#include "qtsyncstatuslog.h"
|
|
38 |
|
|
39 |
//class QtSyncStatusApp : public HbMainWindow
|
|
40 |
//{
|
|
41 |
// Q_OBJECT
|
|
42 |
//
|
|
43 |
//public:
|
|
44 |
// QtSyncStatusApp();
|
|
45 |
// ~QtSyncStatusApp();
|
|
46 |
//
|
|
47 |
// virtual bool event(QEvent *event);
|
|
48 |
//};
|
|
49 |
//
|
|
50 |
//QtSyncStatusApp::QtSyncStatusApp()
|
|
51 |
//{
|
|
52 |
//}
|
|
53 |
//
|
|
54 |
//QtSyncStatusApp::~QtSyncStatusApp()
|
|
55 |
//{
|
|
56 |
//}
|
|
57 |
//
|
|
58 |
//
|
|
59 |
//bool QtSyncStatusApp::event(QEvent *event)
|
|
60 |
//{
|
|
61 |
// if (event->type() == QEvent::ApplicationActivate) {
|
|
62 |
// show();
|
|
63 |
// }
|
|
64 |
// return HbMainWindow::event(event);
|
|
65 |
//}
|
|
66 |
|
|
67 |
int main(int argc, char *argv[])
|
|
68 |
{
|
|
69 |
HbApplication app( argc, argv );
|
|
70 |
HbMainWindow mainWindow;
|
|
71 |
|
|
72 |
QtSyncStatusLog* log = new QtSyncStatusLog();
|
|
73 |
|
|
74 |
QtSyncStatusView* listView = new QtSyncStatusView(*log);
|
|
75 |
mainWindow.addView( listView );
|
|
76 |
|
|
77 |
QtSyncStatusLogView* logView = new QtSyncStatusLogView(*log);
|
|
78 |
mainWindow.addView( logView );
|
|
79 |
|
|
80 |
QObject::connect(logView, SIGNAL(comingBack()), listView, SLOT(activateView()));
|
|
81 |
QObject::connect(listView, SIGNAL(showLog()), logView, SLOT(activateView()));
|
|
82 |
|
|
83 |
mainWindow.show();
|
|
84 |
int error = app.exec();
|
|
85 |
delete log;
|
|
86 |
return error;
|
|
87 |
}
|