Added splitters

This commit is contained in:
Dmitri Bogomolov 2018-11-07 18:28:42 +02:00
parent 49c9ef79f9
commit bc183adff5
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
2 changed files with 313 additions and 278 deletions

View File

@ -21,8 +21,8 @@
<enum>QTabWidget::Rounded</enum> <enum>QTabWidget::Rounded</enum>
</property> </property>
<widget class="QWidget" name="centralwidget"> <widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout_10"> <layout class="QVBoxLayout">
<item row="0" column="0"> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
@ -64,12 +64,16 @@
<attribute name="title"> <attribute name="title">
<string>Messages</string> <string>Messages</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout"> <layout class="QVBoxLayout" name="inboxLayout">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<layout class="QVBoxLayout" name="verticalLayout_12">
<item> <item>
<widget class="SSplitter" name="inboxHorizontalSplitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="SSplitter" name="inboxIdentitiesSplitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="STreeWidget" name="treeWidgetYourIdentities"> <widget class="STreeWidget" name="treeWidgetYourIdentities">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
@ -88,8 +92,6 @@
</property> </property>
</column> </column>
</widget> </widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonNewAddress"> <widget class="QPushButton" name="pushButtonNewAddress">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
@ -101,16 +103,13 @@
<string>New Indentitiy</string> <string>New Indentitiy</string>
</property> </property>
</widget> </widget>
</item> </widget>
</layout> <widget class="SSplitter" name="inboxMessagecontrolSplitter">
</item> <property name="orientation">
<item> <enum>Qt::Vertical</enum>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<layout class="QHBoxLayout" name="horizontalLayoutSearch">
<property name="topMargin">
<number>0</number>
</property> </property>
<widget class="QWidget" name="searchWidget">
<layout class="QHBoxLayout" name="searchLayout">
<item> <item>
<widget class="QLineEdit" name="inboxSearchLineEdit"> <widget class="QLineEdit" name="inboxSearchLineEdit">
<property name="placeholderText"> <property name="placeholderText">
@ -148,8 +147,7 @@
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </widget>
<item>
<widget class="STableWidget" name="tableWidgetInbox"> <widget class="STableWidget" name="tableWidgetInbox">
<property name="editTriggers"> <property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set> <set>QAbstractItemView::NoEditTriggers</set>
@ -214,8 +212,6 @@
</property> </property>
</column> </column>
</widget> </widget>
</item>
<item>
<widget class="MessageView" name="textEditInboxMessage"> <widget class="MessageView" name="textEditInboxMessage">
<property name="baseSize"> <property name="baseSize">
<size> <size>
@ -227,10 +223,8 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </widget>
</layout> </widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>
@ -242,12 +236,16 @@
<attribute name="title"> <attribute name="title">
<string>Send</string> <string>Send</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_7"> <layout class="QVBoxLayout" name="sendLayout">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
<widget class="SSplitter" name="sendHorizontalSplitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="SSplitter" name="sendIdentitiesSplitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="STableWidget" name="tableWidgetAddressBook"> <widget class="STableWidget" name="tableWidgetAddressBook">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
@ -298,8 +296,6 @@
</property> </property>
</column> </column>
</widget> </widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonAddAddressBook"> <widget class="QPushButton" name="pushButtonAddAddressBook">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
@ -311,8 +307,6 @@
<string>Add Contact</string> <string>Add Contact</string>
</property> </property>
</widget> </widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonFetchNamecoinID"> <widget class="QPushButton" name="pushButtonFetchNamecoinID">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
@ -329,15 +323,14 @@
<string>Fetch Namecoin ID</string> <string>Fetch Namecoin ID</string>
</property> </property>
</widget> </widget>
</item> </widget>
</layout> <widget class="SSplitter" name="sendMessagecontrolSplitter">
</item> <property name="orientation">
<item> <enum>Qt::Vertical</enum>
<layout class="QVBoxLayout" name="verticalLayout"> </property>
<item>
<widget class="QTabWidget" name="tabWidgetSend"> <widget class="QTabWidget" name="tabWidgetSend">
<property name="currentIndex"> <property name="currentIndex">
<number>1</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="sendDirect"> <widget class="QWidget" name="sendDirect">
<attribute name="title"> <attribute name="title">
@ -464,9 +457,9 @@ p, li { white-space: pre-wrap; }
</layout> </layout>
</widget> </widget>
</widget> </widget>
</item>
<item> <widget class="QWidget" name="sendControlsContainer">
<layout class="QHBoxLayout" name="horizontalLayout_5"> <layout class="QHBoxLayout" name="sendControlsLayout">
<item> <item>
<widget class="QPushButton" name="pushButtonTTL"> <widget class="QPushButton" name="pushButtonTTL">
<property name="sizePolicy"> <property name="sizePolicy">
@ -602,13 +595,11 @@ p, li { white-space: pre-wrap; }
</widget> </widget>
</item> </item>
</layout> </layout>
</widget>
</widget>
</widget>
</item> </item>
</layout> </layout>
</item>
</layout>
</item>
</layout>
<zorder></zorder>
</widget> </widget>
<widget class="QWidget" name="subscriptions"> <widget class="QWidget" name="subscriptions">
<attribute name="icon"> <attribute name="icon">
@ -618,12 +609,16 @@ p, li { white-space: pre-wrap; }
<attribute name="title"> <attribute name="title">
<string>Subscriptions</string> <string>Subscriptions</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QVBoxLayout">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item> <item>
<widget class="SSplitter" name="subscriptionsHorizontalSplitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="SSplitter" name="subscriptionsIdentitiesSplitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="STreeWidget" name="treeWidgetSubscriptions"> <widget class="STreeWidget" name="treeWidgetSubscriptions">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
@ -651,8 +646,6 @@ p, li { white-space: pre-wrap; }
</property> </property>
</column> </column>
</widget> </widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonAddSubscription"> <widget class="QPushButton" name="pushButtonAddSubscription">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
@ -664,13 +657,13 @@ p, li { white-space: pre-wrap; }
<string>Add new Subscription</string> <string>Add new Subscription</string>
</property> </property>
</widget> </widget>
</item> </widget>
</layout> <widget class="SSplitter" name="subscriptionsMessagecontrolSplitter">
</item> <property name="orientation">
<item> <enum>Qt::Vertical</enum>
<layout class="QVBoxLayout" name="verticalLayout_4"> </property>
<item> <widget class="QWidget" name="searchWidget">
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="searchLayout">
<item> <item>
<widget class="QLineEdit" name="inboxSearchLineEditSubscriptions"> <widget class="QLineEdit" name="inboxSearchLineEditSubscriptions">
<property name="placeholderText"> <property name="placeholderText">
@ -708,8 +701,7 @@ p, li { white-space: pre-wrap; }
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </widget>
<item>
<widget class="STableWidget" name="tableWidgetInboxSubscriptions"> <widget class="STableWidget" name="tableWidgetInboxSubscriptions">
<property name="editTriggers"> <property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set> <set>QAbstractItemView::NoEditTriggers</set>
@ -774,8 +766,6 @@ p, li { white-space: pre-wrap; }
</property> </property>
</column> </column>
</widget> </widget>
</item>
<item>
<widget class="MessageView" name="textEditInboxMessageSubscriptions"> <widget class="MessageView" name="textEditInboxMessageSubscriptions">
<property name="baseSize"> <property name="baseSize">
<size> <size>
@ -787,14 +777,12 @@ p, li { white-space: pre-wrap; }
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </widget>
</layout> </widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_3"> <widget class="QWidget" name="chans">
<attribute name="icon"> <attribute name="icon">
<iconset resource="bitmessage_icons.qrc"> <iconset resource="bitmessage_icons.qrc">
<normaloff>:/newPrefix/images/can-icon-16px.png</normaloff>:/newPrefix/images/can-icon-16px.png</iconset> <normaloff>:/newPrefix/images/can-icon-16px.png</normaloff>:/newPrefix/images/can-icon-16px.png</iconset>
@ -802,12 +790,16 @@ p, li { white-space: pre-wrap; }
<attribute name="title"> <attribute name="title">
<string>Chans</string> <string>Chans</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QVBoxLayout" name="chansLayout">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<layout class="QVBoxLayout" name="verticalLayout_17">
<item> <item>
<widget class="SSplitter" name="chansHorizontalSplitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="SSplitter" name="chansIdentitiesSplitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QTreeWidget" name="treeWidgetChans"> <widget class="QTreeWidget" name="treeWidgetChans">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
@ -841,8 +833,6 @@ p, li { white-space: pre-wrap; }
</property> </property>
</column> </column>
</widget> </widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonAddChan"> <widget class="QPushButton" name="pushButtonAddChan">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
@ -854,13 +844,13 @@ p, li { white-space: pre-wrap; }
<string>Add Chan</string> <string>Add Chan</string>
</property> </property>
</widget> </widget>
</item> </widget>
</layout> <widget class="SSplitter" name="chansMessagecontrolSplitter">
</item> <property name="orientation">
<item> <enum>Qt::Vertical</enum>
<layout class="QVBoxLayout" name="verticalLayout_8"> </property>
<item> <widget class="QWidget" name="searchWidget">
<layout class="QHBoxLayout" name="horizontalLayout_6"> <layout class="QHBoxLayout" name="searchLayout">
<item> <item>
<widget class="QLineEdit" name="inboxSearchLineEditChans"> <widget class="QLineEdit" name="inboxSearchLineEditChans">
<property name="placeholderText"> <property name="placeholderText">
@ -898,8 +888,7 @@ p, li { white-space: pre-wrap; }
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </widget>
<item>
<widget class="STableWidget" name="tableWidgetInboxChans"> <widget class="STableWidget" name="tableWidgetInboxChans">
<property name="editTriggers"> <property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set> <set>QAbstractItemView::NoEditTriggers</set>
@ -964,8 +953,6 @@ p, li { white-space: pre-wrap; }
</property> </property>
</column> </column>
</widget> </widget>
</item>
<item>
<widget class="MessageView" name="textEditInboxMessageChans"> <widget class="MessageView" name="textEditInboxMessageChans">
<property name="baseSize"> <property name="baseSize">
<size> <size>
@ -977,10 +964,8 @@ p, li { white-space: pre-wrap; }
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </widget>
</layout> </widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>
@ -1177,11 +1162,22 @@ p, li { white-space: pre-wrap; }
<extends>QTableWidget</extends> <extends>QTableWidget</extends>
<header>bitmessageqt.settingsmixin</header> <header>bitmessageqt.settingsmixin</header>
</customwidget> </customwidget>
<customwidget>
<class>SSplitter</class>
<extends>QSplitter</extends>
<header>bitmessageqt.settingsmixin</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>MessageCompose</class> <class>MessageCompose</class>
<extends>QTextEdit</extends> <extends>QTextEdit</extends>
<header>bitmessageqt.messagecompose</header> <header>bitmessageqt.messagecompose</header>
</customwidget> </customwidget>
<customwidget>
<class>MessagelistControl</class>
<extends>SSplitter</extends>
<header>bitmessageqt.messagelist</header>
</customwidget>
</customwidgets> </customwidgets>
<tabstops> <tabstops>
<tabstop>tableWidgetInbox</tabstop> <tabstop>tableWidgetInbox</tabstop>

View File

@ -23,6 +23,45 @@ class Window(settingsmixin.SMainWindow, RetranslateMixin):
self.addressBookCompleter.setModel(self.addressBookCompleterModel) self.addressBookCompleter.setModel(self.addressBookCompleterModel)
self.lineEditTo.setCompleter(self.addressBookCompleter) self.lineEditTo.setCompleter(self.addressBookCompleter)
# splitters
for splitter in (
self.inboxHorizontalSplitter,
self.sendHorizontalSplitter,
self.subscriptionsHorizontalSplitter,
self.chansHorizontalSplitter
):
splitter.setStretchFactor(0, 0)
splitter.setStretchFactor(1, 1)
splitter.setCollapsible(0, False)
splitter.setCollapsible(1, False)
for splitter in (
self.inboxIdentitiesSplitter,
self.sendIdentitiesSplitter,
self.subscriptionsIdentitiesSplitter,
self.chansIdentitiesSplitter
):
splitter.setStretchFactor(0, 1)
splitter.setStretchFactor(1, 0)
splitter.setCollapsible(0, False)
splitter.setCollapsible(1, False)
splitter.handle(1).setEnabled(False)
for splitter in (
self.inboxMessagecontrolSplitter,
self.subscriptionsMessagecontrolSplitter,
self.chansMessagecontrolSplitter
):
splitter.setStretchFactor(0, 0)
splitter.setStretchFactor(1, 1)
splitter.setStretchFactor(2, 2)
splitter.setCollapsible(0, False)
splitter.setCollapsible(1, False)
splitter.setCollapsible(2, False)
splitter.handle(1).setEnabled(False)
self.sendMessagecontrolSplitter.handle(1).setEnabled(False)
def updateNetworkSwitchMenuLabel(self, dontconnect=None): def updateNetworkSwitchMenuLabel(self, dontconnect=None):
""" """
Set the label for "Go online"/"Go offline" menu action Set the label for "Go online"/"Go offline" menu action