leocad/common/lc_modellistdialog.h

46 lines
891 B
C
Raw Normal View History

#pragma once
2014-12-13 00:42:09 +01:00
#include "lc_array.h"
2014-12-13 00:42:09 +01:00
namespace Ui
{
2023-04-30 05:10:50 +02:00
class lcModelListDialog;
2014-12-13 00:42:09 +01: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
int GetActiveModelIndex() const;
std::vector<lcModelListDialogEntry> GetResults() const;
2014-12-13 00:42:09 +01:00
public slots:
void accept() override;
2014-12-13 00:42:09 +01:00
void on_NewModel_clicked();
void on_DeleteModel_clicked();
void on_RenameModel_clicked();
void on_ExportModel_clicked();
void on_DuplicateModel_clicked();
2014-12-13 00:42:09 +01:00
void on_MoveUp_clicked();
void on_MoveDown_clicked();
void on_ModelList_itemDoubleClicked(QListWidgetItem* Item);
void on_ModelList_itemSelectionChanged();
2014-12-13 00:42:09 +01:00
private:
QListWidgetItem* mActiveModelItem;
void UpdateButtons();
2023-04-30 05:10:50 +02:00
Ui::lcModelListDialog* ui;
2014-12-13 00:42:09 +01:00
};