Hashtag feature + labels

This commit is contained in:
malhashmi 2013-11-11 19:05:00 +04:00
parent 93ec76e4e2
commit e312c7d7e1
8 changed files with 699 additions and 36 deletions

View File

@ -1763,17 +1763,24 @@ class MyForm(QtGui.QMainWindow):
def click_pushButtonSend(self):
self.statusBar().showMessage('')
toAddresses = str(self.ui.lineEditTo.text())
toLabels = str(self.ui.lineEditTo.text())
fromAddress = str(self.ui.labelFrom.text())
subject = str(self.ui.lineEditSubject.text().toUtf8())
message = str(
self.ui.textEditMessage.document().toPlainText().toUtf8())
if self.ui.radioButtonSpecific.isChecked(): # To send a message to specific people (rather than broadcast)
toAddressesList = [s.strip()
for s in toAddresses.replace(',', ';').split(';')]
toAddressesList = list(set(
toAddressesList)) # remove duplicate addresses. If the user has one address with a BM- and the same address without the BM-, this will not catch it. They'll send the message to the person twice.
for toAddress in toAddressesList:
toLabelsList = [s.strip()
for s in toLabels.replace(',', ';').split(';')]
toLabelsList = list(set(
toLabelsList)) # remove duplicate addresses. If the user has one address with a BM- and the same address without the BM-, this will not catch it. They'll send the message to the person twice.
for toLabel in toLabelsList:
toAddress = ''
queryreturn = sqlQuery('''select address from addressbook where label=?''', toLabel)
if queryreturn != []:
for row in queryreturn:
toAddress, = row
else:
toAddress = toLabel
if toAddress != '':
status, addressVersionNumber, streamNumber, ripe = decodeAddress(
toAddress)
@ -2083,10 +2090,15 @@ class MyForm(QtGui.QMainWindow):
def addEntryToAddressBook(self,address,label):
queryreturn = sqlQuery('''select * from addressbook where address=?''', address)
if queryreturn == []:
queryreturn = sqlQuery('''select * from addressbook where label=?''', str(label))
if queryreturn == []:
if (str(label) == '' or str(label).isspace()):
self.statusBar().showMessage(_translate(
"MainWindow", "Error: Please enter label for this address that contains at least one non-space character."))
else:
self.ui.tableWidgetAddressBook.setSortingEnabled(False)
self.ui.tableWidgetAddressBook.insertRow(0)
newItem = QtGui.QTableWidgetItem(unicode(label, 'utf-8'))
newItem.setIcon(avatarize(address))
self.ui.tableWidgetAddressBook.setItem(0, 0, newItem)
newItem = QtGui.QTableWidgetItem(address)
newItem.setFlags(
@ -2094,8 +2106,12 @@ class MyForm(QtGui.QMainWindow):
self.ui.tableWidgetAddressBook.setItem(0, 1, newItem)
self.ui.tableWidgetAddressBook.setSortingEnabled(True)
sqlExecute('''INSERT INTO addressbook VALUES (?,?)''', str(label), address)
self.rerenderAddressBook()
self.rerenderInboxFromLabels()
self.rerenderSentToLabels()
else:
self.statusBar().showMessage(_translate(
"MainWindow", "Error: You cannot add the same label to your address book twice. Try renaming the new one if you want."))
else:
self.statusBar().showMessage(_translate(
"MainWindow", "Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want."))
@ -2577,9 +2593,13 @@ class MyForm(QtGui.QMainWindow):
else:
self.ui.labelFrom.setText(toAddressAtCurrentInboxRow)
self.setBroadcastEnablementDependingOnWhetherThisIsAChanAddress(toAddressAtCurrentInboxRow)
queryreturn = sqlQuery('''select label from addressbook where address=?''', str(fromAddressAtCurrentInboxRow))
if queryreturn == []:
self.ui.lineEditTo.setText(str(fromAddressAtCurrentInboxRow))
else:
for row in queryreturn:
fromLabelAtCurrentInboxRow, = row
self.ui.lineEditTo.setText(str(fromLabelAtCurrentInboxRow))
# If the previous message was to a chan then we should send our reply to the chan rather than to the particular person who sent the message.
if shared.config.has_section(toAddressAtCurrentInboxRow):
if shared.safeConfigGetBoolean(toAddressAtCurrentInboxRow, 'chan'):
@ -2606,22 +2626,35 @@ class MyForm(QtGui.QMainWindow):
queryreturn = sqlQuery('''select * from addressbook where address=?''',
addressAtCurrentInboxRow)
if queryreturn == []:
index = 1
newLabel = 'Contact' + str(index)
flag = 1
while flag:
newLabel = 'Contact' + str(index)
queryreturn = sqlQuery('''select * from addressbook where label=?''', newLabel)
if queryreturn == []:
flag = 0
else:
index += 1
self.ui.tableWidgetAddressBook.insertRow(0)
newItem = QtGui.QTableWidgetItem(
'--New entry. Change label in Address Book.--')
newLabel)
self.ui.tableWidgetAddressBook.setItem(0, 0, newItem)
newItem.setIcon(avatarize(addressAtCurrentInboxRow))
newItem = QtGui.QTableWidgetItem(addressAtCurrentInboxRow)
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
self.ui.tableWidgetAddressBook.setItem(0, 1, newItem)
sqlExecute('''INSERT INTO addressbook VALUES (?,?)''',
'--New entry. Change label in Address Book.--',
newLabel,
addressAtCurrentInboxRow)
self.ui.tabWidget.setCurrentIndex(5)
self.ui.tableWidgetAddressBook.setCurrentCell(0, 0)
self.statusBar().showMessage(_translate(
"MainWindow", "Entry added to the Address Book. Edit the label to your liking."))
self.rerenderAddressBook()
self.rerenderInboxFromLabels()
self.rerenderSentToLabels()
else:
self.statusBar().showMessage(_translate(
"MainWindow", "Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want."))
@ -2748,13 +2781,13 @@ class MyForm(QtGui.QMainWindow):
listOfSelectedRows[
self.ui.tableWidgetAddressBook.selectedIndexes()[i].row()] = 0
for currentRow in listOfSelectedRows:
addressAtCurrentRow = self.ui.tableWidgetAddressBook.item(
currentRow, 1).text()
labelAtCurrentRow = self.ui.tableWidgetAddressBook.item(
currentRow, 0).text().toUtf8()
if self.ui.lineEditTo.text() == '':
self.ui.lineEditTo.setText(str(addressAtCurrentRow))
self.ui.lineEditTo.setText(str(labelAtCurrentRow))
else:
self.ui.lineEditTo.setText(str(
self.ui.lineEditTo.text()) + '; ' + str(addressAtCurrentRow))
self.ui.lineEditTo.text()) + '; ' + str(labelAtCurrentRow))
if listOfSelectedRows == {}:
self.statusBar().showMessage(_translate(
"MainWindow", "No addresses selected."))
@ -3148,11 +3181,22 @@ class MyForm(QtGui.QMainWindow):
if currentRow >= 0:
addressAtCurrentRow = self.ui.tableWidgetAddressBook.item(
currentRow, 1).text()
tmpLabel = str(self.ui.tableWidgetAddressBook.item(currentRow, 0).text().toUtf8())
if (tmpLabel.isspace() or tmpLabel == ''):
self.statusBar().showMessage(_translate(
"MainWindow", "Error: Label should contain at least one non-space character."))
else:
queryreturn = sqlQuery('''select * from addressbook where label=?''', tmpLabel)
if queryreturn == []:
sqlExecute('''UPDATE addressbook set label=? WHERE address=?''',
str(self.ui.tableWidgetAddressBook.item(currentRow, 0).text().toUtf8()),
tmpLabel,
str(addressAtCurrentRow))
self.rerenderInboxFromLabels()
self.rerenderSentToLabels()
else:
self.statusBar().showMessage(_translate(
"MainWindow", "Error: You cannot add the same label to your address book twice. Try renaming the new one if you want."))
self.rerenderAddressBook()
def tableWidgetSubscriptionsItemChanged(self):
currentRow = self.ui.tableWidgetSubscriptions.currentRow()
@ -3263,8 +3307,8 @@ class hashtagDialog(QtGui.QDialog):
if len(self.h1.array) > i:
newItem = QtGui.QTableWidgetItem(unicode(self.h1.array[i], 'utf-8'))
##the following two lines show the hashtags in colors varying from green to red
#color = self.h1.get_color(self.h1.dic[self.h1.array[i]],self.sum)
#newItem.setTextColor(QtGui.QColor((color>>8)&0xff, color&0xff, 0))
color = self.h1.get_color(self.h1.dic[self.h1.array[i]],self.sum)
newItem.setTextColor(QtGui.QColor((color>>8)&0xff, color&0xff, 0))
self.ui.tableWidgetHashtag.setItem(i, column, newItem)
self.h1.array = []

View File

@ -0,0 +1,6 @@
<RCC>
<qresource prefix="imagesPrefix">
<file>../images/arrow-28-48(1).png</file>
<file>../images/arrow-28-48.png</file>
</qresource>
</RCC>

View File

@ -0,0 +1,270 @@
# -*- coding: utf-8 -*-
# Resource object code
#
# Created: Mon Nov 11 18:56:31 2013
# by: The Resource Compiler for PyQt (Qt v4.8.2)
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore
qt_resource_data = "\
\x00\x00\x06\xfe\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x30\x00\x00\x00\x30\x08\x06\x00\x00\x00\x57\x02\xf9\x87\
\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\
\xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\
\x0b\x13\x01\x00\x9a\x9c\x18\x00\x00\x00\x07\x74\x49\x4d\x45\x07\
\xdd\x0b\x0b\x0e\x21\x27\xe1\xae\x9e\xc3\x00\x00\x06\x8b\x49\x44\
\x41\x54\x68\xde\xed\x99\x51\x88\x5c\x57\x19\xc7\x7f\xff\x21\x2c\
\x25\x84\xa5\x04\x29\x65\x1f\x42\x5a\x63\x09\x12\x24\x2c\xb5\xf4\
\x41\x5b\xef\xb0\x31\x8b\x62\xc0\x98\x58\x6a\x50\x63\xab\xc8\xdc\
\x50\x22\x09\x5d\x9b\x9d\x48\x29\xe1\x4e\xdc\x96\x44\xa4\xcd\x5d\
\x4c\x35\x96\x0a\x55\x52\xdd\x92\x5a\x44\x4c\xdd\x1b\xa4\x0f\x25\
\xc8\x52\x24\x96\x50\x63\x0d\x7d\x58\x4a\x90\x25\x2c\x4b\x29\x61\
\xd9\xbf\x0f\xf7\xce\xec\x9d\xd9\xd9\x99\x3b\x9b\x4d\x14\xdc\xf3\
\x74\x66\x38\xf7\x7e\xe7\xff\x9d\xdf\xf9\xce\x77\xbe\x0b\x6b\x6d\
\xad\xfd\x7f\x37\xad\xe6\xcb\x46\x27\x43\xc0\xfd\x88\xfb\x64\x0d\
\x20\x6f\x00\x95\x30\x73\x88\x69\xe0\x0a\x30\x13\x05\xf1\xff\x8e\
\x80\xd1\x24\x04\xfc\x39\xa1\xbd\xc0\x90\x61\x2b\x76\x49\x12\x76\
\x6a\x41\x06\xa7\x96\x16\x64\xbf\x8f\xf4\xa6\xe1\x77\xe0\xc9\x5a\
\x30\xbe\xf0\x5f\x11\x50\x4d\xc2\x75\xc0\xb7\x80\x27\x6d\xb6\x82\
\x69\x4c\x3a\xdf\xaf\x0b\xa0\x4d\x1f\xae\x02\x27\x80\x9f\x47\x41\
\xfc\xf1\x6d\x13\x50\x4d\xc2\x2f\x60\x9f\x32\x7c\x5a\x12\x60\x6c\
\x68\xdb\xcf\x19\xe9\xd0\xbf\x2a\x74\x10\x78\xbd\x57\xbc\xd4\xb3\
\xd7\xcd\x71\xc4\x21\x9b\x52\x1b\xaf\x2f\xd8\xfc\x0d\x3c\x25\xe9\
\x9f\xc0\x75\x0c\x96\xfb\x85\xee\xb1\x19\x94\xd8\x6e\x58\x07\x4d\
\x68\x65\x7d\x9f\x01\x3d\x51\x0b\xe2\x8f\x56\x5d\x40\x35\x09\xfb\
\x81\x57\x6d\x7f\x71\x09\x2a\xf8\xb2\xd0\x29\xcc\xd9\xa8\x1c\x5f\
\xeb\xf2\x9e\x8d\x98\xdd\xc6\x15\xa1\xc1\x25\x68\xc1\x45\x89\xaf\
\x44\x41\xe7\xf7\xf4\x24\xa0\x9a\x84\x1b\x80\xf3\xe0\x07\x5b\x50\
\x99\x06\x7e\x28\xe9\x95\x28\x88\x17\x7a\x5c\x4d\x6c\xef\x92\x38\
\x61\xd8\xd2\x82\xd6\xbb\xa0\xa0\x88\x08\x15\xc1\xc6\xf6\xef\x25\
\x0d\xa7\x4e\x4f\xbd\x8e\x99\x40\x7c\x2f\x0a\xe2\x99\x9b\x8b\x62\
\x95\xf5\x58\xcf\x0b\x1e\xcb\xe3\x84\x7c\xd1\x28\xe8\x86\x53\xa9\
\x9b\x01\x9b\x67\x80\xe1\x86\x7b\xd2\xff\x7e\x8c\xd8\x7b\xb3\x93\
\x07\xa8\x05\xe3\x1f\x21\x1e\xb7\x7c\x18\xb3\xb0\x68\x57\x0f\x08\
\x9e\xaf\x26\x21\x2b\x16\x50\x4d\xc2\x07\x25\x8f\x34\x96\x4b\x06\
\xf1\xac\xe0\x48\xaf\xc8\x74\x16\x11\x03\x3a\x09\x7e\x12\x0c\x32\
\x92\x31\x7e\xcc\x66\xd7\x8a\x04\x8c\x26\x61\x09\x38\x65\xb4\x2e\
\xe7\x95\x37\x04\x47\xa2\x72\xdc\x0b\xeb\xa5\xc2\x22\xa4\x93\x58\
\x67\xb0\x30\x02\x84\xc4\x4f\x47\x93\xf0\x8e\x9e\x05\x08\xf6\x00\
\x83\x75\x6c\x80\x6b\x12\xdf\x89\x0a\x9e\x9c\xd5\xc9\x90\x6a\x12\
\xfe\x00\xf3\x5a\x35\x09\xfb\x8a\x8b\xf0\x13\xc0\x95\x86\x5d\xb3\
\x59\xf0\xdd\x9e\x04\x54\x93\x0a\xb6\x0f\x37\xb0\x49\x63\xce\x8f\
\xa2\x20\xfe\x77\xd1\xf4\xc2\xe2\x10\xf8\x27\x96\x77\x01\xaf\x56\
\x3b\x78\xb1\x75\x4f\x18\x1f\x4e\xed\x3a\xdb\xd1\x3e\x5c\x4d\x2a\
\xa5\xc2\x02\x8c\xb6\x01\x0f\x64\x7d\x80\x0f\x64\xbd\x54\xf8\x70\
\x31\x23\x82\x13\x76\x8a\x01\x66\x57\xb6\x12\x85\x44\x48\x7a\x1d\
\x6b\x2a\x7d\x56\x18\x6d\xb6\x55\x2e\x2c\x40\xb0\x3b\xa7\x06\xe0\
\x67\x51\x39\xbe\x51\x24\xb6\x57\x93\x70\xc4\x78\x6c\xa9\x53\x18\
\x76\x41\x11\x51\x10\x83\x18\xcf\x3f\x2c\xf1\xb5\x5e\xf6\xc0\x8e\
\x7c\xe4\x91\xf4\xdb\x42\xd8\xd8\x23\xc0\x58\x53\xd4\xca\x45\x15\
\xe4\x61\x70\x21\x11\x86\x09\xf0\x7c\xe3\x59\x3c\xd4\x2e\xa4\x96\
\xda\x1f\x5c\x6c\xcf\xe1\xf4\x41\x14\xc4\xef\x15\xc2\x46\x1a\xb3\
\xf3\x67\x48\x1d\xa1\xc5\xa8\x82\x35\x5c\x04\xa7\x5a\x10\xcf\x60\
\xbd\x53\x7f\xd6\xe8\x5e\x60\x63\x57\x01\xc6\x03\xc0\x86\x1c\x4e\
\xef\x14\xc0\xe6\xa9\x76\xd8\x48\xbc\x24\xf8\x36\x30\x8f\x97\xe2\
\x34\x9a\x54\xd6\x77\x49\x13\xa6\x72\x18\x97\x80\x2d\x5d\x05\x08\
\x0d\xd4\x23\x4f\x26\xe8\x6a\x47\x6c\xe0\x28\xf8\x78\x33\x36\x00\
\x3e\x0d\x3c\x1e\x05\xf1\xcb\xc6\xdf\x94\x3c\xdf\x8a\x93\xe0\xdc\
\xe8\x64\x47\x11\xff\xca\x21\x04\x66\xa0\xc8\x1e\xd8\xe0\x5c\x8a\
\x24\x34\xdb\x01\x9b\xa3\x82\x63\xb6\x9a\xb0\x91\x74\x1a\xa8\xd4\
\x4f\xeb\x5a\x79\xfc\x37\xa0\x7d\xa0\xf9\x16\x9c\x86\x84\xce\x55\
\x93\x70\xfd\x32\x4b\x30\xdb\x34\x5e\x8b\x64\x74\xde\xc4\x79\x90\
\x97\xb9\xfb\x56\x93\xf0\xa8\xf1\xb1\x7c\xa8\xca\xb0\xc9\x26\xdf\
\x7c\xe0\x45\x41\x7c\x56\xb0\x0f\x3c\x8f\x9d\xd9\x30\xc6\x43\xb6\
\x97\x17\x41\x36\x36\x1d\xbf\x50\x44\xc0\xac\x24\x90\xea\x5a\xee\
\x5c\x72\x71\x17\x47\x81\x63\xb9\xb8\x5d\x37\x75\x1a\x5c\x59\x2e\
\x4f\x8a\x82\xf8\xac\xd1\x3e\x49\xf3\x64\x36\x32\x5b\x43\xc0\x52\
\x11\xe6\xce\xdc\x18\x6c\xcd\x75\xdf\xc4\x66\xda\x75\xc5\x69\xfe\
\x7c\x6f\x0b\x37\x77\x08\xbe\xea\xdc\x2a\xd9\x46\xe2\xb4\xda\x78\
\x7e\x49\x74\x29\xc7\x67\x6d\xef\xc3\xe9\x4a\x2c\xda\xf2\xfd\xad\
\xb6\x0c\x9f\xcc\x8f\x51\x5a\xd9\xe8\xb2\x89\xd3\x41\xb3\xb9\xdb\
\xc2\x60\x3e\xfe\xd6\x82\xf1\x8f\xb3\x73\x62\x2a\xb7\x02\x2f\x80\
\x2a\x45\x33\xd4\x5a\x79\xfc\xac\xa4\x47\x80\x1b\x99\x9d\xeb\xa0\
\x9d\x51\x30\x7e\xa9\xc5\x9d\x83\xb9\x1f\x0b\xc0\x7b\x5d\x05\x44\
\x41\xbc\x20\xe9\xaf\x75\x84\x24\xdd\x0d\x6c\x6b\x19\x33\x23\x69\
\x07\x30\x65\x78\x01\x7c\xb0\xd7\xf4\x3a\x0a\xe2\x09\xc3\xa3\x92\
\xae\x09\xed\x8c\xca\xf1\xc5\x96\x64\xf0\x2e\xa4\xcf\xd4\x11\x92\
\x74\xd9\x66\xb6\xe0\x49\xec\xf3\x75\x84\x32\x54\x1e\x6d\x33\x81\
\x19\xe0\x61\xd9\x07\xa3\x15\xd6\x76\x6a\xe5\xf1\x09\xe3\x4f\x45\
\x41\xf3\xe4\xb3\x55\xf9\x3a\x76\xa9\x81\x10\x7e\xb3\xd6\x26\x8d\
\xd7\x32\x87\xd3\x16\xdb\xff\x48\x2f\xef\x06\xf8\x10\x71\x4f\x86\
\xcf\x2d\x6f\xd5\x24\x2c\xd9\xfe\x3b\xb0\x55\x34\xea\x48\x9f\xaf\
\x05\xe3\x6f\x15\x5a\x81\x28\x88\xaf\x20\x5d\x68\x44\x18\xe9\x6e\
\x4c\x78\xbb\xea\x9d\xb6\xbf\x21\x69\x6b\x2e\x52\x5d\x06\xbd\xd5\
\xdb\x95\xd2\x7e\xae\x1e\x61\xb0\x11\x7a\x7a\x34\x09\x37\xdd\x06\
\xef\x6f\x14\x8c\xe5\xa2\x13\xe0\xe7\x6a\xcb\x14\xbc\x4a\x1d\x72\
\xf2\x3f\x00\x7f\xc9\xc1\xd6\x8f\xfd\xab\xac\xa4\x78\x0b\xd1\xe1\
\x45\xc8\xa5\x0c\xd2\xbb\xa0\x97\x7b\xbe\x52\x66\x25\xbe\x03\x92\
\x6e\xe4\x22\xd2\x43\xc6\x2f\x8e\x16\xbc\xe7\xf6\x34\xf9\xc9\x10\
\x43\x84\xd8\x9d\x3b\xbc\x16\x80\x03\x51\x10\xcf\xaf\xa8\x2a\x11\
\x05\xf1\x25\xf0\x91\xa6\x88\x64\xf6\x0b\x7e\x51\x4d\x2a\xeb\x56\
\xcf\xf3\x95\x92\xe5\x31\xec\xa7\xea\xd8\xd8\x46\x70\x32\x0a\xe2\
\x0b\x37\x55\x17\x4a\xcb\x1d\xbc\x92\xe6\x53\x8d\xa0\xb5\x1f\xf4\
\xe7\xea\x2a\xec\x89\xd1\xc9\xca\x27\x6c\x9d\x93\x35\x92\x6e\xda\
\x7a\xad\x51\x7f\x02\x8e\xac\x52\x69\xb1\xd2\x07\x7a\x0d\xf8\x92\
\x17\x2b\x73\x18\xcf\x02\xcf\x48\x8a\x7b\x2d\x8f\x57\x27\xc3\x3e\
\xe3\xfd\x92\x8e\x19\xdf\x25\xea\xf9\x94\x91\xf5\x36\x62\x67\x14\
\xc4\xb3\xab\x59\xdc\xed\x03\x7e\x99\x85\xb8\xd6\xef\x00\x1f\x4a\
\x9c\x01\x7e\x0d\x5c\xea\x54\x22\xaf\x26\xe1\x7d\xb6\xf7\x20\xbe\
\x2f\x6b\x93\x71\x56\xdc\x15\x59\xff\x8f\xa0\xbd\xb5\x20\x9e\xbb\
\x15\xe5\x75\x30\x87\x10\xc7\x6d\xf7\xd5\xcf\x89\x7a\x62\x57\x17\
\x93\x95\xd7\xdf\x07\xae\x67\x5e\xed\x17\xda\x6c\xbc\x5d\xd6\xa6\
\xf4\xfa\xe0\x74\xd2\x8b\xfd\x79\xe3\x67\x25\x3d\xdd\x69\xd3\xae\
\xd6\x07\x8e\x6d\xc0\x29\xdb\x0f\xe5\x70\xa2\x6d\x5f\xa6\x09\x8f\
\xf6\xfd\x29\xa1\x03\x51\x10\xbf\xdd\xeb\x5c\x56\x14\x0e\xd3\xe8\
\xc4\xc3\x88\x2f\x03\x17\xdc\x9c\x02\x2f\xed\x2f\xe6\x54\xad\xfd\
\x8b\xc0\x23\xa0\xcf\xae\x64\xf2\x2b\x5e\x81\x36\x25\xf2\x2d\xb2\
\xf6\x20\x76\x00\xf7\xdb\xee\xcf\x5d\x72\x72\x9f\x92\x3c\x97\x15\
\x09\xce\x1b\x4d\x60\x2e\xd5\xca\x37\xf7\xc5\x72\x55\x3f\xb3\x36\
\x8a\xc2\x66\x40\x62\x00\xe8\xcf\xfe\x9e\xb3\x99\x96\x98\xee\x85\
\xef\xb5\xb6\xd6\xd6\x5a\xf7\xf6\x1f\x49\xe9\x91\xff\xb5\x11\xba\
\xe6\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x06\x8e\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x30\x00\x00\x00\x30\x08\x06\x00\x00\x00\x57\x02\xf9\x87\
\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\
\xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\
\x0b\x13\x01\x00\x9a\x9c\x18\x00\x00\x00\x07\x74\x49\x4d\x45\x07\
\xdd\x0b\x0b\x0e\x21\x0d\x3a\x15\x57\x15\x00\x00\x06\x1b\x49\x44\
\x41\x54\x68\xde\xed\x99\x5f\x88\x5d\x57\x15\xc6\x7f\xdf\xe5\xce\
\x21\x94\x61\x28\x41\x06\xc9\x43\x38\x57\x4b\x29\x21\x68\x18\x6d\
\xe8\x83\xc4\x83\x36\x45\xa4\x36\x24\x26\x51\x2b\x96\x36\xd5\x88\
\x26\x22\x34\xb4\x43\x1e\x82\x08\x81\xe8\x04\x8a\x52\xaa\x88\x34\
\x54\x4b\x53\x6c\x6a\x8a\x51\x4b\x62\xd2\xf6\x58\xfa\x50\xa4\x84\
\x28\x51\x43\x9b\xf6\x1e\xf2\x30\x94\x22\xa1\x84\x61\x08\x67\xc2\
\x7c\x3e\x9c\x73\xef\xec\x7b\x72\xe7\xfe\xc9\xcc\x54\xa1\xd9\x4f\
\x9b\x73\xf6\x59\x6b\x7d\x6b\x7f\x7b\xed\xb5\xd6\x81\x9b\xe3\xe6\
\xf8\x68\x0f\x2d\xb7\xc0\x2c\x89\xea\xc6\x6b\x84\xd6\x18\x8f\xaa\
\x50\x71\x05\x98\x06\xa6\xe3\x34\x9f\xff\xbf\x02\xd0\x4c\x22\x04\
\xeb\x0d\xdb\x04\x9b\x8d\x37\x08\x8d\x16\x6f\x5d\xaa\x30\x46\xa8\
\x00\xf2\x26\x70\x1a\x78\x21\x4e\xf3\x8b\xff\x33\x00\x59\x12\xd5\
\x80\xed\xc0\x3e\xe3\x8d\x85\x30\x61\x4c\x38\x6f\x29\x70\xf9\xa4\
\x73\xae\xd4\xf8\xb0\xd0\x4b\x71\x9a\x7f\x78\x00\xb2\x24\xba\x0b\
\xfc\x24\x68\x62\xd0\x6f\x1c\x28\xeb\x32\x7f\x0d\xd8\x13\xa7\xf9\
\xf9\x15\x05\x50\xf2\xfb\xc7\x42\x8f\x19\xd7\x55\x8a\x58\xf0\xb4\
\x30\xbe\x24\x38\x67\xc8\x84\xae\x94\x9f\xde\x6a\xfc\x09\x60\x42\
\xf0\xf1\xee\xbb\x41\x0e\xda\x0f\x3c\x3e\xcc\x6e\x68\x08\xae\x8f\
\x82\x8f\x01\x5f\xea\x42\x95\x4b\xc0\xaf\x40\x2f\x34\xd2\xfc\xad\
\x1e\x0e\x00\x58\x0f\x7c\x03\xbc\x8b\xee\x60\x8e\x82\x1e\x8a\xd3\
\x3c\x5f\x36\x00\x59\x12\x8d\x19\x4e\x09\xee\xaa\xbc\x7a\xdf\xf8\
\x00\xe8\xe9\xc6\x80\x0a\x03\x99\xab\x0c\xdf\x07\x7e\x24\x18\xab\
\x50\xeb\x25\xf0\xd6\x38\x9d\xcb\x97\x0c\xa0\xa0\x0d\x7f\x16\xdc\
\x53\xa1\xca\x9f\x80\x87\x1a\xe9\xdc\x7f\x96\x16\xc5\x46\xd6\x0a\
\x9e\x01\x36\x05\x87\x1b\xe3\xa3\x42\xdf\xec\x47\xa7\xda\x00\x3a\
\x0e\x01\xf7\x38\x88\x26\xc6\x53\x42\x5b\x96\x6a\x3c\x40\x23\x9d\
\xbb\x04\xfa\x22\xe8\xe9\x96\xfc\x72\xdc\x0f\x7e\x64\x49\x3b\x90\
\x25\x51\x02\x7e\x19\x54\x0b\x62\xc6\x4f\x80\xfd\x37\x1a\xf6\x16\
\xd7\x35\x52\x33\x3c\x25\x78\xb0\x75\x77\x94\x07\xfb\x33\xbd\xa2\
\x93\x7a\x51\x07\xf8\xbb\xf1\xba\x20\xe8\x1d\x17\xda\xb1\xdc\xb7\
\x69\x25\xca\xbd\x2c\xb4\xc9\x25\x95\xca\x10\xfb\xf9\xc5\x1c\xd6\
\x8b\x42\x0f\x18\xd6\x05\x48\xa7\x85\xbe\xb3\x52\xc6\x03\xc4\x69\
\x7e\x4d\xf0\xad\x32\xf5\x68\x8d\x4d\xc6\x5f\x1e\xea\x0c\x14\xe1\
\xce\x8f\xaa\xdc\xa2\x32\x19\x98\x8c\xd3\xfc\xf2\x4a\x27\x67\x71\
\x3a\x77\xa9\xb8\x6b\x68\x87\x57\xe0\xd1\xa1\x00\x18\x3e\x67\x74\
\x87\x4b\x26\x1a\x2e\x08\x1d\xfd\x10\x73\xcc\x5f\x18\xde\x0b\x0e\
\x74\x92\x25\xd1\x6d\x03\x03\x10\xec\xa8\x3c\x7a\xb2\x1b\x75\x9a\
\xc9\xc8\xd8\x12\x39\x5f\x6b\x26\x23\xa3\xd7\x47\xa6\xfc\xaa\xd0\
\x91\x8a\x53\xb7\x0f\x04\xa0\xbc\x2d\xef\x0e\xe8\x33\x0f\x3c\xdf\
\x65\xdd\x46\xc1\xdb\x59\x32\xb2\x6d\x09\xc9\xe0\xcf\x41\x7f\xcd\
\x92\x68\x75\x97\x25\xcf\xa9\x7d\xdb\x83\x60\xf3\x80\x3b\xe0\x31\
\xe3\x90\x3e\xff\x68\xa4\xf9\xfb\x55\xe3\x8d\x4f\x19\x8d\x83\x9e\
\xcb\x92\x68\xdb\x8d\x19\xef\xbd\xc0\x04\x70\xba\x0b\x88\xf3\x46\
\xef\xb1\x60\xc7\x67\xcb\xef\xfa\x01\xd0\xed\xe1\x73\xc1\xd9\x8a\
\xf2\xf5\x86\x53\xc0\xad\xa5\xf0\xc8\xf8\x77\x59\x32\xb2\x73\x08\
\xe3\x7f\x69\xd8\x1b\xd0\x63\x02\x7c\x3a\x4b\x46\x56\x05\x11\x09\
\x70\xa8\x7b\xcc\x78\x4d\x5f\x00\x86\x35\x61\xf4\x01\xbd\x53\x59\
\xf2\xae\xf0\x9b\xe1\x1a\x41\x1d\x78\xb6\xd9\x07\x44\xcb\x78\x60\
\x77\x27\x3d\x8c\xe1\x45\xd0\xd5\xaa\xae\x70\x8d\xa0\x3f\x00\xc1\
\x68\x40\x1f\x80\x0f\x2a\xb1\x7a\x16\xb4\xc5\x70\x26\x5c\x67\x54\
\x07\x3d\x9b\x25\xd1\xce\xde\xc6\x7b\x77\x20\xbb\xf5\xfd\x01\xa1\
\x83\xd5\xcb\x4a\xe8\x83\x85\x35\x82\x32\xe9\xeb\x17\x85\x6a\x01\
\xe2\xc5\x2e\x9c\x59\xa1\x2d\xc0\x19\x75\x7a\xa8\x0e\xbe\x0e\x44\
\x68\x7c\x35\x05\x10\x1c\x68\xa4\x73\x07\xfb\xa5\x26\xc1\x9d\xd0\
\x17\xc0\x8c\x3b\xb3\x8c\xb1\xc5\x40\x80\xdb\x3b\xd1\x5a\x6f\xa8\
\xbb\xa0\xd3\xd7\x5b\xc6\xbb\xe0\xfc\x6e\x07\xc4\x2c\x92\x42\x0e\
\x00\x07\x17\xaf\xe2\x3c\x56\xc9\x7a\x66\x06\x01\x30\x5d\x7e\xdc\
\x12\xd3\xe8\x91\x49\xce\x82\xb7\x08\x4e\xba\xc3\x43\xae\x0b\x3d\
\x93\x25\xd1\x03\xc0\x53\x2a\x3d\xdf\x86\x58\xcc\xf7\x77\xa3\x4d\
\x85\x42\x71\x07\x9c\xd2\xb6\x70\xd4\xbb\x1c\xe2\x8b\x65\xec\xaf\
\x2d\x44\x88\x9e\xe9\xf0\x6c\x96\x44\x5b\xc1\x2f\x16\xd5\x5a\x28\
\xdb\xbf\xb9\xbe\x32\x06\xc1\x64\x9c\xe6\x53\xfd\xeb\x68\x6f\xd0\
\x02\x13\x66\x84\xa6\x07\xd9\x81\xcb\xa0\x77\x03\x0a\x6d\x68\x26\
\x23\xab\xfb\x24\x61\x57\x85\xb6\x1a\x9f\xac\xd0\x89\x90\x36\x25\
\x93\x27\x81\xa9\x01\xc2\xed\xed\xa0\xb5\xc1\x7e\x9c\x8b\xd3\xfc\
\x5a\x5f\x00\x8d\x62\x4b\xcf\x04\x94\xa8\x0b\xfa\x5e\x54\x2d\x10\
\x55\x3a\x85\xb4\x01\x26\x85\xa6\x06\xa9\x25\x8c\xb7\xd3\x79\x70\
\x4f\x0f\x93\x4e\xff\x5e\x9d\xd1\xe2\x7b\x65\x8a\xd1\x17\x04\x68\
\x2b\x70\xb2\x0b\xe7\x27\xe3\x34\x1f\xc8\xf8\x66\x12\x45\x82\xef\
\x56\x1e\x1f\x1f\x26\x1b\x7d\x05\x94\x05\xea\x27\x8c\xef\x1b\x30\
\xa7\xbf\xaa\x02\xc4\x89\x80\x4e\xfb\x06\xa1\x4d\x30\x1e\x34\xac\
\x0d\x68\xfc\x37\xe3\xf3\xc3\x56\x64\x7b\x81\x27\x82\xf6\xc9\x45\
\xc3\xa7\x1b\x69\x3e\x3b\x60\x89\x18\x81\x8e\x01\xaf\x02\x3f\x1b\
\xb4\x04\xcd\x92\xe8\x63\xc0\x3f\x8d\xc7\x5b\x6d\x1b\xe0\x6b\x71\
\x9a\x3f\x3f\x2c\x80\x55\xc0\xbf\xc1\xf1\xc2\x52\x1f\x01\x3d\x3c\
\x84\x31\xb5\x61\x2a\xb8\xf2\xc2\xfb\x03\x70\x6f\xe0\xb8\xb3\xc0\
\x9d\x8b\xc9\xa9\xf5\xa2\x82\xf1\x0f\x2b\x51\x65\x97\xf1\x23\x83\
\x9c\x87\x52\xc6\x30\xc6\x63\x7c\xc8\x70\x6f\xe0\xdf\x6b\x65\xcb\
\x71\xfe\x86\xda\x2a\x42\x27\x84\x8e\x54\xa2\xca\xe1\x61\x40\x0c\
\xea\x79\xc3\x21\xd0\x63\x74\xe8\xf2\x54\x9c\xe6\x6f\x2c\xb5\xb1\
\x75\x4b\xc9\xe3\x8d\x0b\xc2\xdb\x74\xfa\x41\x3c\xe0\x99\xe8\x21\
\x7f\x35\xf0\x6b\xf0\x36\x97\xd5\x77\xd9\xae\x3c\x29\xf4\x95\x6e\
\xb1\x7f\xe8\xd6\x62\x33\x89\xc6\x05\xaf\x1a\xaf\x53\x9b\x4e\x2e\
\x0f\xb6\xf7\x09\x9d\x18\xb6\x4f\x54\x7a\xfd\x7e\xe0\xa7\x94\x29\
\x7c\xe0\x9e\x37\x0c\x9b\x1b\x69\x3e\xb3\x6c\xcd\xdd\x2c\x89\xc6\
\xc1\x7f\x34\x6c\xec\xd2\xdc\x3d\xab\x22\xcf\x3f\x1e\xa7\x73\x97\
\xfb\xb4\x12\xc7\x85\x76\x02\x7b\xc0\x77\x98\x8a\x4b\xe0\x2f\xc0\
\x8e\x38\xcd\xaf\xac\x44\x7b\xfd\x16\xe3\x27\x84\x76\x55\xe8\xd4\
\x3e\x74\xc6\xe7\x84\xce\x1a\x37\x2b\xed\xf5\x4f\x0a\x4d\x80\x3f\
\x65\x54\xeb\xd2\x5e\x9f\x07\x3d\x5e\x76\xfd\xae\xad\xd8\x0f\x8e\
\xf2\xf0\xde\x57\xd4\xb4\xc4\x1d\xbe\xeb\x32\x6f\x45\xf2\xae\x70\
\xdb\x73\xff\x4b\x68\x4f\x9c\xe6\xe9\x8a\xfe\xe0\xe8\x72\x4f\x7c\
\x9b\xe2\x17\x53\x1c\xd0\x29\xa4\x56\xdb\xfc\x45\x20\x5e\x00\x1d\
\x06\x7e\x3b\x8c\xd7\x97\x05\x40\x70\xc0\x6b\x82\x2f\x00\x5f\x05\
\xee\xa6\xf8\x13\x53\xeb\xf4\x75\x9b\x2a\xf3\xc0\x05\xd0\x19\xc3\
\x31\xc1\xeb\x4b\x6d\x12\x2f\xeb\x6f\xd6\x66\xd1\x92\x5c\x2d\x74\
\x1b\x45\x01\x3e\x5a\x70\x9b\x19\xe3\x69\xe0\x2d\xa1\x2b\xcb\xdd\
\xd9\xbe\x39\x6e\x8e\x8f\xf2\xf8\x2f\x64\x86\xd6\x7a\xf6\xea\xb9\
\x47\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
"
qt_resource_name = "\
\x00\x0c\
\x06\x7e\x46\x88\
\x00\x69\
\x00\x6d\x00\x61\x00\x67\x00\x65\x00\x73\x00\x50\x00\x72\x00\x65\x00\x66\x00\x69\x00\x78\
\x00\x06\
\x07\x03\x7d\xc3\
\x00\x69\
\x00\x6d\x00\x61\x00\x67\x00\x65\x00\x73\
\x00\x12\
\x01\xac\x02\xa7\
\x00\x61\
\x00\x72\x00\x72\x00\x6f\x00\x77\x00\x2d\x00\x32\x00\x38\x00\x2d\x00\x34\x00\x38\x00\x28\x00\x31\x00\x29\x00\x2e\x00\x70\x00\x6e\
\x00\x67\
\x00\x0f\
\x02\xae\xfe\x47\
\x00\x61\
\x00\x72\x00\x72\x00\x6f\x00\x77\x00\x2d\x00\x32\x00\x38\x00\x2d\x00\x34\x00\x38\x00\x2e\x00\x70\x00\x6e\x00\x67\
"
qt_resource_struct = "\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
\x00\x00\x00\x1e\x00\x02\x00\x00\x00\x02\x00\x00\x00\x03\
\x00\x00\x00\x30\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x01\x00\x00\x07\x02\
"
def qInitResources():
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
def qCleanupResources():
QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
qInitResources()

View File

@ -0,0 +1,56 @@
class hashtag(object):
_instance = None
class Singleton:
def __init__(self):
#define class variables here
self.string = ""
self.dic = {}
self.array = []
def __init__(self):
if hashtag._instance is None:
# Create and remember instanc
hashtag._instance = hashtag.Singleton()
self._EventHandler_instance = hashtag._instance
def __getattr__(self, aAttr):
return getattr(self._instance, aAttr)
def __setattr__(self, aAttr, aValue):
return setattr(self._instance, aAttr, aValue)
def update_array(self):
for w in sorted(self.dic, key=self.dic.get, reverse=True):
self.array.append(w)
def extract (self,sentence):
array = []
pattern='#'
count = 0
for word in sentence.split(' '):
for word2 in word.split('\\n'):
if word2.startswith(pattern):
for word3 in word2.split('#'):
if(word3 != ''):
array.append('#'+word3.lower())
count+=1
self.update_dic(array)
return count
#return array
def update_dic (self, array):
for item in array:
if (self.dic.get(item)==None):
self.dic[item]=1
else:
self.dic[item]=self.dic[item]+1
def get_color(self, value , sum):
x = value/float(sum)
if(x==0.5):
return 0xffff
elif(x>0.5):
return int(x * 255)
else:
return int(255*x)+0xff00

101
src/bitmessageqt/hashtag.py Normal file
View File

@ -0,0 +1,101 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'hashtag.ui'
#
# Created: Mon Nov 11 18:53:39 2013
# by: PyQt4 UI code generator 4.9.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
class Ui_hashtagDialog(object):
def setupUi(self, hashtagDialog):
hashtagDialog.setObjectName(_fromUtf8("hashtagDialog"))
hashtagDialog.resize(550, 380)
self.buttonBox = QtGui.QDialogButtonBox(hashtagDialog)
self.buttonBox.setGeometry(QtCore.QRect(190, 330, 111, 31))
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
self.hastgaLabel = QtGui.QLabel(hashtagDialog)
self.hastgaLabel.setGeometry(QtCore.QRect(150, 20, 211, 31))
font = QtGui.QFont()
font.setPointSize(14)
font.setBold(True)
font.setWeight(75)
self.hastgaLabel.setFont(font)
self.hastgaLabel.setObjectName(_fromUtf8("hastgaLabel"))
self.tableWidgetHashtag = QtGui.QTableWidget(hashtagDialog)
self.tableWidgetHashtag.setGeometry(QtCore.QRect(50, 70, 401, 234))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.tableWidgetHashtag.sizePolicy().hasHeightForWidth())
self.tableWidgetHashtag.setSizePolicy(sizePolicy)
self.tableWidgetHashtag.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.tableWidgetHashtag.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.tableWidgetHashtag.setObjectName(_fromUtf8("tableWidgetHashtag"))
self.tableWidgetHashtag.setColumnCount(4)
self.tableWidgetHashtag.setRowCount(0)
item = QtGui.QTableWidgetItem()
self.tableWidgetHashtag.setHorizontalHeaderItem(0, item)
item = QtGui.QTableWidgetItem()
self.tableWidgetHashtag.setHorizontalHeaderItem(1, item)
item = QtGui.QTableWidgetItem()
self.tableWidgetHashtag.setHorizontalHeaderItem(2, item)
item = QtGui.QTableWidgetItem()
self.tableWidgetHashtag.setHorizontalHeaderItem(3, item)
self.tableWidgetHashtag.verticalHeader().setVisible(False)
self.label = QtGui.QLabel(hashtagDialog)
self.label.setGeometry(QtCore.QRect(460, 160, 81, 61))
font = QtGui.QFont()
font.setFamily(_fromUtf8("Abyssinica SIL"))
font.setPointSize(12)
self.label.setFont(font)
self.label.setObjectName(_fromUtf8("label"))
self.label_2 = QtGui.QLabel(hashtagDialog)
self.label_2.setGeometry(QtCore.QRect(470, 110, 61, 61))
self.label_2.setText(_fromUtf8(""))
self.label_2.setPixmap(QtGui.QPixmap(_fromUtf8(":/imagesPrefix/images/arrow-28-48(1).png")))
self.label_2.setObjectName(_fromUtf8("label_2"))
self.label_3 = QtGui.QLabel(hashtagDialog)
self.label_3.setGeometry(QtCore.QRect(470, 220, 58, 61))
self.label_3.setText(_fromUtf8(""))
self.label_3.setPixmap(QtGui.QPixmap(_fromUtf8(":/imagesPrefix/images/arrow-28-48.png")))
self.label_3.setObjectName(_fromUtf8("label_3"))
self.retranslateUi(hashtagDialog)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), hashtagDialog.accept)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), hashtagDialog.reject)
QtCore.QMetaObject.connectSlotsByName(hashtagDialog)
def retranslateUi(self, hashtagDialog):
hashtagDialog.setWindowTitle(QtGui.QApplication.translate("hashtagDialog", "Hashtag", None, QtGui.QApplication.UnicodeUTF8))
self.hastgaLabel.setText(QtGui.QApplication.translate("hashtagDialog", "Trending Hashtags", None, QtGui.QApplication.UnicodeUTF8))
item = self.tableWidgetHashtag.horizontalHeaderItem(0)
item.setText(QtGui.QApplication.translate("hashtagDialog", "Day", None, QtGui.QApplication.UnicodeUTF8))
item = self.tableWidgetHashtag.horizontalHeaderItem(1)
item.setText(QtGui.QApplication.translate("hashtagDialog", "Week", None, QtGui.QApplication.UnicodeUTF8))
item = self.tableWidgetHashtag.horizontalHeaderItem(2)
item.setText(QtGui.QApplication.translate("hashtagDialog", "Month", None, QtGui.QApplication.UnicodeUTF8))
item = self.tableWidgetHashtag.horizontalHeaderItem(3)
item.setText(QtGui.QApplication.translate("hashtagDialog", "All Time", None, QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("hashtagDialog", "Popularity", None, QtGui.QApplication.UnicodeUTF8))
import bitmessage_images_rc
if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
hashtagDialog = QtGui.QDialog()
ui = Ui_hashtagDialog()
ui.setupUi(hashtagDialog)
hashtagDialog.show()
sys.exit(app.exec_())

186
src/bitmessageqt/hashtag.ui Normal file
View File

@ -0,0 +1,186 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>hashtagDialog</class>
<widget class="QDialog" name="hashtagDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>550</width>
<height>380</height>
</rect>
</property>
<property name="windowTitle">
<string>Hashtag</string>
</property>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
<x>190</x>
<y>330</y>
<width>111</width>
<height>31</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Ok</set>
</property>
</widget>
<widget class="QLabel" name="hastgaLabel">
<property name="geometry">
<rect>
<x>150</x>
<y>20</y>
<width>211</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>14</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Trending Hashtags</string>
</property>
</widget>
<widget class="QTableWidget" name="tableWidgetHashtag">
<property name="geometry">
<rect>
<x>50</x>
<y>70</y>
<width>401</width>
<height>234</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string>Day</string>
</property>
</column>
<column>
<property name="text">
<string>Week</string>
</property>
</column>
<column>
<property name="text">
<string>Month</string>
</property>
</column>
<column>
<property name="text">
<string>All Time</string>
</property>
</column>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>460</x>
<y>160</y>
<width>81</width>
<height>61</height>
</rect>
</property>
<property name="font">
<font>
<family>Abyssinica SIL</family>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>Popularity</string>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>470</x>
<y>110</y>
<width>61</width>
<height>61</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="bitmessage_images.qrc">:/imagesPrefix/images/arrow-28-48(1).png</pixmap>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>470</x>
<y>220</y>
<width>58</width>
<height>61</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="bitmessage_images.qrc">:/imagesPrefix/images/arrow-28-48.png</pixmap>
</property>
</widget>
</widget>
<resources>
<include location="bitmessage_images.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>hashtagDialog</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>hashtagDialog</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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
src/images/arrow-28-48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB