aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/querydialog.ui
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-10-10 15:39:33 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-10-10 20:47:18 +0200
commit7a7d9dc216ecf0bf7200666b479fb08c0edec834 (patch)
tree30957e51979a26f5baaf54e0c3f193d9689fe92c /src/widgets/querydialog.ui
parent8cb79ee6711b3db3f138db6367752053f45efc17 (diff)
Replace QInputDialog with custom dialog for queriesquery-dialog
Recent commits allowed multi-line input while reusing the QInputDialog object already defined by Kristall. However, QInputDialog lacks a way to access its QPlainTextEdit directly, and therefore set the wrap mode. Since QInputDialog does no wrapping, it is inconvenient for writing a long text (think of social media sites such as BBS or Station). Therefore, a custom QDialog-derived class, namely QueryDialog, has been provided.
Diffstat (limited to 'src/widgets/querydialog.ui')
-rw-r--r--src/widgets/querydialog.ui77
1 files changed, 77 insertions, 0 deletions
diff --git a/src/widgets/querydialog.ui b/src/widgets/querydialog.ui
new file mode 100644
index 0000000..001c29d
--- /dev/null
+++ b/src/widgets/querydialog.ui
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>QueryDialog</class>
+ <widget class="QDialog" name="QueryDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>480</width>
+ <height>240</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Dialog</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="query">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPlainTextEdit" name="text"/>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="lineEdit"/>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>QueryDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>QueryDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>