Skip to content

Commit a2dab27

Browse files
committed
Refactoring and minor changes
1 parent 792bdfb commit a2dab27

8 files changed

+4
-23
lines changed

src/authenticationwidget.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,8 @@ class AuthenticationWidget : public QueryWidget
4242
public:
4343
AuthenticationWidget(QString keyFilePath, QWidget* parent = 0, QString name = "");
4444
~AuthenticationWidget();
45-
QString getName() { return this->name; }
46-
4745

4846
private:
49-
QString name;
5047
QString key;
5148
bool keyAvailable;
5249

src/buttonquerywidget.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
** at **
2525
** iqo.uni-hannover.de **
2626
** **
27-
** Date: 12 June 2019 **
28-
** Version: 1.0.0 **
2927
****************************************************************************/
3028

3129
#include "buttonquerywidget.h"

src/buttonquerywidget.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
** at **
2525
** iqo.uni-hannover.de **
2626
** **
27-
** Date: 12 June 2019 **
28-
** Version: 1.0.0 **
2927
****************************************************************************/
3028

3129
#pragma once
@@ -47,10 +45,8 @@ class ButtonQueryWidget : public QueryWidget
4745
private:
4846
QPushButton* button;
4947
QHBoxLayout* layout;
50-
QString name;
5148
QString command;
5249

53-
5450
public slots:
5551
void handleResponse(QString initialQuery, QString response) override;
5652
void sendQuery();

src/comboboxquerywidget.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
** at **
2525
** iqo.uni-hannover.de **
2626
** **
27-
** Date: 12 June 2019 **
28-
** Version: 1.0.0 **
2927
****************************************************************************/
3028

3129
#include "comboboxquerywidget.h"

src/comboboxquerywidget.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
** at **
2525
** iqo.uni-hannover.de **
2626
** **
27-
** Date: 12 June 2019 **
28-
** Version: 1.0.0 **
2927
****************************************************************************/
3028

3129
#pragma once
@@ -43,18 +41,15 @@ class ComboBoxQueryWidget : public QueryWidget
4341
public:
4442
ComboBoxQueryWidget(QWidget *parent = nullptr);
4543
ComboBoxQueryWidget(QString name, QStringList options, bool expert, QString infoText, QWidget *parent = nullptr);
46-
~ComboBoxQueryWidget();
47-
QString getName() { return this->name; }
44+
~ComboBoxQueryWidget();
4845

4946
private:
5047
QComboBox* comboBox;
5148
QLabel* label;
5249
QHBoxLayout* layout;
53-
QString name;
5450
QStringList options;
5551
bool enableDisableComboBox;
5652

57-
5853
public slots:
5954
void handleResponse(QString initialQuery, QString response) override;
6055
void changeValue(int value);

src/intvaluewidget.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,9 @@ class IntValueWidget : public QueryWidget
4646
void setMin(int minValue);
4747
void setMax(int maxValue);
4848
void setStepSize(int stepSize);
49-
QString getName() { return this->name; }
5049

5150
private:
5251
int value;
53-
QString name;
5452
QSpinBox* spinBox;
5553
QLabel* label;
5654
QHBoxLayout* layout;

src/querywidget.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
** at **
2525
** iqo.uni-hannover.de **
2626
** **
27-
** Date: 12 June 2019 **
28-
** Version: 1.0.0 **
2927
****************************************************************************/
3028

3129
#include "querywidget.h"
@@ -34,6 +32,7 @@ QueryWidget::QueryWidget(QWidget *parent)
3432
: QWidget(parent)
3533
{
3634
this->expert = false;
35+
this->name = "";
3736
}
3837

3938
QueryWidget::~QueryWidget()

src/querywidget.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
** at **
2525
** iqo.uni-hannover.de **
2626
** **
27-
** Date: 12 June 2019 **
28-
** Version: 1.0.0 **
2927
****************************************************************************/
3028

3129
//Abstract class that defines the necessary signals, slots and methods for communication with QueryManager
@@ -44,9 +42,11 @@ class QueryWidget : public QWidget
4442
~QueryWidget();
4543
void setExpert(bool expertMode) { this->expert = expertMode; }
4644
bool isExpert() { return this->expert; }
45+
QString getName() { return this->name; }
4746

4847
protected:
4948
bool expert;
49+
QString name;
5050

5151
public slots:
5252
virtual void handleResponse(QString initialQuery, QString response) = 0;

0 commit comments

Comments
 (0)