Files
GostGenerator/view/componentspreview.h
T

43 lines
1.0 KiB
C++

#ifndef COMPONENTSPREVIEW_H
#define COMPONENTSPREVIEW_H
#include <QWidget>
#include <QVBoxLayout>
#include <QGroupBox>
#include <QComboBox>
#include <QTableView>
#include <QHBoxLayout>
#include "../model/componenttablemodel.h"
#include "freezetablewidget.h"
class ComponentsPreview : public QWidget
{
Q_OBJECT
public:
explicit ComponentsPreview(ComponentTableModel* model, QWidget *parent = nullptr);
// Метод для обновления отображения
void updateView();
// Метод для установки текущего варианта
void setCurrentVariant(const QString &variant);
signals:
void variantChanged(const QString& variant);
void componentSelected(int row);
void componentDoubleClicked(int row);
private:
void setUp();
void setWidgets();
void setUpLayout();
void setUpConnections();
void updateVariantComboBox();
ComponentTableModel* m_model;
QComboBox* m_variantComboBox;
FreezeTableWidget* m_tableView;
};
#endif // COMPONENTSPREVIEW_H