00001 /********************************************************************** 00002 ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 00003 ** 00004 ** This file is part of the Qtopia Environment. 00005 ** 00006 ** This file may be distributed and/or modified under the terms of the 00007 ** GNU General Public License version 2 as published by the Free Software 00008 ** Foundation and appearing in the file LICENSE.GPL included in the 00009 ** packaging of this file. 00010 ** 00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00013 ** 00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information. 00015 ** 00016 ** Contact info@trolltech.com if any conditions of this licensing are 00017 ** not clear to you. 00018 ** 00019 **********************************************************************/ 00020 00021 #include <qdialog.h> 00022 #include <qpixmap.h> 00023 00024 class InputMethods; 00025 class QCString; 00026 class QPushButton; 00027 class QTranslator; 00028 class AppLauncher; 00029 class DocumentList; 00030 00031 class FirstUse : public QDialog 00032 { 00033 Q_OBJECT 00034 public: 00035 FirstUse(QWidget* parent=0, const char * name=0, WFlags=0); 00036 ~FirstUse(); 00037 00038 bool restartNeeded() const { return needRestart; } 00039 00040 private slots: 00041 void message(const QCString &, const QByteArray &); 00042 void calcMaxWindowRect(); 00043 00044 void nextDialog(); 00045 void previousDialog(); 00046 void terminated( int, const QString & ); 00047 void newQcopChannel(const QString & ); 00048 00049 private: 00050 void paintEvent( QPaintEvent * ); 00051 void mouseReleaseEvent( QMouseEvent * ); 00052 void keyPressEvent( QKeyEvent *e ); 00053 00054 void loadPixmaps(); 00055 00056 void reloadLanguages(); 00057 void drawText(QPainter &p, const QString &text); 00058 void updateButtons(); 00059 00060 private: 00061 QPixmap splash; 00062 QPixmap buttons; 00063 00064 InputMethods *inputMethods; 00065 QPushButton *back; 00066 QPushButton *next; 00067 int controlHeight; 00068 00069 QString lang; 00070 QTranslator *transApp; 00071 QTranslator *transLib; 00072 00073 bool needCalibrate; 00074 DocumentList *docList; 00075 AppLauncher *appLauncher; 00076 QWidget *taskBar; 00077 00078 int currApp; 00079 int waitForExit; 00080 bool waitingForLaunch; 00081 bool needRestart; 00082 bool m_calHandler : 1; 00083 00084 QFont defaultFont; 00085 };
1.4.2