-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmytabwidget.cpp
More file actions
46 lines (37 loc) · 1.17 KB
/
mytabwidget.cpp
File metadata and controls
46 lines (37 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "mytabwidget.h"
myTabWidget::myTabWidget(QWidget* parent)
{
this->setParent(parent);
connect(this , SIGNAL(currentChanged(int)),this,SLOT(currentChangedSlot(int)));
}
void myTabWidget::myTabWidgetInitialize(void)
{
mywatchdog = new watchdog();
myrealtimeInfo = new realtimeInfo();
myboardInfo = new boardInfo();
mygpio = new gpio();
mystorage = new storage();
myi2c = new i2c();
mypwm = new pwm();
addTab(myboardInfo,"Board Information");
setTabIcon(BOARDINFOTAB,QIcon(":/Logo.jpg"));
addTab(myrealtimeInfo,"System Monitor");
setTabIcon(REALTIMEINFOTAB,QIcon(":/hw.png"));
addTab(mywatchdog,"Watchdog");
setTabIcon(WATCHDOGTAB,QIcon(":/whg.png"));
addTab(mygpio,"GPIO");
setTabIcon(GPIOTAB,QIcon(":/gpio.png"));
addTab(mystorage,"STORAGE");
setTabIcon(STORAGETAB,QIcon(":/Storage.png"));
addTab(myi2c,"I2C");
setTabIcon(I2CTAB,QIcon(":/i2c.png"));
addTab(mypwm,"PWM");
setTabIcon(PWMTAB,QIcon(":/PWM-Icon.png"));
}
void myTabWidget::currentChangedSlot(int index)
{
if (index == REALTIMEINFOTAB)
myrealtimeInfo->startTimer();
else
myrealtimeInfo->stopTimer();
}