Create ui form template for tabs

This commit is contained in:
johanneshilden 2017-09-30 01:44:29 +03:00
parent 5cd3a0bdf6
commit 0566548062
6 changed files with 238 additions and 6 deletions

View File

@ -50,4 +50,5 @@ FORMS += \
slidersettingsform.ui \
radiobuttonsettingsform.ui \
togglesettingsform.ui \
textfieldsettingsform.ui
textfieldsettingsform.ui \
tabssettingsform.ui

View File

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SliderSettingsForm</class>
<widget class="QWidget" name="SliderSettingsForm">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>474</width>
<height>387</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QWidget" name="formLayoutWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>361</width>
<height>111</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="disabledLabel">
<property name="text">
<string>Disabled</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="disabledCheckBox"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="valueLabel">
<property name="text">
<string>Value</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="valueLineEdit"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="orientationLabel">
<property name="text">
<string>Orientation</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="orientationComboBox">
<item>
<property name="text">
<string>Horizontal</string>
</property>
</item>
<item>
<property name="text">
<string>Vertical</string>
</property>
</item>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="invertedLabel">
<property name="text">
<string>Inverted</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="invertedCheckBox"/>
</item>
</layout>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>20</x>
<y>130</y>
<width>171</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>TODO</string>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -5,7 +5,7 @@
TabsSettingsEditor::TabsSettingsEditor(QWidget *parent)
: QWidget(parent),
// ui(new Ui::TabsSettingsForm),
ui(new Ui::TabsSettingsForm),
m_tabs(new QtMaterialTabs)
{
QVBoxLayout *layout = new QVBoxLayout;
@ -18,7 +18,7 @@ TabsSettingsEditor::TabsSettingsEditor(QWidget *parent)
canvas->setStyleSheet("QWidget { background: white; }");
layout->addWidget(canvas);
// ui->setupUi(widget);
ui->setupUi(widget);
layout->setContentsMargins(20, 20, 20, 20);
layout = new QVBoxLayout;
@ -47,7 +47,7 @@ TabsSettingsEditor::TabsSettingsEditor(QWidget *parent)
TabsSettingsEditor::~TabsSettingsEditor()
{
// delete ui;
delete ui;
}
void TabsSettingsEditor::setupForm()

View File

@ -2,7 +2,7 @@
#define TABSSETTINGSEDITOR_H
#include <QWidget>
//#include "ui_tabssettingsform.h"
#include "ui_tabssettingsform.h"
class QtMaterialTabs;
@ -19,7 +19,7 @@ protected slots:
void updateWidget();
private:
// Ui::TabsSettingsForm *const ui;
Ui::TabsSettingsForm *const ui;
QtMaterialTabs *const m_tabs;
};

View File

@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SliderSettingsForm</class>
<widget class="QWidget" name="SliderSettingsForm">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>474</width>
<height>387</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QWidget" name="formLayoutWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>361</width>
<height>331</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="disabledLabel">
<property name="text">
<string>Disabled</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="disabledCheckBox"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="valueLabel">
<property name="text">
<string>Value</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="valueLineEdit"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="orientationLabel">
<property name="text">
<string>Orientation</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="orientationComboBox">
<item>
<property name="text">
<string>Horizontal</string>
</property>
</item>
<item>
<property name="text">
<string>Vertical</string>
</property>
</item>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="invertedLabel">
<property name="text">
<string>Inverted</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="invertedCheckBox"/>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SliderSettingsForm</class>
<widget class="QWidget" name="SliderSettingsForm">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>474</width>
<height>387</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QWidget" name="formLayoutWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>361</width>
<height>61</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="disabledLabel">
<property name="text">
<string>Disabled</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="disabledCheckBox"/>
</item>
</layout>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>171</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>TODO</string>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>