umbrello: umbrello/codeimpwizard/codeimpthread.h Source File

umbrello 2.31.1 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

codeimpthread.h
Go to the documentation of this file.
1 /*
2 Copyright 2011 Andi Fischer <andi.fischer@hispeed.ch>
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License as
6 published by the Free Software Foundation; either version 2 of
7 the License or (at your option) version 3 or any later version
8 accepted by the membership of KDE e.V. (or its successor approved
9 by the membership of KDE e.V.), which shall act as a proxy
10 defined in Section 14 of version 3 of the license.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20 #ifndef CODEIMPTHREAD_H
21 #define CODEIMPTHREAD_H
22
23 #include <QFileInfo>
24 #include <QMutex>
25 #include <QThread>
26 #include <QWaitCondition>
27
28 class ClassImport;
29
35 class CodeImpThread : public QObject
36 {
37 Q_OBJECT
38 public:
39 explicit CodeImpThread(QFileInfo file, QObject* parent = 0);
40 virtual ~CodeImpThread();
41
42 public slots:
43 virtual void run();
44
45 int emitAskQuestion(const QString& question);
46 void emitMessageToLog(const QString& file, const QString& text);
47
48 signals:
49 void askQuestion(const QString& question, int& answer);
50 void messageToWiz(const QString& file, const QString& text);
51 void messageToLog(const QString& file, const QString& text);
52 void messageToApp(const QString& text);
53 void aborted();
54 void failed();
55 void finished(bool noError);
56
57 private slots:
58 void questionAsked(const QString& question, int& answer);
59
60 private:
61 QFileInfo m_file;
62 //QWaitCondition m_waitCondition;
63 //QMutex m_mutex;
64 };
65
66 #endif
CodeImpThread::messageToLog
void messageToLog(const QString &file, const QString &text)
ClassImport::importFile
bool importFile(const QString &fileName)
Definition: classimport.cpp:117
CodeImpThread::m_file
QFileInfo m_file
Definition: codeimpthread.h:61
ClassImport
Definition: classimport.h:26
CodeImpThread::finished
void finished(bool noError)
classimport.h
CodeImpThread::emitAskQuestion
int emitAskQuestion(const QString &question)
Definition: codeimpthread.cpp:88
CodeImpThread::messageToWiz
void messageToWiz(const QString &file, const QString &text)
CodeImpThread::~CodeImpThread
virtual ~CodeImpThread()
Definition: codeimpthread.cpp:44
CodeImpThread::askQuestion
void askQuestion(const QString &question, int &answer)
i18n
#define i18n
Definition: main.cpp:39
CodeImpThread::failed
void failed()
CodeImpThread::aborted
void aborted()
MyProject\connect
connect()
Definition: namespaces-multiple.php:5
CodeImpThread
Definition: codeimpthread.h:36
CodeImpThread::emitMessageToLog
void emitMessageToLog(const QString &file, const QString &text)
Definition: codeimpthread.cpp:102
CodeImpThread::CodeImpThread
CodeImpThread(QFileInfo file, QObject *parent=0)
Definition: codeimpthread.cpp:33
ClassImport::createImporterByFileExt
static ClassImport * createImporterByFileExt(const QString &fileName, CodeImpThread *thread=0)
Definition: classimport.cpp:43
CodeImpThread::questionAsked
void questionAsked(const QString &question, int &answer)
Definition: codeimpthread.cpp:112
codeimpthread.h
CodeImpThread::messageToApp
void messageToApp(const QString &text)
CodeImpThread::run
virtual void run()
Definition: codeimpthread.cpp:51