Commit 63975d2e authored by Hugo Hörnquist's avatar Hugo Hörnquist

Made money tab better spaced.

Also made the `accTransferText` a QPlainTextEdit instead of a QLineEdit.
parent a6c8415b
...@@ -882,7 +882,7 @@ void MainWindow::on_accTransferSubmit_clicked() ...@@ -882,7 +882,7 @@ void MainWindow::on_accTransferSubmit_clicked()
qlonglong amount = ui->accTransferAmonut->value() * 100; qlonglong amount = ui->accTransferAmonut->value() * 100;
qlonglong from = ui->accTransferFrom->currentData().toLongLong(); qlonglong from = ui->accTransferFrom->currentData().toLongLong();
qlonglong to = ui->accTransferTo->currentData().toLongLong(); qlonglong to = ui->accTransferTo->currentData().toLongLong();
QString text = ui->accTransferText->text(); QString text = ui->accTransferText->toPlainText();
if (amount == 0 || from == to) return; if (amount == 0 || from == to) return;
...@@ -901,7 +901,7 @@ void MainWindow::on_accTransferSubmit_clicked() ...@@ -901,7 +901,7 @@ void MainWindow::on_accTransferSubmit_clicked()
ui->accTransferAmonut->setValue(0); ui->accTransferAmonut->setValue(0);
ui->accTransferFrom->setCurrentIndex(0); ui->accTransferFrom->setCurrentIndex(0);
ui->accTransferTo->setCurrentIndex(0); ui->accTransferTo->setCurrentIndex(0);
ui->accTransferText->setText(""); ui->accTransferText->setPlainText("");
// TODO update money values // TODO update money values
......
...@@ -697,21 +697,30 @@ ...@@ -697,21 +697,30 @@
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="opaqueResize">
<bool>false</bool>
</property>
<property name="handleWidth">
<number>4</number>
</property>
<property name="childrenCollapsible"> <property name="childrenCollapsible">
<bool>false</bool> <bool>false</bool>
</property> </property>
<widget class="QWidget" name=""> <widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout_10"> <layout class="QVBoxLayout" name="verticalLayout_10">
<property name="sizeConstraint">
<enum>QLayout::SetNoConstraint</enum>
</property>
<item> <item>
<layout class="QGridLayout" name="gridLayout_6"> <layout class="QGridLayout" name="gridLayout_6">
<item row="1" column="1"> <item row="1" column="1">
<widget class="QDoubleSpinBox" name="accTransferAmonut"> <widget class="QDoubleSpinBox" name="accTransferAmonut">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="suffix"> <property name="suffix">
<string> kr</string> <string> kr</string>
</property> </property>
...@@ -720,47 +729,127 @@ ...@@ -720,47 +729,127 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0" colspan="2"> <item row="1" column="2">
<widget class="QLineEdit" name="accTransferText"> <widget class="QComboBox" name="accTransferTo">
<property name="placeholderText"> <property name="sizePolicy">
<string>Notering (anledning, person, ...)</string> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="2">
<widget class="QComboBox" name="accTransferTo"/>
</item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_16"> <widget class="QLabel" name="label_16">
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string>Från</string> <string>Från</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QLabel" name="label_18"> <widget class="QLabel" name="label_18">
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string>Kronor</string> <string>Kronor</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QComboBox" name="accTransferFrom"/> <widget class="QComboBox" name="accTransferFrom">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item> </item>
<item row="0" column="2"> <item row="0" column="2">
<widget class="QLabel" name="label_17"> <widget class="QLabel" name="label_17">
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string>Till</string> <string>Till</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget> </widget>
</item> </item>
<item row="2" column="2"> <item row="2" column="2">
<widget class="QPushButton" name="accTransferSubmit"> <widget class="QPushButton" name="accTransferSubmit">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string>Submit</string> <string>Submit</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0" colspan="2">
<widget class="QPlainTextEdit" name="accTransferText">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="baseSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="tabChangesFocus">
<bool>true</bool>
</property>
<property name="plainText">
<string/>
</property>
<property name="tabStopWidth">
<number>1</number>
</property>
<property name="placeholderText">
<string>Notering (anledning, person, ...)</string>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item> <item>
...@@ -772,6 +861,12 @@ ...@@ -772,6 +861,12 @@
</item> </item>
<item> <item>
<widget class="QTreeView" name="accTreeView"> <widget class="QTreeView" name="accTreeView">
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editTriggers"> <property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set> <set>QAbstractItemView::NoEditTriggers</set>
</property> </property>
...@@ -785,6 +880,12 @@ ...@@ -785,6 +880,12 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="accUpdateBtn"> <widget class="QPushButton" name="accUpdateBtn">
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string>Uppdatera</string> <string>Uppdatera</string>
</property> </property>
...@@ -794,6 +895,12 @@ ...@@ -794,6 +895,12 @@
<layout class="QHBoxLayout" name="horizontalLayout_5"> <layout class="QHBoxLayout" name="horizontalLayout_5">
<item> <item>
<widget class="QLineEdit" name="accNewAccText"> <widget class="QLineEdit" name="accNewAccText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="placeholderText"> <property name="placeholderText">
<string>Kontonamn</string> <string>Kontonamn</string>
</property> </property>
...@@ -801,6 +908,12 @@ ...@@ -801,6 +908,12 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="accNewAccBtn"> <widget class="QPushButton" name="accNewAccBtn">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string>Lägg till konto</string> <string>Lägg till konto</string>
</property> </property>
...@@ -810,8 +923,11 @@ ...@@ -810,8 +923,11 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name=""> <widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout_5"> <layout class="QVBoxLayout" name="verticalLayout_5">
<property name="sizeConstraint">
<enum>QLayout::SetNoConstraint</enum>
</property>
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
...@@ -830,6 +946,12 @@ ...@@ -830,6 +946,12 @@
<property name="rootIsDecorated"> <property name="rootIsDecorated">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="wordWrap">
<bool>true</bool>
</property>
<attribute name="headerMinimumSectionSize">
<number>2</number>
</attribute>
</widget> </widget>
</item> </item>
</layout> </layout>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment