Support item tabs based on item group string
This commit is contained in:
parent
0e09b6f46c
commit
a17cd23a4e
29 changed files with 527 additions and 181 deletions
|
|
@ -24,6 +24,7 @@ MainWindow::MainWindow(MainObject * const mainObject, QWidget *parent) :
|
|||
connect(ui->pushButton_refesh, &QPushButton::clicked, mainObject, &MainObject::refresh);
|
||||
connect(&globalItems, &ItemStore::itemAdded, ui->relayList, &ItemScrollBox::addItem);
|
||||
connect(&globalItems, &ItemStore::itemDeleted, ui->relayList, &ItemScrollBox::removeItem);
|
||||
connect(&globalItems, &ItemStore::itemUpdated, ui->relayList, &ItemScrollBox::onItemUpdate);
|
||||
|
||||
for(size_t i = 0; i < globalItems.getItems()->size(); ++i)
|
||||
ui->relayList->addItem(globalItems.getItems()->at(i));
|
||||
|
|
@ -65,7 +66,7 @@ void MainWindow::showPowerItemDialog()
|
|||
}
|
||||
if(powerItem)
|
||||
{
|
||||
ItemSettingsDialog diag(std::shared_ptr<Item>(powerItem), this);
|
||||
ItemSettingsDialog diag(std::shared_ptr<Item>(powerItem), false, this);
|
||||
diag.show();
|
||||
diag.exec();
|
||||
}
|
||||
|
|
@ -79,7 +80,13 @@ void MainWindow::showItemCreationDialog()
|
|||
ItemCreationDialog diag(this);
|
||||
diag.show();
|
||||
if(diag.exec())
|
||||
createdItem(diag.item);
|
||||
{
|
||||
ItemAddRequest request;
|
||||
request.type = ITEM_UPDATE_USER;
|
||||
request.changes = ItemFieldChanges(true);
|
||||
request.payload = diag.item;
|
||||
createdItem(request);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::changeHeaderLableText(QString string)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue