2017-07-19 23:20:32 +02:00
|
|
|
#pragma once
|
2014-12-13 00:42:09 +01:00
|
|
|
|
2020-09-07 20:29:37 +02:00
|
|
|
#include "lc_array.h"
|
2014-12-13 00:42:09 +01:00
|
|
|
|
2020-09-07 20:29:37 +02:00
|
|
|
namespace Ui
|
|
|
|
{
|
2023-04-30 05:10:50 +02:00
|
|
|
class lcModelListDialog;
|
2014-12-13 00:42:09 +01:00
|
|
|
}
|
|
|
|
|
2020-09-07 20:29:37 +02:00
|
|
|
struct lcModelListDialogEntry
|
|
|
|
{
|
|
|
|
QString Name;
|
|
|
|
lcModel* ExistingModel;
|
|
|
|
lcModel* DuplicateSource;
|
|
|
|
};
|
|
|
|
|
2023-04-30 05:10:50 +02:00
|
|
|
class lcModelListDialog : public QDialog
|
2014-12-13 00:42:09 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2023-04-30 05:10:50 +02:00
|
|
|
lcModelListDialog(QWidget* Parent, const lcArray<lcModel*> Models);
|
|
|
|
~lcModelListDialog();
|
2014-12-13 00:42:09 +01:00
|
|
|
|
2019-03-12 21:08:43 +01:00
|
|
|
int GetActiveModelIndex() const;
|
2020-09-07 20:29:37 +02:00
|
|
|
std::vector<lcModelListDialogEntry> GetResults() const;
|
2014-12-13 00:42:09 +01:00
|
|
|
|
|
|
|
public slots:
|
2020-03-22 23:44:41 +01:00
|
|
|
void accept() override;
|
2014-12-13 00:42:09 +01:00
|
|
|
void on_NewModel_clicked();
|
|
|
|
void on_DeleteModel_clicked();
|
|
|
|
void on_RenameModel_clicked();
|
2017-12-11 00:01:12 +01:00
|
|
|
void on_ExportModel_clicked();
|
2020-09-07 20:29:37 +02:00
|
|
|
void on_DuplicateModel_clicked();
|
2014-12-13 00:42:09 +01:00
|
|
|
void on_MoveUp_clicked();
|
|
|
|
void on_MoveDown_clicked();
|
2015-02-08 21:31:11 +01:00
|
|
|
void on_ModelList_itemDoubleClicked(QListWidgetItem* Item);
|
2020-01-04 22:00:31 +01:00
|
|
|
void on_ModelList_itemSelectionChanged();
|
2014-12-13 00:42:09 +01:00
|
|
|
|
|
|
|
private:
|
2019-03-12 21:08:43 +01:00
|
|
|
QListWidgetItem* mActiveModelItem;
|
2017-12-11 00:01:12 +01:00
|
|
|
void UpdateButtons();
|
2023-04-30 05:10:50 +02:00
|
|
|
Ui::lcModelListDialog* ui;
|
2014-12-13 00:42:09 +01:00
|
|
|
};
|
|
|
|
|