Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

qtfrontend.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Bjoern Erik Nilsen & Fredrik Berg Kjoelstad     *
00003  *   bjoern_erik_nilsen@hotmail.com & fredrikbk@hotmail.com                *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef QTFRONTEND_H
00021 #define QTFRONTEND_H
00022 
00023 #include "src/config.h"
00024 #include "src/presentation/frontends/frontend.h"
00025 #include "mainwindowgui.h"
00026 
00027 #include <qprogressdialog.h>
00028 #include <qprogressbar.h>
00029 #include <qtimer.h>
00030 #include <qobject.h>
00031 #include <qapplication.h>
00032 
00033 
00039 class QtFrontend : public QObject, public Frontend
00040 {
00041         Q_OBJECT
00042 public:
00043         
00049         QtFrontend(int argc, char **argv);
00050         
00054         virtual ~QtFrontend();
00055         
00062         int run(int argc, char **argv);
00063         
00069         void showProgress(const char *infoText, unsigned int numOperations = 0);
00070         
00074         void hideProgress();
00075 
00080         void updateProgress(int numOperationsDone);
00081         
00086         void setProgressInfo(const char *infoText);
00087         
00093         bool isOperationAborted();
00094         
00099         void processEvents();
00100         
00107         void reportError(const char *message, int id);
00108         
00114         int askQuestion(const char *question);
00115         
00116 protected slots:
00117         void updateProgressBar();
00118         
00119 private:
00120         QApplication *stApp;
00121         MainWindowGUI *mw;
00122         QProgressDialog *progressDialog;
00123         QProgressBar *progressBar;
00124         QLabel *infoText;
00125         QTimer *timer;
00126         
00127         void initializePreferences();
00128 };
00129 
00130 #endif

Generated on Thu May 19 01:51:21 2005 for stopmotion.kdevelop by  doxygen 1.4.2