Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
DIOT WIC Gateware
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
DIOT WIC Gateware
Commits
8d418c27
Commit
8d418c27
authored
Sep 25, 2018
by
Projects
Committed by
Grzegorz Daniluk
Nov 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GUI demo: made widget constructors more generic
parent
9d851c5f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
controller.cpp
sw/diot-sw/gui_demo/controller.cpp
+3
-4
controller.h
sw/diot-sw/gui_demo/controller.h
+3
-4
No files found.
sw/diot-sw/gui_demo/controller.cpp
View file @
8d418c27
...
...
@@ -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
(
Q
Dialog
*
parent
,
DiotHardware
&
hw
,
int
num
,
int
idx
)
DiotIOCard
::
DiotIOCard
(
Q
Widget
*
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
(
Q
Dialog
*
dialog
,
DiotHardware
&
hw
,
int
slots_count
)
DiotIOController
::
DiotIOController
(
Q
Widget
*
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
(
Q
Dialog
*
parent
,
DiotHardware
&
hw
)
DiotDiag
::
DiotDiag
(
Q
Widget
*
parent
,
DiotHardware
&
hw
)
:
QFrame
(
parent
)
{
DIOT_Crate
*
crate
=
hw
.
GetCrate
();
...
...
sw/diot-sw/gui_demo/controller.h
View file @
8d418c27
...
...
@@ -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
(
Q
Dialog
*
parent
,
DiotHardware
&
hw
,
int
num
,
int
idx
);
DiotIOCard
(
Q
Widget
*
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
(
Q
Dialog
*
dialog
,
DiotHardware
&
hw
,
int
slots_count
);
DiotIOController
(
Q
Widget
*
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
(
Q
Dialog
*
parent
,
DiotHardware
&
hw
);
DiotDiag
(
Q
Widget
*
parent
,
DiotHardware
&
hw
);
virtual
~
DiotDiag
()
{}
public
slots
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment