umbrello 26.03.70-1a62d36 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

codegenstatuspage.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3
4 SPDX-FileCopyrightText: 2002 Luis De la Parra <luis@delaparra.org>
5 SPDX-FileCopyrightText: 2003-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
6*/
7#ifndef CODEGENSTATUSPAGE_H
8#define CODEGENSTATUSPAGE_H
9
10// app includes
11#include "ui_codegenstatuspage.h"
12#include "basictypes.h"
13#include "umlclassifier.h"
14#include "codegenerationpolicy.h"
15#include "codegenerator.h"
16
17// kde includes
18#include <kled.h>
19
20// qt includes
21#include <QHBoxLayout>
22#include <QSpacerItem>
23#include <QWizardPage>
24
30 class CodeGenStatusPage : public QWizardPage, private Ui::CodeGenStatusPage
31{
32 Q_OBJECT
33 public:
34 explicit CodeGenStatusPage(QWidget *parent = nullptr);
35 ~CodeGenStatusPage();
36 void initializePage();
37 bool isComplete() const;
38
39 private:
40 bool m_generationDone;
41
42 protected Q_SLOTS:
43 void generateCode();
44 void classGenerated(UMLClassifier* classifier, bool generated);
45 void classGenerated(UMLClassifier* classifier, CodeGenerator::GenerationState state);
46 void populateStatusList();
47 void showFileGenerated(const QString& filename);
48 void loggerClear();
49 void loggerExport();
50
51};
52
53 class LedStatus : public QWidget
54{
55 Q_OBJECT
56 public:
57 LedStatus(int width, int height) {
58 setFixedSize(width, height);
59 QHBoxLayout* layout = new QHBoxLayout();
60 layout->addItem(new QSpacerItem(20, 20));
61 m_led = new KLed(QColor(124, 252, 0), KLed::Off, KLed::Sunken, KLed::Circular);
62 layout->addWidget(m_led);
63 layout->addItem(new QSpacerItem(20, 20));
64 setLayout(layout);
65 }
66 ~LedStatus() {}
67 void setColor(const QColor& color) { m_led->setColor(color); }
68 void setOn(bool isOn) { isOn ? m_led->setState(KLed::On) : m_led->setState(KLed::Off); }
69 private:
70 KLed *m_led;
71};
72
73#endif
basictypes.h
CodeGenStatusPage
Definition: codegenstatuspage.h:31
CodeGenStatusPage::showFileGenerated
void showFileGenerated(const QString &filename)
Definition: codegenstatuspage.cpp:190
CodeGenStatusPage::loggerClear
void loggerClear()
Definition: codegenstatuspage.cpp:213
CodeGenStatusPage::classGenerated
void classGenerated(UMLClassifier *classifier, bool generated)
Definition: codegenstatuspage.cpp:147
CodeGenStatusPage::loggerExport
void loggerExport()
Definition: codegenstatuspage.cpp:222
CodeGenStatusPage::m_generationDone
bool m_generationDone
Definition: codegenstatuspage.h:40
CodeGenStatusPage::initializePage
void initializePage()
Definition: codegenstatuspage.cpp:62
CodeGenStatusPage::populateStatusList
void populateStatusList()
Definition: codegenstatuspage.cpp:72
CodeGenStatusPage::~CodeGenStatusPage
~CodeGenStatusPage()
Definition: codegenstatuspage.cpp:55
CodeGenStatusPage::generateCode
void generateCode()
Definition: codegenstatuspage.cpp:97
CodeGenStatusPage::isComplete
bool isComplete() const
Definition: codegenstatuspage.cpp:137
CodeGenerator::GenerationState
GenerationState
Definition: codegenerator.h:57
LedStatus
Definition: codegenstatuspage.h:54
LedStatus::setColor
void setColor(const QColor &color)
Definition: codegenstatuspage.h:67
LedStatus::m_led
KLed * m_led
Definition: codegenstatuspage.h:70
LedStatus::setOn
void setOn(bool isOn)
Definition: codegenstatuspage.h:68
LedStatus::~LedStatus
~LedStatus()
Definition: codegenstatuspage.h:66
LedStatus::LedStatus
LedStatus(int width, int height)
Definition: codegenstatuspage.h:57
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: umlclassifier.h:35
codegenerationpolicy.h
codegenerator.h
umlclassifier.h