qthighway/tests/testapps/testservice/main.cpp
changeset 18 1b485afba084
parent 16 19b186e43276
child 28 19321a443c34
equal deleted inserted replaced
16:19b186e43276 18:1b485afba084
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 *
       
     5 * This program is free software: you can redistribute it and/or modify
       
     6 * it under the terms of the GNU Lesser General Public License as published by
       
     7 * the Free Software Foundation, version 2.1 of the License.
       
     8 *
       
     9 * This program is distributed in the hope that it will be useful,
       
    10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    12 * GNU Lesser General Public License for more details.
       
    13 *
       
    14 * You should have received a copy of the GNU Lesser General Public License
       
    15 * along with this program.  If not,
       
    16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
       
    17 *
       
    18 * Description:
       
    19 *
       
    20 */
       
    21 
       
    22 #include <QApplication>
       
    23 #include "testservice.h"
       
    24 #include <xqservicelog.h>
       
    25 
       
    26 
       
    27 #include <QDebug>
       
    28 #include <xqservicelog.h>
       
    29 #include <QApplication>
       
    30 #include <QKeyEvent>
       
    31 #include <QLabel>
       
    32 #include <QVBoxLayout>
       
    33 #include <QStackedWidget>
       
    34 #include <QImageReader>
       
    35 #include <QDebug>
       
    36 #include <QTimer>
       
    37 #include <QPushButton>
       
    38 #include <QLineEdit>
       
    39 #include <QDebug>
       
    40 #include <QString>
       
    41 #include <QCheckBox>
       
    42 
       
    43 #include <QListView>
       
    44 
       
    45 #include "main.h"
       
    46 
       
    47 TestServiceView::TestServiceView( QWidget *parent, Qt::WFlags f ) : QWidget( parent,f )
       
    48 {
       
    49     qDebug() << "[QTH] [TestService] TestServiceView::TestServiceView START";
       
    50     QPalette p = qApp->palette();
       
    51     //p.setColor(QPalette::Highlight, color.lighter(200));
       
    52     //p.setColor(QPalette::Text, Qt::white);
       
    53     //p.setColor(QPalette::Base, bg);
       
    54     //p.setColor(QPalette::WindowText, Qt::red);
       
    55     //p.setColor(QPalette::Window, Qt::yellow);
       
    56     //p.setColor(QPalette::ButtonText, Qt::blue);
       
    57     //p.setColor(QPalette::Button, Qt::green);
       
    58     //p.setColor(QPalette::Link, QColor(240,40,40));
       
    59 
       
    60     qApp->setPalette(p);
       
    61 
       
    62     QPushButton *quitButton = new QPushButton(tr("quit"));
       
    63     connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
       
    64 
       
    65     label = new QLabel("TEST SERVICE");
       
    66 
       
    67     QVBoxLayout *vl = new QVBoxLayout;
       
    68     vl->setMargin(0);
       
    69     vl->setSpacing(0);
       
    70 
       
    71     vl->addWidget(label);
       
    72     //vl->addWidget(sendButton);
       
    73     vl->addWidget(quitButton);
       
    74 
       
    75     setLayout(vl);
       
    76     //showMaximized();
       
    77     showFullScreen();
       
    78     service = new TestService();
       
    79     qDebug() << "[QTH] [TestService] TestServiceView::TestServiceView END";
       
    80 }
       
    81 
       
    82 TestServiceView::~TestServiceView()
       
    83 {
       
    84     delete service;
       
    85 }
       
    86 
       
    87 int main(int argc, char **argv)
       
    88 {
       
    89     QApplication a(argc, argv);
       
    90     qInstallMsgHandler(XQSERVICEMESSAGEHANDLER); 
       
    91     TestServiceView view;
       
    92     return a.exec();
       
    93 }