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()
qlonglong amount = ui->accTransferAmonut->value() * 100;
qlonglong from = ui->accTransferFrom->currentData().toLongLong();
qlonglong to = ui->accTransferTo->currentData().toLongLong();
QString text = ui->accTransferText->text();
QString text = ui->accTransferText->toPlainText();
if (amount == 0 || from == to) return;
......@@ -901,7 +901,7 @@ void MainWindow::on_accTransferSubmit_clicked()
ui->accTransferAmonut->setValue(0);
ui->accTransferFrom->setCurrentIndex(0);
ui->accTransferTo->setCurrentIndex(0);
ui->accTransferText->setText("");
ui->accTransferText->setPlainText("");
// TODO update money values
......
......@@ -697,21 +697,30 @@
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="opaqueResize">
<bool>false</bool>
</property>
<property name="handleWidth">
<number>4</number>
</property>
<property name="childrenCollapsible">
<bool>false</bool>
</property>
<widget class="QWidget" name="">
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout_10">
<property name="sizeConstraint">
<enum>QLayout::SetNoConstraint</enum>
</property>
<item>
<layout class="QGridLayout" name="gridLayout_6">
<item row="1" column="1">
<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">
<string> kr</string>
</property>
......@@ -720,47 +729,127 @@
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QLineEdit" name="accTransferText">
<property name="placeholderText">
<string>Notering (anledning, person, ...)</string>
<item row="1" column="2">
<widget class="QComboBox" name="accTransferTo">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QComboBox" name="accTransferTo"/>
</item>
<item row="0" column="0">
<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">
<string>Från</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
<item row="0" column="1">
<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">
<string>Kronor</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
<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 row="0" column="2">
<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">
<string>Till</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="accTransferSubmit">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Submit</string>
</property>
</widget>
</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>
</item>
<item>
......@@ -772,6 +861,12 @@
</item>
<item>
<widget class="QTreeView" name="accTreeView">
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
......@@ -785,6 +880,12 @@
</item>
<item>
<widget class="QPushButton" name="accUpdateBtn">
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Uppdatera</string>
</property>
......@@ -794,6 +895,12 @@
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLineEdit" name="accNewAccText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="placeholderText">
<string>Kontonamn</string>
</property>
......@@ -801,6 +908,12 @@
</item>
<item>
<widget class="QPushButton" name="accNewAccBtn">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Lägg till konto</string>
</property>
......@@ -810,8 +923,11 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="">
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout_5">
<property name="sizeConstraint">
<enum>QLayout::SetNoConstraint</enum>
</property>
<item>
<widget class="QLabel" name="label">
<property name="text">
......@@ -830,6 +946,12 @@
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<attribute name="headerMinimumSectionSize">
<number>2</number>
</attribute>
</widget>
</item>
</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