umbrello: umbrello/codegenwizard/codegenstatuspage.h Source File

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

codegenstatuspage.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2002 *
8 * Luis De la Parra <luis@delaparra.org> *
9 * copyright (C) 2003-2020 *
10 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
11 ***************************************************************************/
12 #ifndef CODEGENSTATUSPAGE_H
13 #define CODEGENSTATUSPAGE_H
14
15 // app includes
16 #include "ui_codegenstatuspage.h"
17 #include "basictypes.h"
18 #include "classifier.h"
19 #include "codegenerationpolicy.h"
20
21 // kde includes
22 #include <kled.h>
23
24 // qt includes
25 #include <QHBoxLayout>
26 #include <QSpacerItem>
27 #include <QWizardPage>
28
34 class CodeGenStatusPage : public QWizardPage, private Ui::CodeGenStatusPage
35 {
36 Q_OBJECT
37 public:
38 explicit CodeGenStatusPage(QWidget *parent = 0);
39 ~CodeGenStatusPage();
40 void initializePage();
41 bool isComplete() const;
42
43 private:
44 bool m_generationDone;
45
46 protected slots:
47 void generateCode();
48 void classGenerated(UMLClassifier* concept, bool generated);
49 void populateStatusList();
50 void showFileGenerated(const QString& filename);
51 void loggerClear();
52 void loggerExport();
53
54 };
55
56 class LedStatus : public QWidget
57 {
58 Q_OBJECT
59 public:
60 LedStatus(int width, int height) {
61 setFixedSize(width, height);
62 QHBoxLayout* layout = new QHBoxLayout();
63 layout->addItem(new QSpacerItem(20, 20));
64 m_led = new KLed(QColor(124, 252, 0), KLed::Off, KLed::Sunken, KLed::Circular);
65 layout->addWidget(m_led);
66 layout->addItem(new QSpacerItem(20, 20));
67 setLayout(layout);
68 }
69 ~LedStatus() {}
70 void setColor(const QColor& color) { m_led->setColor(color); }
71 void setOn(bool isOn) { isOn ? m_led->setState(KLed::On) : m_led->setState(KLed::Off); }
72 private:
73 KLed *m_led;
74 };
75
76 #endif
UMLDoc::findUMLClassifier
UMLClassifier * findUMLClassifier(const QString &name)
Definition: umldoc.cpp:1164
CodeGenStatusPage::~CodeGenStatusPage
~CodeGenStatusPage()
Definition: codegenstatuspage.cpp:66
LedStatus::LedStatus
LedStatus(int width, int height)
Definition: codegenstatuspage.h:60
codegenfactory.h
defaultcodegenpolicypage.h
CodeGenStatusPage::classGenerated
void classGenerated(UMLClassifier *concept, bool generated)
Definition: codegenstatuspage.cpp:156
CodeGenStatusPage::loggerClear
void loggerClear()
Definition: codegenstatuspage.cpp:207
CodeGenStatusPage::initializePage
void initializePage()
Definition: codegenstatuspage.cpp:73
CodeGenStatusPage::showFileGenerated
void showFileGenerated(const QString &filename)
Definition: codegenstatuspage.cpp:184
CodeGenStatusPage::loggerExport
void loggerExport()
Definition: codegenstatuspage.cpp:216
codegenerationwizard.h
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:17
LedStatus
Definition: codegenstatuspage.h:57
model_utils.h
LedStatus::setColor
void setColor(const QColor &color)
Definition: codegenstatuspage.h:70
CodeGenerationWizard::getSelectionListWidget
QListWidget * getSelectionListWidget()
Definition: codegenerationwizard.cpp:97
codegenerationpolicypage.h
CodeGenerator::writeCodeToFile
virtual void writeCodeToFile()
Definition: codegenerator.cpp:310
CodeGenStatusPage::generateCode
void generateCode()
Definition: codegenstatuspage.cpp:108
CodeGenStatusPage::isComplete
bool isComplete() const
Definition: codegenstatuspage.cpp:146
codegenstatuspage.h
UMLObject::fullyQualifiedName
virtual QString fullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Definition: umlobject.cpp:227
LedStatus::m_led
KLed * m_led
Definition: codegenstatuspage.h:73
UMLApp::generator
CodeGenerator * generator() const
Definition: uml.cpp:2337
i18n
#define i18n
Definition: main.cpp:39
CodeGenStatusPage
Definition: codegenstatuspage.h:35
basictypes.h
codegenerationpolicy.h
CodeGenStatusPage::m_generationDone
bool m_generationDone
Definition: codegenstatuspage.h:54
MyProject\connect
connect()
Definition: namespaces-multiple.php:5
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:269
UMLDoc
Definition: umldoc.h:75
CodeGenStatusPage::CodeGenStatusPage
CodeGenStatusPage(QWidget *parent=0)
Definition: codegenstatuspage.cpp:46
classifier.h
uError
#define uError()
Definition: debug_utils.h:123
uml.h
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
debug_utils.h
codegenpolicyext.h
codegenerator.h
CodeGenStatusPage::populateStatusList
void populateStatusList()
Definition: codegenstatuspage.cpp:83
CodeGenerator
Definition: codegenerator.h:57
LedStatus::setOn
void setOn(bool isOn)
Definition: codegenstatuspage.h:71
UMLApp::document
UMLDoc * document() const
Definition: uml.cpp:1055
umldoc.h
LedStatus::~LedStatus
~LedStatus()
Definition: codegenstatuspage.h:69
CodeGenerationWizard
Definition: codegenerationwizard.h:33