umbrello: umbrello/codegenwizard/codegenstatuspage.h Source File

umbrello 2.32.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 #include "codegenerator.h"
21
22 // kde includes
23 #include <kled.h>
24
25 // qt includes
26 #include <QHBoxLayout>
27 #include <QSpacerItem>
28 #include <QWizardPage>
29
35 class CodeGenStatusPage : public QWizardPage, private Ui::CodeGenStatusPage
36 {
37 Q_OBJECT
38 public:
39 explicit CodeGenStatusPage(QWidget *parent = 0);
40 ~CodeGenStatusPage();
41 void initializePage();
42 bool isComplete() const;
43
44 private:
45 bool m_generationDone;
46
47 protected slots:
48 void generateCode();
49 void classGenerated(UMLClassifier* concept, bool generated);
50 void classGenerated(UMLClassifier* classifier, CodeGenerator::GenerationState state);
51 void populateStatusList();
52 void showFileGenerated(const QString& filename);
53 void loggerClear();
54 void loggerExport();
55
56 };
57
58 class LedStatus : public QWidget
59 {
60 Q_OBJECT
61 public:
62 LedStatus(int width, int height) {
63 setFixedSize(width, height);
64 QHBoxLayout* layout = new QHBoxLayout();
65 layout->addItem(new QSpacerItem(20, 20));
66 m_led = new KLed(QColor(124, 252, 0), KLed::Off, KLed::Sunken, KLed::Circular);
67 layout->addWidget(m_led);
68 layout->addItem(new QSpacerItem(20, 20));
69 setLayout(layout);
70 }
71 ~LedStatus() {}
72 void setColor(const QColor& color) { m_led->setColor(color); }
73 void setOn(bool isOn) { isOn ? m_led->setState(KLed::On) : m_led->setState(KLed::Off); }
74 private:
75 KLed *m_led;
76 };
77
78 #endif
basictypes.h
CodeGenStatusPage
Definition: codegenstatuspage.h:36
CodeGenStatusPage::showFileGenerated
void showFileGenerated(const QString &filename)
Definition: codegenstatuspage.cpp:201
CodeGenStatusPage::loggerClear
void loggerClear()
Definition: codegenstatuspage.cpp:224
CodeGenStatusPage::CodeGenStatusPage
CodeGenStatusPage(QWidget *parent=0)
Definition: codegenstatuspage.cpp:46
CodeGenStatusPage::loggerExport
void loggerExport()
Definition: codegenstatuspage.cpp:233
CodeGenStatusPage::m_generationDone
bool m_generationDone
Definition: codegenstatuspage.h:45
CodeGenStatusPage::initializePage
void initializePage()
Definition: codegenstatuspage.cpp:73
CodeGenStatusPage::classGenerated
void classGenerated(UMLClassifier *concept, bool generated)
Definition: codegenstatuspage.cpp:158
CodeGenStatusPage::populateStatusList
void populateStatusList()
Definition: codegenstatuspage.cpp:83
CodeGenStatusPage::~CodeGenStatusPage
~CodeGenStatusPage()
Definition: codegenstatuspage.cpp:66
CodeGenStatusPage::generateCode
void generateCode()
Definition: codegenstatuspage.cpp:108
CodeGenStatusPage::isComplete
bool isComplete() const
Definition: codegenstatuspage.cpp:148
CodeGenerator::GenerationState
GenerationState
Definition: codegenerator.h:61
LedStatus
Definition: codegenstatuspage.h:59
LedStatus::setColor
void setColor(const QColor &color)
Definition: codegenstatuspage.h:72
LedStatus::m_led
KLed * m_led
Definition: codegenstatuspage.h:75
LedStatus::setOn
void setOn(bool isOn)
Definition: codegenstatuspage.h:73
LedStatus::~LedStatus
~LedStatus()
Definition: codegenstatuspage.h:71
LedStatus::LedStatus
LedStatus(int width, int height)
Definition: codegenstatuspage.h:62
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
classifier.h
codegenerationpolicy.h
codegenerator.h