widget 클래스들의 기초 클래스를 QObject 에서 QWidget으로 변경
git-svn-id: svn://192.168.0.12/source@299 8346c931-da38-4b9b-9d4c-e48b93cbd075
This commit is contained in:
@@ -4,8 +4,9 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
SAddDelWidget::SAddDelWidget(QWidget *parent):
|
SAddDelWidget::SAddDelWidget(QWidget *parent):
|
||||||
m_pbtnAdd(new QPushButton(parent)), m_pbtnDel(new QPushButton(parent)),
|
QWidget(parent),
|
||||||
m_pParent(parent), m_playout(new QVBoxLayout(parent))
|
m_pbtnAdd(new QPushButton(this)), m_pbtnDel(new QPushButton(this)),
|
||||||
|
m_pParent(this), m_playout(new QVBoxLayout(this))
|
||||||
|
|
||||||
{
|
{
|
||||||
initButton();
|
initButton();
|
||||||
@@ -14,6 +15,7 @@ SAddDelWidget::SAddDelWidget(QWidget *parent):
|
|||||||
|
|
||||||
SAddDelWidget::~SAddDelWidget()
|
SAddDelWidget::~SAddDelWidget()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if (m_pParent == nullptr)
|
if (m_pParent == nullptr)
|
||||||
{
|
{
|
||||||
disconnect(m_pbtnAdd, 0, 0, 0);
|
disconnect(m_pbtnAdd, 0, 0, 0);
|
||||||
@@ -21,6 +23,7 @@ SAddDelWidget::~SAddDelWidget()
|
|||||||
delete m_pbtnAdd;
|
delete m_pbtnAdd;
|
||||||
delete m_pbtnDel;
|
delete m_pbtnDel;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAddDelWidget::initButton()
|
void SAddDelWidget::initButton()
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
#ifndef SADDDELWIDGET
|
#ifndef SADDDELWIDGET
|
||||||
#define SADDDELWIDGET
|
#define SADDDELWIDGET
|
||||||
|
|
||||||
#include <QObject>
|
#include <QWidget>
|
||||||
|
|
||||||
class QPushButton;
|
class QPushButton;
|
||||||
class QVBoxLayout;
|
class QVBoxLayout;
|
||||||
class QWidget;
|
|
||||||
|
|
||||||
|
|
||||||
class SAddDelWidget: public QObject
|
|
||||||
|
class SAddDelWidget: public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ enum class SCompanyListWidget::E_TABLE_HEADER
|
|||||||
|
|
||||||
SCompanyListWidget::~SCompanyListWidget()
|
SCompanyListWidget::~SCompanyListWidget()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if (m_pwParent == nullptr)
|
if (m_pwParent == nullptr)
|
||||||
{
|
{
|
||||||
delete m_pbtnSearch;
|
delete m_pbtnSearch;
|
||||||
@@ -41,12 +42,14 @@ SCompanyListWidget::~SCompanyListWidget()
|
|||||||
delete m_pdeStart;
|
delete m_pdeStart;
|
||||||
delete m_ptableWidget;
|
delete m_ptableWidget;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
SCompanyListWidget::SCompanyListWidget(QWidget* parent):
|
SCompanyListWidget::SCompanyListWidget(QWidget* parent):
|
||||||
m_pbtnSearch(new QPushButton(parent)), m_pbtnRefresh(new QPushButton(parent)),
|
QWidget(parent),
|
||||||
m_ptableWidget(new QTableWidget(parent)), m_pdeStart(new QDateEdit(parent)),
|
m_pbtnSearch(new QPushButton(this)), m_pbtnRefresh(new QPushButton(this)),
|
||||||
m_pdeEnd(new QDateEdit(parent)), m_playout(new QVBoxLayout(parent)), m_pwParent(parent),
|
m_ptableWidget(new QTableWidget(this)), m_pdeStart(new QDateEdit(this)),
|
||||||
|
m_pdeEnd(new QDateEdit(this)), m_playout(new QVBoxLayout(this)), m_pwParent(this),
|
||||||
m_pslTableHeader(new QStringList)
|
m_pslTableHeader(new QStringList)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
#ifndef SCOMPANYLISTWIDGET
|
#ifndef SCOMPANYLISTWIDGET
|
||||||
#define SCOMPANYLISTWIDGET
|
#define SCOMPANYLISTWIDGET
|
||||||
|
|
||||||
#include <QObject>
|
#include <QWidget>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
|
|
||||||
|
|
||||||
class QPushButton;
|
class QPushButton;
|
||||||
class QTableWidget;
|
class QTableWidget;
|
||||||
class QDateEdit;
|
class QDateEdit;
|
||||||
@@ -12,7 +13,7 @@ class QVBoxLayout;
|
|||||||
class QStringList;
|
class QStringList;
|
||||||
class QTableWidgetItem;
|
class QTableWidgetItem;
|
||||||
|
|
||||||
class SCompanyListWidget:public QObject
|
class SCompanyListWidget:public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|||||||
@@ -31,10 +31,11 @@ enum class SRunningListWidget::E_TABLE_HEADER
|
|||||||
};
|
};
|
||||||
|
|
||||||
SRunningListWidget::SRunningListWidget(QWidget* parent) :
|
SRunningListWidget::SRunningListWidget(QWidget* parent) :
|
||||||
m_pwParent(parent), m_pbtnTimerStart(new QPushButton(parent)),
|
QWidget(parent),
|
||||||
m_pbtnTimerStop(new QPushButton(parent)), m_pbtnForceStart(new QPushButton(parent)),
|
m_pwParent(this), m_pbtnTimerStart(new QPushButton(this)),
|
||||||
m_pbtnForceStop(new QPushButton(parent)), m_ptableWidget(new QTableWidget(parent)),
|
m_pbtnTimerStop(new QPushButton(this)), m_pbtnForceStart(new QPushButton(this)),
|
||||||
m_playout(new QVBoxLayout(parent)), m_pslTableHeader(new QStringList)
|
m_pbtnForceStop(new QPushButton(this)), m_ptableWidget(new QTableWidget(this)),
|
||||||
|
m_playout(new QVBoxLayout(this)), m_pslTableHeader(new QStringList)
|
||||||
{
|
{
|
||||||
*m_pslTableHeader << "Company" << "Start date" << "End date"
|
*m_pslTableHeader << "Company" << "Start date" << "End date"
|
||||||
<< "Event Num" << "Status" << "Last Update Time";
|
<< "Event Num" << "Status" << "Last Update Time";
|
||||||
@@ -168,6 +169,7 @@ void SRunningListWidget::resetTableHeader()
|
|||||||
|
|
||||||
SRunningListWidget::~SRunningListWidget()
|
SRunningListWidget::~SRunningListWidget()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if (m_pwParent == nullptr)
|
if (m_pwParent == nullptr)
|
||||||
{
|
{
|
||||||
disconnect(m_pbtnForceStart, &QPushButton::released,
|
disconnect(m_pbtnForceStart, &QPushButton::released,
|
||||||
@@ -188,6 +190,7 @@ SRunningListWidget::~SRunningListWidget()
|
|||||||
delete m_ptableWidget;
|
delete m_ptableWidget;
|
||||||
delete m_playout;
|
delete m_playout;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef SRUNNINGLISTWIDGET
|
#ifndef SRUNNINGLISTWIDGET
|
||||||
#define SRUNNINGLISTWIDGET
|
#define SRUNNINGLISTWIDGET
|
||||||
|
|
||||||
#include <QObject>
|
#include <QWidget>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
@@ -13,7 +13,7 @@ class QDateEdit;
|
|||||||
class QVBoxLayout;
|
class QVBoxLayout;
|
||||||
class QStringList;
|
class QStringList;
|
||||||
|
|
||||||
class SRunningListWidget:public QObject
|
class SRunningListWidget:public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -10,17 +10,15 @@ Widget::Widget(QWidget *parent) :
|
|||||||
ui(new Ui::Widget)
|
ui(new Ui::Widget)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
QWidget *w1 = new QWidget;
|
SCompanyListWidget *c = new SCompanyListWidget;
|
||||||
QWidget *w2 = new QWidget;
|
SRunningListWidget *d = new SRunningListWidget;
|
||||||
QWidget *w3 = new QWidget;
|
SAddDelWidget *e = new SAddDelWidget;
|
||||||
SCompanyListWidget *c = new SCompanyListWidget(w1);
|
|
||||||
SRunningListWidget *d = new SRunningListWidget(w2);
|
|
||||||
SAddDelWidget *e = new SAddDelWidget(w3);
|
|
||||||
QHBoxLayout* mainLayout = new QHBoxLayout(this);
|
QHBoxLayout* mainLayout = new QHBoxLayout(this);
|
||||||
|
|
||||||
mainLayout->addWidget(w1);
|
mainLayout->addWidget(c);
|
||||||
mainLayout->addWidget(w3);
|
mainLayout->addWidget(e);
|
||||||
mainLayout->addWidget(w2);
|
|
||||||
|
mainLayout->addWidget(d);
|
||||||
setLayout(mainLayout);
|
setLayout(mainLayout);
|
||||||
|
|
||||||
show();
|
show();
|
||||||
|
|||||||
Reference in New Issue
Block a user