51 lines
1.2 KiB
C
51 lines
1.2 KiB
C
|
#ifndef MTABWIDGET_H
|
|||
|
#define MTABWIDGET_H
|
|||
|
|
|||
|
#include <QWidget>
|
|||
|
#include <QVector>
|
|||
|
#include <QPushButton>
|
|||
|
#include <QButtonGroup>
|
|||
|
#include <QHBoxLayout>
|
|||
|
#include <QVBoxLayout>
|
|||
|
#include <QPainter>
|
|||
|
#include <QPaintEvent>
|
|||
|
#include <QStyleOption>
|
|||
|
#include <QDebug>
|
|||
|
#include <QFile>
|
|||
|
#include <mdevicemanager.h>
|
|||
|
|
|||
|
class mTabWidget : public QWidget
|
|||
|
{
|
|||
|
Q_OBJECT
|
|||
|
public:
|
|||
|
explicit mTabWidget(QWidget *wDeviceManager, QWidget *wProgramManager,
|
|||
|
QWidget *wAdvanceManager, QWidget *wDeviceSetting, QWidget *wGuangYinPin,
|
|||
|
QWidget *parent = nullptr);
|
|||
|
public:
|
|||
|
QPushButton *bnDeviceManager = nullptr ;
|
|||
|
QPushButton *bnProgramManager = nullptr;
|
|||
|
QPushButton *bnDeviceSetting = nullptr;
|
|||
|
QPushButton *bnAdvanceManager = nullptr;
|
|||
|
QPushButton *bnGuangYinPin = nullptr;
|
|||
|
|
|||
|
void refreshLable();
|
|||
|
void onGuangYingPinChanged();
|
|||
|
|
|||
|
protected:
|
|||
|
virtual void paintEvent(QPaintEvent *);
|
|||
|
|
|||
|
signals:
|
|||
|
void sigOpenDeviceUdpTimer(bool b);
|
|||
|
protected slots:
|
|||
|
void onBnsClicked(int id);
|
|||
|
private:
|
|||
|
int curIndex;
|
|||
|
QButtonGroup *m_bns;
|
|||
|
QVector<QWidget*> m_wnds;
|
|||
|
QWidget *m_pDeviceWidget=nullptr;
|
|||
|
|
|||
|
|
|||
|
};
|
|||
|
|
|||
|
#endif // MTABWIDGET_H
|