Use Listbox instead of BigBtn.
This commit is contained in:
@@ -59,9 +59,6 @@ EditPatientDialog::EditPatientDialog(QWidget* parent, Qt::WindowFlags f) : GUIFo
|
|||||||
btnSex = new ListBox(this);
|
btnSex = new ListBox(this);
|
||||||
btnSex->setText(tr("Female"));
|
btnSex->setText(tr("Female"));
|
||||||
btnSex->setProperty("idx", 0);
|
btnSex->setProperty("idx", 0);
|
||||||
btnSex->setLayoutDirection(Qt::RightToLeft);
|
|
||||||
btnSex->setObjectName("editvalBtn");
|
|
||||||
btnSex->setIcon(QIcon(":/icons/arrow-down.png"));
|
|
||||||
|
|
||||||
btnSex->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
btnSex->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||||
connect(btnSex, &QToolButton::clicked, [=]() {
|
connect(btnSex, &QToolButton::clicked, [=]() {
|
||||||
@@ -89,9 +86,6 @@ EditPatientDialog::EditPatientDialog(QWidget* parent, Qt::WindowFlags f) : GUIFo
|
|||||||
|
|
||||||
layout->addWidget(lbl_date);
|
layout->addWidget(lbl_date);
|
||||||
btnDate = new ListBox(this);
|
btnDate = new ListBox(this);
|
||||||
btnDate->setLayoutDirection(Qt::RightToLeft);
|
|
||||||
btnDate->setObjectName("editvalBtn");
|
|
||||||
btnDate->setIcon(QIcon(":/icons/arrow-down.png"));
|
|
||||||
btnDate->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
btnDate->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||||
btnDate->setText("1990-06-15");
|
btnDate->setText("1990-06-15");
|
||||||
connect(btnDate, &QToolButton::clicked, [=]() {
|
connect(btnDate, &QToolButton::clicked, [=]() {
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
#include <QStylePainter>
|
#include <QStylePainter>
|
||||||
|
|
||||||
ListBox::ListBox(QWidget *parent) : QToolButton(parent) {
|
ListBox::ListBox(QWidget *parent) : QToolButton(parent) {
|
||||||
|
this->setLayoutDirection(Qt::RightToLeft);
|
||||||
|
this->setObjectName("ListBox");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ListBox::paintEvent(QPaintEvent *e) {
|
void ListBox::paintEvent(QPaintEvent *e) {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include "utilities/Locker.h"
|
#include "utilities/Locker.h"
|
||||||
#include "utilities/LanguageSwitcher.h"
|
#include "utilities/LanguageSwitcher.h"
|
||||||
#include "components/ULineEdit.h"
|
#include "components/ULineEdit.h"
|
||||||
|
#include "components/ListBox.h"
|
||||||
|
|
||||||
GeneralForm::GeneralForm(QWidget* aParent)
|
GeneralForm::GeneralForm(QWidget* aParent)
|
||||||
: QWidget(aParent)
|
: QWidget(aParent)
|
||||||
@@ -28,7 +29,7 @@ GeneralForm::GeneralForm(QWidget* aParent)
|
|||||||
QLabel* languageLabel = new QLabel(tr("Language"));
|
QLabel* languageLabel = new QLabel(tr("Language"));
|
||||||
lanHeaderLayout->addWidget(languageLabel);
|
lanHeaderLayout->addWidget(languageLabel);
|
||||||
|
|
||||||
QPushButton* btnLan = new QPushButton(lanHeader);
|
QToolButton* btnLan = new ListBox(lanHeader);
|
||||||
lanHeaderLayout->addWidget(btnLan);
|
lanHeaderLayout->addWidget(btnLan);
|
||||||
lanHeaderLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
|
lanHeaderLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#include "event/EventCenter.h"
|
#include "event/EventCenter.h"
|
||||||
#include "device/DeviceManager.h"
|
#include "device/DeviceManager.h"
|
||||||
#include "json/cmdhelper.h"
|
#include "json/cmdhelper.h"
|
||||||
|
#include "components/ListBox.h"
|
||||||
|
|
||||||
SystemSettingForm::SystemSettingForm(QWidget* parent)
|
SystemSettingForm::SystemSettingForm(QWidget* parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
@@ -40,9 +41,9 @@ SystemSettingForm::SystemSettingForm(QWidget* parent)
|
|||||||
|
|
||||||
//data init
|
//data init
|
||||||
mUI->btnPro->setText(JsonObject::Instance()->defaultProtocal());
|
mUI->btnPro->setText(JsonObject::Instance()->defaultProtocal());
|
||||||
mUI->btnPro->setObjectName("BigBtn");
|
mUI->btnPro->setObjectName("ListBox");
|
||||||
mUI->btnFlt->setText(JsonObject::Instance()->defaultFilter());
|
mUI->btnFlt->setText(JsonObject::Instance()->defaultFilter());
|
||||||
mUI->btnFlt->setObjectName("BigBtn");
|
mUI->btnFlt->setObjectName("ListBox");
|
||||||
|
|
||||||
QGridLayout* gridLayout = (QGridLayout*)mUI->block10->layout();
|
QGridLayout* gridLayout = (QGridLayout*)mUI->block10->layout();
|
||||||
auto scanConfirmButton = new ImageSwitch(this);
|
auto scanConfirmButton = new ImageSwitch(this);
|
||||||
|
|||||||
@@ -33,25 +33,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QPushButton" name="btnPro">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@@ -134,6 +115,25 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="ListBox" name="btnPro">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -207,7 +207,7 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="btnFlt">
|
<widget class="ListBox" name="btnFlt">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -341,6 +341,12 @@
|
|||||||
<header location="global">components/BatteryWidget.h</header>
|
<header location="global">components/BatteryWidget.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>ListBox</class>
|
||||||
|
<extends>QToolButton</extends>
|
||||||
|
<header location="global">components/ListBox.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user