iVS3D v2.0.0
Loading...
Searching...
No Matches
samplingwidget.h
1#ifndef SAMPLINGWIDGET_H
2#define SAMPLINGWIDGET_H
3
4#include <QWidget>
5#include <QCheckBox>
6#include "ui_samplingwidget.h"
7
8
9namespace Ui {
10class SamplingWidget;
11}
12
36class SamplingWidget : public QWidget
37{
38 Q_OBJECT
39
40public:
41
51 explicit SamplingWidget(QWidget *parent = nullptr, QStringList algorithmList = QStringList("no algorithm"), QStringList transformList = QStringList(""));
53
58 void showAlgorithmSettings(QWidget *algoSettings);
59
60
66
71 int getSelctedType();
72
77 void setAlgorithm(int idx);
78
79 void disablePreview();
80
81 void setResolutionList(QStringList resList, int idx);
82 void setResolution(QString resolution);
83 void setResolutionValid(bool valid);
84
85
86signals:
87
94
101
106
111 void sig_enablePreviewChanged(bool enabled);
112
117 void sig_resChanged(QString resolution);
118
119private slots:
120 void slot_selectedAlgoChanged(int idx);
121 void slot_startSamplingPressed();
122 void slot_enablePreviewChanged(bool enabled);
123
124private:
125 Ui::SamplingWidget *ui;
126 QWidget *m_algoSettings;
127 QWidget *m_placeholder;
128 QCheckBox *m_cbPreviewTransform;
129 int m_separatorIdx;
130
131 void showSamplingBtns();
132 void showTransformBtns();
133 void showNoBtns();
134};
135
136#define HIDE_WIDGET(W) ui->gridLayout->removeWidget(W); W->setVisible(false);
137#define SHOW_WIDGET(W) ui->gridLayout->addWidget(W,3,2); W->setVisible(true);
138
139#endif // SAMPLINGWIDGET_H
The SamplingWidget class is a graphical user interface to select and edit sampling algorithms and tra...
Definition samplingwidget.h:37
void sig_selectedTransformChanged(int idx)
[signal] sig_selectedTransformChanged(...) is emitted on dropdown index changed to an ITransfrom inst...
void sig_enablePreviewChanged(bool enabled)
[signal] sig_enablePreviewChanged(...) is emitted on enable preview checkbox state changed.
void showAlgorithmSettings(QWidget *algoSettings)
showAlgorithmSettings shows the given QWidget to the user.
Definition samplingwidget.cpp:46
void sig_resChanged(QString resolution)
[signal] sig_resChanged(...) is emitted if the resolution in the combo box is changed
int getSelctedType()
getSelctedType returns the type of the curently selected Algorithm
Definition samplingwidget.cpp:60
void sig_selectedAlgorithmChanged(int idx)
[signal] sig_selectedAlgorithmChanged(...) is emitted on dropdown index changed to an IAlgorithm inst...
void sig_startSampling()
[signal] sig_startSampling(...) is emitted on start sampling button pressed.
int getSelectedAlgorithm()
getSelectedAlgorithm returns the currently selected Algorithm
Definition samplingwidget.cpp:55
void setAlgorithm(int idx)
setAlgorithm sets the currently selceted algoritm to the algorithm corresponding to the index
Definition samplingwidget.cpp:70