diff options
author | Nao Pross <naopross@thearcway.org> | 2017-12-19 01:54:28 +0100 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2017-12-19 01:54:28 +0100 |
commit | a7e74749a1c4edb2f8bc34c79e9bd1562de86ee9 (patch) | |
tree | 4282a5dfa9ef7d77823e3e8ef02a193c91e719d6 /src/ui/metadatadialog.cpp | |
parent | Moved to QtCreator project with QMake (diff) | |
download | OrbitingYeti-a7e74749a1c4edb2f8bc34c79e9bd1562de86ee9.tar.gz OrbitingYeti-a7e74749a1c4edb2f8bc34c79e9bd1562de86ee9.zip |
Change to Qt5 conding conventions
Data structure changes:
- Structogram is no longer just a scope, because it needs to store
metadata
- All structures now use QString instead of std::string, to
integrate better in the Qt framework
New code:
- MainWindow ui code, building layout
- MetadataDialog to change the metadata stored in the Structogram
- Painter is a widget (still unimplemented) to show the structogram
on the GUI
Diffstat (limited to '')
-rw-r--r-- | src/ui/metadatadialog.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/ui/metadatadialog.cpp b/src/ui/metadatadialog.cpp new file mode 100644 index 0000000..348f225 --- /dev/null +++ b/src/ui/metadatadialog.cpp @@ -0,0 +1,31 @@ +#include "ui/metadatadialog.h" +#include "ui_metadatadialog.h" + +MetadataDialog::MetadataDialog(QWidget *parent) : + QDialog(parent), + _ui(new Ui::MetadataDialog) +{ + _ui->setupUi(this); +} + +MetadataDialog::~MetadataDialog() +{ + delete _ui; +} + +void MetadataDialog::setMetadata(const QString& title, const QString& author) +{ + _ui->titleEdit->setText(title); + _ui->authorEdit->setText(author); +} + + +QString MetadataDialog::title() const +{ + return _ui->titleEdit->text(); +} + +QString MetadataDialog::author() const +{ + return _ui->authorEdit->text(); +} |