inital commit
This commit is contained in:
commit
fede535b95
32 changed files with 2357 additions and 0 deletions
30
src/ui/itemcreationdialog.cpp
Normal file
30
src/ui/itemcreationdialog.cpp
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#include "itemcreationdialog.h"
|
||||
#include "ui_itemcreationdialog.h"
|
||||
|
||||
ItemCreationDialog::ItemCreationDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::ItemCreationDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
connect(ui->comboBox, &QComboBox::currentTextChanged, this, &ItemCreationDialog::itemTypeChanged);
|
||||
connect(ui->lineEdit, &QLineEdit::textChanged, this, &ItemCreationDialog::itemNameChanged);
|
||||
}
|
||||
|
||||
ItemCreationDialog::~ItemCreationDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void ItemCreationDialog::itemTypeChanged(const QString& type)
|
||||
{
|
||||
ui->verticalLayout->removeWidget(widget);
|
||||
}
|
||||
|
||||
void ItemCreationDialog::itemNameChanged(const QString& name)
|
||||
{
|
||||
if(item)
|
||||
{
|
||||
item->setName(name);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue