From 782214c7b799cd24718136eb931e081bf5e08c36 Mon Sep 17 00:00:00 2001 From: UnderSampled Date: Wed, 14 Aug 2013 23:21:05 -0400 Subject: [PATCH 1/3] Allow inbox and sent preview panels to resize. --- src/bitmessageqt/bitmessageui.py | 30 ++-- src/bitmessageqt/bitmessageui.ui | 269 ++++++++++++++++--------------- 2 files changed, 159 insertions(+), 140 deletions(-) diff --git a/src/bitmessageqt/bitmessageui.py b/src/bitmessageqt/bitmessageui.py index c051c076..0608c733 100644 --- a/src/bitmessageqt/bitmessageui.py +++ b/src/bitmessageqt/bitmessageui.py @@ -2,8 +2,8 @@ # Form implementation generated from reading ui file 'bitmessageui.ui' # -# Created: Mon Aug 12 00:08:20 2013 -# by: PyQt4 UI code generator 4.10.2 +# Created: Wed Aug 14 23:19:43 2013 +# by: PyQt4 UI code generator 4.10 # # WARNING! All changes made in this file will be lost! @@ -69,7 +69,10 @@ class Ui_MainWindow(object): self.inboxSearchOptionCB.addItem(_fromUtf8("")) self.horizontalLayoutSearch.addWidget(self.inboxSearchOptionCB) self.verticalLayout_2.addLayout(self.horizontalLayoutSearch) - self.tableWidgetInbox = QtGui.QTableWidget(self.inbox) + self.splitter = QtGui.QSplitter(self.inbox) + self.splitter.setOrientation(QtCore.Qt.Vertical) + self.splitter.setObjectName(_fromUtf8("splitter")) + self.tableWidgetInbox = QtGui.QTableWidget(self.splitter) self.tableWidgetInbox.setAlternatingRowColors(True) self.tableWidgetInbox.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) self.tableWidgetInbox.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) @@ -93,11 +96,10 @@ class Ui_MainWindow(object): self.tableWidgetInbox.horizontalHeader().setStretchLastSection(True) self.tableWidgetInbox.verticalHeader().setVisible(False) self.tableWidgetInbox.verticalHeader().setDefaultSectionSize(26) - self.verticalLayout_2.addWidget(self.tableWidgetInbox) - self.textEditInboxMessage = QtGui.QTextEdit(self.inbox) + self.textEditInboxMessage = QtGui.QTextEdit(self.splitter) self.textEditInboxMessage.setBaseSize(QtCore.QSize(0, 500)) self.textEditInboxMessage.setObjectName(_fromUtf8("textEditInboxMessage")) - self.verticalLayout_2.addWidget(self.textEditInboxMessage) + self.verticalLayout_2.addWidget(self.splitter) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/inbox.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.tabWidget.addTab(self.inbox, icon1, _fromUtf8("")) @@ -193,7 +195,10 @@ class Ui_MainWindow(object): self.sentSearchOptionCB.addItem(_fromUtf8("")) self.horizontalLayout.addWidget(self.sentSearchOptionCB) self.verticalLayout.addLayout(self.horizontalLayout) - self.tableWidgetSent = QtGui.QTableWidget(self.sent) + self.splitter_2 = QtGui.QSplitter(self.sent) + self.splitter_2.setOrientation(QtCore.Qt.Vertical) + self.splitter_2.setObjectName(_fromUtf8("splitter_2")) + self.tableWidgetSent = QtGui.QTableWidget(self.splitter_2) self.tableWidgetSent.setDragDropMode(QtGui.QAbstractItemView.DragDrop) self.tableWidgetSent.setAlternatingRowColors(True) self.tableWidgetSent.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) @@ -217,10 +222,9 @@ class Ui_MainWindow(object): self.tableWidgetSent.horizontalHeader().setStretchLastSection(True) self.tableWidgetSent.verticalHeader().setVisible(False) self.tableWidgetSent.verticalHeader().setStretchLastSection(False) - self.verticalLayout.addWidget(self.tableWidgetSent) - self.textEditSentMessage = QtGui.QTextEdit(self.sent) + self.textEditSentMessage = QtGui.QTextEdit(self.splitter_2) self.textEditSentMessage.setObjectName(_fromUtf8("textEditSentMessage")) - self.verticalLayout.addWidget(self.textEditSentMessage) + self.verticalLayout.addWidget(self.splitter_2) icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/sent.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.tabWidget.addTab(self.sent, icon3, _fromUtf8("")) @@ -428,7 +432,7 @@ class Ui_MainWindow(object): self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(MainWindow) - self.menubar.setGeometry(QtCore.QRect(0, 0, 795, 18)) + self.menubar.setGeometry(QtCore.QRect(0, 0, 795, 23)) self.menubar.setObjectName(_fromUtf8("menubar")) self.menuFile = QtGui.QMenu(self.menubar) self.menuFile.setObjectName(_fromUtf8("menuFile")) @@ -546,8 +550,8 @@ class Ui_MainWindow(object): self.textEditMessage.setHtml(_translate("MainWindow", "\n" "\n" -"


", None)) +"\n" +"


", None)) self.label.setText(_translate("MainWindow", "To:", None)) self.label_2.setText(_translate("MainWindow", "From:", None)) self.radioButtonBroadcast.setText(_translate("MainWindow", "Broadcast to everyone who is subscribed to your address", None)) diff --git a/src/bitmessageqt/bitmessageui.ui b/src/bitmessageqt/bitmessageui.ui index 683703d8..226e6a64 100644 --- a/src/bitmessageqt/bitmessageui.ui +++ b/src/bitmessageqt/bitmessageui.ui @@ -22,7 +22,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -112,76 +121,79 @@ - - - true + + + Qt::Vertical - - QAbstractItemView::ExtendedSelection - - - QAbstractItemView::SelectRows - - - true - - - false - - - true - - - 200 - - - false - - - 27 - - - false - - - true - - - false - - - 26 - - - - To + + + true - - - - From + + QAbstractItemView::ExtendedSelection - - - - Subject + + QAbstractItemView::SelectRows - - - - Received + + true - - - - - - - - 0 - 500 - - + + false + + + true + + + 200 + + + false + + + 27 + + + false + + + true + + + false + + + 26 + + + + To + + + + + From + + + + + Subject + + + + + Received + + + + + + + 0 + 500 + + + @@ -269,8 +281,8 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> +</style></head><body style=" font-family:'Sans'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2';"><br /></p></body></html> @@ -409,71 +421,74 @@ p, li { white-space: pre-wrap; } - - - QAbstractItemView::DragDrop + + + Qt::Vertical - - true - - - QAbstractItemView::ExtendedSelection - - - QAbstractItemView::SelectRows - - - true - - - false - - - true - - - 130 - - - false - - - false - - - true - - - false - - - false - - - - To + + + QAbstractItemView::DragDrop - - - - From + + true - - - - Subject + + QAbstractItemView::ExtendedSelection - - - - Status + + QAbstractItemView::SelectRows - + + true + + + false + + + true + + + 130 + + + false + + + false + + + true + + + false + + + false + + + + To + + + + + From + + + + + Subject + + + + + Status + + + + - - - @@ -1023,7 +1038,7 @@ p, li { white-space: pre-wrap; } 0 0 795 - 18 + 23 -- 2.45.1 From 13f029f34c7414b5a9b80670fa5d7a50dd372710 Mon Sep 17 00:00:00 2001 From: UnderSampled Date: Thu, 15 Aug 2013 10:01:36 -0400 Subject: [PATCH 2/3] Set inbox and sent preview panels to read only. --- src/bitmessageqt/bitmessageui.py | 4 +++- src/bitmessageqt/bitmessageui.ui | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/bitmessageqt/bitmessageui.py b/src/bitmessageqt/bitmessageui.py index 0608c733..942f6bf1 100644 --- a/src/bitmessageqt/bitmessageui.py +++ b/src/bitmessageqt/bitmessageui.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'bitmessageui.ui' # -# Created: Wed Aug 14 23:19:43 2013 +# Created: Thu Aug 15 09:54:36 2013 # by: PyQt4 UI code generator 4.10 # # WARNING! All changes made in this file will be lost! @@ -98,6 +98,7 @@ class Ui_MainWindow(object): self.tableWidgetInbox.verticalHeader().setDefaultSectionSize(26) self.textEditInboxMessage = QtGui.QTextEdit(self.splitter) self.textEditInboxMessage.setBaseSize(QtCore.QSize(0, 500)) + self.textEditInboxMessage.setReadOnly(True) self.textEditInboxMessage.setObjectName(_fromUtf8("textEditInboxMessage")) self.verticalLayout_2.addWidget(self.splitter) icon1 = QtGui.QIcon() @@ -223,6 +224,7 @@ class Ui_MainWindow(object): self.tableWidgetSent.verticalHeader().setVisible(False) self.tableWidgetSent.verticalHeader().setStretchLastSection(False) self.textEditSentMessage = QtGui.QTextEdit(self.splitter_2) + self.textEditSentMessage.setReadOnly(True) self.textEditSentMessage.setObjectName(_fromUtf8("textEditSentMessage")) self.verticalLayout.addWidget(self.splitter_2) icon3 = QtGui.QIcon() diff --git a/src/bitmessageqt/bitmessageui.ui b/src/bitmessageqt/bitmessageui.ui index 226e6a64..22b6c314 100644 --- a/src/bitmessageqt/bitmessageui.ui +++ b/src/bitmessageqt/bitmessageui.ui @@ -193,6 +193,9 @@ 500 + + true + @@ -486,7 +489,11 @@ p, li { white-space: pre-wrap; } - + + + true + + -- 2.45.1 From 85fc2682f086d5f9beb4e115fbcd0b363d215646 Mon Sep 17 00:00:00 2001 From: UnderSampled Date: Thu, 15 Aug 2013 14:21:07 -0400 Subject: [PATCH 3/3] remove inbox and sent tables edit triggers. --- src/bitmessageqt/bitmessageui.py | 4 +++- src/bitmessageqt/bitmessageui.ui | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/bitmessageqt/bitmessageui.py b/src/bitmessageqt/bitmessageui.py index 942f6bf1..74505f38 100644 --- a/src/bitmessageqt/bitmessageui.py +++ b/src/bitmessageqt/bitmessageui.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'bitmessageui.ui' # -# Created: Thu Aug 15 09:54:36 2013 +# Created: Thu Aug 15 14:19:52 2013 # by: PyQt4 UI code generator 4.10 # # WARNING! All changes made in this file will be lost! @@ -73,6 +73,7 @@ class Ui_MainWindow(object): self.splitter.setOrientation(QtCore.Qt.Vertical) self.splitter.setObjectName(_fromUtf8("splitter")) self.tableWidgetInbox = QtGui.QTableWidget(self.splitter) + self.tableWidgetInbox.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.tableWidgetInbox.setAlternatingRowColors(True) self.tableWidgetInbox.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) self.tableWidgetInbox.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) @@ -200,6 +201,7 @@ class Ui_MainWindow(object): self.splitter_2.setOrientation(QtCore.Qt.Vertical) self.splitter_2.setObjectName(_fromUtf8("splitter_2")) self.tableWidgetSent = QtGui.QTableWidget(self.splitter_2) + self.tableWidgetSent.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.tableWidgetSent.setDragDropMode(QtGui.QAbstractItemView.DragDrop) self.tableWidgetSent.setAlternatingRowColors(True) self.tableWidgetSent.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) diff --git a/src/bitmessageqt/bitmessageui.ui b/src/bitmessageqt/bitmessageui.ui index 22b6c314..5b597d38 100644 --- a/src/bitmessageqt/bitmessageui.ui +++ b/src/bitmessageqt/bitmessageui.ui @@ -126,6 +126,9 @@ Qt::Vertical + + QAbstractItemView::NoEditTriggers + true @@ -429,6 +432,9 @@ p, li { white-space: pre-wrap; } Qt::Vertical + + QAbstractItemView::NoEditTriggers + QAbstractItemView::DragDrop -- 2.45.1