MessagelistControl widget
This commit is contained in:
parent
45d3dbc0ec
commit
8e99226fee
|
@ -158,7 +158,6 @@ class MainWindow(Window):
|
||||||
|
|
||||||
treeWidget.setSortingEnabled(True)
|
treeWidget.setSortingEnabled(True)
|
||||||
|
|
||||||
|
|
||||||
def rerenderTabTreeMessages(self):
|
def rerenderTabTreeMessages(self):
|
||||||
self.rerenderTabTree('messages')
|
self.rerenderTabTree('messages')
|
||||||
|
|
||||||
|
@ -166,9 +165,9 @@ class MainWindow(Window):
|
||||||
self.rerenderTabTree('chan')
|
self.rerenderTabTree('chan')
|
||||||
|
|
||||||
def rerenderTabTree(self, tab):
|
def rerenderTabTree(self, tab):
|
||||||
if tab == 'messages':
|
if tab != 'chan':
|
||||||
treeWidget = self.treeWidgetYourIdentities
|
return
|
||||||
elif tab == 'chan':
|
|
||||||
treeWidget = self.treeWidgetChans
|
treeWidget = self.treeWidgetChans
|
||||||
folders = Ui_FolderWidget.folderWeight.keys()
|
folders = Ui_FolderWidget.folderWeight.keys()
|
||||||
|
|
||||||
|
@ -188,10 +187,7 @@ class MainWindow(Window):
|
||||||
isMaillinglist = BMConfigParser().safeGetBoolean(
|
isMaillinglist = BMConfigParser().safeGetBoolean(
|
||||||
toAddress, 'mailinglist')
|
toAddress, 'mailinglist')
|
||||||
|
|
||||||
if treeWidget == self.treeWidgetYourIdentities:
|
if treeWidget == self.treeWidgetChans:
|
||||||
if isChan:
|
|
||||||
continue
|
|
||||||
elif treeWidget == self.treeWidgetChans:
|
|
||||||
if not isChan:
|
if not isChan:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -209,13 +205,13 @@ class MainWindow(Window):
|
||||||
total += cnt
|
total += cnt
|
||||||
if toaddress in db and folder in db[toaddress]:
|
if toaddress in db and folder in db[toaddress]:
|
||||||
db[toaddress][folder] = cnt
|
db[toaddress][folder] = cnt
|
||||||
if treeWidget == self.treeWidgetYourIdentities:
|
# if treeWidget == self.treeWidgetYourIdentities:
|
||||||
db[None] = {}
|
# db[None] = {}
|
||||||
db[None]["inbox"] = total
|
# db[None]["inbox"] = total
|
||||||
db[None]["new"] = total
|
# db[None]["new"] = total
|
||||||
db[None]["sent"] = 0
|
# db[None]["sent"] = 0
|
||||||
db[None]["trash"] = 0
|
# db[None]["trash"] = 0
|
||||||
enabled[None] = True
|
# enabled[None] = True
|
||||||
|
|
||||||
if treeWidget.isSortingEnabled():
|
if treeWidget.isSortingEnabled():
|
||||||
treeWidget.setSortingEnabled(False)
|
treeWidget.setSortingEnabled(False)
|
||||||
|
@ -367,17 +363,17 @@ class MainWindow(Window):
|
||||||
self.UISignalThread.start()
|
self.UISignalThread.start()
|
||||||
|
|
||||||
# Key press in tree view
|
# Key press in tree view
|
||||||
self.treeWidgetYourIdentities.keyPressEvent = self.treeWidgetKeyPressEvent
|
# self.treeWidgetYourIdentities.keyPressEvent = self.treeWidgetKeyPressEvent
|
||||||
self.treeWidgetSubscriptions.keyPressEvent = self.treeWidgetKeyPressEvent
|
self.treeWidgetSubscriptions.keyPressEvent = self.treeWidgetKeyPressEvent
|
||||||
self.treeWidgetChans.keyPressEvent = self.treeWidgetKeyPressEvent
|
self.treeWidgetChans.keyPressEvent = self.treeWidgetKeyPressEvent
|
||||||
|
|
||||||
# Key press in messagelist
|
# Key press in messagelist
|
||||||
self.messagelistInbox.keyPressEvent = self.tableWidgetKeyPressEvent
|
# self.messagelistInbox.keyPressEvent = self.tableWidgetKeyPressEvent
|
||||||
self.tableWidgetInboxSubscriptions.keyPressEvent = self.tableWidgetKeyPressEvent
|
self.tableWidgetInboxSubscriptions.keyPressEvent = self.tableWidgetKeyPressEvent
|
||||||
self.tableWidgetInboxChans.keyPressEvent = self.tableWidgetKeyPressEvent
|
self.tableWidgetInboxChans.keyPressEvent = self.tableWidgetKeyPressEvent
|
||||||
|
|
||||||
# Key press in messageview
|
# Key press in messageview
|
||||||
self.textEditInboxMessage.keyPressEvent = self.textEditKeyPressEvent
|
# self.textEditInboxMessage.keyPressEvent = self.textEditKeyPressEvent
|
||||||
self.textEditInboxMessageSubscriptions.keyPressEvent = self.textEditKeyPressEvent
|
self.textEditInboxMessageSubscriptions.keyPressEvent = self.textEditKeyPressEvent
|
||||||
self.textEditInboxMessageChans.keyPressEvent = self.textEditKeyPressEvent
|
self.textEditInboxMessageChans.keyPressEvent = self.textEditKeyPressEvent
|
||||||
|
|
||||||
|
@ -544,7 +540,7 @@ class MainWindow(Window):
|
||||||
widget.item(row, col).setUnread(not status)
|
widget.item(row, col).setUnread(not status)
|
||||||
|
|
||||||
def propagateUnreadCount(self, address = None, folder = "inbox", widget = None, type = 1):
|
def propagateUnreadCount(self, address = None, folder = "inbox", widget = None, type = 1):
|
||||||
widgets = [self.treeWidgetYourIdentities, self.treeWidgetSubscriptions, self.treeWidgetChans]
|
widgets = [self.treeWidgetSubscriptions, self.treeWidgetChans]
|
||||||
queryReturn = sqlQuery("SELECT toaddress, folder, COUNT(msgid) AS cnt FROM inbox WHERE read = 0 GROUP BY toaddress, folder")
|
queryReturn = sqlQuery("SELECT toaddress, folder, COUNT(msgid) AS cnt FROM inbox WHERE read = 0 GROUP BY toaddress, folder")
|
||||||
totalUnread = {}
|
totalUnread = {}
|
||||||
normalUnread = {}
|
normalUnread = {}
|
||||||
|
@ -1076,9 +1072,9 @@ class MainWindow(Window):
|
||||||
self.rerenderTabTreeMessages()
|
self.rerenderTabTreeMessages()
|
||||||
self.rerenderTabTreeSubscriptions()
|
self.rerenderTabTreeSubscriptions()
|
||||||
self.rerenderTabTreeChans()
|
self.rerenderTabTreeChans()
|
||||||
if self.getCurrentFolder(self.treeWidgetYourIdentities) == "trash":
|
# if self.getCurrentFolder(self.treeWidgetYourIdentities) == "trash":
|
||||||
self.loadMessagelist(self.tableWidgetInbox, self.getCurrentAccount(self.treeWidgetYourIdentities), "trash")
|
# self.loadMessagelist(self.tableWidgetInbox, self.getCurrentAccount(self.treeWidgetYourIdentities), "trash")
|
||||||
elif self.getCurrentFolder(self.treeWidgetSubscriptions) == "trash":
|
if self.getCurrentFolder(self.treeWidgetSubscriptions) == "trash":
|
||||||
self.loadMessagelist(self.tableWidgetInboxSubscriptions, self.getCurrentAccount(self.treeWidgetSubscriptions), "trash")
|
self.loadMessagelist(self.tableWidgetInboxSubscriptions, self.getCurrentAccount(self.treeWidgetSubscriptions), "trash")
|
||||||
elif self.getCurrentFolder(self.treeWidgetChans) == "trash":
|
elif self.getCurrentFolder(self.treeWidgetChans) == "trash":
|
||||||
self.loadMessagelist(self.tableWidgetInboxChans, self.getCurrentAccount(self.treeWidgetChans), "trash")
|
self.loadMessagelist(self.tableWidgetInboxChans, self.getCurrentAccount(self.treeWidgetChans), "trash")
|
||||||
|
@ -1829,12 +1825,12 @@ class MainWindow(Window):
|
||||||
treeWidget = self.widgetConvert(sent)
|
treeWidget = self.widgetConvert(sent)
|
||||||
if self.getCurrentFolder(treeWidget) != "sent":
|
if self.getCurrentFolder(treeWidget) != "sent":
|
||||||
continue
|
continue
|
||||||
if (
|
# if (
|
||||||
treeWidget == self.treeWidgetYourIdentities and
|
# treeWidget == self.treeWidgetYourIdentities and
|
||||||
self.getCurrentAccount(treeWidget)
|
# self.getCurrentAccount(treeWidget)
|
||||||
not in (fromAddress, None, False)
|
# not in (fromAddress, None, False)
|
||||||
):
|
# ):
|
||||||
continue
|
# continue
|
||||||
elif treeWidget in [self.treeWidgetSubscriptions, self.treeWidgetChans] and self.getCurrentAccount(treeWidget) != toAddress:
|
elif treeWidget in [self.treeWidgetSubscriptions, self.treeWidgetChans] and self.getCurrentAccount(treeWidget) != toAddress:
|
||||||
continue
|
continue
|
||||||
elif not helper_search.check_match(toAddress, fromAddress, subject, message, self.getCurrentSearchOption(tab), self.getCurrentSearchLine(tab)):
|
elif not helper_search.check_match(toAddress, fromAddress, subject, message, self.getCurrentSearchOption(tab), self.getCurrentSearchLine(tab)):
|
||||||
|
@ -1852,7 +1848,7 @@ class MainWindow(Window):
|
||||||
inbox = self.getAccountMessagelist(acct)
|
inbox = self.getAccountMessagelist(acct)
|
||||||
ret = None
|
ret = None
|
||||||
tab = -1
|
tab = -1
|
||||||
for treeWidget in [self.treeWidgetYourIdentities, self.treeWidgetSubscriptions, self.treeWidgetChans]:
|
for treeWidget in [self.treeWidgetSubscriptions, self.treeWidgetChans]:
|
||||||
tab += 1
|
tab += 1
|
||||||
if tab == 1:
|
if tab == 1:
|
||||||
tab = 2
|
tab = 2
|
||||||
|
@ -1861,12 +1857,12 @@ class MainWindow(Window):
|
||||||
continue
|
continue
|
||||||
if tableWidget == inbox and self.getCurrentAccount(treeWidget) == acct.address and self.getCurrentFolder(treeWidget) in ["inbox", None]:
|
if tableWidget == inbox and self.getCurrentAccount(treeWidget) == acct.address and self.getCurrentFolder(treeWidget) in ["inbox", None]:
|
||||||
ret = self.addMessageListItemInbox(inbox, "inbox", inventoryHash, toAddress, fromAddress, subject, time.time(), 0)
|
ret = self.addMessageListItemInbox(inbox, "inbox", inventoryHash, toAddress, fromAddress, subject, time.time(), 0)
|
||||||
elif (
|
# elif (
|
||||||
treeWidget == self.treeWidgetYourIdentities and
|
# treeWidget == self.treeWidgetYourIdentities and
|
||||||
self.getCurrentAccount(treeWidget) is None and
|
# self.getCurrentAccount(treeWidget) is None and
|
||||||
self.getCurrentFolder(treeWidget) in ("inbox", "new", None)
|
# self.getCurrentFolder(treeWidget) in ("inbox", "new", None)
|
||||||
):
|
# ):
|
||||||
ret = self.addMessageListItemInbox(tableWidget, "inbox", inventoryHash, toAddress, fromAddress, subject, time.time(), 0)
|
# ret = self.addMessageListItemInbox(tableWidget, "inbox", inventoryHash, toAddress, fromAddress, subject, time.time(), 0)
|
||||||
if ret is None:
|
if ret is None:
|
||||||
acct.parseMessage(toAddress, fromAddress, subject, "")
|
acct.parseMessage(toAddress, fromAddress, subject, "")
|
||||||
else:
|
else:
|
||||||
|
@ -2855,14 +2851,10 @@ class MainWindow(Window):
|
||||||
self.treeWidgetSubscriptions.mapToGlobal(point))
|
self.treeWidgetSubscriptions.mapToGlobal(point))
|
||||||
|
|
||||||
def widgetConvert(self, widget):
|
def widgetConvert(self, widget):
|
||||||
# if widget == self.tableWidgetInbox:
|
|
||||||
# return self.treeWidgetYourIdentities
|
|
||||||
if widget == self.tableWidgetInboxSubscriptions:
|
if widget == self.tableWidgetInboxSubscriptions:
|
||||||
return self.treeWidgetSubscriptions
|
return self.treeWidgetSubscriptions
|
||||||
elif widget == self.tableWidgetInboxChans:
|
elif widget == self.tableWidgetInboxChans:
|
||||||
return self.treeWidgetChans
|
return self.treeWidgetChans
|
||||||
elif widget == self.treeWidgetYourIdentities:
|
|
||||||
return self.messagelistInbox
|
|
||||||
elif widget == self.treeWidgetSubscriptions:
|
elif widget == self.treeWidgetSubscriptions:
|
||||||
return self.tableWidgetInboxSubscriptions
|
return self.tableWidgetInboxSubscriptions
|
||||||
elif widget == self.treeWidgetChans:
|
elif widget == self.treeWidgetChans:
|
||||||
|
@ -2871,26 +2863,17 @@ class MainWindow(Window):
|
||||||
def getCurrentTreeWidget(self):
|
def getCurrentTreeWidget(self):
|
||||||
currentIndex = self.tabWidget.currentIndex()
|
currentIndex = self.tabWidget.currentIndex()
|
||||||
treeWidgetList = [
|
treeWidgetList = [
|
||||||
self.treeWidgetYourIdentities,
|
|
||||||
False,
|
|
||||||
self.treeWidgetSubscriptions,
|
self.treeWidgetSubscriptions,
|
||||||
self.treeWidgetChans
|
self.treeWidgetChans
|
||||||
]
|
]
|
||||||
if currentIndex >= 0 and currentIndex < len(treeWidgetList):
|
if currentIndex >= 2 and currentIndex - 2 < len(treeWidgetList):
|
||||||
return treeWidgetList[currentIndex]
|
return treeWidgetList[currentIndex]
|
||||||
else:
|
|
||||||
return False
|
|
||||||
|
|
||||||
def getAccountTreeWidget(self, account):
|
def getAccountTreeWidget(self, account):
|
||||||
try:
|
|
||||||
if account.type == AccountMixin.CHAN:
|
if account.type == AccountMixin.CHAN:
|
||||||
return self.treeWidgetChans
|
return self.treeWidgetChans
|
||||||
elif account.type == AccountMixin.SUBSCRIPTION:
|
elif account.type == AccountMixin.SUBSCRIPTION:
|
||||||
return self.treeWidgetSubscriptions
|
return self.treeWidgetSubscriptions
|
||||||
else:
|
|
||||||
return self.treeWidgetYourIdentities
|
|
||||||
except:
|
|
||||||
return self.treeWidgetYourIdentities
|
|
||||||
|
|
||||||
def getCurrentMessagelist(self):
|
def getCurrentMessagelist(self):
|
||||||
currentIndex = self.tabWidget.currentIndex()
|
currentIndex = self.tabWidget.currentIndex()
|
||||||
|
@ -2900,8 +2883,6 @@ class MainWindow(Window):
|
||||||
)
|
)
|
||||||
if currentIndex >= 2 and currentIndex - 2 < len(messagelistList):
|
if currentIndex >= 2 and currentIndex - 2 < len(messagelistList):
|
||||||
return messagelistList[currentIndex - 2]
|
return messagelistList[currentIndex - 2]
|
||||||
else:
|
|
||||||
return False
|
|
||||||
|
|
||||||
def getAccountMessagelist(self, account):
|
def getAccountMessagelist(self, account):
|
||||||
try:
|
try:
|
||||||
|
@ -2928,15 +2909,11 @@ class MainWindow(Window):
|
||||||
def getCurrentMessageTextedit(self):
|
def getCurrentMessageTextedit(self):
|
||||||
currentIndex = self.tabWidget.currentIndex()
|
currentIndex = self.tabWidget.currentIndex()
|
||||||
messagelistList = [
|
messagelistList = [
|
||||||
self.textEditInboxMessage,
|
|
||||||
False,
|
|
||||||
self.textEditInboxMessageSubscriptions,
|
self.textEditInboxMessageSubscriptions,
|
||||||
self.textEditInboxMessageChans,
|
self.textEditInboxMessageChans,
|
||||||
]
|
]
|
||||||
if currentIndex >= 0 and currentIndex < len(messagelistList):
|
if currentIndex >= 2 and currentIndex - 2 < len(messagelistList):
|
||||||
return messagelistList[currentIndex]
|
return messagelistList[currentIndex]
|
||||||
else:
|
|
||||||
return False
|
|
||||||
|
|
||||||
def getAccountTextedit(self, account):
|
def getAccountTextedit(self, account):
|
||||||
try:
|
try:
|
||||||
|
@ -2953,32 +2930,24 @@ class MainWindow(Window):
|
||||||
if currentIndex is None:
|
if currentIndex is None:
|
||||||
currentIndex = self.tabWidget.currentIndex()
|
currentIndex = self.tabWidget.currentIndex()
|
||||||
messagelistList = [
|
messagelistList = [
|
||||||
self.inboxSearchLineEdit,
|
|
||||||
False,
|
|
||||||
self.inboxSearchLineEditSubscriptions,
|
self.inboxSearchLineEditSubscriptions,
|
||||||
self.inboxSearchLineEditChans,
|
self.inboxSearchLineEditChans,
|
||||||
]
|
]
|
||||||
if currentIndex >= 0 and currentIndex < len(messagelistList):
|
if currentIndex >= 2 and currentIndex - 2 < len(messagelistList):
|
||||||
if retObj:
|
if retObj:
|
||||||
return messagelistList[currentIndex]
|
return messagelistList[currentIndex]
|
||||||
else:
|
else:
|
||||||
return messagelistList[currentIndex].text().toUtf8().data()
|
return messagelistList[currentIndex].text().toUtf8().data()
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
def getCurrentSearchOption(self, currentIndex=None):
|
def getCurrentSearchOption(self, currentIndex=None):
|
||||||
if currentIndex is None:
|
if currentIndex is None:
|
||||||
currentIndex = self.tabWidget.currentIndex()
|
currentIndex = self.tabWidget.currentIndex()
|
||||||
messagelistList = [
|
messagelistList = [
|
||||||
self.inboxSearchOption,
|
|
||||||
False,
|
|
||||||
self.inboxSearchOptionSubscriptions,
|
self.inboxSearchOptionSubscriptions,
|
||||||
self.inboxSearchOptionChans,
|
self.inboxSearchOptionChans,
|
||||||
]
|
]
|
||||||
if currentIndex >= 0 and currentIndex < len(messagelistList):
|
if currentIndex >= 2 and currentIndex - 2 < len(messagelistList):
|
||||||
return messagelistList[currentIndex].currentText().toUtf8().data()
|
return messagelistList[currentIndex].currentText().toUtf8().data()
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
# Group of functions for the Your Identities dialog box
|
# Group of functions for the Your Identities dialog box
|
||||||
def getCurrentItem(self, treeWidget=None):
|
def getCurrentItem(self, treeWidget=None):
|
||||||
|
@ -3473,11 +3442,11 @@ class MainWindow(Window):
|
||||||
messageTextedit.setTextColor(QtGui.QColor())
|
messageTextedit.setTextColor(QtGui.QColor())
|
||||||
messageTextedit.setContent(message)
|
messageTextedit.setContent(message)
|
||||||
|
|
||||||
def messagelistSelect(self, msg):
|
# def messagelistSelect(self, msg):
|
||||||
messageTextedit = self.getCurrentMessageTextedit()
|
# messageTextedit = self.getCurrentMessageTextedit()
|
||||||
if not messageTextedit:
|
# if not messageTextedit:
|
||||||
return
|
# return
|
||||||
messageTextedit.setContent(msg)
|
# messageTextedit.setContent(msg)
|
||||||
|
|
||||||
def tableWidgetAddressBookItemChanged(self, item):
|
def tableWidgetAddressBookItemChanged(self, item):
|
||||||
if item.type == AccountMixin.CHAN:
|
if item.type == AccountMixin.CHAN:
|
||||||
|
|
|
@ -52,7 +52,7 @@ class Window(settingsmixin.SMainWindow):
|
||||||
|
|
||||||
# splitters
|
# splitters
|
||||||
for splitter in (
|
for splitter in (
|
||||||
self.inboxHorizontalSplitter,
|
# self.inboxHorizontalSplitter,
|
||||||
self.sendHorizontalSplitter,
|
self.sendHorizontalSplitter,
|
||||||
self.subscriptionsHorizontalSplitter,
|
self.subscriptionsHorizontalSplitter,
|
||||||
self.chansHorizontalSplitter
|
self.chansHorizontalSplitter
|
||||||
|
@ -63,7 +63,7 @@ class Window(settingsmixin.SMainWindow):
|
||||||
splitter.setCollapsible(1, False)
|
splitter.setCollapsible(1, False)
|
||||||
|
|
||||||
for splitter in (
|
for splitter in (
|
||||||
self.inboxMessagecontrolSplitter,
|
# self.inboxMessagecontrolSplitter,
|
||||||
self.subscriptionsMessagecontrolSplitter,
|
self.subscriptionsMessagecontrolSplitter,
|
||||||
self.chansMessagecontrolSplitter
|
self.chansMessagecontrolSplitter
|
||||||
):
|
):
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="inbox">
|
<widget class="MessagelistControl" name="inbox">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
<iconset resource="bitmessage_icons.qrc">
|
<iconset resource="bitmessage_icons.qrc">
|
||||||
<normaloff>:/newPrefix/images/inbox.png</normaloff>:/newPrefix/images/inbox.png</iconset>
|
<normaloff>:/newPrefix/images/inbox.png</normaloff>:/newPrefix/images/inbox.png</iconset>
|
||||||
|
@ -76,178 +76,6 @@
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Messages</string>
|
<string>Messages</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="inboxLayout">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="SSplitter" name="inboxHorizontalSplitter">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="inboxIdentitiesWidget">
|
|
||||||
<layout class="QVBoxLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="STreeWidget" name="treeWidgetYourIdentities">
|
|
||||||
<property name="baseSize">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="contextMenuPolicy">
|
|
||||||
<enum>Qt::CustomContextMenu</enum>
|
|
||||||
</property>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Identities</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset>
|
|
||||||
<selectedoff>:/newPrefix/images/identities.png</selectedoff>
|
|
||||||
</iconset>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pushButtonNewAddress">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>New Indentitiy</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="SSplitter" name="inboxMessagecontrolSplitter">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="searchWidget">
|
|
||||||
<layout class="QHBoxLayout" name="searchLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="inboxSearchLineEdit">
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>Search</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="inboxSearchOption">
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>All</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>To</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>From</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Subject</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Message</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="InboxMessagelist" name="messagelistInbox">
|
|
||||||
<property name="contextMenuPolicy">
|
|
||||||
<enum>Qt::CustomContextMenu</enum>
|
|
||||||
</property>
|
|
||||||
<property name="editTriggers">
|
|
||||||
<set>QAbstractItemView::NoEditTriggers</set>
|
|
||||||
</property>
|
|
||||||
<property name="alternatingRowColors">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="selectionMode">
|
|
||||||
<enum>QAbstractItemView::ExtendedSelection</enum>
|
|
||||||
</property>
|
|
||||||
<property name="selectionBehavior">
|
|
||||||
<enum>QAbstractItemView::SelectRows</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sortingEnabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<attribute name="horizontalHeaderCascadingSectionResizes">
|
|
||||||
<bool>true</bool>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="horizontalHeaderDefaultSectionSize">
|
|
||||||
<number>200</number>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="horizontalHeaderHighlightSections">
|
|
||||||
<bool>false</bool>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="horizontalHeaderMinimumSectionSize">
|
|
||||||
<number>27</number>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
|
|
||||||
<bool>false</bool>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="horizontalHeaderStretchLastSection">
|
|
||||||
<bool>true</bool>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="verticalHeaderVisible">
|
|
||||||
<bool>false</bool>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="verticalHeaderDefaultSectionSize">
|
|
||||||
<number>26</number>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
|
||||||
<widget class="MessageView" name="textEditInboxMessage">
|
|
||||||
<property name="baseSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>500</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="plainText">
|
|
||||||
<string>
|
|
||||||
Welcome to easy and secure Bitmessage
|
|
||||||
* send messages to other people
|
|
||||||
* send broadcast messages like twitter or
|
|
||||||
* discuss in chan(nel)s with other people
|
|
||||||
</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="send">
|
<widget class="QWidget" name="send">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
|
@ -1585,8 +1413,8 @@ p, li { white-space: pre-wrap; }
|
||||||
<header>bitmessageqt.settingsmixin</header>
|
<header>bitmessageqt.settingsmixin</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>InboxMessagelist</class>
|
<class>MessagelistControl</class>
|
||||||
<extends>QTableView</extends>
|
<extends>QWidget</extends>
|
||||||
<header>bitmessageqt.messagelist</header>
|
<header>bitmessageqt.messagelist</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
@ -1602,8 +1430,6 @@ p, li { white-space: pre-wrap; }
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>messagelistInbox</tabstop>
|
|
||||||
<tabstop>textEditInboxMessage</tabstop>
|
|
||||||
<tabstop>comboBoxSendFrom</tabstop>
|
<tabstop>comboBoxSendFrom</tabstop>
|
||||||
<tabstop>lineEditTo</tabstop>
|
<tabstop>lineEditTo</tabstop>
|
||||||
<tabstop>lineEditSubject</tabstop>
|
<tabstop>lineEditSubject</tabstop>
|
||||||
|
@ -1759,22 +1585,6 @@ p, li { white-space: pre-wrap; }
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>pushButtonNewAddress</sender>
|
|
||||||
<signal>clicked()</signal>
|
|
||||||
<receiver>MainWindow</receiver>
|
|
||||||
<slot>click_NewAddressDialog</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>20</x>
|
|
||||||
<y>20</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>20</x>
|
|
||||||
<y>20</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
<connection>
|
||||||
<sender>pushButtonAddAddressBook</sender>
|
<sender>pushButtonAddAddressBook</sender>
|
||||||
<signal>clicked()</signal>
|
<signal>clicked()</signal>
|
||||||
|
@ -1903,22 +1713,6 @@ p, li { white-space: pre-wrap; }
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>messagelistInbox</sender>
|
|
||||||
<signal>customContextMenuRequested(QPoint)</signal>
|
|
||||||
<receiver>MainWindow</receiver>
|
|
||||||
<slot>on_context_menuInbox()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>656</x>
|
|
||||||
<y>366</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>442</x>
|
|
||||||
<y>289</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
<connection>
|
||||||
<sender>tableWidgetInboxSubscriptions</sender>
|
<sender>tableWidgetInboxSubscriptions</sender>
|
||||||
<signal>customContextMenuRequested(QPoint)</signal>
|
<signal>customContextMenuRequested(QPoint)</signal>
|
||||||
|
@ -1951,22 +1745,6 @@ p, li { white-space: pre-wrap; }
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>treeWidgetYourIdentities</sender>
|
|
||||||
<signal>customContextMenuRequested(QPoint)</signal>
|
|
||||||
<receiver>MainWindow</receiver>
|
|
||||||
<slot>on_context_menuYourIdentities()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>20</x>
|
|
||||||
<y>20</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>20</x>
|
|
||||||
<y>20</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
<connection>
|
||||||
<sender>tableWidgetAddressBook</sender>
|
<sender>tableWidgetAddressBook</sender>
|
||||||
<signal>customContextMenuRequested(QPoint)</signal>
|
<signal>customContextMenuRequested(QPoint)</signal>
|
||||||
|
@ -2655,22 +2433,6 @@ p, li { white-space: pre-wrap; }
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>inboxSearchLineEdit</sender>
|
|
||||||
<signal>returnPressed()</signal>
|
|
||||||
<receiver>MainWindow</receiver>
|
|
||||||
<slot>inboxSearchLineEditReturnPressed</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>20</x>
|
|
||||||
<y>20</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>20</x>
|
|
||||||
<y>20</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
<connection>
|
||||||
<sender>inboxSearchLineEditSubscriptions</sender>
|
<sender>inboxSearchLineEditSubscriptions</sender>
|
||||||
<signal>returnPressed()</signal>
|
<signal>returnPressed()</signal>
|
||||||
|
@ -2703,22 +2465,6 @@ p, li { white-space: pre-wrap; }
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>inboxSearchLineEdit</sender>
|
|
||||||
<signal>textChanged(QString)</signal>
|
|
||||||
<receiver>MainWindow</receiver>
|
|
||||||
<slot>inboxSearchLineEditUpdated</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>20</x>
|
|
||||||
<y>20</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>20</x>
|
|
||||||
<y>20</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
<connection>
|
||||||
<sender>inboxSearchLineEditSubscriptions</sender>
|
<sender>inboxSearchLineEditSubscriptions</sender>
|
||||||
<signal>textChanged(QString)</signal>
|
<signal>textChanged(QString)</signal>
|
||||||
|
@ -2767,22 +2513,6 @@ p, li { white-space: pre-wrap; }
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>messagelistInbox</sender>
|
|
||||||
<signal>messageSelected(QString)</signal>
|
|
||||||
<receiver>MainWindow</receiver>
|
|
||||||
<slot>messagelistSelect</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>20</x>
|
|
||||||
<y>20</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>20</x>
|
|
||||||
<y>20</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
<connection>
|
||||||
<sender>tableWidgetInboxSubscriptions</sender>
|
<sender>tableWidgetInboxSubscriptions</sender>
|
||||||
<signal>itemSelectionChanged()</signal>
|
<signal>itemSelectionChanged()</signal>
|
||||||
|
@ -2815,22 +2545,6 @@ p, li { white-space: pre-wrap; }
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>treeWidgetYourIdentities</sender>
|
|
||||||
<signal>itemSelectionChanged()</signal>
|
|
||||||
<receiver>MainWindow</receiver>
|
|
||||||
<slot>treeWidgetItemClicked</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>20</x>
|
|
||||||
<y>20</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>20</x>
|
|
||||||
<y>20</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
<connection>
|
||||||
<sender>treeWidgetSubscriptions</sender>
|
<sender>treeWidgetSubscriptions</sender>
|
||||||
<signal>itemSelectionChanged()</signal>
|
<signal>itemSelectionChanged()</signal>
|
||||||
|
@ -2863,22 +2577,6 @@ p, li { white-space: pre-wrap; }
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>treeWidgetYourIdentities</sender>
|
|
||||||
<signal>itemChanged(QTreeWidgetItem*,int)</signal>
|
|
||||||
<receiver>MainWindow</receiver>
|
|
||||||
<slot>treeWidgetItemChanged</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>20</x>
|
|
||||||
<y>20</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>20</x>
|
|
||||||
<y>20</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
<connection>
|
||||||
<sender>treeWidgetSubscriptions</sender>
|
<sender>treeWidgetSubscriptions</sender>
|
||||||
<signal>itemChanged(QTreeWidgetItem*,int)</signal>
|
<signal>itemChanged(QTreeWidgetItem*,int)</signal>
|
||||||
|
|
|
@ -2,7 +2,10 @@ from collections import OrderedDict
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
|
import account
|
||||||
|
import foldertree
|
||||||
import l10n
|
import l10n
|
||||||
|
import widgets
|
||||||
from bmconfigparser import BMConfigParser
|
from bmconfigparser import BMConfigParser
|
||||||
from debug import logger
|
from debug import logger
|
||||||
from helper_sql import sqlQuery, sqlExecute
|
from helper_sql import sqlQuery, sqlExecute
|
||||||
|
@ -93,7 +96,8 @@ class InboxTableModel(QtCore.QAbstractTableModel):
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
super(InboxTableModel, self).__init__()
|
super(InboxTableModel, self).__init__()
|
||||||
self.filter = InboxFilter(fields=self.fields)
|
# folder='*' gives empty set
|
||||||
|
self.filter = InboxFilter(folder='*', fields=self.fields)
|
||||||
self.fields = ','.join(self.fields)
|
self.fields = ','.join(self.fields)
|
||||||
self.query = 'SELECT %%s FROM %s ' % self.table
|
self.query = 'SELECT %%s FROM %s ' % self.table
|
||||||
self.sort = ' ORDER BY received DESC'
|
self.sort = ' ORDER BY received DESC'
|
||||||
|
@ -159,7 +163,9 @@ class InboxTableModel(QtCore.QAbstractTableModel):
|
||||||
)[0][0]
|
)[0][0]
|
||||||
|
|
||||||
def updateFilter(self, *args, **kwargs):
|
def updateFilter(self, *args, **kwargs):
|
||||||
|
prev = self.filter.__str__()
|
||||||
self.filter.update(*args, **kwargs)
|
self.filter.update(*args, **kwargs)
|
||||||
|
if prev != self.filter.__str__():
|
||||||
self.emit(QtCore.SIGNAL("layoutChanged()"))
|
self.emit(QtCore.SIGNAL("layoutChanged()"))
|
||||||
|
|
||||||
|
|
||||||
|
@ -170,8 +176,80 @@ class InboxMessagelist(QtGui.QTableView):
|
||||||
|
|
||||||
def currentChanged(self, cur_id, prev_id):
|
def currentChanged(self, cur_id, prev_id):
|
||||||
row = cur_id.row()
|
row = cur_id.row()
|
||||||
if row == prev_id.row():
|
if row and row == prev_id.row():
|
||||||
return
|
return
|
||||||
|
# what if folder changed?
|
||||||
self.model().setRead(row)
|
self.model().setRead(row)
|
||||||
msg = self.model().getMessage(row)
|
msg = self.model().getMessage(row)
|
||||||
self.emit(QtCore.SIGNAL("messageSelected(QString)"), msg)
|
self.emit(QtCore.SIGNAL("messageSelected(QString)"), msg)
|
||||||
|
|
||||||
|
def folderChanged(self, cur_folder, prev_folder):
|
||||||
|
if cur_folder == prev_folder:
|
||||||
|
return
|
||||||
|
try:
|
||||||
|
folder = cur_folder.folderName
|
||||||
|
except AttributeError:
|
||||||
|
folder = 'inbox'
|
||||||
|
update = {'folder': folder}
|
||||||
|
if cur_folder.address:
|
||||||
|
update['toaddress'] = cur_folder.address
|
||||||
|
self.model().updateFilter(update)
|
||||||
|
self.selectRow(0)
|
||||||
|
|
||||||
|
|
||||||
|
class TreeWidgetIdentities(QtGui.QTreeWidget):
|
||||||
|
def __init__(self, parent):
|
||||||
|
super(TreeWidgetIdentities, self).__init__(parent)
|
||||||
|
folders = ('inbox', 'new', 'sent', 'trash')
|
||||||
|
accounts = account.getSortedAccounts() + account.getSortedSubscriptions().keys()
|
||||||
|
top = foldertree.Ui_AddressWidget(self, 0, None, 0, True)
|
||||||
|
for i, folder in enumerate(folders):
|
||||||
|
foldertree.Ui_FolderWidget(top, i, None, folder, 0)
|
||||||
|
for i, addr in enumerate(accounts):
|
||||||
|
top = foldertree.Ui_AddressWidget(
|
||||||
|
self, i, addr, 0,
|
||||||
|
BMConfigParser().safeGetBoolean(addr, 'enabled'))
|
||||||
|
for j, folder in enumerate(folders):
|
||||||
|
foldertree.Ui_FolderWidget(top, j, addr, folder, 0)
|
||||||
|
self.header().setSortIndicator(0, QtCore.Qt.AscendingOrder)
|
||||||
|
|
||||||
|
def filterAccountType(self, account_type):
|
||||||
|
header = self.headerItem()
|
||||||
|
if account_type == foldertree.AccountMixin.CHAN:
|
||||||
|
header.setText(0, _translate("MainWindow", "Chans"))
|
||||||
|
header.setIcon(0, QtGui.QIcon(":/newPrefix/images/can-icon-16px.png"))
|
||||||
|
elif account_type == foldertree.AccountMixin.SUBSCRIPTION:
|
||||||
|
header.setText(0, _translate("MainWindow", "Subscriptions"))
|
||||||
|
header.setIcon(0, QtGui.QIcon(":/newPrefix/images/subscriptions.png"))
|
||||||
|
for i in xrange(self.topLevelItemCount()):
|
||||||
|
item = self.topLevelItem(i)
|
||||||
|
if item.type != account_type:
|
||||||
|
self.setItemHidden(item, True)
|
||||||
|
|
||||||
|
|
||||||
|
class MessagelistControl(QtGui.QWidget):
|
||||||
|
@QtCore.pyqtProperty(int)
|
||||||
|
def AccountType(self):
|
||||||
|
return self._account_type
|
||||||
|
|
||||||
|
def setAccountType(self, value):
|
||||||
|
self._account_type = value
|
||||||
|
|
||||||
|
def __init__(self, parent=None):
|
||||||
|
super(MessagelistControl, self).__init__(parent)
|
||||||
|
widgets.load('messagelistcontrol.ui', self)
|
||||||
|
|
||||||
|
self.horizontalSplitter.setStretchFactor(0, 0)
|
||||||
|
self.horizontalSplitter.setStretchFactor(1, 1)
|
||||||
|
self.horizontalSplitter.setCollapsible(0, False)
|
||||||
|
self.horizontalSplitter.setCollapsible(1, False)
|
||||||
|
|
||||||
|
self.verticalSplitter.setStretchFactor(0, 0)
|
||||||
|
self.verticalSplitter.setStretchFactor(1, 1)
|
||||||
|
self.verticalSplitter.setStretchFactor(2, 2)
|
||||||
|
self.verticalSplitter.setCollapsible(0, False)
|
||||||
|
self.verticalSplitter.setCollapsible(1, False)
|
||||||
|
self.verticalSplitter.setCollapsible(2, False)
|
||||||
|
self.verticalSplitter.handle(1).setEnabled(False)
|
||||||
|
|
||||||
|
self.treeWidget.filterAccountType(self.AccountType)
|
||||||
|
|
343
src/bitmessageqt/messagelistcontrol.ui
Normal file
343
src/bitmessageqt/messagelistcontrol.ui
Normal file
|
@ -0,0 +1,343 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>MessagelistControl</class>
|
||||||
|
<widget class="QWidget" name="MessagelistControl">
|
||||||
|
<property name="AccountType">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>819</width>
|
||||||
|
<height>295</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="inboxLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="SSplitter" name="horizontalSplitter">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="inboxIdentitiesWidget">
|
||||||
|
<layout class="QVBoxLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="TreeWidgetIdentities" name="treeWidget">
|
||||||
|
<property name="baseSize">
|
||||||
|
<size>
|
||||||
|
<width>200</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="contextMenuPolicy">
|
||||||
|
<enum>Qt::CustomContextMenu</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sortingEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Identities</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<selectedoff>:/newPrefix/images/identities.png</selectedoff>
|
||||||
|
</iconset>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="buttonNew">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>200</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">New</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="SSplitter" name="verticalSplitter">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="searchWidget">
|
||||||
|
<layout class="QHBoxLayout" name="searchLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="searchLineEdit">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>Search</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="searchOption">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>All</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>To</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>From</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Subject</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Message</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="InboxMessagelist" name="messagelistInbox">
|
||||||
|
<property name="contextMenuPolicy">
|
||||||
|
<enum>Qt::CustomContextMenu</enum>
|
||||||
|
</property>
|
||||||
|
<property name="editTriggers">
|
||||||
|
<set>QAbstractItemView::NoEditTriggers</set>
|
||||||
|
</property>
|
||||||
|
<property name="alternatingRowColors">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="selectionMode">
|
||||||
|
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||||
|
</property>
|
||||||
|
<property name="selectionBehavior">
|
||||||
|
<enum>QAbstractItemView::SelectRows</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sortingEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<attribute name="horizontalHeaderCascadingSectionResizes">
|
||||||
|
<bool>true</bool>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||||
|
<number>200</number>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="horizontalHeaderHighlightSections">
|
||||||
|
<bool>false</bool>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="horizontalHeaderMinimumSectionSize">
|
||||||
|
<number>27</number>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
|
||||||
|
<bool>false</bool>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="horizontalHeaderStretchLastSection">
|
||||||
|
<bool>true</bool>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="verticalHeaderVisible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="verticalHeaderDefaultSectionSize">
|
||||||
|
<number>26</number>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
<widget class="MessageView" name="messageView">
|
||||||
|
<property name="baseSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>500</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="plainText">
|
||||||
|
<string>
|
||||||
|
Welcome to easy and secure Bitmessage
|
||||||
|
* send messages to other people
|
||||||
|
* send broadcast messages like twitter or
|
||||||
|
* discuss in chan(nel)s with other people
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>MessageView</class>
|
||||||
|
<extends>QTextEdit</extends>
|
||||||
|
<header>bitmessageqt.messageview</header>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>STreeWidget</class>
|
||||||
|
<extends>QTreeWidget</extends>
|
||||||
|
<header>bitmessageqt.settingsmixin</header>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>SSplitter</class>
|
||||||
|
<extends>QSplitter</extends>
|
||||||
|
<header>bitmessageqt.settingsmixin</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>InboxMessagelist</class>
|
||||||
|
<extends>QTableView</extends>
|
||||||
|
<header>bitmessageqt.messagelist</header>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>TreeWidgetIdentities</class>
|
||||||
|
<extends>QTreeWidget</extends>
|
||||||
|
<header>bitmessageqt.messagelist</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
|
<resources>
|
||||||
|
<include location="bitmessage_icons.qrc"/>
|
||||||
|
</resources>
|
||||||
|
<connections>
|
||||||
|
<!-- <connection> -->
|
||||||
|
<!-- <sender>messagelistInbox</sender> -->
|
||||||
|
<!-- <signal>customContextMenuRequested(QPoint)</signal> -->
|
||||||
|
<!-- <receiver>MainWindow</receiver> -->
|
||||||
|
<!-- <slot>on_context_menuInbox()</slot> -->
|
||||||
|
<!-- <hints> -->
|
||||||
|
<!-- <hint type="sourcelabel"> -->
|
||||||
|
<!-- <x>656</x> -->
|
||||||
|
<!-- <y>366</y> -->
|
||||||
|
<!-- </hint> -->
|
||||||
|
<!-- <hint type="destinationlabel"> -->
|
||||||
|
<!-- <x>442</x> -->
|
||||||
|
<!-- <y>289</y> -->
|
||||||
|
<!-- </hint> -->
|
||||||
|
<!-- </hints> -->
|
||||||
|
<!-- </connection> -->
|
||||||
|
<!-- <connection> -->
|
||||||
|
<!-- <sender>pushButtonNewAddress</sender> -->
|
||||||
|
<!-- <signal>clicked()</signal> -->
|
||||||
|
<!-- <receiver>MainWindow</receiver> -->
|
||||||
|
<!-- <slot>click_NewAddressDialog</slot> -->
|
||||||
|
<!-- <hints> -->
|
||||||
|
<!-- <hint type="sourcelabel"> -->
|
||||||
|
<!-- <x>20</x> -->
|
||||||
|
<!-- <y>20</y> -->
|
||||||
|
<!-- </hint> -->
|
||||||
|
<!-- <hint type="destinationlabel"> -->
|
||||||
|
<!-- <x>20</x> -->
|
||||||
|
<!-- <y>20</y> -->
|
||||||
|
<!-- </hint> -->
|
||||||
|
<!-- </hints> -->
|
||||||
|
<!-- </connection> -->
|
||||||
|
<!-- <connection> -->
|
||||||
|
<!-- <sender>treeWidgetYourIdentities</sender> -->
|
||||||
|
<!-- <signal>customContextMenuRequested(QPoint)</signal> -->
|
||||||
|
<!-- <receiver>MainWindow</receiver> -->
|
||||||
|
<!-- <slot>on_context_menuYourIdentities()</slot> -->
|
||||||
|
<!-- <hints> -->
|
||||||
|
<!-- <hint type="sourcelabel"> -->
|
||||||
|
<!-- <x>20</x> -->
|
||||||
|
<!-- <y>20</y> -->
|
||||||
|
<!-- </hint> -->
|
||||||
|
<!-- <hint type="destinationlabel"> -->
|
||||||
|
<!-- <x>20</x> -->
|
||||||
|
<!-- <y>20</y> -->
|
||||||
|
<!-- </hint> -->
|
||||||
|
<!-- </hints> -->
|
||||||
|
<!-- </connection> -->
|
||||||
|
<!-- <connection> -->
|
||||||
|
<!-- <sender>inboxSearchLineEdit</sender> -->
|
||||||
|
<!-- <signal>returnPressed()</signal> -->
|
||||||
|
<!-- <receiver>MainWindow</receiver> -->
|
||||||
|
<!-- <slot>inboxSearchLineEditReturnPressed</slot> -->
|
||||||
|
<!-- <hints> -->
|
||||||
|
<!-- <hint type="sourcelabel"> -->
|
||||||
|
<!-- <x>20</x> -->
|
||||||
|
<!-- <y>20</y> -->
|
||||||
|
<!-- </hint> -->
|
||||||
|
<!-- <hint type="destinationlabel"> -->
|
||||||
|
<!-- <x>20</x> -->
|
||||||
|
<!-- <y>20</y> -->
|
||||||
|
<!-- </hint> -->
|
||||||
|
<!-- </hints> -->
|
||||||
|
<!-- </connection> -->
|
||||||
|
<!-- <connection> -->
|
||||||
|
<!-- <sender>inboxSearchLineEdit</sender> -->
|
||||||
|
<!-- <signal>textChanged(QString)</signal> -->
|
||||||
|
<!-- <receiver>MainWindow</receiver> -->
|
||||||
|
<!-- <slot>inboxSearchLineEditUpdated</slot> -->
|
||||||
|
<!-- <hints> -->
|
||||||
|
<!-- <hint type="sourcelabel"> -->
|
||||||
|
<!-- <x>20</x> -->
|
||||||
|
<!-- <y>20</y> -->
|
||||||
|
<!-- </hint> -->
|
||||||
|
<!-- <hint type="destinationlabel"> -->
|
||||||
|
<!-- <x>20</x> -->
|
||||||
|
<!-- <y>20</y> -->
|
||||||
|
<!-- </hint> -->
|
||||||
|
<!-- </hints> -->
|
||||||
|
<!-- </connection> -->
|
||||||
|
<connection>
|
||||||
|
<sender>treeWidget</sender>
|
||||||
|
<signal>currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)</signal>
|
||||||
|
<receiver>messagelistInbox</receiver>
|
||||||
|
<slot>folderChanged</slot>
|
||||||
|
</connection>
|
||||||
|
<!-- <connection> -->
|
||||||
|
<!-- <sender>treeWidgetYourIdentities</sender> -->
|
||||||
|
<!-- <signal>itemChanged(QTreeWidgetItem*,int)</signal> -->
|
||||||
|
<!-- <receiver>MainWindow</receiver> -->
|
||||||
|
<!-- <slot>treeWidgetItemChanged</slot> -->
|
||||||
|
<!-- <hints> -->
|
||||||
|
<!-- <hint type="sourcelabel"> -->
|
||||||
|
<!-- <x>20</x> -->
|
||||||
|
<!-- <y>20</y> -->
|
||||||
|
<!-- </hint> -->
|
||||||
|
<!-- <hint type="destinationlabel"> -->
|
||||||
|
<!-- <x>20</x> -->
|
||||||
|
<!-- <y>20</y> -->
|
||||||
|
<!-- </hint> -->
|
||||||
|
<!-- </hints> -->
|
||||||
|
<!-- </connection> -->
|
||||||
|
<connection>
|
||||||
|
<sender>messagelistInbox</sender>
|
||||||
|
<signal>messageSelected(QString)</signal>
|
||||||
|
<receiver>messageView</receiver>
|
||||||
|
<slot>setContent</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>20</x>
|
||||||
|
<y>20</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>20</x>
|
||||||
|
<y>20</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
Reference in New Issue
Block a user