告警小窗修改字体大小
This commit is contained in:
parent
8a00706b7a
commit
98b6ee6986
@ -17,7 +17,7 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QStandardItemModel>
|
#include <QStandardItemModel>
|
||||||
#include "pub_logger_api/logger.h"
|
#include "pub_logger_api/logger.h"
|
||||||
|
#include "pub_utility_api/FileStyle.h"
|
||||||
CAlarmWidget::CAlarmWidget(QWidget *parent)
|
CAlarmWidget::CAlarmWidget(QWidget *parent)
|
||||||
: QWidget(parent),
|
: QWidget(parent),
|
||||||
m_pView(Q_NULLPTR),
|
m_pView(Q_NULLPTR),
|
||||||
@ -28,6 +28,7 @@ CAlarmWidget::CAlarmWidget(QWidget *parent)
|
|||||||
m_pConfirmButtonRow2(Q_NULLPTR)
|
m_pConfirmButtonRow2(Q_NULLPTR)
|
||||||
{
|
{
|
||||||
//initialize();
|
//initialize();
|
||||||
|
initStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
CAlarmWidget::~CAlarmWidget()
|
CAlarmWidget::~CAlarmWidget()
|
||||||
@ -40,6 +41,22 @@ CAlarmWidget::~CAlarmWidget()
|
|||||||
qDebug() << "~CAlarmWidget()";
|
qDebug() << "~CAlarmWidget()";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CAlarmWidget::initStyle(){
|
||||||
|
QString qss = QString();
|
||||||
|
std::string strFullPath = iot_public::CFileStyle::getPathOfStyleFile("alarmForm.qss") ;
|
||||||
|
QFile qssfile2(QString::fromStdString(strFullPath));
|
||||||
|
qssfile2.open(QFile::ReadOnly);
|
||||||
|
if (qssfile2.isOpen())
|
||||||
|
{
|
||||||
|
qss += QLatin1String(qssfile2.readAll());
|
||||||
|
qssfile2.close();
|
||||||
|
}
|
||||||
|
if(!qss.isEmpty())
|
||||||
|
{
|
||||||
|
setStyleSheet(qss);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
void CAlarmWidget::setAlarmModel(CAlarmItemModel *pModel)
|
void CAlarmWidget::setAlarmModel(CAlarmItemModel *pModel)
|
||||||
{
|
{
|
||||||
if(!pModel)
|
if(!pModel)
|
||||||
|
|||||||
@ -17,7 +17,7 @@ public:
|
|||||||
~CAlarmWidget();
|
~CAlarmWidget();
|
||||||
|
|
||||||
void setAlarmModel(CAlarmItemModel * pModel);
|
void setAlarmModel(CAlarmItemModel * pModel);
|
||||||
|
void initStyle();
|
||||||
void setRowHeight(const int &height);
|
void setRowHeight(const int &height);
|
||||||
|
|
||||||
void setDockColumnVisible(const int &column, const bool &visbile);
|
void setDockColumnVisible(const int &column, const bool &visbile);
|
||||||
|
|||||||
@ -43,5 +43,8 @@ QFrame#frame{
|
|||||||
border: 0px;
|
border: 0px;
|
||||||
}
|
}
|
||||||
QTableView {
|
QTableView {
|
||||||
font-size:14px;;
|
font-size:20px;;
|
||||||
|
}
|
||||||
|
CAlarmWidget CAlarmView{
|
||||||
|
font-size:20px;
|
||||||
}
|
}
|
||||||
@ -45,3 +45,6 @@ QFrame#frame{
|
|||||||
QTableView {
|
QTableView {
|
||||||
font-size:20px;;
|
font-size:20px;;
|
||||||
}
|
}
|
||||||
|
CAlarmWidget CAlarmView{
|
||||||
|
font-size:20px;
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user