Commit 8d418c27 authored by Projects's avatar Projects Committed by Grzegorz Daniluk

GUI demo: made widget constructors more generic

parent 9d851c5f
......@@ -17,7 +17,6 @@
*/
#include <QtWidgets/QPushButton>
#include <QtWidgets/QDialog>
#include <QtWidgets/QGroupBox>
#include <QBoxLayout>
#include <QLabel>
......@@ -86,7 +85,7 @@ void DiotHardware::SetOutput(int slot, unsigned int state)
}
DiotIOCard::DiotIOCard(QDialog* parent, DiotHardware& hw, int num, int idx)
DiotIOCard::DiotIOCard(QWidget* parent, DiotHardware& hw, int num, int idx)
: QFrame(parent), inputs(num, true),
outputs(num, false), slot_nr(idx), io_count(num)
{
......@@ -210,7 +209,7 @@ bool DiotIOCard::int_to_vec(unsigned int integer, std::vector<bool>& vec)
}
DiotIOController::DiotIOController(QDialog* dialog, DiotHardware& hw, int slots_count)
DiotIOController::DiotIOController(QWidget* dialog, DiotHardware& hw, int slots_count)
: QFrame(dialog)
{
QHBoxLayout *boxLayout = new QHBoxLayout();
......@@ -244,7 +243,7 @@ void DiotIOController::UpdateInputErr(int slot, unsigned int state)
}
DiotDiag::DiotDiag(QDialog* parent, DiotHardware& hw)
DiotDiag::DiotDiag(QWidget* parent, DiotHardware& hw)
: QFrame(parent)
{
DIOT_Crate* crate = hw.GetCrate();
......
......@@ -28,7 +28,6 @@
#include <diot_crate.h>
class DiotIOController;
class QDialog;
class QLabel;
class QPushButton;
......@@ -120,7 +119,7 @@ class DiotIOCard : public QFrame {
Q_OBJECT
public:
DiotIOCard(QDialog* parent, DiotHardware& hw, int num, int idx);
DiotIOCard(QWidget* parent, DiotHardware& hw, int num, int idx);
virtual ~DiotIOCard() {}
unsigned int GetInput() const {
......@@ -164,7 +163,7 @@ class DiotIOController : public QFrame {
Q_OBJECT
public:
DiotIOController(QDialog* dialog, DiotHardware& hw, int slots_count);
DiotIOController(QWidget* dialog, DiotHardware& hw, int slots_count);
public slots:
void UpdateInput(int slot, unsigned int state);
......@@ -183,7 +182,7 @@ class DiotDiag : public QFrame {
Q_OBJECT
public:
DiotDiag(QDialog* parent, DiotHardware& hw);
DiotDiag(QWidget* parent, DiotHardware& hw);
virtual ~DiotDiag() {}
public slots:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment