first commit
This commit is contained in:
32
project/fm_viewer/ui/rm_layout.cpp
Normal file
32
project/fm_viewer/ui/rm_layout.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#include "rm_layout.h"
|
||||
|
||||
RMLayout::RMLayout(QObject *parent) : QObject(parent)
|
||||
{
|
||||
|
||||
}
|
||||
QSpacerItem* RMLayout::addSpacer(QBoxLayout* layout,int width,int height)
|
||||
{
|
||||
QSpacerItem* seperator = new QSpacerItem(width,height,QSizePolicy::Fixed,QSizePolicy::Fixed);
|
||||
layout->addSpacerItem(seperator);
|
||||
return seperator;
|
||||
}
|
||||
|
||||
QLabel* RMLayout::addThemeLabel(QWidget *parent,QLayout* layout, QString title,const char* objectName)
|
||||
{
|
||||
QLabel* lb = new QLabel(parent);
|
||||
lb->setText(title);
|
||||
layout->addWidget(lb);
|
||||
lb->setObjectName(objectName);
|
||||
lb->setStyleSheet("color: #BABABA;font-family: Arial;font-size: 13px;");
|
||||
return lb;
|
||||
}
|
||||
|
||||
QLabel* RMLayout::addLabel(QWidget *parent, QLayout* layout,QString title,const char* objectName)
|
||||
{
|
||||
QLabel* lb = new QLabel(parent);
|
||||
lb->setText(title);
|
||||
layout->addWidget(lb);
|
||||
lb->setObjectName(objectName);
|
||||
return lb;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user