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