mirror of https://github.com/qTox/qTox.git
9 changed files with 1155 additions and 16 deletions
@ -0,0 +1,905 @@
@@ -0,0 +1,905 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<ui version="4.0"> |
||||
<class>Android</class> |
||||
<widget class="QWidget" name="Android"> |
||||
<property name="geometry"> |
||||
<rect> |
||||
<x>0</x> |
||||
<y>0</y> |
||||
<width>320</width> |
||||
<height>480</height> |
||||
</rect> |
||||
</property> |
||||
<property name="windowTitle"> |
||||
<string>Form</string> |
||||
</property> |
||||
<layout class="QVBoxLayout" name="verticalLayout_2"> |
||||
<property name="spacing"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="leftMargin"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="topMargin"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="rightMargin"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="bottomMargin"> |
||||
<number>0</number> |
||||
</property> |
||||
<item> |
||||
<widget class="QFrame" name="statusPanel"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<layout class="QVBoxLayout" name="verticalLayout_3"> |
||||
<property name="spacing"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="leftMargin"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="topMargin"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="rightMargin"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="bottomMargin"> |
||||
<number>0</number> |
||||
</property> |
||||
<item> |
||||
<widget class="QWidget" name="statusHead" native="true"> |
||||
<property name="enabled"> |
||||
<bool>true</bool> |
||||
</property> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<layout class="QGridLayout" name="gridLayout_2"> |
||||
<item row="0" column="0"> |
||||
<layout class="QHBoxLayout" name="myProfile"> |
||||
<property name="spacing"> |
||||
<number>0</number> |
||||
</property> |
||||
<item> |
||||
<spacer name="horizontalSpacer_4"> |
||||
<property name="orientation"> |
||||
<enum>Qt::Horizontal</enum> |
||||
</property> |
||||
<property name="sizeType"> |
||||
<enum>QSizePolicy::Maximum</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>5</width> |
||||
<height>20</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
<item> |
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,1"> |
||||
<property name="spacing"> |
||||
<number>0</number> |
||||
</property> |
||||
<item> |
||||
<widget class="CroppingLabel" name="nameLabel"> |
||||
<property name="enabled"> |
||||
<bool>true</bool> |
||||
</property> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> |
||||
<horstretch>1</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="palette"> |
||||
<palette> |
||||
<active> |
||||
<colorrole role="WindowText"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Button"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Light"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Midlight"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Dark"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Mid"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Text"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="ButtonText"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Base"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Window"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Shadow"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Highlight"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="AlternateBase"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="NoRole"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="ToolTipText"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
</active> |
||||
<inactive> |
||||
<colorrole role="WindowText"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Button"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Light"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Midlight"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Dark"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Mid"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Text"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="ButtonText"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Base"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Window"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Shadow"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Highlight"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="AlternateBase"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="NoRole"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="ToolTipText"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
</inactive> |
||||
<disabled> |
||||
<colorrole role="WindowText"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Button"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Light"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Midlight"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Dark"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Mid"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Text"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="ButtonText"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Base"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Window"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Shadow"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Highlight"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>240</red> |
||||
<green>240</green> |
||||
<blue>240</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="AlternateBase"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="NoRole"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="ToolTipText"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>255</red> |
||||
<green>255</green> |
||||
<blue>255</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
</disabled> |
||||
</palette> |
||||
</property> |
||||
<property name="font"> |
||||
<font> |
||||
<pointsize>11</pointsize> |
||||
<weight>75</weight> |
||||
<bold>true</bold> |
||||
</font> |
||||
</property> |
||||
<property name="text"> |
||||
<string>Your name</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="CroppingLabel" name="statusLabel"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> |
||||
<horstretch>1</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="palette"> |
||||
<palette> |
||||
<active> |
||||
<colorrole role="WindowText"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>193</red> |
||||
<green>193</green> |
||||
<blue>193</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Text"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>193</red> |
||||
<green>193</green> |
||||
<blue>193</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
</active> |
||||
<inactive> |
||||
<colorrole role="WindowText"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>193</red> |
||||
<green>193</green> |
||||
<blue>193</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Text"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>193</red> |
||||
<green>193</green> |
||||
<blue>193</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
</inactive> |
||||
<disabled> |
||||
<colorrole role="WindowText"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>14</red> |
||||
<green>14</green> |
||||
<blue>14</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
<colorrole role="Text"> |
||||
<brush brushstyle="SolidPattern"> |
||||
<color alpha="255"> |
||||
<red>14</red> |
||||
<green>14</green> |
||||
<blue>14</blue> |
||||
</color> |
||||
</brush> |
||||
</colorrole> |
||||
</disabled> |
||||
</palette> |
||||
</property> |
||||
<property name="font"> |
||||
<font> |
||||
<pointsize>8</pointsize> |
||||
</font> |
||||
</property> |
||||
<property name="text"> |
||||
<string>Your status</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
<item> |
||||
<spacer name="horizontalSpacer_3"> |
||||
<property name="orientation"> |
||||
<enum>Qt::Horizontal</enum> |
||||
</property> |
||||
<property name="sizeType"> |
||||
<enum>QSizePolicy::Fixed</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>10</width> |
||||
<height>20</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="statusButton"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>20</width> |
||||
<height>40</height> |
||||
</size> |
||||
</property> |
||||
<property name="focusPolicy"> |
||||
<enum>Qt::NoFocus</enum> |
||||
</property> |
||||
<property name="text"> |
||||
<string/> |
||||
</property> |
||||
<property name="iconSize"> |
||||
<size> |
||||
<width>10</width> |
||||
<height>10</height> |
||||
</size> |
||||
</property> |
||||
<property name="autoExclusive"> |
||||
<bool>false</bool> |
||||
</property> |
||||
<property name="autoDefault"> |
||||
<bool>false</bool> |
||||
</property> |
||||
<property name="default"> |
||||
<bool>false</bool> |
||||
</property> |
||||
<property name="flat"> |
||||
<bool>true</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="AdjustingScrollArea" name="friendList"> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="layoutDirection"> |
||||
<enum>Qt::LeftToRight</enum> |
||||
</property> |
||||
<property name="autoFillBackground"> |
||||
<bool>true</bool> |
||||
</property> |
||||
<property name="frameShape"> |
||||
<enum>QFrame::NoFrame</enum> |
||||
</property> |
||||
<property name="horizontalScrollBarPolicy"> |
||||
<enum>Qt::ScrollBarAlwaysOff</enum> |
||||
</property> |
||||
<property name="widgetResizable"> |
||||
<bool>true</bool> |
||||
</property> |
||||
<widget class="QWidget" name="scrollAreaWidgetContents"> |
||||
<property name="geometry"> |
||||
<rect> |
||||
<x>0</x> |
||||
<y>0</y> |
||||
<width>320</width> |
||||
<height>385</height> |
||||
</rect> |
||||
</property> |
||||
<layout class="QVBoxLayout" name="verticalLayout_5"/> |
||||
</widget> |
||||
</widget> |
||||
</item> |
||||
<item alignment="Qt::AlignHCenter"> |
||||
<widget class="QWidget" name="tooliconsZone" native="true"> |
||||
<property name="enabled"> |
||||
<bool>true</bool> |
||||
</property> |
||||
<property name="sizePolicy"> |
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> |
||||
<horstretch>0</horstretch> |
||||
<verstretch>0</verstretch> |
||||
</sizepolicy> |
||||
</property> |
||||
<property name="styleSheet"> |
||||
<string notr="true"/> |
||||
</property> |
||||
<layout class="QHBoxLayout" name="horizontalLayout_2"> |
||||
<property name="spacing"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="leftMargin"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="topMargin"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="rightMargin"> |
||||
<number>0</number> |
||||
</property> |
||||
<property name="bottomMargin"> |
||||
<number>0</number> |
||||
</property> |
||||
<item> |
||||
<widget class="QPushButton" name="addButton"> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>55</width> |
||||
<height>35</height> |
||||
</size> |
||||
</property> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>55</width> |
||||
<height>35</height> |
||||
</size> |
||||
</property> |
||||
<property name="focusPolicy"> |
||||
<enum>Qt::NoFocus</enum> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string>Add friends</string> |
||||
</property> |
||||
<property name="autoFillBackground"> |
||||
<bool>false</bool> |
||||
</property> |
||||
<property name="styleSheet"> |
||||
<string notr="true"/> |
||||
</property> |
||||
<property name="text"> |
||||
<string/> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../res.qrc"> |
||||
<normaloff>:/img/add.png</normaloff>:/img/add.png</iconset> |
||||
</property> |
||||
<property name="checkable"> |
||||
<bool>false</bool> |
||||
</property> |
||||
<property name="autoDefault"> |
||||
<bool>false</bool> |
||||
</property> |
||||
<property name="flat"> |
||||
<bool>false</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="groupButton"> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>55</width> |
||||
<height>35</height> |
||||
</size> |
||||
</property> |
||||
<property name="focusPolicy"> |
||||
<enum>Qt::NoFocus</enum> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string>Create a group chat</string> |
||||
</property> |
||||
<property name="autoFillBackground"> |
||||
<bool>false</bool> |
||||
</property> |
||||
<property name="text"> |
||||
<string/> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../res.qrc"> |
||||
<normaloff>:/img/group_button.png</normaloff>:/img/group_button.png</iconset> |
||||
</property> |
||||
<property name="flat"> |
||||
<bool>true</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="transferButton"> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>55</width> |
||||
<height>35</height> |
||||
</size> |
||||
</property> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>55</width> |
||||
<height>35</height> |
||||
</size> |
||||
</property> |
||||
<property name="focusPolicy"> |
||||
<enum>Qt::NoFocus</enum> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string>View completed file transfers</string> |
||||
</property> |
||||
<property name="text"> |
||||
<string/> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../res.qrc"> |
||||
<normaloff>:/img/transfer.png</normaloff>:/img/transfer.png</iconset> |
||||
</property> |
||||
<property name="flat"> |
||||
<bool>true</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="settingsButton"> |
||||
<property name="minimumSize"> |
||||
<size> |
||||
<width>55</width> |
||||
<height>35</height> |
||||
</size> |
||||
</property> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>55</width> |
||||
<height>35</height> |
||||
</size> |
||||
</property> |
||||
<property name="focusPolicy"> |
||||
<enum>Qt::NoFocus</enum> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string>Change your settings</string> |
||||
</property> |
||||
<property name="text"> |
||||
<string/> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../res.qrc"> |
||||
<normaloff>:/img/settings.png</normaloff>:/img/settings.png</iconset> |
||||
</property> |
||||
<property name="flat"> |
||||
<bool>true</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
<customwidgets> |
||||
<customwidget> |
||||
<class>AdjustingScrollArea</class> |
||||
<extends>QScrollArea</extends> |
||||
<header>src/widget/adjustingscrollarea.h</header> |
||||
<container>1</container> |
||||
</customwidget> |
||||
<customwidget> |
||||
<class>CroppingLabel</class> |
||||
<extends>QLabel</extends> |
||||
<header>src/widget/croppinglabel.h</header> |
||||
</customwidget> |
||||
</customwidgets> |
||||
<resources> |
||||
<include location="../res.qrc"/> |
||||
</resources> |
||||
<connections/> |
||||
</ui> |
@ -1,13 +1,169 @@
@@ -1,13 +1,169 @@
|
||||
#include "androidgui.h" |
||||
#include "ui_android.h" |
||||
#include "friendlistwidget.h" |
||||
#include "maskablepixmapwidget.h" |
||||
#include "src/core.h" |
||||
#include "src/friend.h" |
||||
#include "src/friendlist.h" |
||||
#include "src/group.h" |
||||
#include "src/grouplist.h" |
||||
#include "src/misc/settings.h" |
||||
#include "src/misc/style.h" |
||||
#include "src/nexus.h" |
||||
#include "src/widget/friendwidget.h" |
||||
#include "src/widget/groupwidget.h" |
||||
#include <QLabel> |
||||
#include <QMenu> |
||||
|
||||
AndroidGUI::AndroidGUI(QWidget *parent) : |
||||
QWidget(parent) |
||||
QWidget(parent), |
||||
ui{new Ui::Android} |
||||
{ |
||||
l = new QLabel("qTox Android", this); |
||||
ui->setupUi(this); |
||||
|
||||
ui->friendList->setStyleSheet(Style::resolve(Style::getStylesheet(":ui/friendList/friendList.css"))); |
||||
|
||||
profilePicture = new MaskablePixmapWidget(this, QSize(40, 40), ":/img/avatar_mask.png"); |
||||
profilePicture->setPixmap(QPixmap(":/img/contact_dark.png")); |
||||
profilePicture->setClickable(true); |
||||
ui->myProfile->insertWidget(0, profilePicture); |
||||
ui->myProfile->insertSpacing(1, 7); |
||||
|
||||
ui->tooliconsZone->setStyleSheet(Style::resolve("QPushButton{background-color:@themeDark;border:none;}QPushButton:hover{background-color:@themeMediumDark;border:none;}")); |
||||
ui->statusHead->setStyleSheet(Style::getStylesheet(":/ui/window/statusPanel.css")); |
||||
|
||||
contactListWidget = new FriendListWidget(); |
||||
ui->friendList->setWidget(contactListWidget); |
||||
ui->friendList->setLayoutDirection(Qt::RightToLeft); |
||||
|
||||
ui->nameLabel->setEditable(true); |
||||
ui->statusLabel->setEditable(true); |
||||
|
||||
ui->statusPanel->setStyleSheet(Style::getStylesheet(":/ui/window/statusPanel.css")); |
||||
|
||||
QMenu *statusButtonMenu = new QMenu(ui->statusButton); |
||||
QAction* setStatusOnline = statusButtonMenu->addAction(AndroidGUI::tr("Online","Button to set your status to 'Online'")); |
||||
setStatusOnline->setIcon(QIcon(":ui/statusButton/dot_online.png")); |
||||
QAction* setStatusAway = statusButtonMenu->addAction(AndroidGUI::tr("Away","Button to set your status to 'Away'")); |
||||
setStatusAway->setIcon(QIcon(":ui/statusButton/dot_idle.png")); |
||||
QAction* setStatusBusy = statusButtonMenu->addAction(AndroidGUI::tr("Busy","Button to set your status to 'Busy'")); |
||||
setStatusBusy->setIcon(QIcon(":ui/statusButton/dot_busy.png")); |
||||
ui->statusButton->setMenu(statusButtonMenu); |
||||
|
||||
ui->statusButton->setProperty("status", "offline"); |
||||
Style::repolish(ui->statusButton); |
||||
|
||||
// Disable some widgets until we're connected to the DHT
|
||||
ui->statusButton->setEnabled(false); |
||||
|
||||
Style::setThemeColor(Settings::getInstance().getThemeColor()); |
||||
Style::setThemeColor(1); |
||||
reloadTheme(); |
||||
|
||||
connect(ui->nameLabel, &CroppingLabel::textChanged, this, &AndroidGUI::onUsernameChanged); |
||||
connect(ui->statusLabel, &CroppingLabel::textChanged, this, &AndroidGUI::onStatusMessageChanged); |
||||
} |
||||
|
||||
AndroidGUI::~AndroidGUI() |
||||
{ |
||||
delete l; |
||||
delete profilePicture; |
||||
delete contactListWidget; |
||||
} |
||||
|
||||
void AndroidGUI::reloadTheme() |
||||
{ |
||||
QString statusPanelStyle = Style::getStylesheet(":/ui/window/statusPanel.css"); |
||||
ui->tooliconsZone->setStyleSheet(Style::resolve("QPushButton{background-color:@themeDark;border:none;}QPushButton:hover{background-color:@themeMediumDark;border:none;}")); |
||||
ui->statusPanel->setStyleSheet(statusPanelStyle); |
||||
ui->statusHead->setStyleSheet(statusPanelStyle); |
||||
ui->friendList->setStyleSheet(Style::getStylesheet(":ui/friendList/friendList.css")); |
||||
ui->statusButton->setStyleSheet(Style::getStylesheet(":ui/statusButton/statusButton.css")); |
||||
|
||||
for (Friend* f : FriendList::getAllFriends()) |
||||
f->getFriendWidget()->reloadTheme(); |
||||
|
||||
for (Group* g : GroupList::getAllGroups()) |
||||
g->getGroupWidget()->reloadTheme(); |
||||
} |
||||
|
||||
void AndroidGUI::onSelfAvatarLoaded(const QPixmap& pic) |
||||
{ |
||||
profilePicture->setPixmap(pic); |
||||
} |
||||
|
||||
void AndroidGUI::onConnected() |
||||
{ |
||||
ui->statusButton->setEnabled(true); |
||||
if (beforeDisconnect == Status::Offline) |
||||
emit statusSet(Status::Online); |
||||
else |
||||
emit statusSet(beforeDisconnect); |
||||
} |
||||
|
||||
void AndroidGUI::onDisconnected() |
||||
{ |
||||
QString stat = ui->statusButton->property("status").toString(); |
||||
if (stat == "online") |
||||
beforeDisconnect = Status::Online; |
||||
else if (stat == "busy") |
||||
beforeDisconnect = Status::Busy; |
||||
else if (stat == "away") |
||||
beforeDisconnect = Status::Away; |
||||
else |
||||
beforeDisconnect = Status::Offline; |
||||
|
||||
ui->statusButton->setEnabled(false); |
||||
emit statusSet(Status::Offline); |
||||
} |
||||
|
||||
void AndroidGUI::onUsernameChanged(const QString& newUsername, const QString& oldUsername) |
||||
{ |
||||
setUsername(oldUsername); // restore old username until Core tells us to set it
|
||||
Nexus::getCore()->setUsername(newUsername); |
||||
} |
||||
|
||||
void AndroidGUI::setUsername(const QString& username) |
||||
{ |
||||
ui->nameLabel->setText(username); |
||||
ui->nameLabel->setToolTip(username); // for overlength names
|
||||
QString sanename = username; |
||||
sanename.remove(QRegExp("[\\t\\n\\v\\f\\r\\x0000]")); |
||||
nameMention = QRegExp("\\b" + QRegExp::escape(username) + "\\b", Qt::CaseInsensitive); |
||||
sanitizedNameMention = QRegExp("\\b" + QRegExp::escape(sanename) + "\\b", Qt::CaseInsensitive); |
||||
} |
||||
|
||||
void AndroidGUI::onStatusMessageChanged(const QString& newStatusMessage, const QString& oldStatusMessage) |
||||
{ |
||||
ui->statusLabel->setText(oldStatusMessage); // restore old status message until Core tells us to set it
|
||||
ui->statusLabel->setToolTip(oldStatusMessage); // for overlength messsages
|
||||
Nexus::getCore()->setStatusMessage(newStatusMessage); |
||||
} |
||||
|
||||
void AndroidGUI::setStatusMessage(const QString &statusMessage) |
||||
{ |
||||
ui->statusLabel->setText(statusMessage); |
||||
ui->statusLabel->setToolTip(statusMessage); // for overlength messsages
|
||||
} |
||||
|
||||
void AndroidGUI::onStatusSet(Status status) |
||||
{ |
||||
//We have to use stylesheets here, there's no way to
|
||||
//prevent the button icon from moving when pressed otherwise
|
||||
switch (status) |
||||
{ |
||||
case Status::Online: |
||||
ui->statusButton->setProperty("status" ,"online"); |
||||
break; |
||||
case Status::Away: |
||||
ui->statusButton->setProperty("status" ,"away"); |
||||
break; |
||||
case Status::Busy: |
||||
ui->statusButton->setProperty("status" ,"busy"); |
||||
break; |
||||
case Status::Offline: |
||||
ui->statusButton->setProperty("status" ,"offline"); |
||||
break; |
||||
} |
||||
Style::repolish(ui->statusButton); |
||||
} |
||||
|
||||
|
Loading…
Reference in new issue