umbrello  2.31.90
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);
41  void initializePage();
42  bool isComplete() const;
43 
44 private:
46 
47 protected slots:
48  void generateCode();
49  void classGenerated(UMLClassifier* concept, bool generated);
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  }
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
Definition: codegenstatuspage.h:36
void showFileGenerated(const QString &filename)
Definition: codegenstatuspage.cpp:201
void loggerClear()
Definition: codegenstatuspage.cpp:224
CodeGenStatusPage(QWidget *parent=0)
Definition: codegenstatuspage.cpp:46
void loggerExport()
Definition: codegenstatuspage.cpp:233
bool m_generationDone
Definition: codegenstatuspage.h:45
void initializePage()
Definition: codegenstatuspage.cpp:73
void classGenerated(UMLClassifier *concept, bool generated)
Definition: codegenstatuspage.cpp:158
void populateStatusList()
Definition: codegenstatuspage.cpp:83
~CodeGenStatusPage()
Definition: codegenstatuspage.cpp:66
void generateCode()
Definition: codegenstatuspage.cpp:108
bool isComplete() const
Definition: codegenstatuspage.cpp:148
GenerationState
Definition: codegenerator.h:61
Definition: codegenstatuspage.h:59
void setColor(const QColor &color)
Definition: codegenstatuspage.h:72
KLed * m_led
Definition: codegenstatuspage.h:75
void setOn(bool isOn)
Definition: codegenstatuspage.h:73
~LedStatus()
Definition: codegenstatuspage.h:71
LedStatus(int width, int height)
Definition: codegenstatuspage.h:62
Information for a non-graphical Concept/Class.
Definition: classifier.h:40