new profile tab
This commit is contained in:
parent
45f0b72657
commit
3936b2b391
2 changed files with 111 additions and 1 deletions
|
|
@ -29,6 +29,7 @@ from weboob.capabilities.messages import ICapMessages
|
||||||
from .ui.contacts_ui import Ui_Contacts
|
from .ui.contacts_ui import Ui_Contacts
|
||||||
from .ui.contact_thread_ui import Ui_ContactThread
|
from .ui.contact_thread_ui import Ui_ContactThread
|
||||||
from .ui.thread_message_ui import Ui_ThreadMessage
|
from .ui.thread_message_ui import Ui_ThreadMessage
|
||||||
|
from .ui.profile_ui import Ui_Profile
|
||||||
|
|
||||||
class ThreadMessage(QFrame):
|
class ThreadMessage(QFrame):
|
||||||
def __init__(self, message, parent=None):
|
def __init__(self, message, parent=None):
|
||||||
|
|
@ -106,6 +107,16 @@ class ContactThread(QWidget):
|
||||||
QMessageBox.critical(self, self.tr('Error while posting reply'),
|
QMessageBox.critical(self, self.tr('Error while posting reply'),
|
||||||
content, QMessageBox.Ok)
|
content, QMessageBox.Ok)
|
||||||
|
|
||||||
|
class ContactProfile(QWidget):
|
||||||
|
def __init__(self, weboob, contact, parent=None):
|
||||||
|
QWidget.__init__(self, parent)
|
||||||
|
self.ui = Ui_Profile()
|
||||||
|
self.ui.setupUi(self)
|
||||||
|
|
||||||
|
self.weboob = weboob
|
||||||
|
self.contact = contact
|
||||||
|
|
||||||
|
self.ui.nicknameLabel.setText('<h1>%s</h1>' % contact.name)
|
||||||
|
|
||||||
class IGroup(object):
|
class IGroup(object):
|
||||||
def __init__(self, weboob, id, name):
|
def __init__(self, weboob, id, name):
|
||||||
|
|
@ -203,7 +214,7 @@ class ContactsWidget(QWidget):
|
||||||
|
|
||||||
self.contact = current.data(Qt.UserRole).toPyObject()
|
self.contact = current.data(Qt.UserRole).toPyObject()
|
||||||
|
|
||||||
self.ui.tabWidget.addTab(QWidget(), self.tr('Profile'))
|
self.ui.tabWidget.addTab(ContactProfile(self.weboob, self.contact), self.tr('Profile'))
|
||||||
if self.contact.backend.has_caps(ICapMessages):
|
if self.contact.backend.has_caps(ICapMessages):
|
||||||
self.ui.tabWidget.addTab(ContactThread(self.weboob, self.contact), self.tr('Messages'))
|
self.ui.tabWidget.addTab(ContactThread(self.weboob, self.contact), self.tr('Messages'))
|
||||||
if self.contact.backend.has_caps(ICapChat):
|
if self.contact.backend.has_caps(ICapChat):
|
||||||
|
|
|
||||||
99
weboob/applications/qhavesex/ui/profile.ui
Normal file
99
weboob/applications/qhavesex/ui/profile.ui
Normal file
|
|
@ -0,0 +1,99 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Profile</class>
|
||||||
|
<widget class="QWidget" name="Profile">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>460</width>
|
||||||
|
<height>320</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frame">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frame_4">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="photoLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>photo</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frame_3">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="nicknameLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string><h1>Nickname</h1></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="statusLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>status</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frame_2">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Plain</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="textEdit"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue