StyleSheet Rewrite

Use QDarkStyle to make Standard_Dark.qss and Standard_Light.qss
Use Widget name to stylize them.
This commit is contained in:
Phenom 2021-04-09 11:54:57 +02:00
parent 16ca0dc52c
commit d7981f3811
772 changed files with 12162 additions and 11459 deletions

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>715</width> <width>1068</width>
<height>605</height> <height>880</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -37,14 +37,14 @@
<widget class="HeaderFrame" name="headerFrame"/> <widget class="HeaderFrame" name="headerFrame"/>
</item> </item>
<item> <item>
<widget class="QFrame" name="frame"> <widget class="QFrame" name="gradFrame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::NoFrame</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout_7"> <layout class="QGridLayout" name="gradFrame_GL">
<item row="3" column="0"> <item row="3" column="0">
<widget class="QGroupBox" name="typeGroupBox"> <widget class="QGroupBox" name="typeGroupBox">
<property name="title"> <property name="title">
@ -73,7 +73,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="forumComboBox"/> <widget class="RSComboBox" name="forumComboBox"/>
</item> </item>
</layout> </layout>
</item> </item>
@ -306,6 +306,14 @@
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="nameLabel"> <widget class="QLabel" name="nameLabel">
<property name="font">
<font>
<pointsize>11</pointsize>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>Name:</string> <string>Name:</string>
</property> </property>
@ -405,6 +413,11 @@
<header>gui/common/HeaderFrame.h</header> <header>gui/common/HeaderFrame.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
</customwidgets> </customwidgets>
<tabstops> <tabstops>
<tabstop>urlLineEdit</tabstop> <tabstop>urlLineEdit</tabstop>

View File

@ -86,7 +86,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="StyledLabel" name="titleBarLabel"> <widget class="QLabel" name="titleBarLabel">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>Feeds</string> <string>Feeds</string>
</property> </property>
@ -178,11 +185,6 @@
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
<customwidget> <customwidget>
<class>RSTreeWidget</class> <class>RSTreeWidget</class>
<extends>QTreeWidget</extends> <extends>QTreeWidget</extends>

View File

@ -10,7 +10,7 @@
<height>123</height> <height>123</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="FeedReaderFeedItem_GL">
<property name="leftMargin"> <property name="leftMargin">
<number>1</number> <number>1</number>
</property> </property>
@ -30,7 +30,7 @@
<number>1</number> <number>1</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QFrame" name="frame"> <widget class="QFrame" name="feedFrame">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -46,9 +46,9 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Sunken</enum> <enum>QFrame::Sunken</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="feedFrame_VL">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_6"> <layout class="QHBoxLayout" name="Top_HL">
<item> <item>
<widget class="QLabel" name="logoLabel"> <widget class="QLabel" name="logoLabel">
<property name="maximumSize"> <property name="maximumSize">
@ -66,9 +66,9 @@
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="TopRight_VL">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="title_HL">
<item> <item>
<widget class="QLabel" name="feedIconLabel"> <widget class="QLabel" name="feedIconLabel">
<property name="minimumSize"> <property name="minimumSize">
@ -92,7 +92,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="StyledLabel" name="titleLabel"> <widget class="QLabel" name="titleLabel">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -101,7 +101,9 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>11</pointsize>
<weight>75</weight> <weight>75</weight>
<italic>true</italic>
<bold>true</bold> <bold>true</bold>
</font> </font>
</property> </property>
@ -127,7 +129,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="msgTitle_HL">
<property name="spacing"> <property name="spacing">
<number>8</number> <number>8</number>
</property> </property>
@ -195,7 +197,7 @@ p, li { white-space: pre-wrap; }
<string>Expand</string> <string>Expand</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../../retroshare-gui/src/gui/icons.qrc"> <iconset>
<normaloff>:/icons/png/down-arrow.png</normaloff>:/icons/png/down-arrow.png</iconset> <normaloff>:/icons/png/down-arrow.png</normaloff>:/icons/png/down-arrow.png</iconset>
</property> </property>
</widget> </widget>
@ -221,7 +223,7 @@ p, li { white-space: pre-wrap; }
<string>Set as read and remove item</string> <string>Set as read and remove item</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../../retroshare-gui/src/gui/icons.qrc"> <iconset>
<normaloff>:/icons/png/correct.png</normaloff>:/icons/png/correct.png</iconset> <normaloff>:/icons/png/correct.png</normaloff>:/icons/png/correct.png</iconset>
</property> </property>
</widget> </widget>
@ -247,7 +249,7 @@ p, li { white-space: pre-wrap; }
<string>Remove Item</string> <string>Remove Item</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../../retroshare-gui/src/gui/icons.qrc"> <iconset>
<normaloff>:/icons/png/exit2.png</normaloff>:/icons/png/exit2.png</iconset> <normaloff>:/icons/png/exit2.png</normaloff>:/icons/png/exit2.png</iconset>
</property> </property>
</widget> </widget>
@ -260,7 +262,7 @@ p, li { white-space: pre-wrap; }
</item> </item>
<item> <item>
<widget class="QFrame" name="expandFrame"> <widget class="QFrame" name="expandFrame">
<layout class="QVBoxLayout"> <layout class="QVBoxLayout" name="expandFrame_VL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -287,7 +289,7 @@ p, li { white-space: pre-wrap; }
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Sunken</enum> <enum>QFrame::Sunken</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="msgFrame_VL">
<property name="leftMargin"> <property name="leftMargin">
<number>5</number> <number>5</number>
</property> </property>
@ -336,16 +338,8 @@ p, li { white-space: pre-wrap; }
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
</customwidgets>
<resources> <resources>
<include location="FeedReader_images.qrc"/> <include location="FeedReader_images.qrc"/>
<include location="../../../retroshare-gui/src/gui/icons.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>800</width> <width>800</width>
<height>521</height> <height>564</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -16,7 +16,7 @@
<property name="sizeGripEnabled"> <property name="sizeGripEnabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="PreviewFeedDialog_VL">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
@ -28,7 +28,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="titleFrame_VL">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
@ -57,6 +57,14 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="font">
<font>
<pointsize>11</pointsize>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>Name:</string> <string>Name:</string>
</property> </property>
@ -284,7 +292,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="transformationTypeComboBox"/> <widget class="RSComboBox" name="transformationTypeComboBox"/>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
@ -324,6 +332,14 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="font">
<font>
<pointsize>11</pointsize>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>Title:</string> <string>Title:</string>
</property> </property>
@ -365,7 +381,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
<widget class="QFrame" name="msgFrame"> <widget class="QFrame" name="msgFrame">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="msgFrame_HL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -387,7 +403,7 @@
</layout> </layout>
</widget> </widget>
<widget class="QFrame" name="structureTreeFrame"> <widget class="QFrame" name="structureTreeFrame">
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="structureTreeFrame_HL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -451,7 +467,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="transformationFrame_VL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -472,7 +488,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="xsltFrame_VL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -499,7 +515,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="xpathFrame_HL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -513,7 +529,7 @@
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<layout class="QVBoxLayout" name="xpathUserLayout"> <layout class="QVBoxLayout" name="xpathUseLayout">
<item> <item>
<widget class="QLabel" name="xpathUseLabel"> <widget class="QLabel" name="xpathUseLabel">
<property name="text"> <property name="text">
@ -572,11 +588,13 @@
</widget> </widget>
</item> </item>
</layout> </layout>
<zorder>titleFrame</zorder>
<zorder>splitter</zorder>
<zorder>buttonBox</zorder>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
<customwidget> <customwidget>
<class>RSPlainTextEdit</class> <class>RSPlainTextEdit</class>
<extends>QPlainTextEdit</extends> <extends>QPlainTextEdit</extends>

View File

@ -1,9 +1,3 @@
/* Default stylesheet /* Default stylesheet
This file is used as default for all stylesheets and can be overloaded */ This file is used as default for all stylesheets and can be overloaded */
/* Font */
VOIPToasterItem QLabel#textLabel
{
qproperty-fontSizeFactor: 115;
}

View File

@ -1,6 +1,6 @@
<RCC> <RCC>
<qresource prefix="/qss/stylesheet/FeedReader"> <qresource prefix="/qss/stylesheet/FeedReader">
<file>FeedReader_qss.default</file> <file>FeedReader_default.qss</file>
<file>FeedReader_Standard.qss</file> <file>FeedReader_Standard.qss</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -375,7 +375,7 @@ void VOIPConfigPanel::on_qpbAudioWizard_clicked() {
void VOIPConfigPanel::on_changedCurrentInputDevice(int i) void VOIPConfigPanel::on_changedCurrentInputDevice(int i)
{ {
QString s = dynamic_cast<QComboBox*>(sender())->itemData(i).toString(); QString s = dynamic_cast<RSComboBox*>(sender())->itemData(i).toString();
videoInput->stop(); videoInput->stop();

View File

@ -63,7 +63,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="inputDevice_CB"/> <widget class="RSComboBox" name="inputDevice_CB"/>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
@ -257,7 +257,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="qcbTransmit"> <widget class="RSComboBox" name="qcbTransmit">
<property name="toolTip"> <property name="toolTip">
<string>When to transmit your speech</string> <string>When to transmit your speech</string>
</property> </property>
@ -510,6 +510,11 @@
<header>gui/AudioStats.h</header> <header>gui/AudioStats.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
</customwidgets> </customwidgets>
<tabstops> <tabstops>
<tabstop>qsDoublePush</tabstop> <tabstop>qsDoublePush</tabstop>

View File

@ -22,7 +22,7 @@
<height>102</height> <height>102</height>
</size> </size>
</property> </property>
<layout class="QHBoxLayout"> <layout class="QHBoxLayout" name="VOIPToasterItem_HL">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
@ -39,14 +39,14 @@
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QFrame" name="windowFrame"> <widget class="QFrame" name="toasterFrame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::WinPanel</enum> <enum>QFrame::WinPanel</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="toasterFrame_GL">
<property name="leftMargin"> <property name="leftMargin">
<number>2</number> <number>2</number>
</property> </property>
@ -63,7 +63,7 @@
<number>2</number> <number>2</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<layout class="QHBoxLayout"> <layout class="QHBoxLayout" name="toaster_HL">
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
@ -97,13 +97,20 @@
</item> </item>
<item> <item>
<widget class="QLabel" name="toasterLabel"> <widget class="QLabel" name="toasterLabel">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string notr="true">RetroShare</string> <string notr="true">RetroShare</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer> <spacer name="toaster_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -141,7 +148,7 @@
</layout> </layout>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="buttons_GL">
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
@ -240,7 +247,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.67,
</widget> </widget>
</item> </item>
<item row="0" column="1" colspan="2"> <item row="0" column="1" colspan="2">
<widget class="StyledLabel" name="textLabel"> <widget class="QLabel" name="textLabel">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
@ -255,6 +262,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.67,
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
@ -272,11 +280,6 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.67,
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
<customwidget> <customwidget>
<class>AvatarWidget</class> <class>AvatarWidget</class>
<extends>QLabel</extends> <extends>QLabel</extends>

View File

@ -1 +1 @@
/* Standard stylesheet for FeedReader */ /* Standard stylesheet for VOIP */

View File

@ -1,9 +1,3 @@
/* Default stylesheet /* Default stylesheet
This file is used as default for all stylesheets and can be overloaded */ This file is used as default for all stylesheets and can be overloaded */
/* Font */
FeedReaderFeedItem QLabel#titleLabel
{
qproperty-fontSizeFactor: 135;
}

View File

@ -1,6 +1,6 @@
<RCC> <RCC>
<qresource prefix="/qss/stylesheet/VOIP"> <qresource prefix="/qss/stylesheet/VOIP">
<file>VOIP_qss.default</file> <file>VOIP_default.qss</file>
<file>VOIP_Standard.qss</file> <file>VOIP_Standard.qss</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -439,7 +439,7 @@ Changes for 0.5.4e
- Enabled embedded images in private chat and messages (only for QT version 4.7.0 and higher) - Enabled embedded images in private chat and messages (only for QT version 4.7.0 and higher)
- added tooltips to GroupFlagsWidget when buttons are unchecked (Patch from Anonym) - added tooltips to GroupFlagsWidget when buttons are unchecked (Patch from Anonym)
- when an unknow user attempt to connect, show the name in the security item (Patch from Anonym) - when an unknow user attempt to connect, show the name in the security item (Patch from Anonym)
- Load new stylesheets for locale depended things. Loading order: qss.default (internal), qss.<locale> (internal e.g. qss.de_DE) - Load new stylesheets for locale depended things. Loading order: default.qss (internal), <locale>.qss (internal e.g. de_DE.qss)
stylesheet.qss (internal or external), stylesheet_<locale>.lqss (parallel to stylesheet) stylesheet.qss (internal or external), stylesheet_<locale>.lqss (parallel to stylesheet)
- Added api for news feeds to the plugin interface. Added news feeds to the FeedReader plugin. - Added api for news feeds to the plugin interface. Added news feeds to the FeedReader plugin.
- Removed toaster for muted participant of a chat lobby. - Removed toaster for muted participant of a chat lobby.
@ -586,7 +586,7 @@ Changes for 0.5.4c
- GUI - GUI
* patch from AC to perform html optimization of forum posts using the canonical function optimizeHtml() * patch from AC to perform html optimization of forum posts using the canonical function optimizeHtml()
* fixed bug preventing share manager to modify more than one directory at once * fixed bug preventing share manager to modify more than one directory at once
* Moved most of the hardcoded colors of lists and trees to the file qss.default (with help from braindead). * Moved most of the hardcoded colors of lists and trees to the file default.qss (with help from braindead).
Now the stylesheet can redefine these colors. Now the stylesheet can redefine these colors.
* Added multiselective mute/unmute to chat lobby. Added mute/unmute with double click on icon. * Added multiselective mute/unmute to chat lobby. Added mute/unmute with double click on icon.
* Added flag for hungarian language. * Added flag for hungarian language.
@ -790,10 +790,10 @@ Changes for 0.5.4a
* Set the built-in stylesheet "Standard" as default for new profiles. * Set the built-in stylesheet "Standard" as default for new profiles.
* Removed some unnecessary style sheets. * Removed some unnecessary style sheets.
* Added two internal stylesheets: * Added two internal stylesheets:
- qss.default - This file is used as default for all stylesheets (e.g. the frames of - default.qss - This file is used as default for all stylesheets (e.g. the frames of
the AvatarWidget) and can be overloaded from the selected stylesheet the AvatarWidget) and can be overloaded from the selected stylesheet
- Standard.qss - The standard stylesheet for the current look of RetroShare. More internal stylesheets can be added. - Standard.qss - The standard stylesheet for the current look of RetroShare. More internal stylesheets can be added.
The plan is to move nearly all internal stylesheets to the files Standard.qss/qss.default. The plan is to move nearly all internal stylesheets to the files Standard.qss/default.qss.
After that the "empty" stylesheet should represent the system theme of the os. After that the "empty" stylesheet should represent the system theme of the os.
- Added clear chat history to the context menu of the message text browser - Added clear chat history to the context menu of the message text browser
@ -3121,4 +3121,4 @@ We have available for those interested in retroshare:
(2) deb installation files for debian/etch and kubuntu/feisty (2) deb installation files for debian/etch and kubuntu/feisty
(3) Language pack for those interested in translating. (3) Language pack for those interested in translating.

View File

@ -52,8 +52,8 @@ AboutWidget::AboutWidget(QWidget* parent)
l->setMargin(0); l->setMargin(0);
l->addStretch(1); l->addStretch(1);
l->addStretch(1); l->addStretch(1);
frame->setContentsMargins(0, 0, 0, 0); specialFrame->setContentsMargins(0, 0, 0, 0);
frame->setLayout(l); specialFrame->setLayout(l);
tWidget = NULL; tWidget = NULL;
aWidget = NULL; aWidget = NULL;
installAWidget(); installAWidget();
@ -67,7 +67,7 @@ AboutWidget::AboutWidget(QWidget* parent)
void AboutWidget::installAWidget() { void AboutWidget::installAWidget() {
assert(tWidget == NULL); assert(tWidget == NULL);
aWidget = new AWidget(); aWidget = new AWidget();
QVBoxLayout* l = (QVBoxLayout*)frame->layout(); QVBoxLayout* l = (QVBoxLayout*)specialFrame->layout();
l->insertWidget(0, aWidget); l->insertWidget(0, aWidget);
l->setStretchFactor(aWidget, 100); l->setStretchFactor(aWidget, 100);
aWidget->setFocus(); aWidget->setFocus();
@ -96,10 +96,10 @@ void AboutWidget::installTWidget() {
vl->addWidget(levelLabel); vl->addWidget(levelLabel);
vl->addStretch(); vl->addStretch();
QHBoxLayout* l = (QHBoxLayout*)frame->layout(); QHBoxLayout* l = (QHBoxLayout*)specialFrame->layout();
l->insertWidget(0, pan); l->insertWidget(0, pan);
l->insertWidget(0, tWidget); l->insertWidget(0, tWidget);
QRect cRect = frame->contentsRect(); QRect cRect = specialFrame->contentsRect();
int height = tWidget->heightForWidth(cRect.width()); int height = tWidget->heightForWidth(cRect.width());
tWidget->setFixedSize(cRect.width() * cRect.height() / height, cRect.height()); tWidget->setFixedSize(cRect.width() * cRect.height() / height, cRect.height());
npLabel->setFixedSize(tWidget->squareWidth()*4, tWidget->squareHeight()*5); npLabel->setFixedSize(tWidget->squareWidth()*4, tWidget->squareHeight()*5);
@ -117,7 +117,7 @@ void AboutWidget::installTWidget() {
void AboutWidget::switchPages() { void AboutWidget::switchPages() {
QLayoutItem* li = NULL; QLayoutItem* li = NULL;
QLayout* l = frame->layout(); QLayout* l = specialFrame->layout();
while ((li = l->takeAt(0)) && li->widget()) { while ((li = l->takeAt(0)) && li->widget()) {
li->widget()->deleteLater(); li->widget()->deleteLater();
} }
@ -158,9 +158,9 @@ void AboutWidget::updateTitle()
void AboutWidget::mousePressEvent(QMouseEvent *e) void AboutWidget::mousePressEvent(QMouseEvent *e)
{ {
QPoint globalPos = mapToGlobal(e->pos()); QPoint globalPos = mapToGlobal(e->pos());
QPoint framePos = frame->mapFromGlobal(globalPos); QPoint framePos = specialFrame->mapFromGlobal(globalPos);
if (frame->contentsRect().contains(framePos)) { if (specialFrame->contentsRect().contains(framePos)) {
{ {
if(e->modifiers() & Qt::ControlModifier) if(e->modifiers() & Qt::ControlModifier)
switchPages(); switchPages();

View File

@ -57,7 +57,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QFrame" name="frame"> <widget class="QFrame" name="specialFrame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>

View File

@ -94,14 +94,14 @@ ChatLobbyWidget::ChatLobbyWidget(QWidget *parent, Qt::WindowFlags flags)
myInviteIdChooser = NULL; myInviteIdChooser = NULL;
QObject::connect( NotifyQt::getInstance(), SIGNAL(lobbyListChanged()), SLOT(lobbyChanged())); QObject::connect( NotifyQt::getInstance(), SIGNAL(lobbyListChanged()), SLOT(lobbyChanged()));
QObject::connect( NotifyQt::getInstance(), SIGNAL(chatLobbyEvent(qulonglong,int,const RsGxsId&,const QString&)), this, SLOT(displayChatLobbyEvent(qulonglong,int,const RsGxsId&,const QString&))); QObject::connect( NotifyQt::getInstance(), SIGNAL(chatLobbyEvent(qulonglong,int,RsGxsId,QString)), this, SLOT(displayChatLobbyEvent(qulonglong,int,RsGxsId,QString)));
QObject::connect( NotifyQt::getInstance(), SIGNAL(chatLobbyInviteReceived()), this, SLOT(readChatLobbyInvites())); QObject::connect( NotifyQt::getInstance(), SIGNAL(chatLobbyInviteReceived()), this, SLOT(readChatLobbyInvites()));
QObject::connect( ui.lobbyTreeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(lobbyTreeWidgetCustomPopupMenu(QPoint))); QObject::connect( ui.lobbyTreeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(lobbyTreeWidgetCustomPopupMenu(QPoint)));
QObject::connect( ui.lobbyTreeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(itemDoubleClicked(QTreeWidgetItem*,int))); QObject::connect( ui.lobbyTreeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(itemDoubleClicked(QTreeWidgetItem*,int)));
QObject::connect( ui.lobbyTreeWidget, SIGNAL(itemSelectionChanged()), this, SLOT(updateCurrentLobby())); QObject::connect( ui.lobbyTreeWidget, SIGNAL(itemSelectionChanged()), this, SLOT(updateCurrentLobby()));
QObject::connect( ui.filterLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterItems(QString))); QObject::connect( ui.filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterItems(QString)));
QObject::connect( ui.filterLineEdit, SIGNAL(filterChanged(int)), this, SLOT(filterColumnChanged(int))); QObject::connect( ui.filterLineEdit, SIGNAL(filterChanged(int)), this, SLOT(filterColumnChanged(int)));
QObject::connect( ui.createLobbyToolButton, SIGNAL(clicked()), this, SLOT(createChatLobby())); QObject::connect( ui.createLobbyToolButton, SIGNAL(clicked()), this, SLOT(createChatLobby()));
@ -194,25 +194,25 @@ ChatLobbyWidget::ChatLobbyWidget(QWidget *parent, Qt::WindowFlags flags)
// load settings // load settings
processSettings(true); processSettings(true);
int S = QFontMetricsF(font()).height(); int S = QFontMetricsF(font()).height();
QString help_str = tr("\ QString help_str = tr("\
<h1><img width=\"%1\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Chat Rooms</h1> \ <h1><img width=\"%1\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Chat Rooms</h1> \
<p>Chat rooms work pretty much like IRC. \ <p>Chat rooms work pretty much like IRC. \
They allow you to talk anonymously with tons of people without the need to make friends.</p> \ They allow you to talk anonymously with tons of people without the need to make friends.</p> \
<p>A chat room can be public (your friends see it) or private (your friends can't see it, unless you \ <p>A chat room can be public (your friends see it) or private (your friends can't see it, unless you \
invite them with <img src=\":/icons/png/add.png\" width=%2/>). \ invite them with <img src=\":/icons/png/add.png\" width=%2/>). \
Once you have been invited to a private room, you will be able to see it when your friends \ Once you have been invited to a private room, you will be able to see it when your friends \
are using it.</p> \ are using it.</p> \
<p>The list at left shows \ <p>The list at left shows \
chat lobbies your friends are participating in. You can either \ chat lobbies your friends are participating in. You can either \
<ul> \ <ul> \
<li>Right click to create a new chat room</li> \ <li>Right click to create a new chat room</li> \
<li>Double click a chat room to enter, chat, and show it to your friends</li> \ <li>Double click a chat room to enter, chat, and show it to your friends</li> \
</ul> \ </ul> \
Note: For the chat rooms to work properly, your computer needs be on time. So check your system clock!\ Note: For the chat rooms to work properly, your computer needs be on time. So check your system clock!\
</p> \ </p> \
" "
).arg(QString::number(2*S)).arg(QString::number(S)) ; ).arg(QString::number(2*S), QString::number(S)) ;
registerHelpButton(ui.helpButton,help_str,"ChatLobbyDialog") ; registerHelpButton(ui.helpButton,help_str,"ChatLobbyDialog") ;
@ -232,7 +232,7 @@ ChatLobbyWidget::~ChatLobbyWidget()
UserNotify *ChatLobbyWidget::createUserNotify(QObject *parent) UserNotify *ChatLobbyWidget::createUserNotify(QObject *parent)
{ {
myChatLobbyUserNotify = new ChatLobbyUserNotify(parent); myChatLobbyUserNotify = new ChatLobbyUserNotify(parent);
connect(myChatLobbyUserNotify, SIGNAL(countChanged(ChatLobbyId, unsigned int)), this, SLOT(updateNotify(ChatLobbyId, unsigned int))); connect(myChatLobbyUserNotify, SIGNAL(countChanged(ChatLobbyId, uint)), this, SLOT(updateNotify(ChatLobbyId, uint)));
return myChatLobbyUserNotify; return myChatLobbyUserNotify;
} }
@ -920,7 +920,7 @@ void ChatLobbyWidget::showBlankPage(ChatLobbyId id, bool subscribed /*= false*/)
} }
} }
ui.lobbyInfoLabel->setText(text); ui.info_Label_Lobby->setText(text);
return ; return ;
} }
@ -932,7 +932,7 @@ void ChatLobbyWidget::showBlankPage(ChatLobbyId id, bool subscribed /*= false*/)
ui.lobbysec_lineEdit->clear(); ui.lobbysec_lineEdit->clear();
QString text = tr("No chat room selected. \nSelect chat rooms at left to show details.\nDouble click a chat room to enter and chat.") ; QString text = tr("No chat room selected. \nSelect chat rooms at left to show details.\nDouble click a chat room to enter and chat.") ;
ui.lobbyInfoLabel->setText(text) ; ui.info_Label_Lobby->setText(text) ;
} }
void ChatLobbyWidget::subscribeItem() void ChatLobbyWidget::subscribeItem()
@ -1116,6 +1116,7 @@ void ChatLobbyWidget::updateCurrentLobby()
filterItems(ui.filterLineEdit->text()); filterItems(ui.filterLineEdit->text());
} }
} }
void ChatLobbyWidget::updateMessageChanged(bool incoming, ChatLobbyId id, QDateTime time, QString senderName, QString msg) void ChatLobbyWidget::updateMessageChanged(bool incoming, ChatLobbyId id, QDateTime time, QString senderName, QString msg)
{ {
QTreeWidgetItem *current_item = ui.lobbyTreeWidget->currentItem(); QTreeWidgetItem *current_item = ui.lobbyTreeWidget->currentItem();
@ -1174,9 +1175,11 @@ void ChatLobbyWidget::readChatLobbyInvites()
if(found) if(found)
continue ; continue ;
QMessageBox mb(QObject::tr("Join chat room"), QMessageBox mb(QObject::tr("Join chat room")
tr("%1 invites you to chat room named %2").arg(QString::fromUtf8(rsPeers->getPeerName((*it).peer_id).c_str())).arg(RsHtml::plainText(it->lobby_name)), , tr("%1 invites you to chat room named %2")
QMessageBox::Question, QMessageBox::Yes,QMessageBox::No, 0); .arg(QString::fromUtf8(rsPeers->getPeerName((*it).peer_id).c_str())
, RsHtml::plainText(it->lobby_name))
, QMessageBox::Question, QMessageBox::Yes,QMessageBox::No, 0);
QLabel *label; QLabel *label;

View File

@ -70,7 +70,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="StyledLabel" name="titleBarLabel"> <widget class="QLabel" name="titleBarLabel">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>Chat rooms</string> <string>Chat rooms</string>
</property> </property>
@ -183,7 +190,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QTreeWidget" name="lobbyTreeWidget"> <widget class="RSTreeWidget" name="lobbyTreeWidget">
<property name="iconSize"> <property name="iconSize">
<size> <size>
<width>16</width> <width>16</width>
@ -228,6 +235,13 @@
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QGroupBox" name="lobbyinfo_groupBox"> <widget class="QGroupBox" name="lobbyinfo_groupBox">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true"/>
</property> </property>
@ -244,6 +258,7 @@
<widget class="QLabel" name="lobbyname_label"> <widget class="QLabel" name="lobbyname_label">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
@ -261,6 +276,13 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="font">
<font>
<pointsize>16</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>TextLabel</string> <string>TextLabel</string>
</property> </property>
@ -270,6 +292,7 @@
<widget class="QLabel" name="lobbyid_label"> <widget class="QLabel" name="lobbyid_label">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
@ -296,6 +319,7 @@
<widget class="QLabel" name="lobbytopic_label"> <widget class="QLabel" name="lobbytopic_label">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
@ -325,6 +349,7 @@
<widget class="QLabel" name="lobbytype_label"> <widget class="QLabel" name="lobbytype_label">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
@ -351,6 +376,7 @@
<widget class="QLabel" name="lobbysec_label"> <widget class="QLabel" name="lobbysec_label">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
@ -371,6 +397,7 @@
<widget class="QLabel" name="lobbypeers_label"> <widget class="QLabel" name="lobbypeers_label">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
@ -396,7 +423,7 @@
</layout> </layout>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="lobbyInfoLabel"> <widget class="QLabel" name="info_Label_Lobby">
<property name="text"> <property name="text">
<string notr="true">TextLabel</string> <string notr="true">TextLabel</string>
</property> </property>
@ -432,12 +459,12 @@
<customwidget> <customwidget>
<class>LineEditClear</class> <class>LineEditClear</class>
<extends>QLineEdit</extends> <extends>QLineEdit</extends>
<header location="global">gui/common/LineEditClear.h</header> <header>gui/common/LineEditClear.h</header>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>StyledLabel</class> <class>RSTreeWidget</class>
<extends>QLabel</extends> <extends>QTreeWidget</extends>
<header>gui/common/StyledLabel.h</header> <header>gui/common/RSTreeWidget.h</header>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources> <resources>

View File

@ -49,7 +49,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="StyledLabel" name="titleBarLabel"> <widget class="QLabel" name="titleBarLabel">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>Circles</string> <string>Circles</string>
</property> </property>
@ -247,13 +254,6 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
</customwidgets>
<resources> <resources>
<include location="../images.qrc"/> <include location="../images.qrc"/>
<include location="../icons.qrc"/> <include location="../icons.qrc"/>

View File

@ -98,7 +98,7 @@ CreateCircleDialog::CreateCircleDialog()
connect(ui.addButton, SIGNAL(clicked()), this, SLOT(addMember())); connect(ui.addButton, SIGNAL(clicked()), this, SLOT(addMember()));
connect(ui.removeButton, SIGNAL(clicked()), this, SLOT(removeMember())); connect(ui.removeButton, SIGNAL(clicked()), this, SLOT(removeMember()));
connect(ui.createButton, SIGNAL(clicked()), this, SLOT(createCircle())); connect(ui.postButton, SIGNAL(clicked()), this, SLOT(createCircle()));
connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(close())); connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(close()));
connect(ui.treeWidget_membership, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(selectedMember(QTreeWidgetItem*, QTreeWidgetItem*))); connect(ui.treeWidget_membership, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(selectedMember(QTreeWidgetItem*, QTreeWidgetItem*)));
@ -187,14 +187,14 @@ void CreateCircleDialog::editExistingId(const RsGxsGroupId &circleId, const bool
ui.idChooser->setVisible(true) ; ui.idChooser->setVisible(true) ;
} }
ui.createButton->setText(tr("Update")); ui.postButton->setText(tr("Update"));
ui.addButton->setEnabled(!readonly) ; ui.addButton->setEnabled(!readonly) ;
ui.removeButton->setEnabled(!readonly) ; ui.removeButton->setEnabled(!readonly) ;
if(readonly) if(readonly)
{ {
ui.createButton->hide() ; ui.postButton->hide() ;
ui.cancelButton->setText(tr("Close")); ui.cancelButton->setText(tr("Close"));
ui.peersSelection_GB->hide() ; ui.peersSelection_GB->hide() ;
ui.addButton->hide() ; ui.addButton->hide() ;
@ -216,7 +216,7 @@ void CreateCircleDialog::editNewId(bool isExternal)
{ {
setupForExternalCircle(); setupForExternalCircle();
ui.headerFrame->setHeaderText(tr("Create New Circle")); ui.headerFrame->setHeaderText(tr("Create New Circle"));
ui.createButton->setText(tr("Create")); ui.postButton->setText(tr("Create"));
} }
else else
{ {

View File

@ -13,7 +13,7 @@
<property name="windowTitle"> <property name="windowTitle">
<string/> <string/>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="CreateCircleDialog_GL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -40,226 +40,225 @@
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QFrame" name="frame"> <widget class="QFrame" name="gradFrame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gradFrame_GL">
<item row="0" column="0" colspan="3"> <item row="0" column="0" colspan="3">
<widget class="QGroupBox" name="groupBox_title"> <widget class="QGroupBox" name="groupBox_title">
<property name="title"> <property name="title">
<string>Circle Details</string> <string>Circle Details</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_5"> <layout class="QGridLayout" name="groupBox_title_GL">
<property name="leftMargin">
<number>11</number>
</property>
<item row="0" column="0"> <item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_3"> <widget class="QLabel" name="circleNameLabel">
<item row="0" column="0"> <property name="font">
<widget class="QLabel" name="label_2"> <font>
<property name="font"> <weight>75</weight>
<font> <bold>true</bold>
<weight>75</weight> </font>
<bold>true</bold> </property>
</font> <property name="layoutDirection">
</property> <enum>Qt::LeftToRight</enum>
<property name="layoutDirection"> </property>
<enum>Qt::LeftToRight</enum> <property name="text">
</property> <string>Name:</string>
<property name="text"> </property>
<string>Name:</string> <property name="alignment">
</property> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<property name="alignment"> </property>
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </widget>
</property> </item>
</widget> <item row="0" column="1" colspan="3">
</item> <widget class="QLineEdit" name="circleName">
<item row="0" column="1" colspan="3"> <property name="toolTip">
<widget class="QLineEdit" name="circleName"> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The circle name, contact author and invited member list will be visible to all invited members. If the circle is not private, it will also be visible to neighbor nodes of the nodes who host the invited members.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<property name="toolTip"> </property>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The circle name, contact author and invited member list will be visible to all invited members. If the circle is not private, it will also be visible to neighbor nodes of the nodes who host the invited members.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> </widget>
</property> </item>
</widget> <item row="1" column="0">
</item> <widget class="QLabel" name="idChooserLabel">
<item row="1" column="0"> <property name="font">
<widget class="QLabel" name="idChooserLabel"> <font>
<property name="font"> <weight>75</weight>
<font> <bold>true</bold>
<weight>75</weight> </font>
<bold>true</bold> </property>
</font> <property name="text">
</property> <string>Contact author:</string>
<property name="text"> </property>
<string>Contact author:</string> </widget>
</property> </item>
</widget> <item row="1" column="1">
</item> <widget class="GxsIdChooser" name="idChooser">
<item row="1" column="1"> <property name="sizePolicy">
<widget class="GxsIdChooser" name="idChooser"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<property name="sizePolicy"> <horstretch>0</horstretch>
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <verstretch>0</verstretch>
<horstretch>0</horstretch> </sizepolicy>
<verstretch>0</verstretch> </property>
</sizepolicy> <property name="toolTip">
</property> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The creator of a circle is purely optional. It is however useful for public circles so that people know with whom to discuss membership aspects.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<property name="toolTip"> </property>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The creator of a circle is purely optional. It is however useful for public circles so that people know with whom to discuss membership aspects.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> </widget>
</property> </item>
</widget> <item row="1" column="2">
</item> <widget class="GxsIdLabel" name="circleAdminLabel">
<item row="1" column="2"> <property name="text">
<widget class="GxsIdLabel" name="circleAdminLabel"> <string>[Circle Admin]</string>
<property name="text"> </property>
<string>[Circle Admin]</string> </widget>
</property> </item>
</widget> <item row="1" column="3">
</item> <spacer name="idChooserHSpacer">
<item row="1" column="3"> <property name="orientation">
<spacer name="horizontalSpacer_2"> <enum>Qt::Horizontal</enum>
<property name="orientation"> </property>
<enum>Qt::Horizontal</enum> <property name="sizeType">
</property> <enum>QSizePolicy::Expanding</enum>
<property name="sizeType"> </property>
<enum>QSizePolicy::Expanding</enum> <property name="sizeHint" stdset="0">
</property> <size>
<property name="sizeHint" stdset="0"> <width>40</width>
<size> <height>20</height>
<width>40</width> </size>
<height>20</height> </property>
</size> </spacer>
</property> </item>
</spacer> <item row="2" column="0">
</item> <widget class="QLabel" name="distributionLabel">
<item row="2" column="0"> <property name="font">
<widget class="QLabel" name="label_3"> <font>
<property name="font"> <weight>75</weight>
<font> <bold>true</bold>
<weight>75</weight> </font>
<bold>true</bold> </property>
</font> <property name="text">
</property> <string>Distribution:</string>
<property name="text"> </property>
<string>Distribution:</string> <property name="alignment">
</property> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<property name="alignment"> </property>
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </widget>
</property> </item>
</widget> <item row="2" column="1" colspan="3">
</item> <widget class="QFrame" name="frame_Distribution">
<item row="2" column="1" colspan="3"> <property name="frameShape">
<widget class="QFrame" name="frame_Distribution"> <enum>QFrame::StyledPanel</enum>
<property name="frameShape"> </property>
<enum>QFrame::StyledPanel</enum> <property name="frameShadow">
</property> <enum>QFrame::Raised</enum>
<property name="frameShadow"> </property>
<enum>QFrame::Raised</enum> <layout class="QGridLayout" name="frame_Distribution_GL">
</property> <property name="leftMargin">
<layout class="QGridLayout" name="gridLayout_4"> <number>2</number>
<property name="leftMargin"> </property>
<number>2</number> <property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item row="0" column="0">
<widget class="QRadioButton" name="radioButton_Public">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Publicly distributed circles are visible to your friends, which will get to know the circle data (Creator, members, etc)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="topMargin"> <property name="text">
<number>2</number> <string>Public</string>
</property> </property>
<property name="rightMargin"> <property name="icon">
<number>2</number> <iconset resource="../icons.qrc">
<normaloff>:/icons/png/network-puplic.png</normaloff>:/icons/png/network-puplic.png</iconset>
</property> </property>
<property name="bottomMargin"> <property name="iconSize">
<number>2</number> <size>
<width>24</width>
<height>24</height>
</size>
</property> </property>
<item row="0" column="0"> </widget>
<widget class="QRadioButton" name="radioButton_Public"> </item>
<property name="toolTip"> <item row="0" column="1">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Publicly distributed circles are visible to your friends, which will get to know the circle data (Creator, members, etc)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <widget class="QRadioButton" name="radioButton_Self">
</property> <property name="toolTip">
<property name="text"> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Private (a.k.a. self-restricted) circles are only visible to the invited members of these circles. In practice the circle uses its own list of invited members to limit its own distribution. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>Public</string> </property>
</property> <property name="text">
<property name="icon"> <string>Private</string>
<iconset resource="../icons.qrc"> </property>
<normaloff>:/icons/png/network-puplic.png</normaloff>:/icons/png/network-puplic.png</iconset> <property name="icon">
</property> <iconset resource="../icons.qrc">
<property name="iconSize"> <normaloff>:/icons/png/person.png</normaloff>:/icons/png/person.png</iconset>
<size> </property>
<width>24</width> <property name="iconSize">
<height>24</height> <size>
</size> <width>24</width>
</property> <height>24</height>
</widget> </size>
</item> </property>
<item row="0" column="1"> </widget>
<widget class="QRadioButton" name="radioButton_Self"> </item>
<property name="toolTip"> <item row="0" column="2">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Private (a.k.a. self-restricted) circles are only visible to the invited members of these circles. In practice the circle uses its own list of invited members to limit its own distribution. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <widget class="QRadioButton" name="radioButton_Restricted">
</property> <property name="toolTip">
<property name="text"> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Circles can be restricted to the members of another circle. Only the members of that second circle will be allowed to see the new circle and its content (list of members, etc).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>Private</string> </property>
</property> <property name="text">
<property name="icon"> <string>Only &amp;visible to members of:</string>
<iconset resource="../icons.qrc"> </property>
<normaloff>:/icons/png/person.png</normaloff>:/icons/png/person.png</iconset> <property name="icon">
</property> <iconset resource="../icons.qrc">
<property name="iconSize"> <normaloff>:/icons/png/circles.png</normaloff>:/icons/png/circles.png</iconset>
<size> </property>
<width>24</width> <property name="iconSize">
<height>24</height> <size>
</size> <width>24</width>
</property> <height>24</height>
</widget> </size>
</item> </property>
<item row="0" column="2"> </widget>
<widget class="QRadioButton" name="radioButton_Restricted"> </item>
<property name="toolTip"> <item row="0" column="3">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Circles can be restricted to the members of another circle. Only the members of that second circle will be allowed to see the new circle and its content (list of members, etc).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <widget class="GxsCircleChooser" name="circleComboBox"/>
</property> </item>
<property name="text"> <item row="0" column="4">
<string>Only &amp;visible to members of:</string> <spacer name="frame_Distribution_HSpacer">
</property> <property name="orientation">
<property name="icon"> <enum>Qt::Horizontal</enum>
<iconset resource="../icons.qrc"> </property>
<normaloff>:/icons/png/circles.png</normaloff>:/icons/png/circles.png</iconset> <property name="sizeHint" stdset="0">
</property> <size>
<property name="iconSize"> <width>147</width>
<size> <height>20</height>
<width>24</width> </size>
<height>24</height> </property>
</size> </spacer>
</property> </item>
</widget> </layout>
</item> </widget>
<item row="0" column="3">
<widget class="GxsCircleChooser" name="circleComboBox"/>
</item>
<item row="0" column="4">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>147</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="1" column="0" colspan="3"> <item row="1" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="id_HL">
<item> <item>
<widget class="QGroupBox" name="members_groupBox"> <widget class="QGroupBox" name="members_groupBox">
<property name="title"> <property name="title">
<string>Invited Members</string> <string>Invited Members</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="members_groupBox_VL">
<item> <item>
<widget class="QTreeWidget" name="treeWidget_membership"> <widget class="QTreeWidget" name="treeWidget_membership">
<property name="contextMenuPolicy"> <property name="contextMenuPolicy">
@ -287,9 +286,9 @@
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="add_rem_VL">
<item> <item>
<spacer name="verticalSpacer"> <spacer name="add_rem_Top_VSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
@ -330,7 +329,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer_2"> <spacer name="add_rem_Bot_VSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
@ -378,7 +377,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="frame_PgpTypes_HL">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
@ -419,9 +418,9 @@
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="IdFilter_HL">
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="IdFilter_Label">
<property name="text"> <property name="text">
<string>Filter</string> <string>Filter</string>
</property> </property>
@ -438,7 +437,7 @@
</layout> </layout>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<spacer name="horizontalSpacer_3"> <spacer name="bottumHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -451,7 +450,14 @@
</spacer> </spacer>
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QPushButton" name="createButton"> <widget class="QPushButton" name="postButton">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>Create</string> <string>Create</string>
</property> </property>
@ -503,7 +509,6 @@
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="../images.qrc"/>
<include location="../icons.qrc"/> <include location="../icons.qrc"/>
</resources> </resources>
<connections/> <connections/>

View File

@ -121,10 +121,10 @@ SearchDialog::SearchDialog(QWidget *parent)
connect( ui.searchSummaryWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( searchSummaryWidgetCustomPopupMenu( QPoint ) ) ); connect( ui.searchSummaryWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( searchSummaryWidgetCustomPopupMenu( QPoint ) ) );
connect( ui.showBannedFiles_TB, SIGNAL( clicked() ), this, SLOT( openBannedFiles() ) ); connect( ui.showBannedFiles_TB, SIGNAL( clicked() ), this, SLOT( openBannedFiles() ) );
connect( ui.lineEdit, SIGNAL( returnPressed ( void ) ), this, SLOT( searchKeywords( void ) ) ); connect( ui.lineEdit, SIGNAL( returnPressed () ), this, SLOT( searchKeywords() ) );
connect( ui.lineEdit, SIGNAL( textChanged ( const QString& ) ), this, SLOT( checkText( const QString& ) ) ); connect( ui.lineEdit, SIGNAL( textChanged ( const QString& ) ), this, SLOT( checkText( const QString& ) ) );
connect( ui.pushButtonSearch, SIGNAL( released ( void ) ), this, SLOT( searchKeywords( void ) ) ); connect( ui.searchButton, SIGNAL( released () ), this, SLOT( searchKeywords() ) );
connect( ui.pushButtonDownload, SIGNAL( released ( void ) ), this, SLOT( download( void ) ) ); connect( ui.pushButtonDownload, SIGNAL( released () ), this, SLOT( download() ) );
connect( ui.cloaseallsearchresultsButton, SIGNAL(clicked()), this, SLOT(searchRemoveAll())); connect( ui.cloaseallsearchresultsButton, SIGNAL(clicked()), this, SLOT(searchRemoveAll()));
connect( ui.searchResultWidget, SIGNAL( itemDoubleClicked ( QTreeWidgetItem *, int)), this, SLOT(download())); connect( ui.searchResultWidget, SIGNAL( itemDoubleClicked ( QTreeWidgetItem *, int)), this, SLOT(download()));
@ -186,11 +186,6 @@ SearchDialog::SearchDialog(QWidget *parent)
_smheader->resizeSection ( SR_AGE_COL, 90*f ); _smheader->resizeSection ( SR_AGE_COL, 90*f );
_smheader->resizeSection ( SR_HASH_COL, 240*f ); _smheader->resizeSection ( SR_HASH_COL, 240*f );
// set header text aligment
QTreeWidgetItem * headerItem = ui.searchResultWidget->headerItem();
headerItem->setTextAlignment(SR_NAME_COL, Qt::AlignRight | Qt::AlignRight);
headerItem->setTextAlignment(SR_SIZE_COL, Qt::AlignRight | Qt::AlignRight);
ui.searchResultWidget->sortItems(SR_NAME_COL, Qt::AscendingOrder); ui.searchResultWidget->sortItems(SR_NAME_COL, Qt::AscendingOrder);
/* Set initial size the splitter */ /* Set initial size the splitter */
@ -276,30 +271,9 @@ void SearchDialog::processSettings(bool bLoad)
void SearchDialog::checkText(const QString& txt) void SearchDialog::checkText(const QString& txt)
{ {
bool valid; ui.searchButton->setDisabled(txt.length() < 3);
QColor color; ui.searchLineFrame->setProperty("valid", (txt.length() >= 3));
if(txt.length() < 3)
{
std::cout << "setting palette 1" << std::endl ;
valid = false;
color = QApplication::palette().color(QPalette::Disabled, QPalette::Base);
}
else
{
std::cout << "setting palette 2" << std::endl ;
valid = true;
color = QApplication::palette().color(QPalette::Active, QPalette::Base);
}
/* unpolish widget to clear the stylesheet's palette cache */
ui.searchLineFrame->style()->unpolish(ui.searchLineFrame); ui.searchLineFrame->style()->unpolish(ui.searchLineFrame);
QPalette palette = ui.lineEdit->palette();
palette.setColor(ui.lineEdit->backgroundRole(), color);
ui.lineEdit->setPalette(palette);
ui.searchLineFrame->setProperty("valid", valid);
Rshare::refreshStyleSheet(ui.searchLineFrame, false); Rshare::refreshStyleSheet(ui.searchLineFrame, false);
} }
@ -393,11 +367,10 @@ void SearchDialog::download()
/* should also be able to handle multi-selection */ /* should also be able to handle multi-selection */
QList<QTreeWidgetItem*> itemsForDownload = ui.searchResultWidget->selectedItems() ; QList<QTreeWidgetItem*> itemsForDownload = ui.searchResultWidget->selectedItems() ;
int numdls = itemsForDownload.size() ; int numdls = itemsForDownload.size() ;
QTreeWidgetItem * item ;
bool attemptDownloadLocal = false ; bool attemptDownloadLocal = false ;
for (int i = 0; i < numdls; ++i) { for (int i = 0; i < numdls; ++i) {
item = itemsForDownload.at(i) ; QTreeWidgetItem *item = itemsForDownload.at(i) ;
// call the download // call the download
// * // *
if (item->text(SR_HASH_COL).isEmpty()) { // we have a folder if (item->text(SR_HASH_COL).isEmpty()) { // we have a folder
@ -421,8 +394,8 @@ void SearchDialog::download()
std::cout << *it << "-" << std::endl; std::cout << *it << "-" << std::endl;
QColor foreground = textColorDownloading(); QColor foreground = textColorDownloading();
for (int i = 0; i < item->columnCount(); ++i) for (int j = 0; j < item->columnCount(); ++j)
item->setData(i, Qt::ForegroundRole, foreground ); item->setData(j, Qt::ForegroundRole, foreground );
} }
} }
} }
@ -1209,17 +1182,16 @@ void SearchDialog::insertFile(qulonglong searchId, const FileDetail& file, int s
// //
bool found = false ; bool found = false ;
bool altname = false ; bool altname = false ;
int sources;
int friendSource = 0;
int anonymousSource = 0;
QString modifiedResult; QString modifiedResult;
QList<QTreeWidgetItem*> itms = ui.searchResultWidget->findItems(QString::fromStdString(file.hash.toStdString()),Qt::MatchExactly,SR_HASH_COL) ; QList<QTreeWidgetItem*> itms = ui.searchResultWidget->findItems(QString::fromStdString(file.hash.toStdString()),Qt::MatchExactly,SR_HASH_COL) ;
for(QList<QTreeWidgetItem*>::const_iterator it(itms.begin());it!=itms.end();++it) for(auto &it : itms)
if((*it)->text(SR_SEARCH_ID_COL) == sid_hexa) if(it->text(SR_SEARCH_ID_COL) == sid_hexa)
{ {
QString resultCount = (*it)->text(SR_SOURCES_COL); int friendSource = 0;
int anonymousSource = 0;
QString resultCount = it->text(SR_SOURCES_COL);
QStringList modifiedResultCount = resultCount.split("/", QString::SkipEmptyParts); QStringList modifiedResultCount = resultCount.split("/", QString::SkipEmptyParts);
if(searchType == FRIEND_SEARCH) if(searchType == FRIEND_SEARCH)
{ {
@ -1233,13 +1205,13 @@ void SearchDialog::insertFile(qulonglong searchId, const FileDetail& file, int s
} }
modifiedResult = QString::number(friendSource) + "/" + QString::number(anonymousSource); modifiedResult = QString::number(friendSource) + "/" + QString::number(anonymousSource);
float fltRes = friendSource + (float)anonymousSource/1000; float fltRes = friendSource + (float)anonymousSource/1000;
(*it)->setText(SR_SOURCES_COL,modifiedResult); it->setText(SR_SOURCES_COL,modifiedResult);
(*it)->setData(SR_SOURCES_COL, ROLE_SORT, fltRes); it->setData(SR_SOURCES_COL, ROLE_SORT, fltRes);
QTreeWidgetItem *item = (*it); QTreeWidgetItem *item = it;
found = true ; found = true ;
if(QString::compare((*it)->text(SR_NAME_COL), QString::fromUtf8(file.name.c_str()), Qt::CaseSensitive)!=0) if(QString::compare(it->text(SR_NAME_COL), QString::fromUtf8(file.name.c_str()), Qt::CaseSensitive)!=0)
altname = true; altname = true;
if (!item->data(SR_DATA_COL, SR_ROLE_LOCAL).toBool()) { if (!item->data(SR_DATA_COL, SR_ROLE_LOCAL).toBool()) {
@ -1280,19 +1252,18 @@ void SearchDialog::insertFile(qulonglong searchId, const FileDetail& file, int s
} }
} }
if(altname) if(altname)
{ {
QTreeWidgetItem *item = new RSTreeWidgetItem(compareResultRole); QTreeWidgetItem *altItem = new RSTreeWidgetItem(compareResultRole);
item->setText(SR_NAME_COL, QString::fromUtf8(file.name.c_str())); altItem->setText(SR_NAME_COL, QString::fromUtf8(file.name.c_str()));
item->setText(SR_HASH_COL, QString::fromStdString(file.hash.toStdString())); altItem->setText(SR_HASH_COL, QString::fromStdString(file.hash.toStdString()));
setIconAndType(item, QString::fromUtf8(file.name.c_str())); setIconAndType(altItem, QString::fromUtf8(file.name.c_str()));
item->setText(SR_SIZE_COL, QString::number(file.size)); altItem->setText(SR_SIZE_COL, QString::number(file.size));
setIconAndType(item, QString::fromUtf8(file.name.c_str())); setIconAndType(altItem, QString::fromUtf8(file.name.c_str()));
(*it)->addChild(item); it->addChild(altItem);
}
} }
}
if(!found) if(!found)
{ {
++nb_results[searchId] ; ++nb_results[searchId] ;
@ -1301,7 +1272,7 @@ void SearchDialog::insertFile(qulonglong searchId, const FileDetail& file, int s
QTreeWidgetItem *item = new RSTreeWidgetItem(compareResultRole); QTreeWidgetItem *item = new RSTreeWidgetItem(compareResultRole);
item->setText(SR_NAME_COL, QString::fromUtf8(file.name.c_str())); item->setText(SR_NAME_COL, QString::fromUtf8(file.name.c_str()));
item->setText(SR_HASH_COL, QString::fromStdString(file.hash.toStdString())); item->setText(SR_HASH_COL, QString::fromStdString(file.hash.toStdString()));
setIconAndType(item, QString::fromUtf8(file.name.c_str())); setIconAndType(item, QString::fromUtf8(file.name.c_str()));
@ -1314,6 +1285,8 @@ void SearchDialog::insertFile(qulonglong searchId, const FileDetail& file, int s
item->setText(SR_AGE_COL, QString::number(file.age)); item->setText(SR_AGE_COL, QString::number(file.age));
item->setData(SR_AGE_COL, ROLE_SORT, file.age); item->setData(SR_AGE_COL, ROLE_SORT, file.age);
item->setTextAlignment( SR_SIZE_COL, Qt::AlignRight ); item->setTextAlignment( SR_SIZE_COL, Qt::AlignRight );
int friendSource = 0;
int anonymousSource = 0;
if(searchType == FRIEND_SEARCH) if(searchType == FRIEND_SEARCH)
{ {
friendSource = 1; friendSource = 1;
@ -1344,7 +1317,7 @@ void SearchDialog::insertFile(qulonglong searchId, const FileDetail& file, int s
} else { } else {
item->setData(SR_DATA_COL, SR_ROLE_LOCAL, false); item->setData(SR_DATA_COL, SR_ROLE_LOCAL, false);
sources = item->text(SR_SOURCES_COL).toInt(); int sources = item->text(SR_SOURCES_COL).toInt();
if (sources == 1) if (sources == 1)
{ {
foreground = ui.searchResultWidget->palette().color(QPalette::Text); foreground = ui.searchResultWidget->palette().color(QPalette::Text);
@ -1369,11 +1342,8 @@ void SearchDialog::insertFile(qulonglong searchId, const FileDetail& file, int s
/* hide/show this search result */ /* hide/show this search result */
hideOrShowSearchResult(item); hideOrShowSearchResult(item);
}
/* update the summary as well */ // only increment result when it's a new item.
if(!found) // only increment result when it's a new item.
{
int s = ui.searchSummaryWidget->topLevelItem(summaryItemIndex)->text(SS_RESULTS_COL).toInt() ; int s = ui.searchSummaryWidget->topLevelItem(summaryItemIndex)->text(SS_RESULTS_COL).toInt() ;
ui.searchSummaryWidget->topLevelItem(summaryItemIndex)->setText(SS_RESULTS_COL, QString::number(s+1)); ui.searchSummaryWidget->topLevelItem(summaryItemIndex)->setText(SS_RESULTS_COL, QString::number(s+1));
ui.searchSummaryWidget->topLevelItem(summaryItemIndex)->setData(SS_RESULTS_COL, ROLE_SORT, s+1); ui.searchSummaryWidget->topLevelItem(summaryItemIndex)->setData(SS_RESULTS_COL, ROLE_SORT, s+1);

View File

@ -159,7 +159,7 @@ private:
QAbstractItemDelegate *mAgeColumnDelegate; QAbstractItemDelegate *mAgeColumnDelegate;
QAbstractItemDelegate *mSizeColumnDelegate; QAbstractItemDelegate *mSizeColumnDelegate;
/* Color definitions (for standard see qss.default) */ /* Color definitions (for standard see default.qss) */
QColor mTextColorLocal; QColor mTextColorLocal;
QColor mTextColorDownloading; QColor mTextColorDownloading;
QColor mTextColorNoSources; QColor mTextColorNoSources;

View File

@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>793</width> <width>783</width>
<height>511</height> <height>511</height>
</rect> </rect>
</property> </property>
@ -16,7 +16,7 @@
<verstretch>1</verstretch> <verstretch>1</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="SearchDialog_VL">
<item> <item>
<widget class="QFrame" name="titleBarFrame"> <widget class="QFrame" name="titleBarFrame">
<property name="sizePolicy"> <property name="sizePolicy">
@ -31,7 +31,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Plain</enum> <enum>QFrame::Plain</enum>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="titleBarFrame_HL">
<property name="leftMargin"> <property name="leftMargin">
<number>3</number> <number>3</number>
</property> </property>
@ -45,42 +45,30 @@
<number>3</number> <number>3</number>
</property> </property>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="searchButton_HL">
<property name="spacing"> <property name="spacing">
<number>2</number> <number>2</number>
</property> </property>
<item> <item>
<widget class="QFrame" name="searchLineFrame"> <widget class="QFrame" name="searchLineFrame">
<property name="minimumSize"> <layout class="QGridLayout" name="searchLineFrame_GL">
<size>
<width>0</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>22</height>
</size>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>2</number>
</property> </property>
<property name="topMargin"> <property name="topMargin">
<number>0</number> <number>2</number>
</property> </property>
<property name="rightMargin"> <property name="rightMargin">
<number>0</number> <number>2</number>
</property> </property>
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>2</number>
</property> </property>
<property name="horizontalSpacing"> <property name="horizontalSpacing">
<number>0</number> <number>0</number>
</property> </property>
<property name="verticalSpacing"> <property name="verticalSpacing">
<number>1</number> <number>0</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="LineEditClear" name="lineEdit"> <widget class="LineEditClear" name="lineEdit">
@ -93,7 +81,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="pushButtonSearch"> <widget class="QPushButton" name="searchButton">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="focusPolicy"> <property name="focusPolicy">
<enum>Qt::NoFocus</enum> <enum>Qt::NoFocus</enum>
</property> </property>
@ -342,7 +337,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="FileTypeComboBox"> <widget class="RSComboBox" name="FileTypeComboBox">
<item> <item>
<property name="text"> <property name="text">
<string>Any</string> <string>Any</string>
@ -466,6 +461,11 @@
<extends>QLineEdit</extends> <extends>QLineEdit</extends>
<header location="global">gui/common/LineEditClear.h</header> <header location="global">gui/common/LineEditClear.h</header>
</customwidget> </customwidget>
<customwidget>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
<customwidget> <customwidget>
<class>SearchTreeWidget</class> <class>SearchTreeWidget</class>
<extends>QTreeWidget</extends> <extends>QTreeWidget</extends>
@ -473,8 +473,8 @@
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="../icons.qrc"/>
<include location="../images.qrc"/> <include location="../images.qrc"/>
<include location="../icons.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -213,15 +213,20 @@ SharedFilesDialog::SharedFilesDialog(bool remote_mode, QWidget *parent)
/* Set header resize modes and initial section sizes */ /* Set header resize modes and initial section sizes */
QHeaderView * header = ui.dirTreeView->header () ; QHeaderView * header = ui.dirTreeView->header () ;
#if QT_VERSION < QT_VERSION_CHECK(5,11,0)
int charWidth = ui.dirTreeView->fontMetrics().width("_");
#else
int charWidth = ui.dirTreeView->fontMetrics().horizontalAdvance("_");
#endif
header->resizeSection ( COLUMN_NAME, 490 ); header->resizeSection ( COLUMN_NAME , charWidth*100 );
header->resizeSection ( COLUMN_FILENB, 70 ); header->resizeSection ( COLUMN_FILENB , charWidth*15 );
header->resizeSection ( COLUMN_SIZE, 70 ); header->resizeSection ( COLUMN_SIZE , charWidth*10 );
header->resizeSection ( COLUMN_AGE, 100 ); header->resizeSection ( COLUMN_AGE , charWidth*6 );
header->resizeSection ( COLUMN_FRIEND_ACCESS,100); header->resizeSection ( COLUMN_FRIEND_ACCESS, charWidth*10 );
header->resizeSection ( COLUMN_WN_VISU_DIR, 100 ); header->resizeSection ( COLUMN_WN_VISU_DIR , charWidth*20 );
header->setStretchLastSection(false); header->setStretchLastSection(true);
/* Set Multi Selection */ /* Set Multi Selection */
ui.dirTreeView->setSelectionMode(QAbstractItemView::ExtendedSelection); ui.dirTreeView->setSelectionMode(QAbstractItemView::ExtendedSelection);

View File

@ -61,7 +61,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="StyledLabel" name="titleBarLabel"> <widget class="QLabel" name="titleBarLabel">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>Files</string> <string>Files</string>
</property> </property>
@ -216,7 +223,7 @@ border-image: url(:/images/closepressed.png)
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QComboBox" name="viewType_CB"> <widget class="RSComboBox" name="viewType_CB">
<item> <item>
<property name="text"> <property name="text">
<string>Tree view</string> <string>Tree view</string>
@ -230,7 +237,7 @@ border-image: url(:/images/closepressed.png)
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="indicatorCBox"> <widget class="RSComboBox" name="indicatorCBox">
<item> <item>
<property name="text"> <property name="text">
<string>All</string> <string>All</string>
@ -304,7 +311,7 @@ border-image: url(:/images/closepressed.png)
<string>Download</string> <string>Download</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../images.qrc"> <iconset>
<normaloff>:/images/download16.png</normaloff>:/images/download16.png</iconset> <normaloff>:/images/download16.png</normaloff>:/images/download16.png</iconset>
</property> </property>
</widget> </widget>
@ -369,9 +376,6 @@ border-image: url(:/images/closepressed.png)
<property name="animated"> <property name="animated">
<bool>false</bool> <bool>false</bool>
</property> </property>
<attribute name="headerStretchLastSection">
<bool>false</bool>
</attribute>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -382,9 +386,9 @@ border-image: url(:/images/closepressed.png)
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>
<class>StyledLabel</class> <class>RSComboBox</class>
<extends>QLabel</extends> <extends>QComboBox</extends>
<header>gui/common/StyledLabel.h</header> <header>gui/common/RSComboBox.h</header>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources> <resources>

View File

@ -70,7 +70,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="StyledLabel" name="titleBarLabel"> <widget class="QLabel" name="titleBarLabel">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>File Transfers</string> <string>File Transfers</string>
</property> </property>
@ -300,11 +307,6 @@
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
<customwidget> <customwidget>
<class>LineEditClear</class> <class>LineEditClear</class>
<extends>QLineEdit</extends> <extends>QLineEdit</extends>

View File

@ -10,7 +10,7 @@
<height>491</height> <height>491</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="FriendsDialog_GL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -37,7 +37,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Sunken</enum> <enum>QFrame::Sunken</enum>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="titleBarFrame_HL">
<property name="leftMargin"> <property name="leftMargin">
<number>2</number> <number>2</number>
</property> </property>
@ -70,14 +70,21 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="StyledLabel" name="titleBarLabel"> <widget class="QLabel" name="titleBarLabel">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>Network</string> <string>Network</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer> <spacer name="titleBar_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -115,12 +122,12 @@
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<widget class="QWidget" name="layoutWidget"> <widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="left_VL">
<property name="spacing"> <property name="spacing">
<number>1</number> <number>1</number>
</property> </property>
<item> <item>
<widget class="QFrame" name="headFrame"> <widget class="QFrame" name="headerBFrame">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true"/>
</property> </property>
@ -130,7 +137,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Sunken</enum> <enum>QFrame::Sunken</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="headerBFrame_GL">
<property name="leftMargin"> <property name="leftMargin">
<number>1</number> <number>1</number>
</property> </property>
@ -192,7 +199,14 @@
</widget> </widget>
</item> </item>
<item row="0" column="1" colspan="3"> <item row="0" column="1" colspan="3">
<widget class="StyledElidedLabel" name="nicknameLabel"> <widget class="ElidedLabel" name="nicknameLabel">
<property name="font">
<font>
<pointsize>20</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string notr="true">Nickname (Location)</string> <string notr="true">Nickname (Location)</string>
</property> </property>
@ -240,7 +254,7 @@
<attribute name="title"> <attribute name="title">
<string>Broadcast</string> <string>Broadcast</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="groupChatTab_GL">
<item row="0" column="0"> <item row="0" column="0">
<widget class="ChatWidget" name="chatWidget" native="true"/> <widget class="ChatWidget" name="chatWidget" native="true"/>
</item> </item>
@ -362,11 +376,6 @@
<header>gui/common/AvatarWidget.h</header> <header>gui/common/AvatarWidget.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
<customwidget> <customwidget>
<class>ChatWidget</class> <class>ChatWidget</class>
<extends>QWidget</extends> <extends>QWidget</extends>
@ -380,9 +389,9 @@
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>StyledElidedLabel</class> <class>ElidedLabel</class>
<extends>QLabel</extends> <extends>QLabel</extends>
<header>gui/common/StyledElidedLabel.h</header> <header>gui/common/ElidedLabel.h</header>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>NewFriendList</class> <class>NewFriendList</class>

View File

@ -53,7 +53,7 @@
class EntropyCollectorWidget: public QTextBrowser class EntropyCollectorWidget: public QTextBrowser
{ {
public: public:
EntropyCollectorWidget(QProgressBar *pr,QWidget *p = NULL) explicit EntropyCollectorWidget(QProgressBar *pr,QWidget *p = NULL)
: QTextBrowser(p) : QTextBrowser(p)
{ {
progress = pr ; progress = pr ;
@ -288,8 +288,6 @@ void GenCertDialog::setupState()
break; break;
} }
//ui.no_node_label->setVisible(false);
setWindowTitle(generate_new?tr("Create new profile and new Retroshare node"):tr("Create new Retroshare node")); setWindowTitle(generate_new?tr("Create new profile and new Retroshare node"):tr("Create new Retroshare node"));
//ui.headerFrame->setHeaderText(generate_new?tr("Create a new profile and node"):tr("Create a new node")); //ui.headerFrame->setHeaderText(generate_new?tr("Create a new profile and node"):tr("Create a new node"));
@ -300,15 +298,9 @@ void GenCertDialog::setupState()
ui.genPGPuser->setVisible(adv_state && haveGPGKeys && !generate_new) ; ui.genPGPuser->setVisible(adv_state && haveGPGKeys && !generate_new) ;
//ui.genprofileinfo_label->setVisible(false);
//ui.no_gpg_key_label->setText(tr("Welcome to Retroshare. Before you can proceed you need to create a profile and associate a node with it. To do so please fill out this form.\nAlternatively you can import a (previously exported) profile. Just uncheck \"Create a new profile\""));
//no_gpg_key_label->setVisible(false);
ui.name_label->setVisible(true); ui.name_label->setVisible(true);
ui.name_input->setVisible(generate_new); ui.name_input->setVisible(generate_new);
//ui.header_label->setVisible(false) ;
ui.nickname_label->setVisible(adv_state && !mOnlyGenerateIdentity); ui.nickname_label->setVisible(adv_state && !mOnlyGenerateIdentity);
ui.nickname_input->setVisible(adv_state && !mOnlyGenerateIdentity); ui.nickname_input->setVisible(adv_state && !mOnlyGenerateIdentity);
@ -352,8 +344,8 @@ void GenCertDialog::setupState()
ui.genButton->setVisible(false) ; ui.genButton->setVisible(false) ;
ui.generate_label->setVisible(false) ; ui.generate_label->setVisible(false) ;
ui.info_label->setText("Please choose a profile name and password...") ; ui.info_Label->setText("Please choose a profile name and password...") ;
ui.info_label->setVisible(true) ; ui.info_Label->setVisible(true) ;
} }
else if(!mEntropyOk) else if(!mEntropyOk)
{ {
@ -361,8 +353,8 @@ void GenCertDialog::setupState()
ui.genButton->setVisible(false) ; ui.genButton->setVisible(false) ;
ui.generate_label->setVisible(false) ; ui.generate_label->setVisible(false) ;
ui.info_label->setText("Please move your mouse randomly to generate enough random data to create your profile.") ; ui.info_Label->setText("Please move your mouse randomly to generate enough random data to create your profile.") ;
ui.info_label->setVisible(true) ; ui.info_Label->setVisible(true) ;
} }
else else
{ {
@ -371,7 +363,7 @@ void GenCertDialog::setupState()
ui.genButton->setToolTip(tr("Click to create your node and/or profile")) ; ui.genButton->setToolTip(tr("Click to create your node and/or profile")) ;
ui.genButton->setVisible(true) ; ui.genButton->setVisible(true) ;
ui.generate_label->setVisible(false) ; ui.generate_label->setVisible(false) ;
ui.info_label->setVisible(false) ; ui.info_Label->setVisible(false) ;
} }
} }
@ -591,7 +583,6 @@ void GenCertDialog::genPerson()
//generate a new gpg key //generate a new gpg key
std::string err_string; std::string err_string;
//_key_label->setText(tr("Generating new node key, please be patient: this process needs generating large prime numbers, and can take some minutes on slow computers. \n\nFill in your password when asked, to sign your new key.")); //_key_label->setText(tr("Generating new node key, please be patient: this process needs generating large prime numbers, and can take some minutes on slow computers. \n\nFill in your password when asked, to sign your new key."));
//ui.no_gpg_key_label->show();
//ui.reuse_existing_node_CB->hide(); //ui.reuse_existing_node_CB->hide();
ui.name_label->hide(); ui.name_label->hide();
ui.name_input->hide(); ui.name_input->hide();
@ -609,7 +600,6 @@ void GenCertDialog::genPerson()
ui.node_input->hide(); ui.node_input->hide();
ui.genButton->hide(); ui.genButton->hide();
ui.importIdentity_PB->hide(); ui.importIdentity_PB->hide();
//ui.genprofileinfo_label->hide();
ui.nodeType_CB->hide(); ui.nodeType_CB->hide();
//ui.adv_checkbox->hide(); //ui.adv_checkbox->hide();
ui.keylength_label->hide(); ui.keylength_label->hide();

View File

@ -31,7 +31,7 @@ class GenCertDialog : public QDialog
public: public:
/** Default constructor */ /** Default constructor */
GenCertDialog(bool onlyGenerateIdentity, QWidget *parent = 0); explicit GenCertDialog(bool onlyGenerateIdentity, QWidget *parent = 0);
virtual ~GenCertDialog() ; virtual ~GenCertDialog() ;
virtual void mouseMoveEvent(QMouseEvent *e) ; virtual void mouseMoveEvent(QMouseEvent *e) ;

View File

@ -111,7 +111,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="nodeType_CB"> <widget class="RSComboBox" name="nodeType_CB">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -187,7 +187,7 @@
<item row="1" column="0"> <item row="1" column="0">
<layout class="QGridLayout" name="profilGLayout"> <layout class="QGridLayout" name="profilGLayout">
<item row="14" column="2"> <item row="14" column="2">
<widget class="QComboBox" name="keylength_comboBox"> <widget class="RSComboBox" name="keylength_comboBox">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -245,6 +245,12 @@
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Put a strong password here. This password protects your private node key!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Put a strong password here. This password protects your private node key!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
@ -303,6 +309,12 @@
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Your node name designates the Retroshare instance that&lt;/p&gt;&lt;p&gt;will run on this computer.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Your node name designates the Retroshare instance that&lt;/p&gt;&lt;p&gt;will run on this computer.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
@ -340,6 +352,12 @@
<height>32</height> <height>32</height>
</size> </size>
</property> </property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The profile name identifies you over the network.&lt;/p&gt;&lt;p&gt;It is used by your friends to accept connections from you.&lt;/p&gt;&lt;p&gt;You can create multiple Retroshare nodes with the&lt;/p&gt;&lt;p&gt;same profile on different computers.&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The profile name identifies you over the network.&lt;/p&gt;&lt;p&gt;It is used by your friends to accept connections from you.&lt;/p&gt;&lt;p&gt;You can create multiple Retroshare nodes with the&lt;/p&gt;&lt;p&gt;same profile on different computers.&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
@ -352,13 +370,19 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="genPGPuser"> <widget class="RSComboBox" name="genPGPuser">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Your profile is associated with a PGP key pair. RetroShare currently ignores DSA keys.</string> <string>Your profile is associated with a PGP key pair. RetroShare currently ignores DSA keys.</string>
</property> </property>
@ -417,6 +441,12 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Put a strong password here. This password protects your private node key!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Put a strong password here. This password protects your private node key!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
@ -456,6 +486,12 @@
<height>32</height> <height>32</height>
</size> </size>
</property> </property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This should be a Tor Onion address of the form: xa76giaf6ifda7ri63i263.onion &lt;br/&gt;or an I2P address in the form: [52 characters].b32.i2p &lt;/p&gt;&lt;p&gt;In order to get one, you must configure either Tor or I2P to create a new hidden service / server tunnel. &lt;/p&gt;&lt;p&gt;You can also leave this blank now, but your node will only work if you correctly set the Tor/I2P service address in Options-&amp;gt;Network-&amp;gt;Hidden Service configuration panel.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This should be a Tor Onion address of the form: xa76giaf6ifda7ri63i263.onion &lt;br/&gt;or an I2P address in the form: [52 characters].b32.i2p &lt;/p&gt;&lt;p&gt;In order to get one, you must configure either Tor or I2P to create a new hidden service / server tunnel. &lt;/p&gt;&lt;p&gt;You can also leave this blank now, but your node will only work if you correctly set the Tor/I2P service address in Options-&amp;gt;Network-&amp;gt;Hidden Service configuration panel.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
@ -479,6 +515,12 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This is your connection port.&lt;/p&gt;&lt;p&gt;Any value between 1024 and 65535 &lt;/p&gt;&lt;p&gt;should be ok. You can change it later.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This is your connection port.&lt;/p&gt;&lt;p&gt;Any value between 1024 and 65535 &lt;/p&gt;&lt;p&gt;should be ok. You can change it later.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
@ -510,6 +552,12 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Identities are used when you write in chat rooms, forums and channel comments. &lt;/p&gt;&lt;p&gt;They also receive/send email over the Retroshare network. You can create&lt;/p&gt;&lt;p&gt;a signed identity now, or do it later on when you get to need it.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Identities are used when you write in chat rooms, forums and channel comments. &lt;/p&gt;&lt;p&gt;They also receive/send email over the Retroshare network. You can create&lt;/p&gt;&lt;p&gt;a signed identity now, or do it later on when you get to need it.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
@ -532,6 +580,8 @@
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -721,7 +771,12 @@
</layout> </layout>
</item> </item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="info_label"> <widget class="QLabel" name="info_Label">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>TextLabel</string> <string>TextLabel</string>
</property> </property>
@ -751,6 +806,13 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
</customwidgets>
<tabstops> <tabstops>
<tabstop>name_input</tabstop> <tabstop>name_input</tabstop>
<tabstop>node_input</tabstop> <tabstop>node_input</tabstop>

View File

@ -53,19 +53,19 @@ GetStartedDialog::GetStartedDialog(QWidget *parent)
mFirstShow = true; mFirstShow = true;
connect(ui.inviteCheckBox, SIGNAL(stateChanged( int )), this, SLOT(tickInviteChanged())); connect(ui.inviteCheckBox, SIGNAL(stateChanged(int)), this, SLOT(tickInviteChanged()));
connect(ui.addCheckBox, SIGNAL(stateChanged( int )), this, SLOT(tickAddChanged())); connect(ui.addCheckBox, SIGNAL(stateChanged(int)), this, SLOT(tickAddChanged()));
connect(ui.connectCheckBox, SIGNAL(stateChanged( int )), this, SLOT(tickConnectChanged())); connect(ui.connectCheckBox, SIGNAL(stateChanged(int)), this, SLOT(tickConnectChanged()));
connect(ui.firewallCheckBox, SIGNAL(stateChanged( int )), this, SLOT(tickFirewallChanged())); connect(ui.firewallCheckBox, SIGNAL(stateChanged(int)), this, SLOT(tickFirewallChanged()));
connect(ui.pushButton_InviteFriends, SIGNAL(clicked( bool )), this, SLOT(inviteFriends())); connect(ui.pushButton_InviteFriends, SIGNAL(clicked(bool)), this, SLOT(inviteFriends()));
connect(ui.pushButton_AddFriend, SIGNAL(clicked( bool )), this, SLOT(addFriends())); connect(ui.pushButton_AddFriend, SIGNAL(clicked(bool)), this, SLOT(addFriends()));
connect(ui.pushButton_FAQ, SIGNAL(clicked( bool )), this, SLOT(OpenFAQ())); connect(ui.pushButton_FAQ, SIGNAL(clicked(bool)), this, SLOT(OpenFAQ()));
connect(ui.pushButton_Forums, SIGNAL(clicked( bool )), this, SLOT(OpenForums())); connect(ui.pushButton_Forums, SIGNAL(clicked(bool)), this, SLOT(OpenForums()));
connect(ui.pushButton_Website, SIGNAL(clicked( bool )), this, SLOT(OpenWebsite())); connect(ui.pushButton_Website, SIGNAL(clicked(bool)), this, SLOT(OpenWebsite()));
connect(ui.pushButton_EmailFeedback, SIGNAL(clicked( bool )), this, SLOT(emailFeedback())); connect(ui.pushButton_EmailFeedback, SIGNAL(clicked(bool)), this, SLOT(emailFeedback()));
connect(ui.pushButton_EmailSupport, SIGNAL(clicked( bool )), this, SLOT(emailSupport())); connect(ui.pushButton_EmailSupport, SIGNAL(clicked(bool)), this, SLOT(emailSupport()));
} }
GetStartedDialog::~GetStartedDialog() GetStartedDialog::~GetStartedDialog()
@ -105,8 +105,7 @@ void GetStartedDialog::showEvent ( QShowEvent * /*event*/ )
void GetStartedDialog::updateFromUserLevel() void GetStartedDialog::updateFromUserLevel()
{ {
RsConfigUserLvl userLevel = RsConfigUserLvl::NEW; RsConfigUserLvl userLevel = rsConfig->getUserLevel();
userLevel = rsConfig->getUserLevel();
ui.inviteCheckBox->setChecked(false); ui.inviteCheckBox->setChecked(false);
ui.addCheckBox->setChecked(false); ui.addCheckBox->setChecked(false);
@ -185,17 +184,12 @@ void GetStartedDialog::tickFirewallChanged()
} }
} }
static void sendMail(const QString &address, const QString &subject, QString body) static void sendMail(const QString &address, const QString &subject, const QString &body)
{ {
/* Only under windows do we need to do this! */
#ifdef Q_OS_WIN
/* search and replace the end of lines with: "%0D%0A" */
body.replace("\n", "%0D%0A");
#endif
QString mailstr = "mailto:" + address; QString mailstr = "mailto:" + address;
mailstr += "?subject=" + subject; mailstr += "?subject=" + QUrl::toPercentEncoding(subject);
mailstr += "&body=" + body; mailstr += "&body=" + QUrl::toPercentEncoding(body);
std::cerr << "MAIL STRING:" << mailstr.toStdString() << std::endl; std::cerr << "MAIL STRING:" << mailstr.toStdString() << std::endl;
@ -240,7 +234,7 @@ void GetStartedDialog::inviteFriends()
RsAutoUpdatePage::unlockAllEvents() ; RsAutoUpdatePage::unlockAllEvents() ;
} }
QString text = QString("%1\n%2\n\n%3\n").arg(GetInviteText()).arg(GetCutBelowText()).arg(QString::fromUtf8(cert.c_str())); QString text = QString("%1\n%2\n\n%3\n").arg(GetInviteText(), GetCutBelowText(), QString::fromUtf8(cert.c_str()));
sendMail("", tr("RetroShare Invitation"), text); sendMail("", tr("RetroShare Invitation"), text);
} }
@ -427,8 +421,10 @@ void GetStartedDialog::emailSupport()
sysVersion = "Linux"; sysVersion = "Linux";
#endif #endif
#endif #endif
text += QString("My RetroShare Configuration is: (%1, %2, %3)").arg(Rshare::retroshareVersion(true)).arg(sysVersion).arg(static_cast<typename std::underlying_type<RsConfigUserLvl>::type>(userLevel)) + "\n"; text += QString("My RetroShare Configuration is: (%1, %2, %3)").arg(Rshare::retroshareVersion(true)
text += "\n"; , sysVersion
).arg(static_cast<typename std::underlying_type<RsConfigUserLvl>::type>(userLevel)) + "\n";
text += "\n";
text += QString("I am having trouble with RetroShare."); text += QString("I am having trouble with RetroShare.");
text += QString(" Can you help me with....") + "\n"; text += QString(" Can you help me with....") + "\n";

View File

@ -10,7 +10,7 @@
<height>582</height> <height>582</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="GetStartedDialog_VL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -32,11 +32,20 @@
<attribute name="title"> <attribute name="title">
<string>Getting Started</string> <string>Getting Started</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="GetStartedTab_VL">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<property name="margin"> <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> <number>0</number>
</property> </property>
<item> <item>
@ -53,12 +62,12 @@
<height>732</height> <height>732</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="scrollAreaWidgetContents_VL">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="invite_GL">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QCheckBox" name="inviteCheckBox"> <widget class="QCheckBox" name="inviteCheckBox">
<property name="sizePolicy"> <property name="sizePolicy">
@ -121,20 +130,20 @@
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;RetroShare is nothing without your Friends. Click on the Button to start the process.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;RetroShare is nothing without your Friends. Click on the Button to start the process.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Email an Invitation with your &amp;quot;ID Certificate&amp;quot; to your friends.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;Email an Invitation with your &amp;quot;ID Certificate&amp;quot; to your friends.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Be sure to get their invitation back as well... &lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;Be sure to get their invitation back as well... &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;You can only connect with friends if you have both added each other.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;You can only connect with friends if you have both added each other.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="add_GL">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QCheckBox" name="addCheckBox"> <widget class="QCheckBox" name="addCheckBox">
<property name="sizePolicy"> <property name="sizePolicy">
@ -197,17 +206,17 @@ p, li { white-space: pre-wrap; }
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;When your friends send you their invitations, click to open the Add Friends window.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;When your friends send you their invitations, click to open the Add Friends window.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Paste your Friends' &amp;quot;ID Certificates&amp;quot; into the window and add them as friends.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;Paste your Friends' &amp;quot;ID Certificates&amp;quot; into the window and add them as friends.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="connect_GL">
<property name="horizontalSpacing"> <property name="horizontalSpacing">
<number>0</number> <number>0</number>
</property> </property>
@ -282,25 +291,25 @@ p, li { white-space: pre-wrap; }
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Be Online at the same time as your friends, and RetroShare will automatically connect you!&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;Be Online at the same time as your friends, and RetroShare will automatically connect you!&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Your client needs to find the RetroShare Network before it can make connections.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;Your client needs to find the RetroShare Network before it can make connections.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;This takes 5-30 minutes the first time you start up RetroShare&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;This takes 5-30 minutes the first time you start up RetroShare&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;The DHT indicator (in the Status Bar) turns Green when it can make connections.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;The DHT indicator (in the Status Bar) turns Green when it can make connections.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;After a couple of minutes, the NAT indicator (also in the Status Bar) switch to Yellow or Green.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;After a couple of minutes, the NAT indicator (also in the Status Bar) switch to Yellow or Green.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;If it remains Red, then you have a Nasty Firewall, that RetroShare struggles to connect through.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;If it remains Red, then you have a Nasty Firewall, that RetroShare struggles to connect through.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Look in the Further Help section for more advice about connecting.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;Look in the Further Help section for more advice about connecting.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="firewall_GL">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QCheckBox" name="firewallCheckBox"> <widget class="QCheckBox" name="firewallCheckBox">
<property name="sizePolicy"> <property name="sizePolicy">
@ -366,23 +375,23 @@ p, li { white-space: pre-wrap; }
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;You can improve your Retroshare performance by opening an External Port. &lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;You can improve your Retroshare performance by opening an External Port. &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;This will speed up connections and allow more people to connect with you. &lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;This will speed up connections and allow more people to connect with you. &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;The easiest way to do this is by enabling UPnP on your Wireless Box or Router.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;The easiest way to do this is by enabling UPnP on your Wireless Box or Router.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;As each router is different, you will need to find out your Router Model and search the Internet for instructions.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;As each router is different, you will need to find out your Router Model and search the Internet for instructions.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;If none of this makes sense to you, don't worry about it Retroshare will still work.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;If none of this makes sense to you, don't worry about it Retroshare will still work.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item>
<spacer name="verticalSpacer"> <spacer name="GetStartedTab_VSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
@ -407,31 +416,31 @@ p, li { white-space: pre-wrap; }
<attribute name="title"> <attribute name="title">
<string>Further Help and Support</string> <string>Further Help and Support</string>
</attribute> </attribute>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="FurtherHelpTab_HL">
<item> <item>
<widget class="QTextBrowser" name="textBrowser_2"> <widget class="QTextBrowser" name="FurtherHelpTabTextBrowser">
<property name="html"> <property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Having trouble getting started with RetroShare?&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;Having trouble getting started with RetroShare?&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;1) Look at the FAQ Wiki. This is a bit old, we are trying to bring it up to date.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;1) Look at the FAQ Wiki. This is a bit old, we are trying to bring it up to date.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;2) Check out the Online Forums. Ask questions and discuss features.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;2) Check out the Online Forums. Ask questions and discuss features.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;3) Try the Internal RetroShare Forums &lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;3) Try the Internal RetroShare Forums &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt; - These come online once you are connected to friends.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt; - These come online once you are connected to friends.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;4) If you are still stuck. Email us.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;4) If you are still stuck. Email us.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;Enjoy Retrosharing&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:12pt;&quot;&gt;Enjoy Retrosharing&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_6"> <layout class="QVBoxLayout" name="buttons_VL">
<item> <item>
<widget class="QPushButton" name="pushButton_Website"> <widget class="QPushButton" name="pushButton_Website">
<property name="text"> <property name="text">
@ -454,7 +463,7 @@ p, li { white-space: pre-wrap; }
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer_3"> <spacer name="buttonsTop_VSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
@ -481,7 +490,7 @@ p, li { white-space: pre-wrap; }
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer_4"> <spacer name="buttonsBottom1_VSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
@ -494,7 +503,7 @@ p, li { white-space: pre-wrap; }
</spacer> </spacer>
</item> </item>
<item> <item>
<spacer name="verticalSpacer_2"> <spacer name="buttonsBottom2_VSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>

View File

@ -56,7 +56,7 @@
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item row="2" column="0" colspan="3"> <item row="1" column="0" colspan="3">
<widget class="QTextBrowser" name="version"> <widget class="QTextBrowser" name="version">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
@ -72,13 +72,13 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0" colspan="3"> <item row="0" column="0" colspan="3">
<widget class="QTextBrowser" name="about"> <widget class="QTextBrowser" name="about">
<property name="html"> <property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-weight:600;&quot;&gt;RetroShare is an Open Source cross-platform, &lt;/span&gt;&lt;/p&gt; &lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-weight:600;&quot;&gt;RetroShare is an Open Source cross-platform, &lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-weight:600;&quot;&gt;private and secure decentralized communication platform. &lt;/span&gt;&lt;/p&gt; &lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-weight:600;&quot;&gt;private and secure decentralized communication platform. &lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-weight:600;&quot;&gt;It lets you share securely your friends, &lt;/span&gt;&lt;/p&gt; &lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-weight:600;&quot;&gt;It lets you share securely your friends, &lt;/span&gt;&lt;/p&gt;
@ -97,16 +97,6 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0">
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_2"> <widget class="QWidget" name="tab_2">
@ -223,7 +213,7 @@ p, li { white-space: pre-wrap; }
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600;&quot;&gt;RetroShare Translations:&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600;&quot;&gt;RetroShare Translations:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://retroshare.sourceforge.net/wiki/index.php/Translation&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; text-decoration: underline; color:#0000ff;&quot;&gt;http://retroshare.sourceforge.net/wiki/index.php/Translation&lt;/span&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://retroshare.sourceforge.net/wiki/index.php/Translation&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; text-decoration: underline; color:#0000ff;&quot;&gt;http://retroshare.sourceforge.net/wiki/index.php/Translation&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;

View File

@ -89,6 +89,8 @@
<property name="font"> <property name="font">
<font> <font>
<pointsize>11</pointsize> <pointsize>11</pointsize>
<weight>75</weight>
<bold>true</bold>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -105,7 +107,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="icons.qrc"> <iconset resource="images.qrc">
<normaloff>:/icons/help_64.png</normaloff>:/icons/help_64.png</iconset> <normaloff>:/icons/help_64.png</normaloff>:/icons/help_64.png</iconset>
</property> </property>
<property name="checkable"> <property name="checkable">
@ -289,6 +291,13 @@ private and secure decentralized communication platform.
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QToolButton" name="addButton"> <widget class="QToolButton" name="addButton">
<property name="font">
<font>
<pointsize>15</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>Add friend</string> <string>Add friend</string>
</property> </property>
@ -415,8 +424,8 @@ private and secure decentralized communication platform.
</layout> </layout>
</widget> </widget>
<resources> <resources>
<include location="icons.qrc"/>
<include location="images.qrc"/> <include location="images.qrc"/>
<include location="icons.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -355,7 +355,7 @@
</widget> </widget>
</item> </item>
<item row="7" column="1"> <item row="7" column="1">
<widget class="QComboBox" name="ownOpinion_CB"> <widget class="RSComboBox" name="ownOpinion_CB">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -493,12 +493,16 @@ p, li { white-space: pre-wrap; }
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>
<class>HeaderFrame</class> <class>HeaderFrame</class>
<extends>QFrame</extends> <extends>QFrame</extends>
<header>gui/common/HeaderFrame.h</header> <header>gui/common/HeaderFrame.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
</customwidgets> <customwidget>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
</customwidgets>
</ui> </ui>

View File

@ -259,7 +259,7 @@ IdDialog::IdDialog(QWidget *parent)
ui->editButton->hide(); ui->editButton->hide();
ui->avlabel_Circles->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/circles.png")); ui->avLabel_Circles->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/circles.png"));
ui->headerTextLabel_Circles->setText(tr("Circles")); ui->headerTextLabel_Circles->setText(tr("Circles"));
@ -475,10 +475,10 @@ void IdDialog::clearPerson()
{ {
QFontMetricsF f(ui->avLabel_Person->font()) ; QFontMetricsF f(ui->avLabel_Person->font()) ;
ui->avLabel_Person->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/people.png").scaled(f.height()*4,f.height()*4,Qt::IgnoreAspectRatio,Qt::SmoothTransformation)); ui->avLabel_Person->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/people.png").scaled(f.height()*4,f.height()*4,Qt::KeepAspectRatio,Qt::SmoothTransformation));
ui->headerTextLabel_Person->setText(tr("People")); ui->headerTextLabel_Person->setText(tr("People"));
ui->inviteFrame->hide(); ui->info_Frame_Invite->hide();
ui->avatarLabel->clear(); ui->avatarLabel->clear();
whileBlocking(ui->ownOpinion_CB)->setCurrentIndex(1); whileBlocking(ui->ownOpinion_CB)->setCurrentIndex(1);
@ -2490,7 +2490,7 @@ void IdDialog::sendInvite()
{ {
MessageComposer::sendInvite(id,false); MessageComposer::sendInvite(id,false);
ui->inviteFrame->show(); ui->info_Frame_Invite->show();
ui->inviteButton->setEnabled(false); ui->inviteButton->setEnabled(false);
} }
@ -2572,9 +2572,9 @@ void IdDialog::removefromContacts()
updateIdList(); updateIdList();
} }
void IdDialog::on_closeInfoFrameButton_clicked() void IdDialog::on_closeInfoFrameButton_Invite_clicked()
{ {
ui->inviteFrame->setVisible(false); ui->info_Frame_Invite->setVisible(false);
} }
// We need to use indexes here because saving items is not possible since they can be re-created. // We need to use indexes here because saving items is not possible since they can be re-created.

View File

@ -89,7 +89,7 @@ private slots:
void chatIdentityItem(QTreeWidgetItem* item); void chatIdentityItem(QTreeWidgetItem* item);
void sendMsg(); void sendMsg();
void copyRetroshareLink(); void copyRetroshareLink();
void on_closeInfoFrameButton_clicked(); void on_closeInfoFrameButton_Invite_clicked();
void updateSelection(); void updateSelection();

View File

@ -88,7 +88,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="StyledLabel" name="titleBarLabel"> <widget class="QLabel" name="titleBarLabel">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>People</string> <string>People</string>
</property> </property>
@ -287,7 +294,7 @@
<widget class="QWidget" name="scrollAreaWidgetContents"> <widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>-155</x> <x>0</x>
<y>0</y> <y>0</y>
<width>634</width> <width>634</width>
<height>523</height> <height>523</height>
@ -295,7 +302,7 @@
</property> </property>
<layout class="QVBoxLayout" name="scrollAreaWidgetContentsVLayout"> <layout class="QVBoxLayout" name="scrollAreaWidgetContentsVLayout">
<item> <item>
<widget class="QFrame" name="headerFramePerson"> <widget class="QFrame" name="headerBFramePerson">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum"> <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -308,14 +315,19 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="headerFramePersonGLayout"> <layout class="QGridLayout" name="headerBFramePersonGLayout">
<property name="horizontalSpacing"> <property name="horizontalSpacing">
<number>12</number> <number>12</number>
</property> </property>
<item row="0" column="3"> <item row="0" column="3">
<layout class="QVBoxLayout" name="headerFramePersonVLayout"> <layout class="QVBoxLayout" name="headerFramePersonVLayout">
<item> <item>
<widget class="StyledElidedLabel" name="headerTextLabel_Person"> <widget class="ElidedLabel" name="headerTextLabel_Person">
<property name="font">
<font>
<pointsize>22</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>People</string> <string>People</string>
</property> </property>
@ -335,10 +347,19 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QFrame" name="inviteFrame"> <widget class="QFrame" name="info_Frame_Invite">
<property name="palette"> <property name="palette">
<palette> <palette>
<active> <active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base"> <colorrole role="Base">
<brush brushstyle="SolidPattern"> <brush brushstyle="SolidPattern">
<color alpha="255"> <color alpha="255">
@ -359,6 +380,15 @@
</colorrole> </colorrole>
</active> </active>
<inactive> <inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base"> <colorrole role="Base">
<brush brushstyle="SolidPattern"> <brush brushstyle="SolidPattern">
<color alpha="255"> <color alpha="255">
@ -379,6 +409,15 @@
</colorrole> </colorrole>
</inactive> </inactive>
<disabled> <disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>154</red>
<green>154</green>
<blue>154</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base"> <colorrole role="Base">
<brush brushstyle="SolidPattern"> <brush brushstyle="SolidPattern">
<color alpha="255"> <color alpha="255">
@ -409,7 +448,7 @@
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::Box</enum> <enum>QFrame::Box</enum>
</property> </property>
<layout class="QHBoxLayout" name="inviteFrameHLayout"> <layout class="QHBoxLayout" name="info_Frame_Invite_HL">
<property name="leftMargin"> <property name="leftMargin">
<number>6</number> <number>6</number>
</property> </property>
@ -423,7 +462,7 @@
<number>6</number> <number>6</number>
</property> </property>
<item> <item>
<widget class="QLabel" name="infoPixmap"> <widget class="QLabel" name="infoPixmap_Invite">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16</width> <width>16</width>
@ -442,14 +481,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="infoLabel"> <widget class="QLabel" name="infoLabel_Invite">
<property name="text"> <property name="text">
<string notr="true">Invite messages stay into your Outbox until an acknowledgement of receipt has been received.</string> <string notr="true">Invite messages stay into your Outbox until an acknowledgement of receipt has been received.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QToolButton" name="closeInfoFrameButton"> <widget class="QToolButton" name="closeInfoFrameButton_Invite">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16</width> <width>16</width>
@ -803,7 +842,7 @@ border-image: url(:/images/closepressed.png)
</widget> </widget>
</item> </item>
<item row="9" column="1" rowspan="2"> <item row="9" column="1" rowspan="2">
<widget class="QComboBox" name="ownOpinion_CB"> <widget class="RSComboBox" name="ownOpinion_CB">
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-family:'Sans'; font-size:9pt;&quot;&gt;Your own opinion about an identity rules the visibility of that identity for yourself and your friend nodes. Your own opinion is shared among friends and used to compute a reputation score: If your opinion about an identity is neutral, the reputation score is the difference between friend's positive and negative opinions. If not, your own opinion gives the score.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-family:'Sans'; font-size:9pt;&quot;&gt;The overall score is used in chat lobbies, forums and channels to decide on the actions to take for each specific identity. When the overall score is lower than -1, the identity is banned, which prevents all messages and forums/channels authored by this identity to be forwarded, both ways. Some forums also have special anti-spam flags that require a non negative reputation level, making them more sensitive to bad opinions. Banned identities gradually lose their activity and eventually disappear (after 5 days).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-family:'Sans'; font-size:9pt;&quot;&gt;You can change the thresholds and the time of inactivity to delete identities in preferences -&amp;gt; people. &lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-family:'Sans'; font-size:9pt;&quot;&gt;Your own opinion about an identity rules the visibility of that identity for yourself and your friend nodes. Your own opinion is shared among friends and used to compute a reputation score: If your opinion about an identity is neutral, the reputation score is the difference between friend's positive and negative opinions. If not, your own opinion gives the score.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-family:'Sans'; font-size:9pt;&quot;&gt;The overall score is used in chat lobbies, forums and channels to decide on the actions to take for each specific identity. When the overall score is lower than -1, the identity is banned, which prevents all messages and forums/channels authored by this identity to be forwarded, both ways. Some forums also have special anti-spam flags that require a non negative reputation level, making them more sensitive to bad opinions. Banned identities gradually lose their activity and eventually disappear (after 5 days).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-family:'Sans'; font-size:9pt;&quot;&gt;You can change the thresholds and the time of inactivity to delete identities in preferences -&amp;gt; people. &lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
@ -938,7 +977,7 @@ border-image: url(:/images/closepressed.png)
</layout> </layout>
<zorder>detailsGroupBox</zorder> <zorder>detailsGroupBox</zorder>
<zorder>usageStatisticsGBox</zorder> <zorder>usageStatisticsGBox</zorder>
<zorder>headerFramePerson</zorder> <zorder>headerBFramePerson</zorder>
</widget> </widget>
</widget> </widget>
</item> </item>
@ -954,19 +993,19 @@ border-image: url(:/images/closepressed.png)
</attribute> </attribute>
<layout class="QVBoxLayout" name="circleTabVLayout"> <layout class="QVBoxLayout" name="circleTabVLayout">
<item> <item>
<widget class="QFrame" name="headerFrameCircle"> <widget class="QFrame" name="headerBFrameCircle">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="headerFrameCircleGLayout"> <layout class="QGridLayout" name="headerBFrameCircleGLayout">
<property name="horizontalSpacing"> <property name="horizontalSpacing">
<number>12</number> <number>12</number>
</property> </property>
<item row="0" column="0" rowspan="2"> <item row="0" column="0" rowspan="2">
<widget class="QLabel" name="avlabel_Circles"> <widget class="QLabel" name="avLabel_Circles">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>64</width> <width>64</width>
@ -991,7 +1030,12 @@ border-image: url(:/images/closepressed.png)
</widget> </widget>
</item> </item>
<item row="0" column="1" rowspan="2" colspan="2"> <item row="0" column="1" rowspan="2" colspan="2">
<widget class="StyledElidedLabel" name="headerTextLabel_Circles"> <widget class="ElidedLabel" name="headerTextLabel_Circles">
<property name="font">
<font>
<pointsize>22</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>Circles</string> <string>Circles</string>
</property> </property>
@ -1074,7 +1118,7 @@ border-image: url(:/images/closepressed.png)
<customwidget> <customwidget>
<class>LineEditClear</class> <class>LineEditClear</class>
<extends>QLineEdit</extends> <extends>QLineEdit</extends>
<header>gui/common/LineEditClear.h</header> <header location="global">gui/common/LineEditClear.h</header>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>RSTreeWidget</class> <class>RSTreeWidget</class>
@ -1082,14 +1126,14 @@ border-image: url(:/images/closepressed.png)
<header>gui/common/RSTreeWidget.h</header> <header>gui/common/RSTreeWidget.h</header>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>StyledElidedLabel</class> <class>ElidedLabel</class>
<extends>QLabel</extends> <extends>QLabel</extends>
<header>gui/common/StyledElidedLabel.h</header> <header>gui/common/ElidedLabel.h</header>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>StyledLabel</class> <class>RSComboBox</class>
<extends>QLabel</extends> <extends>QComboBox</extends>
<header>gui/common/StyledLabel.h</header> <header>gui/common/RSComboBox.h</header>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>RSTextBrowser</class> <class>RSTextBrowser</class>

View File

@ -77,7 +77,7 @@ IdEditDialog::IdEditDialog(QWidget *parent) :
/* Connect signals */ /* Connect signals */
connect(ui->radioButton_GpgId, SIGNAL(toggled(bool)), this, SLOT(idTypeToggled(bool))); connect(ui->radioButton_GpgId, SIGNAL(toggled(bool)), this, SLOT(idTypeToggled(bool)));
connect(ui->radioButton_Pseudo, SIGNAL(toggled(bool)), this, SLOT(idTypeToggled(bool))); connect(ui->radioButton_Pseudo, SIGNAL(toggled(bool)), this, SLOT(idTypeToggled(bool)));
connect(ui->createButton, SIGNAL(clicked()), this, SLOT(submit())); connect(ui->postButton, SIGNAL(clicked()), this, SLOT(submit()));
connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(reject())); connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
connect(ui->plainTextEdit_Tag, SIGNAL(textChanged()), this, SLOT(checkNewTag())); connect(ui->plainTextEdit_Tag, SIGNAL(textChanged()), this, SLOT(checkNewTag()));
@ -238,7 +238,7 @@ void IdEditDialog::setupExistingId(const RsGxsGroupId& keyId)
setWindowTitle(tr("Edit identity")); setWindowTitle(tr("Edit identity"));
ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/person.png")); ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/person.png"));
ui->headerFrame->setHeaderText(tr("Edit identity")); ui->headerFrame->setHeaderText(tr("Edit identity"));
ui->createButton->setText(tr("Update")); ui->postButton->setText(tr("Update"));
mStateHelper->setLoading(IDEDITDIALOG_LOADID, true); mStateHelper->setLoading(IDEDITDIALOG_LOADID, true);
@ -601,7 +601,7 @@ void IdEditDialog::createId()
if(rsIdentity->createIdentity(keyId,params.nickname,params.mImage,!params.isPgpLinked,gpg_password)) if(rsIdentity->createIdentity(keyId,params.nickname,params.mImage,!params.isPgpLinked,gpg_password))
{ {
ui->createButton->setEnabled(false); ui->postButton->setEnabled(false);
if(!keyId.isNull()) if(!keyId.isNull())
{ {

View File

@ -55,10 +55,19 @@
</property> </property>
<layout class="QVBoxLayout" name="frame_TopVLayout"> <layout class="QVBoxLayout" name="frame_TopVLayout">
<item> <item>
<widget class="QLabel" name="info_label"> <widget class="QLabel" name="info_Label">
<property name="palette"> <property name="palette">
<palette> <palette>
<active> <active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base"> <colorrole role="Base">
<brush brushstyle="SolidPattern"> <brush brushstyle="SolidPattern">
<color alpha="255"> <color alpha="255">
@ -79,6 +88,15 @@
</colorrole> </colorrole>
</active> </active>
<inactive> <inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base"> <colorrole role="Base">
<brush brushstyle="SolidPattern"> <brush brushstyle="SolidPattern">
<color alpha="255"> <color alpha="255">
@ -99,6 +117,15 @@
</colorrole> </colorrole>
</inactive> </inactive>
<disabled> <disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>154</red>
<green>154</green>
<blue>154</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base"> <colorrole role="Base">
<brush brushstyle="SolidPattern"> <brush brushstyle="SolidPattern">
<color alpha="255"> <color alpha="255">
@ -120,6 +147,11 @@
</disabled> </disabled>
</palette> </palette>
</property> </property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="autoFillBackground"> <property name="autoFillBackground">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -365,7 +397,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="frame_Tags_GL">
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLabel" name="label_Tag2"> <widget class="QLabel" name="label_Tag2">
<property name="text"> <property name="text">
@ -477,7 +509,7 @@
</item> </item>
<item> <item>
<widget class="QFrame" name="frame_Button"> <widget class="QFrame" name="frame_Button">
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="frame_Button_HL">
<property name="spacing"> <property name="spacing">
<number>9</number> <number>9</number>
</property> </property>
@ -507,7 +539,14 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QPushButton" name="createButton"> <widget class="QPushButton" name="postButton">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>Create</string> <string>Create</string>
</property> </property>

View File

@ -247,12 +247,13 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags)
statusBar()->setVisible(Settings->valueFromGroup("StatusBar", "ShowStatusBar", QVariant(true)).toBool()); statusBar()->setVisible(Settings->valueFromGroup("StatusBar", "ShowStatusBar", QVariant(true)).toBool());
/* initialize combobox in status bar */ /* initialize combobox in status bar */
statusComboBox = new QComboBox(statusBar()); statusComboBox = new RSComboBox(statusBar());
statusComboBox->setVisible(Settings->valueFromGroup("StatusBar", "ShowStatus", QVariant(true)).toBool()); statusComboBox->setVisible(Settings->valueFromGroup("StatusBar", "ShowStatus", QVariant(true)).toBool());
statusComboBox->setFocusPolicy(Qt::ClickFocus); statusComboBox->setFocusPolicy(Qt::ClickFocus);
initializeStatusObject(statusComboBox, true); initializeStatusObject(statusComboBox, true);
QWidget *widget = new QWidget(); QWidget *widget = new QWidget();
widget->setObjectName("trans_statusComboBoxFrame");
QHBoxLayout *hbox = new QHBoxLayout(); QHBoxLayout *hbox = new QHBoxLayout();
hbox->setMargin(0); hbox->setMargin(0);
hbox->setSpacing(6); hbox->setSpacing(6);
@ -1300,7 +1301,7 @@ static void setStatusObject(QObject *pObject, int nStatus)
} }
return; return;
} }
QComboBox *pComboBox = dynamic_cast<QComboBox*>(pObject); RSComboBox *pComboBox = dynamic_cast<RSComboBox*>(pObject);
if (pComboBox) { if (pComboBox) {
/* set index of combobox */ /* set index of combobox */
int nIndex = pComboBox->findData(nStatus, Qt::UserRole); int nIndex = pComboBox->findData(nStatus, Qt::UserRole);
@ -1389,7 +1390,7 @@ void MainWindow::initializeStatusObject(QObject *pObject, bool bConnect)
} }
} else { } else {
/* initialize combobox */ /* initialize combobox */
QComboBox *pComboBox = dynamic_cast<QComboBox*>(pObject); RSComboBox *pComboBox = dynamic_cast<RSComboBox*>(pObject);
if (pComboBox) { if (pComboBox) {
pComboBox->addItem(QIcon(StatusDefs::imageStatus(RS_STATUS_ONLINE)), StatusDefs::name(RS_STATUS_ONLINE), RS_STATUS_ONLINE); pComboBox->addItem(QIcon(StatusDefs::imageStatus(RS_STATUS_ONLINE)), StatusDefs::name(RS_STATUS_ONLINE), RS_STATUS_ONLINE);
pComboBox->addItem(QIcon(StatusDefs::imageStatus(RS_STATUS_BUSY)), StatusDefs::name(RS_STATUS_BUSY), RS_STATUS_BUSY); pComboBox->addItem(QIcon(StatusDefs::imageStatus(RS_STATUS_BUSY)), StatusDefs::name(RS_STATUS_BUSY), RS_STATUS_BUSY);
@ -1613,7 +1614,7 @@ void MainWindow::switchVisibilityStatus(StatusElement e,bool b)
//{ //{
// ServicePermissionDialog::showYourself(); // ServicePermissionDialog::showYourself();
//} //}
QComboBox *MainWindow::statusComboBoxInstance() RSComboBox *MainWindow::statusComboBoxInstance()
{ {
return statusComboBox; return statusComboBox;
} }

View File

@ -25,12 +25,12 @@
#include <set> #include <set>
#include "gui/common/rwindow.h" #include "gui/common/rwindow.h"
#include "gui/common/RSComboBox.h"
namespace Ui { namespace Ui {
class MainWindow; class MainWindow;
} }
class QComboBox;
class QLabel; class QLabel;
class QActionGroup; class QActionGroup;
class QListWidgetItem; class QListWidgetItem;
@ -174,7 +174,7 @@ public:
void removeStatusObject(QObject *pObject); void removeStatusObject(QObject *pObject);
void setStatus(QObject *pObject, int nStatus); void setStatus(QObject *pObject, int nStatus);
QComboBox *statusComboBoxInstance(); RSComboBox *statusComboBoxInstance();
PeerStatus *peerstatusInstance(); PeerStatus *peerstatusInstance();
NATStatus *natstatusInstance(); NATStatus *natstatusInstance();
DHTStatus *dhtstatusInstance(); DHTStatus *dhtstatusInstance();
@ -294,7 +294,7 @@ private:
QAction *toggleVisibilityAction, *toolAct; QAction *toggleVisibilityAction, *toolAct;
QList<UserNotify*> userNotifyList; QList<UserNotify*> userNotifyList;
QComboBox *statusComboBox; RSComboBox *statusComboBox;
PeerStatus *peerstatus; PeerStatus *peerstatus;
NATStatus *natstatus; NATStatus *natstatus;
DHTStatus *dhtstatus; DHTStatus *dhtstatus;

View File

@ -33,6 +33,11 @@
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::NoFrame</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
@ -143,7 +148,7 @@
</action> </action>
<action name="actionAdd_Share"> <action name="actionAdd_Share">
<property name="icon"> <property name="icon">
<iconset resource="images.qrc"> <iconset>
<normaloff>:/images/add-share24.png</normaloff>:/images/add-share24.png</iconset> <normaloff>:/images/add-share24.png</normaloff>:/images/add-share24.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -161,7 +166,7 @@
</action> </action>
<action name="actionMessenger"> <action name="actionMessenger">
<property name="icon"> <property name="icon">
<iconset resource="images.qrc"> <iconset>
<normaloff>:/images/messenger.png</normaloff>:/images/messenger.png</iconset> <normaloff>:/images/messenger.png</normaloff>:/images/messenger.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -187,7 +192,7 @@
</action> </action>
<action name="actionQuit"> <action name="actionQuit">
<property name="icon"> <property name="icon">
<iconset resource="images.qrc"> <iconset>
<normaloff>:/images/exit_24x24.png</normaloff>:/images/exit_24x24.png</iconset> <normaloff>:/images/exit_24x24.png</normaloff>:/images/exit_24x24.png</iconset>
</property> </property>
<property name="text"> <property name="text">

View File

@ -74,7 +74,7 @@
<item row="0" column="1"> <item row="0" column="1">
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_4">
<item row="1" column="0" colspan="2"> <item row="1" column="0" colspan="2">
<widget class="QComboBox" name="messagelineEdit"> <widget class="RSComboBox" name="messagelineEdit">
<property name="editable"> <property name="editable">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -124,7 +124,7 @@
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="LogoBar" name="logoFrame"> <widget class="LogoBar" name="gradFrame_Logo">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
@ -175,7 +175,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>258</width> <width>258</width>
<height>21</height> <height>27</height>
</rect> </rect>
</property> </property>
</widget> </widget>
@ -199,6 +199,11 @@
<header>gui/LogoBar.h</header> <header>gui/LogoBar.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="images.qrc"/> <include location="images.qrc"/>

View File

@ -43,6 +43,7 @@ class NetworkDialog : public RsAutoUpdatePage
Q_PROPERTY(QColor backgroundColorAcceptConnection READ backgroundColorAcceptConnection WRITE setBackgroundColorAcceptConnection) Q_PROPERTY(QColor backgroundColorAcceptConnection READ backgroundColorAcceptConnection WRITE setBackgroundColorAcceptConnection)
Q_PROPERTY(QColor backgroundColorHasSignedMe READ backgroundColorHasSignedMe WRITE setBackgroundColorHasSignedMe) Q_PROPERTY(QColor backgroundColorHasSignedMe READ backgroundColorHasSignedMe WRITE setBackgroundColorHasSignedMe)
Q_PROPERTY(QColor backgroundColorDenied READ backgroundColorDenied WRITE setBackgroundColorDenied) Q_PROPERTY(QColor backgroundColorDenied READ backgroundColorDenied WRITE setBackgroundColorDenied)
Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor)
public: public:
/** Default Constructor */ /** Default Constructor */
@ -55,12 +56,14 @@ public:
QColor backgroundColorAcceptConnection() const { return mBackgroundColorAcceptConnection; } QColor backgroundColorAcceptConnection() const { return mBackgroundColorAcceptConnection; }
QColor backgroundColorHasSignedMe() const { return mBackgroundColorHasSignedMe; } QColor backgroundColorHasSignedMe() const { return mBackgroundColorHasSignedMe; }
QColor backgroundColorDenied() const { return mBackgroundColorDenied; } QColor backgroundColorDenied() const { return mBackgroundColorDenied; }
QColor textColor() const { return mTextColor; }
void setBackgroundColorSelf(QColor color) { PGPIdItemModel->setBackgroundColorSelf(color); mBackgroundColorSelf = color; } void setBackgroundColorSelf(QColor color) { PGPIdItemModel->setBackgroundColorSelf(color); mBackgroundColorSelf = color; }
void setBackgroundColorOwnSign(QColor color) { PGPIdItemModel->setBackgroundColorOwnSign(color); mBackgroundColorOwnSign = color; } void setBackgroundColorOwnSign(QColor color) { PGPIdItemModel->setBackgroundColorOwnSign(color); mBackgroundColorOwnSign = color; }
void setBackgroundColorAcceptConnection(QColor color) { PGPIdItemModel->setBackgroundColorAcceptConnection(color); mBackgroundColorAcceptConnection = color; } void setBackgroundColorAcceptConnection(QColor color) { PGPIdItemModel->setBackgroundColorAcceptConnection(color); mBackgroundColorAcceptConnection = color; }
void setBackgroundColorHasSignedMe(QColor color) { PGPIdItemModel->setBackgroundColorHasSignedMe(color); mBackgroundColorHasSignedMe = color; } void setBackgroundColorHasSignedMe(QColor color) { PGPIdItemModel->setBackgroundColorHasSignedMe(color); mBackgroundColorHasSignedMe = color; }
void setBackgroundColorDenied(QColor color) { PGPIdItemModel->setBackgroundColorDenied(color); mBackgroundColorDenied = color; } void setBackgroundColorDenied(QColor color) { PGPIdItemModel->setBackgroundColorDenied(color); mBackgroundColorDenied = color; }
void setTextColor(QColor color) { PGPIdItemModel->setTextColor(color); mTextColor = color; }
protected: protected:
void changeEvent(QEvent *e); void changeEvent(QEvent *e);
@ -89,12 +92,13 @@ private:
void removeKeys(std::set<RsPgpId> selected) ; void removeKeys(std::set<RsPgpId> selected) ;
/* Color definitions (for standard see qss.default) */ /* Color definitions (for standard see default.qss) */
QColor mBackgroundColorSelf; QColor mBackgroundColorSelf;
QColor mBackgroundColorOwnSign; QColor mBackgroundColorOwnSign;
QColor mBackgroundColorAcceptConnection; QColor mBackgroundColorAcceptConnection;
QColor mBackgroundColorHasSignedMe; QColor mBackgroundColorHasSignedMe;
QColor mBackgroundColorDenied; QColor mBackgroundColorDenied;
QColor mTextColor;
RSTreeWidgetItemCompareRole *compareNetworkRole ; RSTreeWidgetItemCompareRole *compareNetworkRole ;

View File

@ -299,6 +299,10 @@ QVariant pgpid_item_model::data(const QModelIndex &index, int role) const
} }
} }
} }
else if(role == Qt::ForegroundRole)
{
return QBrush(mTextColor);
}
return QVariant(); return QVariant();
} }

View File

@ -60,6 +60,7 @@ public:
void setBackgroundColorAcceptConnection(QColor color) { mBackgroundColorAcceptConnection = color; } void setBackgroundColorAcceptConnection(QColor color) { mBackgroundColorAcceptConnection = color; }
void setBackgroundColorHasSignedMe(QColor color) { mBackgroundColorHasSignedMe = color; } void setBackgroundColorHasSignedMe(QColor color) { mBackgroundColorHasSignedMe = color; }
void setBackgroundColorDenied(QColor color) { mBackgroundColorDenied = color; } void setBackgroundColorDenied(QColor color) { mBackgroundColorDenied = color; }
void setTextColor(QColor color) { mTextColor = color; }
public slots: public slots:
@ -73,6 +74,7 @@ private:
QColor mBackgroundColorAcceptConnection; QColor mBackgroundColorAcceptConnection;
QColor mBackgroundColorHasSignedMe; QColor mBackgroundColorHasSignedMe;
QColor mBackgroundColorDenied; QColor mBackgroundColorDenied;
QColor mTextColor;
}; };
#endif // KEY_ITEM_MODEL_H #endif // KEY_ITEM_MODEL_H

View File

@ -504,7 +504,7 @@ void NewsFeed::handleSecurityEvent(std::shared_ptr<const RsEvent> event)
MessageComposer::addConnectAttemptMsg(e.mPgpId, e.mSslId, QString::fromStdString(det.name + "(" + det.location + ")")); MessageComposer::addConnectAttemptMsg(e.mPgpId, e.mSslId, QString::fromStdString(det.name + "(" + det.location + ")"));
} }
void NewsFeed::testFeeds(uint notifyFlags) void NewsFeed::testFeeds(uint /*notifyFlags*/)
{ {
#ifdef TO_REMOVE #ifdef TO_REMOVE
if (!instance) { if (!instance) {

View File

@ -67,7 +67,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="StyledLabel" name="titleBarLabel"> <widget class="QLabel" name="titleBarLabel">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>Activity Stream</string> <string>Activity Stream</string>
</property> </property>
@ -87,7 +94,7 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QComboBox" name="sortComboBox"/> <widget class="RSComboBox" name="sortComboBox"/>
</item> </item>
<item> <item>
<widget class="QPushButton" name="feedOptionsButton"> <widget class="QPushButton" name="feedOptionsButton">
@ -143,9 +150,9 @@
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>
<class>StyledLabel</class> <class>RSComboBox</class>
<extends>QLabel</extends> <extends>QComboBox</extends>
<header>gui/common/StyledLabel.h</header> <header>gui/common/RSComboBox.h</header>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>RSFeedWidget</class> <class>RSFeedWidget</class>

View File

@ -138,14 +138,14 @@
</layout> </layout>
</item> </item>
<item row="2" column="0" colspan="2"> <item row="2" column="0" colspan="2">
<widget class="QFrame" name="frame"> <widget class="QFrame" name="plainFrame">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding"> <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>1</verstretch> <verstretch>1</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="plainFrame_GL">
<property name="topMargin"> <property name="topMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -185,8 +185,8 @@ p, li { white-space: pre-wrap; }
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>757</width> <width>741</width>
<height>395</height> <height>316</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">

View File

@ -28,7 +28,7 @@
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QComboBox" name="comboBox_shareMode"> <widget class="RSComboBox" name="comboBox_shareMode">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -111,6 +111,13 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
</customwidgets>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>

View File

@ -153,7 +153,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="comboBox"> <widget class="RSComboBox" name="comboBox">
<item> <item>
<property name="text"> <property name="text">
<string>50 %</string> <string>50 %</string>
@ -302,6 +302,13 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
</customwidgets>
<resources> <resources>
<include location="../images.qrc"/> <include location="../images.qrc"/>
<include location="../icons.qrc"/> <include location="../icons.qrc"/>

View File

@ -61,7 +61,7 @@
<string>Edit Album Details</string> <string>Edit Album Details</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../images.qrc"> <iconset>
<normaloff>:/images/edit_16.png</normaloff>:/images/edit_16.png</iconset> <normaloff>:/images/edit_16.png</normaloff>:/images/edit_16.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
@ -186,6 +186,11 @@
</property> </property>
<item> <item>
<widget class="QPushButton" name="pushButton_YourAlbums"> <widget class="QPushButton" name="pushButton_YourAlbums">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>My Albums</string> <string>My Albums</string>
</property> </property>
@ -212,6 +217,11 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="pushButton_SubscribedAlbums"> <widget class="QPushButton" name="pushButton_SubscribedAlbums">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>Subscribed Albums</string> <string>Subscribed Albums</string>
</property> </property>
@ -238,6 +248,11 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="pushButton_SharedAlbums"> <widget class="QPushButton" name="pushButton_SharedAlbums">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>Shared Albums</string> <string>Shared Albums</string>
</property> </property>
@ -286,7 +301,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>804</width> <width>804</width>
<height>208</height> <height>205</height>
</rect> </rect>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -322,7 +337,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>804</width> <width>804</width>
<height>208</height> <height>205</height>
</rect> </rect>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">

View File

@ -24,6 +24,11 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>Album Name</string> <string>Album Name</string>
</property> </property>
@ -155,8 +160,6 @@
</layout> </layout>
</widget> </widget>
<resources> <resources>
<include location="Photo_images.qrc"/>
<include location="../images.qrc"/>
<include location="../icons.qrc"/> <include location="../icons.qrc"/>
</resources> </resources>
<connections/> <connections/>

View File

@ -108,15 +108,15 @@ void BoardPostDisplayWidgetBase::makeUpVote()
void BoardPostDisplayWidgetBase::setReadStatus(bool isNew, bool isUnread) void BoardPostDisplayWidgetBase::setReadStatus(bool isNew, bool isUnread)
{ {
if (isUnread) if (isUnread)
readButton()->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/message-state-unread.png")); readButton()->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/message-state-unread.png"));
else else
readButton()->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/message-state-read.png")); readButton()->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/message-state-read.png"));
newLabel()->setVisible(isNew); newLabel()->setVisible(isNew);
mainFrame()->setProperty("new", isNew); feedFrame()->setProperty("new", isNew);
mainFrame()->style()->unpolish(mainFrame()); feedFrame()->style()->unpolish(feedFrame());
mainFrame()->style()->polish(mainFrame()); feedFrame()->style()->polish( feedFrame());
} }
void BoardPostDisplayWidget_compact::doExpand(bool e) void BoardPostDisplayWidget_compact::doExpand(bool e)
@ -174,8 +174,9 @@ void BoardPostDisplayWidgetBase::setup()
menu->addAction(CopyLinkAction); menu->addAction(CopyLinkAction);
menu->addSeparator(); menu->addSeparator();
shareButton()->setMenu(menu); shareButton()->setMenu(menu);
shareButton()->setPopupMode(QToolButton::InstantPopup);
connect(shareButton(),SIGNAL(pressed()),this,SLOT(handleShareButtonClicked())); connect(menu,SIGNAL(aboutToShow()),this,SLOT(handleShareButtonClicked()));
RsReputationLevel overall_reputation = rsReputations->overallReputationLevel(mPost.mMeta.mAuthorId); RsReputationLevel overall_reputation = rsReputations->overallReputationLevel(mPost.mMeta.mAuthorId);
bool redacted = (overall_reputation == RsReputationLevel::LOCALLY_NEGATIVE); bool redacted = (overall_reputation == RsReputationLevel::LOCALLY_NEGATIVE);
@ -293,17 +294,17 @@ void BoardPostDisplayWidgetBase::handleCopyLinkClicked()
BoardPostDisplayWidget_compact::BoardPostDisplayWidget_compact(const RsPostedPost& post, uint8_t display_flags,QWidget *parent=nullptr) BoardPostDisplayWidget_compact::BoardPostDisplayWidget_compact(const RsPostedPost& post, uint8_t display_flags,QWidget *parent=nullptr)
: BoardPostDisplayWidgetBase(post,display_flags,parent), ui(new Ui::BoardPostDisplayWidget_compact()) : BoardPostDisplayWidgetBase(post,display_flags,parent), ui(new Ui::BoardPostDisplayWidget_compact())
{ {
ui->setupUi(this); ui->setupUi(this);
setup(); setup();
ui->verticalLayout->addStretch(); ui->right_VL->addStretch();
ui->verticalLayout->setAlignment(Qt::AlignTop); ui->right_VL->setAlignment(Qt::AlignTop);
ui->topLayout->setAlignment(Qt::AlignTop); ui->topLayout->setAlignment(Qt::AlignTop);
ui->arrowsLayout->addStretch(); ui->arrowsLayout->addStretch();
ui->arrowsLayout->setAlignment(Qt::AlignTop); ui->arrowsLayout->setAlignment(Qt::AlignTop);
ui->verticalLayout_2->addStretch(); ui->feedFrame_VL->addStretch();
adjustSize(); adjustSize();
} }
BoardPostDisplayWidget_compact::~BoardPostDisplayWidget_compact() BoardPostDisplayWidget_compact::~BoardPostDisplayWidget_compact()
@ -414,9 +415,9 @@ QLabel *BoardPostDisplayWidget_compact::dateLabel() { return ui->da
QLabel *BoardPostDisplayWidget_compact::titleLabel() { return ui->titleLabel; } QLabel *BoardPostDisplayWidget_compact::titleLabel() { return ui->titleLabel; }
QLabel *BoardPostDisplayWidget_compact::scoreLabel() { return ui->scoreLabel; } QLabel *BoardPostDisplayWidget_compact::scoreLabel() { return ui->scoreLabel; }
QLabel *BoardPostDisplayWidget_compact::notes() { return ui->notes; } QLabel *BoardPostDisplayWidget_compact::notes() { return ui->notes; }
QPushButton *BoardPostDisplayWidget_compact::shareButton() { return ui->shareButton; } QToolButton *BoardPostDisplayWidget_compact::shareButton() { return ui->shareButton; }
QLabel *BoardPostDisplayWidget_compact::pictureLabel() { return ui->pictureLabel; } QLabel *BoardPostDisplayWidget_compact::pictureLabel() { return ui->pictureLabel; }
QFrame *BoardPostDisplayWidget_compact::mainFrame() { return ui->mainFrame; } QFrame *BoardPostDisplayWidget_compact::feedFrame() { return ui->feedFrame; }
//=================================================================================================================================== //===================================================================================================================================
//== class BoardPostDisplayWidget_card == //== class BoardPostDisplayWidget_card ==
@ -425,17 +426,17 @@ QFrame *BoardPostDisplayWidget_compact::mainFrame() { return ui->ma
BoardPostDisplayWidget_card::BoardPostDisplayWidget_card(const RsPostedPost& post, uint8_t display_flags, QWidget *parent) BoardPostDisplayWidget_card::BoardPostDisplayWidget_card(const RsPostedPost& post, uint8_t display_flags, QWidget *parent)
: BoardPostDisplayWidgetBase(post,display_flags,parent), ui(new Ui::BoardPostDisplayWidget_card()) : BoardPostDisplayWidgetBase(post,display_flags,parent), ui(new Ui::BoardPostDisplayWidget_card())
{ {
ui->setupUi(this); ui->setupUi(this);
setup(); setup();
ui->verticalLayout->addStretch(); ui->right_VL->addStretch();
ui->verticalLayout->setAlignment(Qt::AlignTop); ui->right_VL->setAlignment(Qt::AlignTop);
ui->topLayout->setAlignment(Qt::AlignTop); ui->topLayout->setAlignment(Qt::AlignTop);
ui->arrowsLayout->addStretch(); ui->arrowsLayout->addStretch();
ui->arrowsLayout->setAlignment(Qt::AlignTop); ui->arrowsLayout->setAlignment(Qt::AlignTop);
ui->verticalLayout_2->addStretch(); ui->feedFrame_VL->addStretch();
adjustSize(); adjustSize();
} }
BoardPostDisplayWidget_card::~BoardPostDisplayWidget_card() BoardPostDisplayWidget_card::~BoardPostDisplayWidget_card()
@ -493,7 +494,7 @@ QLabel *BoardPostDisplayWidget_card::dateLabel() { return ui->dateL
QLabel *BoardPostDisplayWidget_card::titleLabel() { return ui->titleLabel; } QLabel *BoardPostDisplayWidget_card::titleLabel() { return ui->titleLabel; }
QLabel *BoardPostDisplayWidget_card::scoreLabel() { return ui->scoreLabel; } QLabel *BoardPostDisplayWidget_card::scoreLabel() { return ui->scoreLabel; }
QLabel *BoardPostDisplayWidget_card::notes() { return ui->notes; } QLabel *BoardPostDisplayWidget_card::notes() { return ui->notes; }
QPushButton *BoardPostDisplayWidget_card::shareButton() { return ui->shareButton; } QToolButton *BoardPostDisplayWidget_card::shareButton() { return ui->shareButton; }
QLabel *BoardPostDisplayWidget_card::pictureLabel() { return ui->pictureLabel; } QLabel *BoardPostDisplayWidget_card::pictureLabel() { return ui->pictureLabel; }
QFrame *BoardPostDisplayWidget_card::mainFrame() { return ui->mainFrame; } QFrame *BoardPostDisplayWidget_card::feedFrame() { return ui->feedFrame; }

View File

@ -78,8 +78,8 @@ protected slots:
virtual QLabel *notes() =0; virtual QLabel *notes() =0;
virtual QLabel *pictureLabel()=0; virtual QLabel *pictureLabel()=0;
virtual QToolButton *readButton() =0; virtual QToolButton *readButton() =0;
virtual QPushButton *shareButton() =0; virtual QToolButton *shareButton() =0;
virtual QFrame *mainFrame() =0; virtual QFrame *feedFrame() =0;
void loadComments(bool e); void loadComments(bool e);
void readToggled(); void readToggled();
@ -126,8 +126,8 @@ public:
QLabel *notes() override; QLabel *notes() override;
QLabel *pictureLabel() override; QLabel *pictureLabel() override;
QToolButton *readButton() override; QToolButton *readButton() override;
QPushButton *shareButton() override; QToolButton *shareButton() override;
QFrame *mainFrame() override; QFrame *feedFrame() override;
public slots: public slots:
void viewPicture() ; void viewPicture() ;
@ -164,9 +164,9 @@ public:
QLabel *scoreLabel() override; QLabel *scoreLabel() override;
QLabel *notes() override; QLabel *notes() override;
QToolButton *readButton() override; QToolButton *readButton() override;
QPushButton *shareButton() override; QToolButton *shareButton() override;
QLabel *pictureLabel() override; QLabel *pictureLabel() override;
QFrame *mainFrame() override; QFrame *feedFrame() override;
protected slots: protected slots:
/* GxsGroupFeedItem */ /* GxsGroupFeedItem */

View File

@ -22,7 +22,7 @@
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true"/>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="BoardPostDisplayWidget_card_HL">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
@ -42,7 +42,7 @@
<number>2</number> <number>2</number>
</property> </property>
<item> <item>
<widget class="QFrame" name="mainFrame"> <widget class="QFrame" name="feedFrame">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum"> <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -55,7 +55,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="feedFrame_VL">
<property name="spacing"> <property name="spacing">
<number>2</number> <number>2</number>
</property> </property>
@ -127,10 +127,10 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="StyledLabel" name="scoreLabel"> <widget class="QLabel" name="scoreLabel">
<property name="font"> <property name="font">
<font> <font>
<pointsize>9</pointsize> <pointsize>14</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -177,9 +177,9 @@
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="right_VL">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="from_HL">
<property name="spacing"> <property name="spacing">
<number>5</number> <number>5</number>
</property> </property>
@ -199,8 +199,8 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<weight>50</weight> <weight>75</weight>
<bold>false</bold> <bold>true</bold>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -277,7 +277,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_4"> <spacer name="from_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -295,7 +295,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<widget class="StyledLabel" name="titleLabel"> <widget class="QLabel" name="titleLabel">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -304,9 +304,9 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>Arial</family> <pointsize>12</pointsize>
<pointsize>10</pointsize>
<weight>75</weight> <weight>75</weight>
<italic>true</italic>
<bold>true</bold> <bold>true</bold>
</font> </font>
</property> </property>
@ -340,7 +340,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer"> <spacer name="pictureLabel_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -371,7 +371,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="buttons_HL">
<item> <item>
<widget class="QToolButton" name="commentButton"> <widget class="QToolButton" name="commentButton">
<property name="text"> <property name="text">
@ -393,7 +393,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="shareButton"> <widget class="QToolButton" name="shareButton">
<property name="text"> <property name="text">
<string>Share</string> <string>Share</string>
</property> </property>
@ -401,13 +401,16 @@
<iconset resource="Posted_images.qrc"> <iconset resource="Posted_images.qrc">
<normaloff>:/images/share.png</normaloff>:/images/share.png</iconset> <normaloff>:/images/share.png</normaloff>:/images/share.png</iconset>
</property> </property>
<property name="flat"> <property name="autoRaise">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_2"> <spacer name="buttons_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -436,15 +439,10 @@
<extends>QLabel</extends> <extends>QLabel</extends>
<header>gui/gxs/GxsIdLabel.h</header> <header>gui/gxs/GxsIdLabel.h</header>
</customwidget> </customwidget>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="Posted_images.qrc"/>
<include location="../images.qrc"/> <include location="../images.qrc"/>
<include location="Posted_images.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -22,7 +22,7 @@
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true"/>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="BoardPostDisplayWidget_compact_HL">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
@ -42,7 +42,7 @@
<number>2</number> <number>2</number>
</property> </property>
<item> <item>
<widget class="QFrame" name="mainFrame"> <widget class="QFrame" name="feedFrame">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum"> <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -55,7 +55,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="feedFrame_VL">
<property name="spacing"> <property name="spacing">
<number>2</number> <number>2</number>
</property> </property>
@ -89,78 +89,80 @@
<number>2</number> <number>2</number>
</property> </property>
<item> <item>
<layout class="QVBoxLayout" name="arrowsLayout"> <widget class="QFrame" name="voteFrame">
<item> <layout class="QVBoxLayout" name="arrowsLayout">
<widget class="QToolButton" name="voteUpButton"> <item>
<property name="sizePolicy"> <widget class="QToolButton" name="voteUpButton">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <property name="sizePolicy">
<horstretch>0</horstretch> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<verstretch>0</verstretch> <horstretch>0</horstretch>
</sizepolicy> <verstretch>0</verstretch>
</property> </sizepolicy>
<property name="toolTip"> </property>
<string>Vote up</string> <property name="toolTip">
</property> <string>Vote up</string>
<property name="text"> </property>
<string/> <property name="text">
</property> <string/>
<property name="icon"> </property>
<iconset resource="Posted_images.qrc"> <property name="icon">
<normaloff>:/images/up-arrow.png</normaloff>:/images/up-arrow.png</iconset> <iconset resource="Posted_images.qrc">
</property> <normaloff>:/images/up-arrow.png</normaloff>:/images/up-arrow.png</iconset>
<property name="autoRaise"> </property>
<bool>true</bool> <property name="autoRaise">
</property> <bool>true</bool>
</widget> </property>
</item> </widget>
<item> </item>
<widget class="StyledLabel" name="scoreLabel"> <item>
<property name="font"> <widget class="QLabel" name="scoreLabel">
<font> <property name="font">
<pointsize>9</pointsize> <font>
</font> <pointsize>14</pointsize>
</property> </font>
<property name="text"> </property>
<string>0</string> <property name="text">
</property> <string>0</string>
<property name="alignment"> </property>
<set>Qt::AlignCenter</set> <property name="alignment">
</property> <set>Qt::AlignCenter</set>
</widget> </property>
</item> </widget>
<item> </item>
<widget class="QToolButton" name="voteDownButton"> <item>
<property name="sizePolicy"> <widget class="QToolButton" name="voteDownButton">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <property name="sizePolicy">
<horstretch>0</horstretch> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<verstretch>0</verstretch> <horstretch>0</horstretch>
</sizepolicy> <verstretch>0</verstretch>
</property> </sizepolicy>
<property name="minimumSize"> </property>
<size> <property name="minimumSize">
<width>0</width> <size>
<height>0</height> <width>0</width>
</size> <height>0</height>
</property> </size>
<property name="toolTip"> </property>
<string>Vote down</string> <property name="toolTip">
</property> <string>Vote down</string>
<property name="styleSheet"> </property>
<string notr="true"/> <property name="styleSheet">
</property> <string notr="true"/>
<property name="text"> </property>
<string>\/</string> <property name="text">
</property> <string>\/</string>
<property name="icon"> </property>
<iconset resource="Posted_images.qrc"> <property name="icon">
<normaloff>:/images/down-arrow.png</normaloff>:/images/down-arrow.png</iconset> <iconset resource="Posted_images.qrc">
</property> <normaloff>:/images/down-arrow.png</normaloff>:/images/down-arrow.png</iconset>
<property name="autoRaise"> </property>
<bool>true</bool> <property name="autoRaise">
</property> <bool>true</bool>
</widget> </property>
</item> </widget>
</layout> </item>
</layout>
</widget>
</item> </item>
<item> <item>
<widget class="ZoomableLabel" name="pictureLabel"> <widget class="ZoomableLabel" name="pictureLabel">
@ -182,12 +184,12 @@
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="right_VL">
<property name="leftMargin"> <property name="leftMargin">
<number>3</number> <number>3</number>
</property> </property>
<item> <item>
<widget class="StyledLabel" name="titleLabel"> <widget class="QLabel" name="titleLabel">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -196,9 +198,9 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>Arial</family> <pointsize>12</pointsize>
<pointsize>10</pointsize>
<weight>75</weight> <weight>75</weight>
<italic>true</italic>
<bold>true</bold> <bold>true</bold>
</font> </font>
</property> </property>
@ -220,7 +222,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="from_HL">
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
@ -243,8 +245,8 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<weight>50</weight> <weight>75</weight>
<bold>false</bold> <bold>true</bold>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -285,7 +287,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_4"> <spacer name="from_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -303,7 +305,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="buttons_HM">
<item> <item>
<widget class="QToolButton" name="commentButton"> <widget class="QToolButton" name="commentButton">
<property name="text"> <property name="text">
@ -345,7 +347,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="shareButton"> <widget class="QToolButton" name="shareButton">
<property name="text"> <property name="text">
<string>Share</string> <string>Share</string>
</property> </property>
@ -353,7 +355,10 @@
<iconset resource="Posted_images.qrc"> <iconset resource="Posted_images.qrc">
<normaloff>:/images/share.png</normaloff>:/images/share.png</iconset> <normaloff>:/images/share.png</normaloff>:/images/share.png</iconset>
</property> </property>
<property name="flat"> <property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
@ -395,7 +400,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_2"> <spacer name="buttons_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -421,7 +426,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="frame_notes_HL">
<property name="spacing"> <property name="spacing">
<number>2</number> <number>2</number>
</property> </property>
@ -474,11 +479,6 @@
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
<customwidget> <customwidget>
<class>GxsIdLabel</class> <class>GxsIdLabel</class>
<extends>QLabel</extends> <extends>QLabel</extends>

View File

@ -24,6 +24,7 @@
<family>MS Sans Serif</family> <family>MS Sans Serif</family>
<pointsize>11</pointsize> <pointsize>11</pointsize>
<weight>75</weight> <weight>75</weight>
<italic>true</italic>
<bold>true</bold> <bold>true</bold>
</font> </font>
</property> </property>
@ -36,14 +37,14 @@
</widget> </widget>
</item> </item>
<item row="1" column="0" colspan="2"> <item row="1" column="0" colspan="2">
<widget class="QFrame" name="frame"> <widget class="QFrame" name="plainFrame">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="plainFrame_GL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -133,7 +134,10 @@
<property name="font"> <property name="font">
<font> <font>
<family>MS Sans Serif</family> <family>MS Sans Serif</family>
<pointsize>9</pointsize> <pointsize>11</pointsize>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
</font> </font>
</property> </property>
<property name="text"> <property name="text">

View File

@ -104,12 +104,12 @@ void PostedCardView::setReadStatus(bool isNew, bool isUnread)
ui->newLabel->setVisible(isNew); ui->newLabel->setVisible(isNew);
ui->mainFrame->setProperty("new", isNew); ui->feedFrame->setProperty("new", isNew);
ui->mainFrame->style()->unpolish(ui->mainFrame); ui->feedFrame->style()->unpolish(ui->feedFrame);
ui->mainFrame->style()->polish( ui->mainFrame); ui->feedFrame->style()->polish( ui->feedFrame);
} }
void PostedCardView::setComment(const RsGxsComment& cmt) {} void PostedCardView::setComment(const RsGxsComment& /*cmt*/) {}
PostedCardView::~PostedCardView() PostedCardView::~PostedCardView()
{ {
@ -192,11 +192,11 @@ void PostedCardView::fill()
ui->dateLabel->setText(timestamp); ui->dateLabel->setText(timestamp);
} else { } else {
QPixmap sqpixmap2 = FilesDefs::getPixmapFromQtResourcePath(":/images/thumb-default.png"); //QPixmap sqpixmap2 = FilesDefs::getPixmapFromQtResourcePath(":/images/thumb-default.png");
mInFill = true; mInFill = true;
int desired_height = 1.5*(ui->voteDownButton->height() + ui->voteUpButton->height() + ui->scoreLabel->height()); //int desired_height = 1.5*(ui->voteDownButton->height() + ui->voteUpButton->height() + ui->scoreLabel->height());
int desired_width = sqpixmap2.width()*desired_height/(float)sqpixmap2.height(); //int desired_width = sqpixmap2.width()*desired_height/(float)sqpixmap2.height();
QDateTime qtime; QDateTime qtime;
qtime.setTime_t(mPost.mMeta.mPublishTs); qtime.setTime_t(mPost.mMeta.mPublishTs);
@ -211,7 +211,6 @@ void PostedCardView::fill()
// The only combination that seems to work: load as EncodedUrl, extract toEncoded(). // The only combination that seems to work: load as EncodedUrl, extract toEncoded().
QByteArray urlarray(mPost.mLink.c_str()); QByteArray urlarray(mPost.mLink.c_str());
QUrl url = QUrl::fromEncoded(urlarray.trimmed()); QUrl url = QUrl::fromEncoded(urlarray.trimmed());
QString urlstr = "Invalid Link";
QString sitestr = "Invalid Link"; QString sitestr = "Invalid Link";
bool urlOkay = url.isValid(); bool urlOkay = url.isValid();
@ -230,7 +229,7 @@ void PostedCardView::fill()
if (urlOkay) if (urlOkay)
{ {
urlstr = QString("<a href=\""); QString urlstr = QString("<a href=\"");
urlstr += QString(url.toEncoded()); urlstr += QString(url.toEncoded());
urlstr += QString("\" ><span style=\" text-decoration: underline; color:#2255AA;\"> "); urlstr += QString("\" ><span style=\" text-decoration: underline; color:#2255AA;\"> ");
urlstr += messageName(); urlstr += messageName();
@ -259,7 +258,6 @@ void PostedCardView::fill()
GxsIdDetails::loadPixmapFromData(mPost.mImage.mData, mPost.mImage.mSize, pixmap,GxsIdDetails::ORIGINAL); GxsIdDetails::loadPixmapFromData(mPost.mImage.mData, mPost.mImage.mSize, pixmap,GxsIdDetails::ORIGINAL);
// Wiping data - as its been passed to thumbnail. // Wiping data - as its been passed to thumbnail.
QPixmap scaledpixmap;
if(pixmap.width() > 800){ if(pixmap.width() > 800){
QPixmap scaledpixmap = pixmap.scaledToWidth(800, Qt::SmoothTransformation); QPixmap scaledpixmap = pixmap.scaledToWidth(800, Qt::SmoothTransformation);
ui->pictureLabel->setPixmap(scaledpixmap); ui->pictureLabel->setPixmap(scaledpixmap);
@ -267,14 +265,14 @@ void PostedCardView::fill()
ui->pictureLabel->setPixmap(pixmap); ui->pictureLabel->setPixmap(pixmap);
} }
} }
else if (mPost.mImage.mData == NULL) else //if (mPost.mImage.mData == NULL)
{ {
ui->picture_frame->hide(); ui->picture_frame->hide();
} }
else //else
{ //{
ui->picture_frame->show(); // ui->picture_frame->show();
} //}
} }
//QString score = "Hot" + QString::number(post.mHotScore); //QString score = "Hot" + QString::number(post.mHotScore);

View File

@ -33,7 +33,7 @@
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QFrame" name="mainFrame"> <widget class="QFrame" name="feedFrame">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -49,7 +49,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Sunken</enum> <enum>QFrame::Sunken</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="feedFrame_GL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -69,7 +69,7 @@
<number>6</number> <number>6</number>
</property> </property>
<item row="1" column="1"> <item row="1" column="1">
<widget class="StyledLabel" name="titleLabel"> <widget class="QLabel" name="titleLabel">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -78,9 +78,9 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>Arial</family> <pointsize>11</pointsize>
<pointsize>10</pointsize>
<weight>75</weight> <weight>75</weight>
<italic>true</italic>
<bold>true</bold> <bold>true</bold>
</font> </font>
</property> </property>
@ -290,10 +290,10 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="StyledLabel" name="scoreLabel"> <widget class="QLabel" name="scoreLabel">
<property name="font"> <property name="font">
<font> <font>
<pointsize>9</pointsize> <pointsize>14</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -506,11 +506,6 @@
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
<customwidget> <customwidget>
<class>GxsIdLabel</class> <class>GxsIdLabel</class>
<extends>QLabel</extends> <extends>QLabel</extends>
@ -518,9 +513,9 @@
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="Posted_images.qrc"/>
<include location="../images.qrc"/> <include location="../images.qrc"/>
<include location="../icons.qrc"/> <include location="../icons.qrc"/>
<include location="Posted_images.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -53,10 +53,10 @@ PostedCreatePostDialog::PostedCreatePostDialog(RsPosted *posted, const RsGxsGrou
ui->setupUi(this); ui->setupUi(this);
Settings->loadWidgetInformation(this); Settings->loadWidgetInformation(this);
connect(ui->submitButton, SIGNAL(clicked()), this, SLOT(createPost())); connect(ui->postButton, SIGNAL(clicked()), this, SLOT(createPost()));
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject())); connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
connect(ui->addPicButton, SIGNAL(clicked() ), this , SLOT(addPicture())); connect(ui->addPicButton, SIGNAL(clicked() ), this , SLOT(addPicture()));
connect(ui->RichTextEditWidget, SIGNAL(textSizeOk(bool)),ui->submitButton, SLOT(setEnabled(bool))); connect(ui->RichTextEditWidget, SIGNAL(textSizeOk(bool)),ui->postButton, SLOT(setEnabled(bool)));
ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/postedlinks.png")); ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/postedlinks.png"));
ui->headerFrame->setHeaderText(tr("Create a new Post")); ui->headerFrame->setHeaderText(tr("Create a new Post"));
@ -74,13 +74,13 @@ PostedCreatePostDialog::PostedCreatePostDialog(RsPosted *posted, const RsGxsGrou
ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, default_author); ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, default_author);
QSignalMapper *signalMapper = new QSignalMapper(this); QSignalMapper *signalMapper = new QSignalMapper(this);
connect(ui->postButton, SIGNAL(clicked()), signalMapper, SLOT(map())); connect(ui->viewPostButton, SIGNAL(clicked()), signalMapper, SLOT(map()));
connect(ui->imageButton, SIGNAL(clicked()), signalMapper, SLOT(map())); connect(ui->viewImageButton, SIGNAL(clicked()), signalMapper, SLOT(map()));
connect(ui->linkButton, SIGNAL(clicked()), signalMapper, SLOT(map())); connect(ui->viewLinkButton, SIGNAL(clicked()), signalMapper, SLOT(map()));
signalMapper->setMapping(ui->postButton, VIEW_POST); signalMapper->setMapping(ui->viewPostButton, VIEW_POST);
signalMapper->setMapping(ui->imageButton, VIEW_IMAGE); signalMapper->setMapping(ui->viewImageButton, VIEW_IMAGE);
signalMapper->setMapping(ui->linkButton, VIEW_LINK); signalMapper->setMapping(ui->viewLinkButton, VIEW_LINK);
connect(signalMapper, SIGNAL(mapped(int)), this, SLOT(setPage(int))); connect(signalMapper, SIGNAL(mapped(int)), this, SLOT(setPage(int)));
ui->removeButton->hide(); ui->removeButton->hide();
@ -189,7 +189,7 @@ void PostedCreatePostDialog::fileHashingFinished(QList<HashedFile> hashedFiles)
link = RetroShareLink::createFile(hashedFile.filename, hashedFile.size, QString::fromStdString(hashedFile.hash.toStdString())); link = RetroShareLink::createFile(hashedFile.filename, hashedFile.size, QString::fromStdString(hashedFile.hash.toStdString()));
ui->linkEdit->setText(link.toString()); ui->linkEdit->setText(link.toString());
} }
ui->submitButton->setEnabled(true); ui->postButton->setEnabled(true);
ui->addPicButton->setEnabled(true); ui->addPicButton->setEnabled(true);
} }
@ -233,7 +233,7 @@ void PostedCreatePostDialog::addPicture()
//If still yes then link it //If still yes then link it
if(answer == QMessageBox::Yes) { if(answer == QMessageBox::Yes) {
ui->submitButton->setEnabled(false); ui->postButton->setEnabled(false);
ui->addPicButton->setEnabled(false); ui->addPicButton->setEnabled(false);
QStringList files; QStringList files;
files.append(imagefilename); files.append(imagefilename);
@ -245,11 +245,11 @@ void PostedCreatePostDialog::addPicture()
int PostedCreatePostDialog::viewMode() int PostedCreatePostDialog::viewMode()
{ {
if (ui->postButton->isChecked()) { if (ui->viewPostButton->isChecked()) {
return VIEW_POST; return VIEW_POST;
} else if (ui->imageButton->isChecked()) { } else if (ui->viewImageButton->isChecked()) {
return VIEW_IMAGE; return VIEW_IMAGE;
} else if (ui->linkButton->isChecked()) { } else if (ui->viewLinkButton->isChecked()) {
return VIEW_LINK; return VIEW_LINK;
} }
@ -263,25 +263,25 @@ void PostedCreatePostDialog::setPage(int viewMode)
case VIEW_POST: case VIEW_POST:
ui->stackedWidget->setCurrentIndex(0); ui->stackedWidget->setCurrentIndex(0);
ui->postButton->setChecked(true); ui->viewPostButton->setChecked(true);
ui->imageButton->setChecked(false); ui->viewImageButton->setChecked(false);
ui->linkButton->setChecked(false); ui->viewLinkButton->setChecked(false);
break; break;
case VIEW_IMAGE: case VIEW_IMAGE:
ui->stackedWidget->setCurrentIndex(1); ui->stackedWidget->setCurrentIndex(1);
ui->imageButton->setChecked(true); ui->viewImageButton->setChecked(true);
ui->postButton->setChecked(false); ui->viewPostButton->setChecked(false);
ui->linkButton->setChecked(false); ui->viewLinkButton->setChecked(false);
break; break;
case VIEW_LINK: case VIEW_LINK:
ui->stackedWidget->setCurrentIndex(2); ui->stackedWidget->setCurrentIndex(2);
ui->linkButton->setChecked(true); ui->viewLinkButton->setChecked(true);
ui->postButton->setChecked(false); ui->viewPostButton->setChecked(false);
ui->imageButton->setChecked(false); ui->viewImageButton->setChecked(false);
break; break;
default: default:

View File

@ -40,21 +40,21 @@
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QFrame" name="mainFrame"> <widget class="QFrame" name="gradFrame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gradFrame_GL">
<item row="4" column="0" colspan="3"> <item row="4" column="0" colspan="3">
<widget class="QStackedWidget" name="stackedWidget"> <widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="stackedWidgetPage1"> <widget class="QWidget" name="stackedWidgetPage1">
<layout class="QGridLayout" name="gridLayout_5"> <layout class="QGridLayout" name="stackedWidgetPage1_GL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -73,7 +73,7 @@
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="stackedWidgetPage2"> <widget class="QWidget" name="stackedWidgetPage2">
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="stackedWidgetPage2_GL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -104,7 +104,7 @@
<property name="title"> <property name="title">
<string>Preview</string> <string>Preview</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_6"> <layout class="QGridLayout" name="groupBox_GL">
<property name="topMargin"> <property name="topMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -115,7 +115,7 @@
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<spacer name="horizontalSpacer_2"> <spacer name="pictureLeft_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -128,7 +128,7 @@
</spacer> </spacer>
</item> </item>
<item row="0" column="2"> <item row="0" column="2">
<spacer name="horizontalSpacer_3"> <spacer name="pictureRight_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -143,17 +143,17 @@
<item row="0" column="1"> <item row="0" column="1">
<widget class="QStackedWidget" name="stackedWidgetPicture"> <widget class="QStackedWidget" name="stackedWidgetPicture">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>1</number>
</property> </property>
<widget class="QWidget" name="PageAttach"> <widget class="QWidget" name="PageAttach">
<layout class="QGridLayout" name="gridLayout_8"> <layout class="QGridLayout" name="PageAttach_GL">
<item row="0" column="0"> <item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_7"> <layout class="QGridLayout" name="PageAttachTop_GL">
<property name="topMargin"> <property name="topMargin">
<number>9</number> <number>9</number>
</property> </property>
<item row="1" column="0"> <item row="1" column="0">
<spacer name="horizontalSpacer_6"> <spacer name="addPicLeft_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -190,7 +190,7 @@
</widget> </widget>
</item> </item>
<item row="1" column="2"> <item row="1" column="2">
<spacer name="horizontalSpacer_7"> <spacer name="addPicRight_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -203,7 +203,7 @@
</spacer> </spacer>
</item> </item>
<item row="3" column="0" colspan="3"> <item row="3" column="0" colspan="3">
<spacer name="verticalSpacer_2"> <spacer name="addPic_VSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
@ -218,7 +218,7 @@
</layout> </layout>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<spacer name="horizontalSpacer_8"> <spacer name="PageAttach_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -233,7 +233,7 @@
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="PageImage"> <widget class="QWidget" name="PageImage">
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="PageImage_GL">
<property name="topMargin"> <property name="topMargin">
<number>2</number> <number>2</number>
</property> </property>
@ -267,7 +267,7 @@
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<spacer name="horizontalSpacer_5"> <spacer name="PageImage_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -305,7 +305,7 @@
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="stackedWidgetPage3"> <widget class="QWidget" name="stackedWidgetPage3">
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="stackedWidgetPage3_GL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -323,7 +323,7 @@
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<spacer name="verticalSpacer"> <spacer name="linkVSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
@ -340,7 +340,7 @@
</widget> </widget>
</item> </item>
<item row="5" column="0" colspan="3"> <item row="5" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="signed_HL">
<item> <item>
<widget class="QLabel" name="signedLabel"> <widget class="QLabel" name="signedLabel">
<property name="sizePolicy"> <property name="sizePolicy">
@ -367,13 +367,20 @@
</layout> </layout>
</item> </item>
<item row="6" column="1"> <item row="6" column="1">
<widget class="QPushButton" name="submitButton"> <widget class="QPushButton" name="postButton">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true"/>
</property> </property>
@ -399,12 +406,12 @@
</widget> </widget>
</item> </item>
<item row="1" column="0" colspan="3"> <item row="1" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="view_HL">
<property name="spacing"> <property name="spacing">
<number>2</number> <number>2</number>
</property> </property>
<item> <item>
<widget class="QPushButton" name="postButton"> <widget class="QPushButton" name="viewPostButton">
<property name="text"> <property name="text">
<string>Post</string> <string>Post</string>
</property> </property>
@ -424,7 +431,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="imageButton"> <widget class="QPushButton" name="viewImageButton">
<property name="text"> <property name="text">
<string>Image</string> <string>Image</string>
</property> </property>
@ -450,7 +457,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="linkButton"> <widget class="QPushButton" name="viewLinkButton">
<property name="text"> <property name="text">
<string>Link</string> <string>Link</string>
</property> </property>
@ -473,7 +480,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_4"> <spacer name="viewHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -488,10 +495,19 @@
</layout> </layout>
</item> </item>
<item row="0" column="0" colspan="3"> <item row="0" column="0" colspan="3">
<widget class="StyledLabel" name="info_label"> <widget class="QLabel" name="info_Label">
<property name="palette"> <property name="palette">
<palette> <palette>
<active> <active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base"> <colorrole role="Base">
<brush brushstyle="SolidPattern"> <brush brushstyle="SolidPattern">
<color alpha="255"> <color alpha="255">
@ -512,6 +528,15 @@
</colorrole> </colorrole>
</active> </active>
<inactive> <inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base"> <colorrole role="Base">
<brush brushstyle="SolidPattern"> <brush brushstyle="SolidPattern">
<color alpha="255"> <color alpha="255">
@ -532,6 +557,15 @@
</colorrole> </colorrole>
</inactive> </inactive>
<disabled> <disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>154</red>
<green>154</green>
<blue>154</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base"> <colorrole role="Base">
<brush brushstyle="SolidPattern"> <brush brushstyle="SolidPattern">
<color alpha="255"> <color alpha="255">
@ -553,6 +587,11 @@
</disabled> </disabled>
</palette> </palette>
</property> </property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="autoFillBackground"> <property name="autoFillBackground">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -584,7 +623,7 @@
</spacer> </spacer>
</item> </item>
<item row="2" column="0" colspan="3"> <item row="2" column="0" colspan="3">
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="title_VL">
<property name="topMargin"> <property name="topMargin">
<number>6</number> <number>6</number>
</property> </property>
@ -613,15 +652,9 @@
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>
<class>StyledLabel</class> <class>GxsIdChooser</class>
<extends>QLabel</extends> <extends>QComboBox</extends>
<header>gui/common/StyledLabel.h</header> <header>gui/gxs/GxsIdChooser.h</header>
</customwidget>
<customwidget>
<class>HashBox</class>
<extends>QScrollArea</extends>
<header location="global">gui/common/HashBox.h</header>
<container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>HeaderFrame</class> <class>HeaderFrame</class>
@ -629,21 +662,22 @@
<header>gui/common/HeaderFrame.h</header> <header>gui/common/HeaderFrame.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>GxsIdChooser</class>
<extends>QComboBox</extends>
<header>gui/gxs/GxsIdChooser.h</header>
</customwidget>
<customwidget> <customwidget>
<class>RichTextEdit</class> <class>RichTextEdit</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>util/RichTextEdit.h</header> <header>util/RichTextEdit.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>HashBox</class>
<extends>QScrollArea</extends>
<header location="global">gui/common/HashBox.h</header>
<container>1</container>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="Posted_images.qrc"/>
<include location="../icons.qrc"/> <include location="../icons.qrc"/>
<include location="Posted_images.qrc"/>
</resources> </resources>
<connections> <connections>
<connection> <connection>

View File

@ -705,9 +705,9 @@ void PostedItem::setReadStatus(bool isNew, bool isUnread)
//ui->newLabel->setVisible(isNew); //ui->newLabel->setVisible(isNew);
ui->mainFrame->setProperty("new", isNew); ui->feedFrame->setProperty("new", isNew);
ui->mainFrame->style()->unpolish(ui->mainFrame); ui->feedFrame->style()->unpolish(ui->feedFrame);
ui->mainFrame->style()->polish( ui->mainFrame); ui->feedFrame->style()->polish( ui->feedFrame);
} }

View File

@ -33,7 +33,7 @@
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QFrame" name="mainFrame"> <widget class="QFrame" name="feedFrame">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -49,7 +49,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Sunken</enum> <enum>QFrame::Sunken</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="feedFrame_GL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -125,7 +125,12 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="StyledLabel" name="scoreLabel"> <widget class="QLabel" name="scoreLabel">
<property name="font">
<font>
<pointsize>14</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>0</string> <string>0</string>
</property> </property>
@ -248,7 +253,7 @@
<number>6</number> <number>6</number>
</property> </property>
<item> <item>
<widget class="StyledLabel" name="titleLabel"> <widget class="QLabel" name="titleLabel">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -257,7 +262,9 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>11</pointsize>
<weight>75</weight> <weight>75</weight>
<italic>true</italic>
<bold>true</bold> <bold>true</bold>
</font> </font>
</property> </property>
@ -327,6 +334,7 @@
<widget class="QLabel" name="nameLabel"> <widget class="QLabel" name="nameLabel">
<property name="font"> <property name="font">
<font> <font>
<pointsize>11</pointsize>
<weight>75</weight> <weight>75</weight>
<italic>true</italic> <italic>true</italic>
<bold>true</bold> <bold>true</bold>
@ -718,15 +726,10 @@
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
<customwidget> <customwidget>
<class>ElidedLabel</class> <class>ElidedLabel</class>
<extends>QLabel</extends> <extends>QLabel</extends>
<header location="global">gui/common/ElidedLabel.h</header> <header>gui/common/ElidedLabel.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
@ -741,9 +744,9 @@
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="Posted_images.qrc"/>
<include location="../images.qrc"/> <include location="../images.qrc"/>
<include location="../icons.qrc"/> <include location="../icons.qrc"/>
<include location="Posted_images.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -102,7 +102,7 @@ PostedListWidget::PostedListWidget(const RsGxsGroupId &postedId, QWidget *parent
available posts from your subscribed friends, and make the \ available posts from your subscribed friends, and make the \
links visible to all other friends.</p><p>Afterwards you can unsubscribe from the context menu of the links list at left.</p>")); links visible to all other friends.</p><p>Afterwards you can unsubscribe from the context menu of the links list at left.</p>"));
ui->infoframe->hide(); ui->infoFrame->hide();
/* load settings */ /* load settings */
processSettings(true); processSettings(true);
@ -417,7 +417,7 @@ void PostedListWidget::insertPostedDetails(const RsPostedGroup &group)
if (IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags)) { if (IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags)) {
ui->infoframe->hide(); ui->infoFrame->hide();
} else { } else {
@ -472,7 +472,7 @@ void PostedListWidget::insertPostedDetails(const RsPostedGroup &group)
ui->infoDistribution->setText(distrib_string); ui->infoDistribution->setText(distrib_string);
ui->infoframe->show(); ui->infoFrame->show();
} }
} }
@ -771,7 +771,7 @@ void PostedListWidget::applyRanking()
void PostedListWidget::blank() void PostedListWidget::blank()
{ {
clearPosts(); clearPosts();
ui->infoframe->hide(); ui->infoFrame->hide();
} }
void PostedListWidget::clearPosts() void PostedListWidget::clearPosts()
{ {

View File

@ -30,7 +30,7 @@
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QFrame" name="headerFrame"> <widget class="QFrame" name="toolBarFrame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::Box</enum> <enum>QFrame::Box</enum>
</property> </property>
@ -106,7 +106,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="comboBox"> <widget class="RSComboBox" name="comboBox">
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-family:'-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol'; font-size:14pt; color:#24292e; background-color:#ffffff;&quot;&gt;Select sorting&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-family:'-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol'; font-size:14pt; color:#24292e; background-color:#ffffff;&quot;&gt;Select sorting&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
@ -260,7 +260,7 @@
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QFrame" name="infoframe"> <widget class="QFrame" name="infoFrame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
@ -323,7 +323,7 @@
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;Description&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;Description&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="textInteractionFlags"> <property name="textInteractionFlags">
@ -515,7 +515,10 @@ p, li { white-space: pre-wrap; }
<widget class="QLabel" name="namelabel"> <widget class="QLabel" name="namelabel">
<property name="font"> <property name="font">
<font> <font>
<pointsize>14</pointsize> <pointsize>11</pointsize>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -658,16 +661,21 @@ p, li { white-space: pre-wrap; }
<extends>QLabel</extends> <extends>QLabel</extends>
<header>gui/gxs/GxsIdLabel.h</header> <header>gui/gxs/GxsIdLabel.h</header>
</customwidget> </customwidget>
<customwidget>
<class>SubscribeToolButton</class>
<extends>QToolButton</extends>
<header>gui/common/SubscribeToolButton.h</header>
</customwidget>
<customwidget> <customwidget>
<class>GxsIdChooser</class> <class>GxsIdChooser</class>
<extends>QComboBox</extends> <extends>QComboBox</extends>
<header>gui/gxs/GxsIdChooser.h</header> <header>gui/gxs/GxsIdChooser.h</header>
</customwidget> </customwidget>
<customwidget>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
<customwidget>
<class>SubscribeToolButton</class>
<extends>QToolButton</extends>
<header>gui/common/SubscribeToolButton.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="../icons.qrc"/> <include location="../icons.qrc"/>

View File

@ -923,7 +923,7 @@ void PostedListWidgetWithModel::insertBoardDetails(const RsPostedGroup& group)
formatDescription = RsHtml().formatText(NULL, formatDescription, formatFlag); formatDescription = RsHtml().formatText(NULL, formatDescription, formatFlag);
ui->infoDescription->setText(formatDescription); ui->trans_Description->setText(formatDescription);
ui->infoAdministrator->setId(group.mMeta.mAuthorId) ; ui->infoAdministrator->setId(group.mMeta.mAuthorId) ;
link = RetroShareLink::createMessage(group.mMeta.mAuthorId, ""); link = RetroShareLink::createMessage(group.mMeta.mAuthorId, "");

View File

@ -46,7 +46,7 @@
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="0"> <item row="2" column="0">
<widget class="QTextBrowser" name="infoDescription"> <widget class="QTextBrowser" name="trans_Description">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true"/>
</property> </property>
@ -54,7 +54,7 @@
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;Description&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;Description&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="textInteractionFlags"> <property name="textInteractionFlags">
@ -271,9 +271,10 @@ p, li { white-space: pre-wrap; }
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<weight>50</weight> <pointsize>15</pointsize>
<weight>75</weight>
<italic>false</italic> <italic>false</italic>
<bold>false</bold> <bold>true</bold>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -300,7 +301,7 @@ p, li { white-space: pre-wrap; }
</widget> </widget>
</item> </item>
<item row="0" column="1" colspan="3"> <item row="0" column="1" colspan="3">
<widget class="StyledElidedLabel" name="namelabel"> <widget class="ElidedLabel" name="namelabel">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -309,7 +310,9 @@ p, li { white-space: pre-wrap; }
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>11</pointsize>
<weight>75</weight> <weight>75</weight>
<italic>true</italic>
<bold>true</bold> <bold>true</bold>
</font> </font>
</property> </property>
@ -344,7 +347,7 @@ p, li { white-space: pre-wrap; }
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
<widget class="QFrame" name="headerFrame"> <widget class="QFrame" name="toolBarFrame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::Box</enum> <enum>QFrame::Box</enum>
</property> </property>
@ -372,6 +375,12 @@ p, li { white-space: pre-wrap; }
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>Create Post</string> <string>Create Post</string>
</property> </property>
@ -394,7 +403,13 @@ p, li { white-space: pre-wrap; }
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="sortStrategy_CB"> <widget class="RSComboBox" name="sortStrategy_CB">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-family:'-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol'; font-size:14pt; color:#24292e; background-color:#ffffff;&quot;&gt;Select sorting&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-family:'-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol'; font-size:14pt; color:#24292e; background-color:#ffffff;&quot;&gt;Select sorting&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
@ -572,14 +587,15 @@ p, li { white-space: pre-wrap; }
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>
<class>LineEditClear</class> <class>ElidedLabel</class>
<extends>QLineEdit</extends> <extends>QLabel</extends>
<header>gui/common/LineEditClear.h</header> <header>gui/common/ElidedLabel.h</header>
<container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>SubscribeToolButton</class> <class>GxsIdChooser</class>
<extends>QToolButton</extends> <extends>QComboBox</extends>
<header>gui/common/SubscribeToolButton.h</header> <header>gui/gxs/GxsIdChooser.h</header>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>GxsIdLabel</class> <class>GxsIdLabel</class>
@ -587,15 +603,14 @@ p, li { white-space: pre-wrap; }
<header>gui/gxs/GxsIdLabel.h</header> <header>gui/gxs/GxsIdLabel.h</header>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>RSTreeView</class> <class>LineEditClear</class>
<extends>QTreeView</extends> <extends>QLineEdit</extends>
<header>gui/common/RSTreeView.h</header> <header>gui/common/LineEditClear.h</header>
<container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>StyledElidedLabel</class> <class>RSComboBox</class>
<extends>QLabel</extends> <extends>QComboBox</extends>
<header>gui/common/StyledElidedLabel.h</header> <header>gui/common/RSComboBox.h</header>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>RSTabWidget</class> <class>RSTabWidget</class>
@ -604,9 +619,15 @@ p, li { white-space: pre-wrap; }
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>GxsIdChooser</class> <class>RSTreeView</class>
<extends>QComboBox</extends> <extends>QTreeView</extends>
<header>gui/gxs/GxsIdChooser.h</header> <header>gui/common/RSTreeView.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>SubscribeToolButton</class>
<extends>QToolButton</extends>
<header>gui/common/SubscribeToolButton.h</header>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources> <resources>

View File

@ -20,20 +20,23 @@
#include "QuickStartWizard.h" #include "QuickStartWizard.h"
#include <QFileDialog> #include "gui/common/FilesDefs.h"
#include <QSettings> #ifdef USE_COMBOBOX
#include <QCheckBox> #include "gui/common/RSComboBox.h"
#include <QMessageBox> #endif
#include <QComboBox>
#include <QHeaderView>
#include <retroshare/rsfiles.h>
#include <retroshare/rsconfig.h>
#include <retroshare/rspeers.h>
#include <retroshare/rstypes.h>
#include "settings/rsharesettings.h" #include "settings/rsharesettings.h"
#include "util/QtVersion.h" #include "util/QtVersion.h"
#include "gui/common/FilesDefs.h"
#include "retroshare/rsfiles.h"
#include "retroshare/rsconfig.h"
#include "retroshare/rspeers.h"
#include "retroshare/rstypes.h"
#include <QCheckBox>
#include <QFileDialog>
#include <QHeaderView>
#include <QMessageBox>
#include <QSettings>
QuickStartWizard::QuickStartWizard(QWidget *parent) : QuickStartWizard::QuickStartWizard(QWidget *parent) :
QDialog(parent) QDialog(parent)
@ -53,7 +56,7 @@ QuickStartWizard::QuickStartWizard(QWidget *parent) :
// ui.checkBoxF2FRouting->setChecked(true) ; // ui.checkBoxF2FRouting->setChecked(true) ;
// ui.checkBoxF2FRouting->setEnabled(false) ; // ui.checkBoxF2FRouting->setEnabled(false) ;
connect( ui.netModeComboBox, SIGNAL( activated ( int ) ), this, SLOT( toggleUPnP( ) ) ); connect( ui.netModeComboBox, SIGNAL( activated(int) ), this, SLOT( toggleUPnP() ) );
// connect( ui.checkBoxTunnelConnection, SIGNAL( toggled( bool ) ), this, SLOT( toggleTunnelConnection(bool) ) ); // connect( ui.checkBoxTunnelConnection, SIGNAL( toggled( bool ) ), this, SLOT( toggleTunnelConnection(bool) ) );
// bool b = rsPeers->getAllowTunnelConnection() ; // bool b = rsPeers->getAllowTunnelConnection() ;
@ -299,7 +302,7 @@ void QuickStartWizard::loadShare()
listWidget->insertRow(row) ; listWidget->insertRow(row) ;
listWidget->setItem(row,0,new QTableWidgetItem(QString::fromStdString((*it).filename))); listWidget->setItem(row,0,new QTableWidgetItem(QString::fromStdString((*it).filename)));
#ifdef USE_COMBOBOX #ifdef USE_COMBOBOX
QComboBox *cb = new QComboBox ; RSComboBox *cb = new RSComboBox ;
cb->addItem(tr("Network Wide")) ; cb->addItem(tr("Network Wide")) ;
cb->addItem(tr("Browsable")) ; cb->addItem(tr("Browsable")) ;
cb->addItem(tr("Universal")) ; cb->addItem(tr("Universal")) ;
@ -494,7 +497,6 @@ void QuickStartWizard::loadNetwork()
void QuickStartWizard::saveChanges() void QuickStartWizard::saveChanges()
{ {
QString str;
//bool saveAddr = false; //bool saveAddr = false;

View File

@ -334,7 +334,7 @@ p, li { white-space: pre-wrap; }
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QComboBox" name="netModeComboBox"> <widget class="RSComboBox" name="netModeComboBox">
<item> <item>
<property name="text"> <property name="text">
<string>Automatic (UPnP)</string> <string>Automatic (UPnP)</string>
@ -360,7 +360,7 @@ p, li { white-space: pre-wrap; }
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QComboBox" name="discoveryComboBox"> <widget class="RSComboBox" name="discoveryComboBox">
<item> <item>
<property name="text"> <property name="text">
<string>Public: DHT &amp; Discovery</string> <string>Public: DHT &amp; Discovery</string>
@ -1072,6 +1072,11 @@ p, li { white-space: pre-wrap; }
<header>gui/common/HeaderFrame.h</header> <header>gui/common/HeaderFrame.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="images.qrc"/> <include location="images.qrc"/>

View File

@ -16,8 +16,17 @@
<property name="sizeGripEnabled"> <property name="sizeGripEnabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="ServicePermissionDialog_GL">
<property name="margin"> <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> <number>0</number>
</property> </property>
<property name="spacing"> <property name="spacing">
@ -37,14 +46,14 @@
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QFrame" name="frame"> <widget class="QFrame" name="gradFrame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gradFrame_GL">
<item row="0" column="0"> <item row="0" column="0">
<widget class="FriendSelectionWidget" name="servicePermissionList" native="true"> <widget class="FriendSelectionWidget" name="servicePermissionList" native="true">
<property name="sizePolicy"> <property name="sizePolicy">
@ -69,7 +78,7 @@
</widget> </widget>
</item> </item>
</layout> </layout>
<zorder>frame</zorder> <zorder>gradFrame</zorder>
<zorder>headerFrame</zorder> <zorder>headerFrame</zorder>
</widget> </widget>
<customwidgets> <customwidgets>

View File

@ -66,7 +66,7 @@ ShareManager::ShareManager()
Settings->loadWidgetInformation(this); Settings->loadWidgetInformation(this);
connect(ui.addButton, SIGNAL(clicked( bool ) ), this , SLOT( addShare() ) ); connect(ui.addButton, SIGNAL(clicked( bool ) ), this , SLOT( addShare() ) );
connect(ui.closeButton, SIGNAL(clicked()), this, SLOT(applyAndClose())); connect(ui.applyButton, SIGNAL(clicked()), this, SLOT(applyAndClose()));
connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(cancel())); connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
connect(ui.shareddirList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(shareddirListCustomPopupMenu(QPoint))); connect(ui.shareddirList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(shareddirListCustomPopupMenu(QPoint)));

View File

@ -17,7 +17,7 @@
<iconset resource="images.qrc"> <iconset resource="images.qrc">
<normaloff>:/images/logo/logo_16.png</normaloff>:/images/logo/logo_16.png</iconset> <normaloff>:/images/logo/logo_16.png</normaloff>:/images/logo/logo_16.png</iconset>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="ShareManager_GL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -47,14 +47,14 @@
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QFrame" name="frame_2"> <widget class="QFrame" name="gradFrame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::NoFrame</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gradFrame_GL">
<property name="topMargin"> <property name="topMargin">
<number>6</number> <number>6</number>
</property> </property>
@ -63,10 +63,7 @@
<property name="title"> <property name="title">
<string>Shared Folder Manager</string> <string>Shared Folder Manager</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="groupBox_GL">
<property name="topMargin">
<number>2</number>
</property>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QTableWidget" name="shareddirList"> <widget class="QTableWidget" name="shareddirList">
<property name="contextMenuPolicy"> <property name="contextMenuPolicy">
@ -97,7 +94,7 @@
<bool>false</bool> <bool>false</bool>
</attribute> </attribute>
<attribute name="verticalHeaderDefaultSectionSize"> <attribute name="verticalHeaderDefaultSectionSize">
<number>22</number> <number>43</number>
</attribute> </attribute>
<column> <column>
<property name="text"> <property name="text">
@ -132,17 +129,12 @@
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QPushButton" name="addButton"> <widget class="QPushButton" name="addButton">
<property name="minimumSize"> <property name="font">
<size> <font>
<width>0</width> <pointsize>12</pointsize>
<height>0</height> <weight>75</weight>
</size> <bold>true</bold>
</property> </font>
<property name="maximumSize">
<size>
<width>200</width>
<height>200</height>
</size>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Add a Share Directory</string> <string>Add a Share Directory</string>
@ -150,16 +142,10 @@
<property name="text"> <property name="text">
<string>Add new</string> <string>Add new</string>
</property> </property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<spacer> <spacer name="buttons_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -172,7 +158,14 @@
</spacer> </spacer>
</item> </item>
<item row="2" column="2"> <item row="2" column="2">
<widget class="QPushButton" name="closeButton"> <widget class="QPushButton" name="applyButton">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>Apply and close</string> <string>Apply and close</string>
</property> </property>
@ -186,10 +179,19 @@
</widget> </widget>
</item> </item>
<item row="0" column="0" colspan="4"> <item row="0" column="0" colspan="4">
<widget class="StyledLabel" name="labelInstructions"> <widget class="QLabel" name="info_Label">
<property name="palette"> <property name="palette">
<palette> <palette>
<active> <active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base"> <colorrole role="Base">
<brush brushstyle="SolidPattern"> <brush brushstyle="SolidPattern">
<color alpha="255"> <color alpha="255">
@ -210,6 +212,15 @@
</colorrole> </colorrole>
</active> </active>
<inactive> <inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base"> <colorrole role="Base">
<brush brushstyle="SolidPattern"> <brush brushstyle="SolidPattern">
<color alpha="255"> <color alpha="255">
@ -230,6 +241,15 @@
</colorrole> </colorrole>
</inactive> </inactive>
<disabled> <disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>154</red>
<green>154</green>
<blue>154</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base"> <colorrole role="Base">
<brush brushstyle="SolidPattern"> <brush brushstyle="SolidPattern">
<color alpha="255"> <color alpha="255">
@ -251,6 +271,11 @@
</disabled> </disabled>
</palette> </palette>
</property> </property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="autoFillBackground"> <property name="autoFillBackground">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -274,11 +299,6 @@
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
<customwidget> <customwidget>
<class>HeaderFrame</class> <class>HeaderFrame</class>
<extends>QFrame</extends> <extends>QFrame</extends>

View File

@ -252,7 +252,7 @@
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QComboBox" name="loadName"/> <widget class="RSComboBox" name="loadName"/>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLabel" name="password_label"> <widget class="QLabel" name="password_label">
@ -298,6 +298,8 @@
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
@ -355,16 +357,21 @@ p, li { white-space: pre-wrap; }
</item> </item>
</layout> </layout>
</widget> </widget>
<resources>
<include location="images.qrc"/>
<include location="icons.qrc"/>
</resources>
<connections/>
<customwidgets> <customwidgets>
<customwidget> <customwidget>
<class>LineEditClear</class> <class>LineEditClear</class>
<extends>QLineEdit</extends> <extends>QLineEdit</extends>
<header>gui/common/LineEditClear.h</header> <header>gui/common/LineEditClear.h</header>
</customwidget> </customwidget>
<customwidget>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources>
<include location="images.qrc"/>
<include location="icons.qrc"/>
</resources>
<connections/>
</ui> </ui>

View File

@ -35,7 +35,7 @@ PulseAddDialog::PulseAddDialog(QWidget *parent)
{ {
ui.setupUi(this); ui.setupUi(this);
connect(ui.pushButton_Post, SIGNAL( clicked( void ) ), this, SLOT( postPulse( void ) ) ); connect(ui.postButton, SIGNAL( clicked( void ) ), this, SLOT( postPulse( void ) ) );
connect(ui.pushButton_AddURL, SIGNAL( clicked( void ) ), this, SLOT( addURL( void ) ) ); connect(ui.pushButton_AddURL, SIGNAL( clicked( void ) ), this, SLOT( addURL( void ) ) );
connect(ui.pushButton_ClearDisplayAs, SIGNAL( clicked( void ) ), this, SLOT( clearDisplayAs( void ) ) ); connect(ui.pushButton_ClearDisplayAs, SIGNAL( clicked( void ) ), this, SLOT( clearDisplayAs( void ) ) );
connect(ui.pushButton_Cancel, SIGNAL( clicked( void ) ), this, SLOT( cancelPulse( void ) ) ); connect(ui.pushButton_Cancel, SIGNAL( clicked( void ) ), this, SLOT( cancelPulse( void ) ) );
@ -98,10 +98,9 @@ void PulseAddDialog::cleanup()
QLayout *layout = ui.widget_replyto->layout(); QLayout *layout = ui.widget_replyto->layout();
// completely delete layout and sublayouts // completely delete layout and sublayouts
QLayoutItem * item; QLayoutItem * item;
QWidget * widget;
while ((item = layout->takeAt(0))) while ((item = layout->takeAt(0)))
{ {
if ((widget = item->widget()) != 0) if (QWidget *widget = item->widget())
{ {
std::cerr << "PulseAddDialog::cleanup() removing widget"; std::cerr << "PulseAddDialog::cleanup() removing widget";
std::cerr << std::endl; std::cerr << std::endl;
@ -129,8 +128,8 @@ void PulseAddDialog::cleanup()
ui.frame_URL->setEnabled(false); ui.frame_URL->setEnabled(false);
ui.frame_URL->hide(); ui.frame_URL->hide();
ui.pushButton_Post->setEnabled(false); ui.postButton->setEnabled(false);
ui.pushButton_Post->setText(tr("Post")); ui.postButton->setText(tr("Post"));
ui.textEdit_Pulse->setPlaceholderText(tr("Whats happening?")); ui.textEdit_Pulse->setPlaceholderText(tr("Whats happening?"));
ui.frame_input->setVisible(true); ui.frame_input->setVisible(true);
ui.widget_sentiment->setVisible(true); ui.widget_sentiment->setVisible(true);
@ -163,12 +162,12 @@ void PulseAddDialog::pulseTextChanged()
{ {
std::string pulseText = ui.textEdit_Pulse->toPlainText().toStdString(); std::string pulseText = ui.textEdit_Pulse->toPlainText().toStdString();
bool enable = (pulseText.size() > 0) && (pulseText.size() < PULSE_MAX_SIZE); bool enable = (pulseText.size() > 0) && (pulseText.size() < PULSE_MAX_SIZE);
ui.pushButton_Post->setEnabled(enable); ui.postButton->setEnabled(enable);
} }
// Old Interface, deprecate / make internal. // Old Interface, deprecate / make internal.
// TODO: Convert mReplyToPulse to be an SPtr, and remove &pulse parameter. // TODO: Convert mReplyToPulse to be an SPtr, and remove &pulse parameter.
void PulseAddDialog::setReplyTo(RsWirePulse &pulse, RsWirePulseSPtr pPulse, std::string &groupName, uint32_t replyType) void PulseAddDialog::setReplyTo(const RsWirePulse &pulse, RsWirePulseSPtr pPulse, std::string &/*groupName*/, uint32_t replyType)
{ {
mIsReply = true; mIsReply = true;
mReplyToPulse = pulse; mReplyToPulse = pulse;
@ -191,21 +190,21 @@ void PulseAddDialog::setReplyTo(RsWirePulse &pulse, RsWirePulseSPtr pPulse, std:
if (mReplyType & WIRE_PULSE_TYPE_REPLY) if (mReplyType & WIRE_PULSE_TYPE_REPLY)
{ {
ui.pushButton_Post->setText(tr("Reply to Pulse")); ui.postButton->setText(tr("Reply to Pulse"));
ui.textEdit_Pulse->setPlaceholderText(tr("Pulse your reply")); ui.textEdit_Pulse->setPlaceholderText(tr("Pulse your reply"));
} }
else else
{ {
// cannot add msg for like / republish. // cannot add msg for like / republish.
ui.pushButton_Post->setEnabled(true); ui.postButton->setEnabled(true);
ui.frame_input->setVisible(false); ui.frame_input->setVisible(false);
ui.widget_sentiment->setVisible(false); ui.widget_sentiment->setVisible(false);
if (mReplyType & WIRE_PULSE_TYPE_REPUBLISH) { if (mReplyType & WIRE_PULSE_TYPE_REPUBLISH) {
ui.pushButton_Post->setText(tr("Republish Pulse")); ui.postButton->setText(tr("Republish Pulse"));
ui.pushButton_picture->hide(); ui.pushButton_picture->hide();
} }
else if (mReplyType & WIRE_PULSE_TYPE_LIKE) { else if (mReplyType & WIRE_PULSE_TYPE_LIKE) {
ui.pushButton_Post->setText(tr("Like Pulse")); ui.postButton->setText(tr("Like Pulse"));
ui.pushButton_picture->hide(); ui.pushButton_picture->hide();
} }
} }

View File

@ -57,7 +57,7 @@ private slots:
private: private:
// OLD VERSIONs, private now. // OLD VERSIONs, private now.
void setGroup(RsWireGroup &group); void setGroup(RsWireGroup &group);
void setReplyTo(RsWirePulse &pulse, RsWirePulseSPtr pPulse, std::string &groupName, uint32_t replyType); void setReplyTo(const RsWirePulse &pulse, RsWirePulseSPtr pPulse, std::string &groupName, uint32_t replyType);
void postOriginalPulse(); void postOriginalPulse();
void postReplyPulse(); void postReplyPulse();

View File

@ -13,7 +13,7 @@
<property name="windowTitle"> <property name="windowTitle">
<string/> <string/>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="PulseAddDialog_GL">
<property name="topMargin"> <property name="topMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -21,7 +21,7 @@
<number>6</number> <number>6</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QFrame" name="frame"> <widget class="QFrame" name="frame_from">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -34,18 +34,12 @@
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="frameShape"> <layout class="QGridLayout" name="frame_from_GL">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label"> <widget class="QLabel" name="fromLabel">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>100</width> <width>100</width>
@ -72,7 +66,7 @@
</widget> </widget>
</item> </item>
<item row="0" column="4"> <item row="0" column="4">
<spacer name="horizontalSpacer"> <spacer name="frame_from_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -86,6 +80,11 @@
</item> </item>
<item row="0" column="2"> <item row="0" column="2">
<widget class="QLabel" name="label_groupName"> <widget class="QLabel" name="label_groupName">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>GroupLabel</string> <string>GroupLabel</string>
</property> </property>
@ -118,13 +117,7 @@
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QFrame" name="frame_reply"> <widget class="QFrame" name="frame_reply">
<property name="frameShape"> <layout class="QVBoxLayout" name="frame_reply_VL">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -142,7 +135,7 @@
</item> </item>
<item> <item>
<widget class="QWidget" name="widget_sentiment" native="true"> <widget class="QWidget" name="widget_sentiment" native="true">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="widget_sentiment_HL">
<property name="leftMargin"> <property name="leftMargin">
<number>20</number> <number>20</number>
</property> </property>
@ -175,7 +168,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_3"> <spacer name="widget_sentiment_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -188,14 +181,14 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_sentiment">
<property name="text"> <property name="text">
<string>Response Sentiment: </string> <string>Response Sentiment: </string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="comboBox_sentiment"> <widget class="RSComboBox" name="comboBox_sentiment">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -238,13 +231,7 @@
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QFrame" name="frame_input"> <widget class="QFrame" name="frame_input">
<property name="frameShape"> <layout class="QVBoxLayout" name="frame_input_VL">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<property name="topMargin"> <property name="topMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -275,7 +262,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="frame_picture_GL">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_image1"> <widget class="QLabel" name="label_image1">
<property name="minimumSize"> <property name="minimumSize">
@ -345,9 +332,9 @@
</item> </item>
<item> <item>
<widget class="QFrame" name="frame_URL"> <widget class="QFrame" name="frame_URL">
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="frame_URL_GL">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_URL">
<property name="text"> <property name="text">
<string>URL</string> <string>URL</string>
</property> </property>
@ -364,7 +351,7 @@
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_DisplayAs">
<property name="text"> <property name="text">
<string>Display As</string> <string>Display As</string>
</property> </property>
@ -387,7 +374,7 @@
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="butons_HL">
<property name="leftMargin"> <property name="leftMargin">
<number>6</number> <number>6</number>
</property> </property>
@ -408,7 +395,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_2"> <spacer name="buttonHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -421,7 +408,14 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QPushButton" name="pushButton_Post"> <widget class="QPushButton" name="postButton">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>Post </string> <string>Post </string>
</property> </property>
@ -444,9 +438,12 @@
<extends>QLabel</extends> <extends>QLabel</extends>
<header>gui/gxs/GxsIdLabel.h</header> <header>gui/gxs/GxsIdLabel.h</header>
</customwidget> </customwidget>
<customwidget>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources/>
<include location="TheWire_images.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -50,7 +50,7 @@ void PulseReply::setup()
// connect(pushButton_tmpViewGroup, SIGNAL(clicked()), this, SLOT(actionViewGroup())); // connect(pushButton_tmpViewGroup, SIGNAL(clicked()), this, SLOT(actionViewGroup()));
// connect(pushButton_tmpViewParent, SIGNAL(clicked()), this, SLOT(actionViewParent())); // connect(pushButton_tmpViewParent, SIGNAL(clicked()), this, SLOT(actionViewParent()));
connect(toolButton_follow, SIGNAL(clicked()), this, SLOT(actionFollow())); connect(followButton, SIGNAL(clicked()), this, SLOT(actionFollow()));
// connect(toolButton_rate, SIGNAL(clicked()), this, SLOT(rate())); // connect(toolButton_rate, SIGNAL(clicked()), this, SLOT(rate()));
connect(toolButton_reply, SIGNAL(clicked()), this, SLOT(actionReply())); connect(toolButton_reply, SIGNAL(clicked()), this, SLOT(actionReply()));
@ -118,7 +118,7 @@ void PulseReply::setPulseStatus(PulseStatus status)
{ {
widget_actions->setVisible(status == PulseStatus::FULL); widget_actions->setVisible(status == PulseStatus::FULL);
widget_follow->setVisible(status != PulseStatus::FULL); widget_follow->setVisible(status != PulseStatus::FULL);
toolButton_follow->setEnabled(status == PulseStatus::UNSUBSCRIBED); followButton->setEnabled(status == PulseStatus::UNSUBSCRIBED);
switch(status) switch(status)
{ {

View File

@ -26,7 +26,7 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
<widget class="QFrame" name="frame"> <widget class="QFrame" name="plainFrame">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -48,7 +48,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="plainFrame_GL">
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -380,7 +380,14 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QToolButton" name="toolButton_follow"> <widget class="QToolButton" name="followButton">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>FOLLOW</string> <string>FOLLOW</string>
</property> </property>

View File

@ -48,7 +48,7 @@ void PulseTopLevel::setup()
{ {
connect(toolButton_viewGroup, SIGNAL(clicked()), this, SLOT(actionViewGroup())); connect(toolButton_viewGroup, SIGNAL(clicked()), this, SLOT(actionViewGroup()));
connect(toolButton_viewParent, SIGNAL(clicked()), this, SLOT(actionViewParent())); connect(toolButton_viewParent, SIGNAL(clicked()), this, SLOT(actionViewParent()));
connect(toolButton_follow, SIGNAL(clicked()), this, SLOT(actionFollow())); connect(followButton, SIGNAL(clicked()), this, SLOT(actionFollow()));
connect(toolButton_followParent, SIGNAL(clicked()), this, SLOT(actionFollowParent())); connect(toolButton_followParent, SIGNAL(clicked()), this, SLOT(actionFollowParent()));
// connect(toolButton_rate, SIGNAL(clicked()), this, SLOT(rate())); // connect(toolButton_rate, SIGNAL(clicked()), this, SLOT(rate()));
@ -58,7 +58,7 @@ void PulseTopLevel::setup()
connect(toolButton_view, SIGNAL(clicked()), this, SLOT(actionViewPulse())); connect(toolButton_view, SIGNAL(clicked()), this, SLOT(actionViewPulse()));
} }
void PulseTopLevel::setRefMessage(QString msg, uint32_t image_count) void PulseTopLevel::setRefMessage(QString /*msg*/, uint32_t /*image_count*/)
{ {
// This should never happen. // This should never happen.
//widget_message->setRefMessage(msg, image_count); //widget_message->setRefMessage(msg, image_count);
@ -149,7 +149,7 @@ void PulseTopLevel::setReferenceString(QString ref)
} }
} }
void PulseTopLevel::mousePressEvent(QMouseEvent *event) void PulseTopLevel::mousePressEvent(QMouseEvent */*event*/)
{ {
} }

View File

@ -24,9 +24,9 @@
<property name="windowTitle"> <property name="windowTitle">
<string notr="true"/> <string notr="true"/>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="PulseTopLevel_VL">
<item> <item>
<widget class="QFrame" name="frame"> <widget class="QFrame" name="plainFrame">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -48,7 +48,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="plainFrame_VL">
<item> <item>
<widget class="QWidget" name="widget_prefix" native="true"> <widget class="QWidget" name="widget_prefix" native="true">
<property name="sizePolicy"> <property name="sizePolicy">
@ -63,7 +63,7 @@
<height>40</height> <height>40</height>
</size> </size>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_10"> <layout class="QHBoxLayout" name="widget_prefix_HL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -77,7 +77,7 @@
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<spacer name="horizontalSpacer_14"> <spacer name="widget_prefix_LHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -171,7 +171,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_15"> <spacer name="widget_prefix_RHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -200,9 +200,9 @@
<height>60</height> <height>60</height>
</size> </size>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="widget_header_GL">
<item row="2" column="1"> <item row="2" column="1">
<spacer name="verticalSpacer"> <spacer name="widget_header_VSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
@ -256,7 +256,7 @@
</widget> </widget>
</item> </item>
<item row="0" column="3" rowspan="3"> <item row="0" column="3" rowspan="3">
<spacer name="horizontalSpacer_13"> <spacer name="widget_header_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -336,7 +336,7 @@
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_9"> <layout class="QHBoxLayout" name="widget_publish_HL">
<item> <item>
<widget class="QLabel" name="label_date"> <widget class="QLabel" name="label_date">
<property name="text"> <property name="text">
@ -345,7 +345,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_12"> <spacer name="widget_publish_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -361,7 +361,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="Line" name="line_2"> <widget class="Line" name="line_1">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -381,9 +381,9 @@
<height>40</height> <height>40</height>
</size> </size>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_8"> <layout class="QHBoxLayout" name="widget_replies_HL">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_611"> <layout class="QHBoxLayout" name="extra_replies_HL">
<item> <item>
<widget class="QLabel" name="label_extra_replies"> <widget class="QLabel" name="label_extra_replies">
<property name="text"> <property name="text">
@ -392,14 +392,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_911"> <widget class="QLabel" name="extra_replies_Label">
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#2e3436;&quot;&gt;Replies&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#2e3436;&quot;&gt;Replies&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_1011"> <spacer name="extra_replies_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -417,7 +417,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_6"> <layout class="QHBoxLayout" name="extra_republishes_HL">
<item> <item>
<widget class="QLabel" name="label_extra_republishes"> <widget class="QLabel" name="label_extra_republishes">
<property name="text"> <property name="text">
@ -426,14 +426,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_9"> <widget class="QLabel" name="extra_republishe_Label">
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#2e3436;&quot;&gt;Republishes&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#2e3436;&quot;&gt;Republishes&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_10"> <spacer name="extra_republishes_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -451,7 +451,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_7"> <layout class="QHBoxLayout" name="extra_likes_HL">
<item> <item>
<widget class="QLabel" name="label_extra_likes"> <widget class="QLabel" name="label_extra_likes">
<property name="text"> <property name="text">
@ -460,14 +460,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_11"> <widget class="QLabel" name="extra_likes_Label">
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#2e3436;&quot;&gt;Likes&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#2e3436;&quot;&gt;Likes&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_11"> <spacer name="extra_likes_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -485,7 +485,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_9"> <spacer name="widget_replies_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -501,7 +501,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="Line" name="line"> <widget class="Line" name="line_2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -521,11 +521,11 @@
<height>40</height> <height>40</height>
</size> </size>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_5"> <layout class="QHBoxLayout" name="widget_actions_HL">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="replies_HL">
<item> <item>
<spacer name="horizontalSpacer_8"> <spacer name="replies_LHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -562,7 +562,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_7"> <spacer name="replies_RHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -577,9 +577,9 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="republishes_HL">
<item> <item>
<spacer name="horizontalSpacer_6"> <spacer name="republishes_LHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -616,7 +616,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_5"> <spacer name="republishes_RHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -631,9 +631,9 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="likes_HL">
<item> <item>
<spacer name="horizontalSpacer_4"> <spacer name="likes_LHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -670,7 +670,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_3"> <spacer name="likes_RHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -685,9 +685,9 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="view_HL">
<item> <item>
<spacer name="horizontalSpacer"> <spacer name="view_LHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -717,7 +717,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_2"> <spacer name="view_RHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -748,9 +748,9 @@
<height>40</height> <height>40</height>
</size> </size>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_11"> <layout class="QHBoxLayout" name="widget_actionsFollow_HL">
<item> <item>
<spacer name="horizontalSpacer_20"> <spacer name="widget_actionsFollow_LHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -763,7 +763,14 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QToolButton" name="toolButton_follow"> <widget class="QToolButton" name="followButton">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>FOLLOW</string> <string>FOLLOW</string>
</property> </property>
@ -773,7 +780,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_21"> <spacer name="widget_actionsFollow_RHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>

View File

@ -42,7 +42,7 @@ PulseViewGroup::PulseViewGroup(PulseViewHolder *holder, RsWireGroupSPtr group)
void PulseViewGroup::setup() void PulseViewGroup::setup()
{ {
if (mGroup) { if (mGroup) {
connect(toolButton_follow, SIGNAL(clicked()), this, SLOT(actionFollow())); connect(followButton, SIGNAL(clicked()), this, SLOT(actionFollow()));
label_groupName->setText("@" + QString::fromStdString(mGroup->mMeta.mGroupName)); label_groupName->setText("@" + QString::fromStdString(mGroup->mMeta.mGroupName));
label_authorName->setText(BoldString(QString::fromStdString(mGroup->mMeta.mAuthorId.toStdString()))); label_authorName->setText(BoldString(QString::fromStdString(mGroup->mMeta.mAuthorId.toStdString())));

View File

@ -24,9 +24,9 @@
<property name="windowTitle"> <property name="windowTitle">
<string notr="true"/> <string notr="true"/>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="PulseViewGroup_VL">
<item> <item>
<widget class="QFrame" name="frame"> <widget class="QFrame" name="plainFrame">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -48,12 +48,12 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="plainFrame_VL">
<item> <item>
<widget class="QFrame" name="frame_headerBackground"> <widget class="QFrame" name="frame_headerBackground">
<layout class="QHBoxLayout" name="horizontalLayout_9"> <layout class="QHBoxLayout" name="frame_headerBackground_HL">
<item> <item>
<spacer name="horizontalSpacer_16"> <spacer name="frame_headerBackground_LHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -85,7 +85,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_14"> <spacer name="frame_headerBackground_RHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -114,9 +114,9 @@
<height>60</height> <height>60</height>
</size> </size>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="widget_header_GL">
<item row="0" column="1" rowspan="3"> <item row="0" column="1" rowspan="3">
<spacer name="horizontalSpacer_13"> <spacer name="widget_header_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -167,7 +167,7 @@
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<spacer name="verticalSpacer"> <spacer name="widget_header_VSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
@ -205,7 +205,7 @@
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="widget_publish_GL">
<item row="1" column="2"> <item row="1" column="2">
<widget class="QLabel" name="label_date"> <widget class="QLabel" name="label_date">
<property name="sizePolicy"> <property name="sizePolicy">
@ -226,7 +226,7 @@
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<spacer name="horizontalSpacer_15"> <spacer name="widget_publish_LHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -261,7 +261,7 @@
</widget> </widget>
</item> </item>
<item row="1" column="3"> <item row="1" column="3">
<spacer name="horizontalSpacer_12"> <spacer name="widget_publish_RHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -296,7 +296,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="Line" name="line_2"> <widget class="Line" name="line_1">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -316,9 +316,9 @@
<height>40</height> <height>40</height>
</size> </size>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_8"> <layout class="QHBoxLayout" name="widget_replies_HL">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_622"> <layout class="QHBoxLayout" name="extra_pulses_HL">
<item> <item>
<widget class="QLabel" name="label_extra_pulses"> <widget class="QLabel" name="label_extra_pulses">
<property name="text"> <property name="text">
@ -327,14 +327,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_922"> <widget class="QLabel" name="extra_pulses_Label">
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#2e3436;&quot;&gt;Pulses&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#2e3436;&quot;&gt;Pulses&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_1022"> <spacer name="extra_pulses_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -352,7 +352,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_611"> <layout class="QHBoxLayout" name="extra_replies_HL">
<item> <item>
<widget class="QLabel" name="label_extra_replies"> <widget class="QLabel" name="label_extra_replies">
<property name="text"> <property name="text">
@ -361,14 +361,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_911"> <widget class="QLabel" name="extra_replies_Label">
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#2e3436;&quot;&gt;Replies&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#2e3436;&quot;&gt;Replies&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_1011"> <spacer name="extra_replies_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -386,7 +386,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_6"> <layout class="QHBoxLayout" name="extra_republishes_HL">
<item> <item>
<widget class="QLabel" name="label_extra_republishes"> <widget class="QLabel" name="label_extra_republishes">
<property name="text"> <property name="text">
@ -395,14 +395,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_9"> <widget class="QLabel" name="extra_republishes_Label">
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#2e3436;&quot;&gt;Republishes&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#2e3436;&quot;&gt;Republishes&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_10"> <spacer name="extra_republishes_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -420,7 +420,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_7"> <layout class="QHBoxLayout" name="extra_likes_HL">
<item> <item>
<widget class="QLabel" name="label_extra_likes"> <widget class="QLabel" name="label_extra_likes">
<property name="text"> <property name="text">
@ -429,14 +429,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_11"> <widget class="QLabel" name="extra_likes_Label">
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#2e3436;&quot;&gt;Likes&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#2e3436;&quot;&gt;Likes&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_11"> <spacer name="extra_likes_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -454,7 +454,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_9"> <spacer name="widget_replies_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -470,7 +470,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="Line" name="line"> <widget class="Line" name="line_2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -490,9 +490,9 @@
<height>40</height> <height>40</height>
</size> </size>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_10"> <layout class="QHBoxLayout" name="widget_actions_HL">
<item> <item>
<spacer name="horizontalSpacer_20"> <spacer name="widget_actions_LHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -505,7 +505,14 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QToolButton" name="toolButton_follow"> <widget class="QToolButton" name="followButton">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>FOLLOW</string> <string>FOLLOW</string>
</property> </property>
@ -515,7 +522,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_21"> <spacer name="widget_actions_RHSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -535,8 +542,6 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<resources> <resources/>
<include location="TheWire_images.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -57,14 +57,12 @@
/** Constructor */ /** Constructor */
WireDialog::WireDialog(QWidget *parent) WireDialog::WireDialog(QWidget *parent)
: MainPage(parent), mGroupSet(GROUP_SET_ALL) : MainPage(parent), mGroupSet(GROUP_SET_ALL)
, mAddDialog(nullptr), mGroupSelected(nullptr), mWireQueue(nullptr)
, mHistoryIndex(-1)
{ {
ui.setupUi(this); ui.setupUi(this);
mAddDialog = NULL;
mGroupSelected = NULL;
mHistoryIndex = -1;
connect( ui.toolButton_createAccount, SIGNAL(clicked()), this, SLOT(createGroup())); connect( ui.toolButton_createAccount, SIGNAL(clicked()), this, SLOT(createGroup()));
connect( ui.toolButton_createPulse, SIGNAL(clicked()), this, SLOT(createPulse())); connect( ui.toolButton_createPulse, SIGNAL(clicked()), this, SLOT(createPulse()));
connect( ui.toolButton_refresh, SIGNAL(clicked()), this, SLOT(refreshGroups())); connect( ui.toolButton_refresh, SIGNAL(clicked()), this, SLOT(refreshGroups()));
@ -98,6 +96,7 @@ WireDialog::~WireDialog()
// save settings // save settings
processSettings(false); processSettings(false);
clearTwitterView();
delete(mWireQueue); delete(mWireQueue);
} }
@ -127,7 +126,7 @@ void WireDialog::refreshGroups()
void WireDialog::addGroup(QWidget *item) void WireDialog::addGroup(QWidget *item)
{ {
QLayout *alayout = ui.scrollAreaWidgetContents_groups->layout(); QLayout *alayout = ui.groupsWidget->layout();
alayout->addWidget(item); alayout->addWidget(item);
} }
@ -268,7 +267,7 @@ void WireDialog::deleteGroups()
mGroupSelected = NULL; mGroupSelected = NULL;
QLayout *alayout = ui.scrollAreaWidgetContents_groups->layout(); QLayout *alayout = ui.groupsWidget->layout();
QLayoutItem *item; QLayoutItem *item;
int i = 0; int i = 0;
while (i < alayout->count()) while (i < alayout->count())
@ -300,17 +299,16 @@ void WireDialog::updateGroups(std::vector<RsWireGroup>& groups)
mOwnGroups.clear(); mOwnGroups.clear();
ui.groupChooser->clear(); ui.groupChooser->clear();
std::vector<RsWireGroup>::const_iterator it; for(auto &it : groups) {
for(it = groups.begin(); it != groups.end(); it++) {
// save list of all groups. // save list of all groups.
mAllGroups[it->mMeta.mGroupId] = *it; mAllGroups[it.mMeta.mGroupId] = it;
if (it->mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN) if (it.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN)
{ {
// grab own groups. // grab own groups.
// setup Chooser too. // setup Chooser too.
mOwnGroups.push_back(*it); mOwnGroups.push_back(it);
ui.groupChooser->addItem(QString::fromStdString(it->mMeta.mGroupName)); ui.groupChooser->addItem(QString::fromStdString(it.mMeta.mGroupName));
} }
} }
} }
@ -362,16 +360,15 @@ void WireDialog::showGroups()
std::list<RsGxsGroupId> allGroupIds; std::list<RsGxsGroupId> allGroupIds;
/* depends on the comboBox */ /* depends on the comboBox */
std::map<RsGxsGroupId, RsWireGroup>::const_iterator it; for (auto &it : mAllGroups)
for (it = mAllGroups.begin(); it != mAllGroups.end(); it++)
{ {
bool add = (mGroupSet == GROUP_SET_ALL); bool add = (mGroupSet == GROUP_SET_ALL);
if (it->second.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN) { if (it.second.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN) {
if (mGroupSet == GROUP_SET_OWN) { if (mGroupSet == GROUP_SET_OWN) {
add = true; add = true;
} }
} }
else if (it->second.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED) { else if (it.second.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED) {
if (mGroupSet == GROUP_SET_SUBSCRIBED) { if (mGroupSet == GROUP_SET_SUBSCRIBED) {
add = true; add = true;
} }
@ -383,11 +380,11 @@ void WireDialog::showGroups()
} }
if (add) { if (add) {
addGroup(it->second); addGroup(it.second);
// request data. // request data.
std::list<RsGxsGroupId> grpIds; std::list<RsGxsGroupId> grpIds;
grpIds.push_back(it->second.mMeta.mGroupId); grpIds.push_back(it.second.mMeta.mGroupId);
allGroupIds.push_back(it->second.mMeta.mGroupId); allGroupIds.push_back(it.second.mMeta.mGroupId);
} }
} }
@ -790,20 +787,21 @@ void WireDialog::showPulseFocus(const RsGxsGroupId groupId, const RsGxsMessageId
// fetch data from backend. // fetch data from backend.
RsWirePulseSPtr pPulse; RsWirePulseSPtr pPulse;
int type = 0; int type = 0;
bool success = rsWire->getPulseFocus(groupId, msgId, type, pPulse); if(rsWire->getPulseFocus(groupId, msgId, type, pPulse))
// sleep(2);
/* now insert the pulse + children into the layput */
RsQThreadUtils::postToObject([pPulse,this]()
{ {
/* Here it goes any code you want to be executed on the Qt Gui // sleep(2);
/* now insert the pulse + children into the layput */
RsQThreadUtils::postToObject([pPulse,this]()
{
/* Here it goes any code you want to be executed on the Qt Gui
* thread, for example to update the data model with new information * thread, for example to update the data model with new information
* after a blocking call to RetroShare API complete */ * after a blocking call to RetroShare API complete */
postPulseFocus(pPulse); postPulseFocus(pPulse);
}, this); }, this);
}
}); });
} }
@ -822,10 +820,9 @@ void WireDialog::postPulseFocus(RsWirePulseSPtr pPulse)
addTwitterView(new PulseTopLevel(this, pPulse)); addTwitterView(new PulseTopLevel(this, pPulse));
std::list<RsWirePulseSPtr>::iterator it; for(auto &it : pPulse->mReplies)
for(it = pPulse->mReplies.begin(); it != pPulse->mReplies.end(); it++)
{ {
RsWirePulseSPtr reply = *it; RsWirePulseSPtr reply = it;
PulseReply *firstReply = new PulseReply(this, reply); PulseReply *firstReply = new PulseReply(this, reply);
addTwitterView(firstReply); addTwitterView(firstReply);
@ -857,9 +854,9 @@ void WireDialog::postPulseFocus(RsWirePulseSPtr pPulse)
addTwitterView(new PulseReplySeperator()); addTwitterView(new PulseReplySeperator());
} }
for(it = pPulse->mRepublishes.begin(); it != pPulse->mRepublishes.end(); it++) for(auto &it : pPulse->mRepublishes)
{ {
RsWirePulseSPtr repub = *it; RsWirePulseSPtr repub = it;
PulseReply *firstRepub = new PulseReply(this, repub); PulseReply *firstRepub = new PulseReply(this, repub);
firstRepub->showReplyLine(false); firstRepub->showReplyLine(false);
@ -928,10 +925,9 @@ void WireDialog::postGroupFocus(RsWireGroupSPtr group, std::list<RsWirePulseSPtr
addTwitterView(new PulseViewGroup(this, group)); addTwitterView(new PulseViewGroup(this, group));
std::list<RsWirePulseSPtr>::iterator it; for(auto &it : pulses)
for(it = pulses.begin(); it != pulses.end(); it++)
{ {
RsWirePulseSPtr reply = *it; RsWirePulseSPtr reply = it;
// don't show likes // don't show likes
if (reply->mPulseType & WIRE_PULSE_TYPE_LIKE) { if (reply->mPulseType & WIRE_PULSE_TYPE_LIKE) {
@ -949,7 +945,7 @@ void WireDialog::postGroupFocus(RsWireGroupSPtr group, std::list<RsWirePulseSPtr
} }
} }
void WireDialog::requestGroupsPulses(const std::list<RsGxsGroupId> groupIds) void WireDialog::requestGroupsPulses(const std::list<RsGxsGroupId>& groupIds)
{ {
WireViewHistory view; WireViewHistory view;
view.viewType = WireViewType::GROUPS; view.viewType = WireViewType::GROUPS;
@ -959,7 +955,7 @@ void WireDialog::requestGroupsPulses(const std::list<RsGxsGroupId> groupIds)
showGroupsPulses(groupIds); showGroupsPulses(groupIds);
} }
void WireDialog::showGroupsPulses(const std::list<RsGxsGroupId> groupIds) void WireDialog::showGroupsPulses(const std::list<RsGxsGroupId>& groupIds)
{ {
clearTwitterView(); clearTwitterView();
@ -968,20 +964,21 @@ void WireDialog::showGroupsPulses(const std::list<RsGxsGroupId> groupIds)
{ {
// fetch data from backend. // fetch data from backend.
std::list<RsWirePulseSPtr> pulses; std::list<RsWirePulseSPtr> pulses;
bool success = rsWire->getPulsesForGroups(groupIds, pulses); if(rsWire->getPulsesForGroups(groupIds, pulses))
// sleep(2);
/* now insert the pulse + children into the layput */
RsQThreadUtils::postToObject([pulses,this]()
{ {
/* Here it goes any code you want to be executed on the Qt Gui // sleep(2);
/* now insert the pulse + children into the layput */
RsQThreadUtils::postToObject([pulses,this]()
{
/* Here it goes any code you want to be executed on the Qt Gui
* thread, for example to update the data model with new information * thread, for example to update the data model with new information
* after a blocking call to RetroShare API complete */ * after a blocking call to RetroShare API complete */
postGroupsPulses(pulses); postGroupsPulses(pulses);
}, this); }, this);
}
}); });
} }
@ -992,10 +989,9 @@ void WireDialog::postGroupsPulses(std::list<RsWirePulseSPtr> pulses)
ui.label_viewMode->setText("Groups Pulses"); ui.label_viewMode->setText("Groups Pulses");
std::list<RsWirePulseSPtr>::iterator it; for(auto &it : pulses)
for(it = pulses.begin(); it != pulses.end(); it++)
{ {
RsWirePulseSPtr reply = *it; RsWirePulseSPtr reply = it;
// don't show likes // don't show likes
if (reply->mPulseType & WIRE_PULSE_TYPE_LIKE) { if (reply->mPulseType & WIRE_PULSE_TYPE_LIKE) {
std::cerr << "WireDialog::postGroupsPulses() Not showing LIKE"; std::cerr << "WireDialog::postGroupsPulses() Not showing LIKE";

View File

@ -76,9 +76,9 @@ public:
WireDialog(QWidget *parent = 0); WireDialog(QWidget *parent = 0);
~WireDialog(); ~WireDialog();
virtual QIcon iconPixmap() const { return QIcon(IMAGE_WIRE) ; } virtual QIcon iconPixmap() const override { return QIcon(IMAGE_WIRE) ; }
virtual QString pageName() const { return tr("The Wire") ; } virtual QString pageName() const override { return tr("The Wire") ; }
virtual QString helpText() const { return ""; } virtual QString helpText() const override { return ""; }
// WireGroupHolder interface. // WireGroupHolder interface.
virtual void subscribe(RsGxsGroupId &groupId) override; virtual void subscribe(RsGxsGroupId &groupId) override;
@ -114,8 +114,8 @@ public:
void showGroupFocus(const RsGxsGroupId groupId); void showGroupFocus(const RsGxsGroupId groupId);
void postGroupFocus(RsWireGroupSPtr group, std::list<RsWirePulseSPtr> pulses); void postGroupFocus(RsWireGroupSPtr group, std::list<RsWirePulseSPtr> pulses);
void requestGroupsPulses(const std::list<RsGxsGroupId> groupIds); void requestGroupsPulses(const std::list<RsGxsGroupId>& groupIds);
void showGroupsPulses(const std::list<RsGxsGroupId> groupIds); void showGroupsPulses(const std::list<RsGxsGroupId>& groupIds);
void postGroupsPulses(std::list<RsWirePulseSPtr> pulses); void postGroupsPulses(std::list<RsWirePulseSPtr> pulses);
private slots: private slots:
@ -153,7 +153,7 @@ private:
bool loadGroupData(const uint32_t &token); bool loadGroupData(const uint32_t &token);
void acknowledgeGroup(const uint32_t &token, const uint32_t &userType); void acknowledgeGroup(const uint32_t &token, const uint32_t &userType);
virtual void loadRequest(const TokenQueue *queue, const TokenRequest &req); virtual void loadRequest(const TokenQueue *queue, const TokenRequest &req) override;
int mGroupSet; int mGroupSet;

View File

@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>804</width> <width>809</width>
<height>586</height> <height>586</height>
</rect> </rect>
</property> </property>
@ -33,7 +33,7 @@
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QFrame" name="frame_toolbar"> <widget class="QFrame" name="toolBarFrame">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -46,7 +46,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Plain</enum> <enum>QFrame::Plain</enum>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="toolBarFrame_HL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -108,7 +108,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="groupChooser"/> <widget class="RSComboBox" name="groupChooser"/>
</item> </item>
<item> <item>
<widget class="QToolButton" name="toolButton_Settings"> <widget class="QToolButton" name="toolButton_Settings">
@ -134,7 +134,7 @@
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<widget class="QFrame" name="frame"> <widget class="QFrame" name="plainFrame_GroupSet">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>1</horstretch> <horstretch>1</horstretch>
@ -159,9 +159,9 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="plainFrame_GroupSet_VL">
<item> <item>
<widget class="QComboBox" name="comboBox_groupSet"> <widget class="RSComboBox" name="comboBox_groupSet">
<item> <item>
<property name="text"> <property name="text">
<string>All</string> <string>All</string>
@ -199,22 +199,22 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QScrollArea" name="scrollArea_2"> <widget class="QScrollArea" name="trans_scrollAreaWidgetContents_groups">
<property name="widgetResizable"> <property name="widgetResizable">
<bool>true</bool> <bool>true</bool>
</property> </property>
<widget class="QWidget" name="scrollAreaWidgetContents_groups"> <widget class="QWidget" name="groupsWidget">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>228</width> <width>220</width>
<height>488</height> <height>444</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="groupsWidget_VL">
<item> <item>
<spacer name="verticalSpacer_2"> <spacer name="groupsWidget_VSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
@ -305,6 +305,11 @@
</item> </item>
<item> <item>
<widget class="QLabel" name="label_viewMode"> <widget class="QLabel" name="label_viewMode">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>Most Recent</string> <string>Most Recent</string>
</property> </property>
@ -337,7 +342,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="comboBox_filterTime"> <widget class="RSComboBox" name="comboBox_filterTime">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -382,8 +387,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>523</width> <width>521</width>
<height>484</height> <height>437</height>
</rect> </rect>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -429,6 +434,13 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
</customwidgets>
<resources> <resources>
<include location="TheWire_images.qrc"/> <include location="TheWire_images.qrc"/>
<include location="../icons.qrc"/> <include location="../icons.qrc"/>

View File

@ -51,7 +51,7 @@
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QComboBox" name="comboBox_Category"> <widget class="RSComboBox" name="comboBox_Category">
<item> <item>
<property name="text"> <property name="text">
<string>Travel</string> <string>Travel</string>
@ -110,7 +110,7 @@
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QComboBox" name="comboBox_3"> <widget class="RSComboBox" name="comboBox_3">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -135,7 +135,7 @@
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QComboBox" name="comboBox_4"> <widget class="RSComboBox" name="comboBox_4">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -170,7 +170,7 @@
</widget> </widget>
</item> </item>
<item row="1" column="0" colspan="2"> <item row="1" column="0" colspan="2">
<widget class="QComboBox" name="comboBox_6"> <widget class="RSComboBox" name="comboBox_6">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -195,7 +195,7 @@
</widget> </widget>
</item> </item>
<item row="2" column="0" colspan="2"> <item row="2" column="0" colspan="2">
<widget class="QComboBox" name="comboBox"> <widget class="RSComboBox" name="comboBox">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -266,6 +266,13 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
</customwidgets>
<resources> <resources>
<include location="Wiki_images.qrc"/> <include location="Wiki_images.qrc"/>
</resources> </resources>

View File

@ -56,18 +56,18 @@ WikiEditDialog::WikiEditDialog(QWidget *parent)
{ {
ui.setupUi(this); ui.setupUi(this);
connect(ui.pushButton_Cancel, SIGNAL( clicked( void ) ), this, SLOT( cancelEdit( void ) ) ); connect(ui.pushButton_Cancel, SIGNAL( clicked() ), this, SLOT( cancelEdit() ) );
connect(ui.pushButton_Revert, SIGNAL( clicked( void ) ), this, SLOT( revertEdit( void ) ) ); connect(ui.pushButton_Revert, SIGNAL( clicked() ), this, SLOT( revertEdit() ) );
connect(ui.pushButton_Submit, SIGNAL( clicked( void ) ), this, SLOT( submitEdit( void ) ) ); connect(ui.postButton, SIGNAL( clicked() ), this, SLOT( submitEdit() ) );
connect(ui.pushButton_Preview, SIGNAL( clicked( void ) ), this, SLOT( previewToggle( void ) ) ); connect(ui.pushButton_Preview, SIGNAL( clicked() ), this, SLOT( previewToggle() ) );
connect(ui.pushButton_History, SIGNAL( clicked( void ) ), this, SLOT( historyToggle( void ) ) ); connect(ui.pushButton_History, SIGNAL( clicked() ), this, SLOT( historyToggle() ) );
connect(ui.toolButton_Show, SIGNAL( clicked( void ) ), this, SLOT( detailsToggle( void ) ) ); connect(ui.toolButton_Show, SIGNAL( clicked() ), this, SLOT( detailsToggle() ) );
connect(ui.toolButton_Hide, SIGNAL( clicked( void ) ), this, SLOT( detailsToggle( void ) ) ); connect(ui.toolButton_Hide, SIGNAL( clicked() ), this, SLOT( detailsToggle() ) );
connect(ui.textEdit, SIGNAL( textChanged( void ) ), this, SLOT( textChanged( void ) ) ); connect(ui.textEdit, SIGNAL( textChanged() ), this, SLOT( textChanged() ) );
connect(ui.checkBox_OldHistory, SIGNAL( clicked( void ) ), this, SLOT( oldHistoryChanged( void ) ) ); connect(ui.checkBox_OldHistory, SIGNAL( clicked() ), this, SLOT( oldHistoryChanged() ) );
connect(ui.checkBox_Merge, SIGNAL( clicked( void ) ), this, SLOT( mergeModeToggle( void ) ) ); connect(ui.checkBox_Merge, SIGNAL( clicked() ), this, SLOT( mergeModeToggle() ) );
connect(ui.pushButton_Merge, SIGNAL( clicked( void ) ), this, SLOT( generateMerge( void ) ) ); connect(ui.pushButton_Merge, SIGNAL( clicked() ), this, SLOT( generateMerge() ) );
connect(ui.treeWidget_History, SIGNAL( itemSelectionChanged( void ) ), this, SLOT( historySelected( void ) ) ); connect(ui.treeWidget_History, SIGNAL( itemSelectionChanged() ), this, SLOT( historySelected() ) );
mWikiQueue = new TokenQueue(rsWiki->getTokenService(), this); mWikiQueue = new TokenQueue(rsWiki->getTokenService(), this);
@ -125,7 +125,7 @@ void WikiEditDialog::textChanged()
mTextChanged = true; mTextChanged = true;
ui.pushButton_Revert->setEnabled(true); ui.pushButton_Revert->setEnabled(true);
ui.pushButton_Submit->setEnabled(true); ui.postButton->setEnabled(true);
ui.label_Status->setText("Modified"); ui.label_Status->setText("Modified");
// Disable Selection in Edit History. // Disable Selection in Edit History.
@ -142,7 +142,7 @@ void WikiEditDialog::textReset()
mTextChanged = false; mTextChanged = false;
ui.pushButton_Revert->setEnabled(false); ui.pushButton_Revert->setEnabled(false);
ui.pushButton_Submit->setEnabled(false); ui.postButton->setEnabled(false);
ui.label_Status->setText("Original"); ui.label_Status->setText("Original");
// Enable Selection in Edit History. // Enable Selection in Edit History.
@ -434,11 +434,11 @@ void WikiEditDialog::setNewPage()
void WikiEditDialog::setRepublishMode(RsGxsMessageId &origMsgId) void WikiEditDialog::setRepublishMode(RsGxsMessageId &origMsgId)
{ {
mRepublishMode = true; mRepublishMode = true;
mRepublishOrigId = origMsgId; mRepublishOrigId = origMsgId;
ui.pushButton_Submit->setText(tr("Republish")); ui.postButton->setText(tr("Republish"));
/* No need for for REQUIRED ID */ /* No need for for REQUIRED ID */
ui.comboBox_IdChooser->loadIds(0, RsGxsId()); ui.comboBox_IdChooser->loadIds(0, RsGxsId());
} }

View File

@ -13,7 +13,7 @@
<property name="windowTitle"> <property name="windowTitle">
<string/> <string/>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="WikiEditDialog_GL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -40,14 +40,14 @@
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QFrame" name="frame"> <widget class="QFrame" name="gradFrame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="gradFrame_VL">
<item> <item>
<widget class="QSplitter" name="splitter_History"> <widget class="QSplitter" name="splitter_History">
<property name="sizePolicy"> <property name="sizePolicy">
@ -63,7 +63,7 @@
<property name="title"> <property name="title">
<string>Page Edit History</string> <string>Page Edit History</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="groupBox_History_VL">
<item> <item>
<widget class="QCheckBox" name="checkBox_OldHistory"> <widget class="QCheckBox" name="checkBox_OldHistory">
<property name="text"> <property name="text">
@ -109,18 +109,18 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QFrame" name="frame_3"> <widget class="QFrame" name="edit_Frame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,0,10,0"> <layout class="QVBoxLayout" name="edit_Frame_VL" stretch="0,0,10,0">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="hide_show_VL">
<property name="topMargin"> <property name="topMargin">
<number>6</number> <number>6</number>
</property> </property>
@ -132,7 +132,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer"> <spacer name="hide_show_VSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
@ -157,7 +157,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QFrame" name="frame"> <widget class="QFrame" name="formFrame">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding"> <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -177,7 +177,7 @@
<string>Wiki Group:</string> <string>Wiki Group:</string>
</property> </property>
<property name="buddy"> <property name="buddy">
<cstring>frame</cstring> <cstring>formFrame</cstring>
</property> </property>
</widget> </widget>
</item> </item>
@ -254,16 +254,23 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="status_HL">
<item> <item>
<widget class="QPushButton" name="pushButton_History"> <widget class="QPushButton" name="pushButton_History">
<property name="font">
<font>
<pointsize>15</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>History</string> <string>History</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer"> <spacer name="status_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -298,7 +305,7 @@
<widget class="QTextEdit" name="textEdit"/> <widget class="QTextEdit" name="textEdit"/>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="bottom_HL">
<item> <item>
<widget class="QPushButton" name="pushButton_Cancel"> <widget class="QPushButton" name="pushButton_Cancel">
<property name="text"> <property name="text">
@ -314,7 +321,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_2"> <spacer name="bottom_HL_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -327,7 +334,14 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QPushButton" name="pushButton_Submit"> <widget class="QPushButton" name="postButton">
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>Submit</string> <string>Submit</string>
</property> </property>
@ -357,8 +371,6 @@
<header>gui/gxs/GxsIdChooser.h</header> <header>gui/gxs/GxsIdChooser.h</header>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources> <resources/>
<include location="Wiki_images.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>838</width> <width>297</width>
<height>130</height> <height>138</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -17,7 +17,7 @@
<iconset resource="../images.qrc"> <iconset resource="../images.qrc">
<normaloff>:/images/logo/logo_16.png</normaloff>:/images/logo/logo_16.png</iconset> <normaloff>:/images/logo/logo_16.png</normaloff>:/images/logo/logo_16.png</iconset>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="AdvancedSearchDialog_GL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -31,20 +31,14 @@
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QFrame" name="frame"> <widget class="QFrame" name="gradFrame">
<property name="minimumSize">
<size>
<width>0</width>
<height>130</height>
</size>
</property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gradFrame_GL">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QGroupBox" name="searchCriteriaBox"> <widget class="QGroupBox" name="searchCriteriaBox">
<property name="sizePolicy"> <property name="sizePolicy">
@ -53,12 +47,6 @@
<verstretch>1</verstretch> <verstretch>1</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>800</width>
<height>60</height>
</size>
</property>
<property name="autoFillBackground"> <property name="autoFillBackground">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -68,59 +56,15 @@
<property name="alignment"> <property name="alignment">
<set>Qt::AlignJustify|Qt::AlignTop</set> <set>Qt::AlignJustify|Qt::AlignTop</set>
</property> </property>
<layout class="QVBoxLayout"> <layout class="QVBoxLayout" name="searchCriteriaBox_VL">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<widget class="QFrame" name="expressionsFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>600</width>
<height>26</height>
</size>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>9</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<layout class="QHBoxLayout" name="_2"> <layout class="QHBoxLayout" name="buttons_HL">
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
@ -142,8 +86,8 @@
<string>Add a further search criterion.</string> <string>Add a further search criterion.</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../icons.qrc">
<normaloff>:/images/add_24x24.png</normaloff>:/images/add_24x24.png</iconset> <normaloff>:/icons/png/add.png</normaloff>:/icons/png/add.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
@ -174,16 +118,10 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer> <spacer name="buttons_HSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0">
<size>
<width>381</width>
<height>27</height>
</size>
</property>
</spacer> </spacer>
</item> </item>
<item> <item>
@ -203,7 +141,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="executeButton"> <widget class="QPushButton" name="searchButton">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
@ -227,6 +165,7 @@
</widget> </widget>
<resources> <resources>
<include location="../images.qrc"/> <include location="../images.qrc"/>
<include location="../icons.qrc"/>
</resources> </resources>
<connections> <connections>
<connection> <connection>

View File

@ -21,97 +21,79 @@
*******************************************************************************/ *******************************************************************************/
#include "advancedsearchdialog.h" #include "advancedsearchdialog.h"
#include "gui/common/FilesDefs.h" #include "gui/common/FilesDefs.h"
#include <QGridLayout>
AdvancedSearchDialog::AdvancedSearchDialog(QWidget * parent) : QDialog (parent) AdvancedSearchDialog::AdvancedSearchDialog(QWidget * parent) : QDialog (parent)
{ {
setupUi(this); setupUi(this);
dialogLayout = this->layout();
metrics = new QFontMetrics(this->font());
// the list of expressions QFontMetrics metrics = QFontMetrics(this->font());
expressions = new QList<ExpressionWidget*>(); searchCriteriaBox_VL->setContentsMargins(2, metrics.height()/2, 2, 2);
addExprButton->setIconSize(QSize(metrics.height(),metrics.height())*1.5);
resetButton->setIconSize(QSize(metrics.height(),metrics.height())*1.5);
// a area for holding the objects // Save current default size as minimum to only add expresssions size to it.
expressionsLayout = new QVBoxLayout(); this->adjustSize();
expressionsLayout->setSpacing(0); this->setMinimumSize(this->size());
expressionsLayout->setMargin(0);
expressionsLayout->setObjectName(QString::fromUtf8("expressionsLayout"));
expressionsFrame->setSizePolicy(QSizePolicy::MinimumExpanding,
QSizePolicy::MinimumExpanding);
expressionsFrame->setLayout(expressionsLayout);
// we now add the first expression widgets to the dialog via a vertical
// layout
reset();//addNewExpression();
connect (this->addExprButton, SIGNAL(clicked()), // the list of expressions
this, SLOT(addNewExpression())); expressions = new QList<ExpressionWidget*>();
connect (this->resetButton, SIGNAL(clicked()),
this, SLOT(reset()));
connect(this->executeButton, SIGNAL(clicked()),
this, SLOT(prepareSearch()));
addExprButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/add.png")); // we now add the first expression widgets to the dialog
reset();//addNewExpression();
connect ( addExprButton, SIGNAL(clicked())
, this, SLOT(addNewExpression()));
connect ( resetButton, SIGNAL(clicked())
, this, SLOT(reset()));
connect ( searchButton, SIGNAL(clicked())
, this, SLOT(prepareSearch()));
} }
void AdvancedSearchDialog::addNewExpression() void AdvancedSearchDialog::addNewExpression()
{ {
int sizeChange = metrics->height() + 26; ExpressionWidget *expr = new ExpressionWidget(searchCriteriaBox, (expressions->size() == 0));
expressions->append(expr);
ExpressionWidget *expr; searchCriteriaBox_VL->addWidget(expr);
if (expressions->size() == 0) searchCriteriaBox_VL->setAlignment(Qt::AlignTop);
{ expr->adjustSize();
//create an initial expression if (searchCriteriaBox->minimumWidth() < expr->minimumWidth())
expr = new ExpressionWidget(expressionsFrame, true); searchCriteriaBox->setMinimumWidth(expr->minimumWidth());
} else {
expr = new ExpressionWidget(expressionsFrame);
}
expressions->append(expr);
expressionsLayout->addWidget(expr, 1, Qt::AlignLeft);
connect(expr, SIGNAL(signalDelete(ExpressionWidget*)),
this, SLOT(deleteExpression(ExpressionWidget*)));
//expressionsLayout->invalidate();
//searchCriteriaBox->setMinimumSize(searchCriteriaBox->minimumWidth(),
// searchCriteriaBox->minimumHeight() + sizeChange);
//searchCriteriaBox->adjustSize();
expressionsFrame->adjustSize();
this->setMinimumSize(this->minimumWidth(), this->minimumHeight()+sizeChange);
this->adjustSize();
QSize exprHeight = QSize(0,expr->height());
connect( expr, SIGNAL(signalDelete(ExpressionWidget*))
, this, SLOT(deleteExpression(ExpressionWidget*)) );
this->setMinimumSize(this->minimumSize() + exprHeight);
int marg = gradFrame_GL->contentsMargins().left()+gradFrame_GL->contentsMargins().right();
marg += this->contentsMargins().left()+this->contentsMargins().right();
if (this->minimumWidth() < (searchCriteriaBox->minimumWidth()+marg))
this->setMinimumWidth(searchCriteriaBox->minimumWidth()+marg);
} }
void AdvancedSearchDialog::deleteExpression(ExpressionWidget* expr) void AdvancedSearchDialog::deleteExpression(ExpressionWidget* expr)
{ {
int sizeChange = metrics->height() + 26; QSize exprHeight = QSize(0,expr->height());
expressions->removeAll(expr); expressions->removeAll(expr);
expr->hide(); expr->hide();
expressionsLayout->removeWidget(expr); searchCriteriaBox_VL->removeWidget(expr);
delete expr; delete expr;
expressionsLayout->invalidate(); this->setMinimumSize(this->minimumSize() - exprHeight);
//searchCriteriaBox->setMinimumSize(searchCriteriaBox->minimumWidth(), this->resize(this->size() - exprHeight);
// searchCriteriaBox->minimumHeight() - sizeChange);
//searchCriteriaBox->adjustSize();
expressionsFrame->adjustSize();
this->setMinimumSize(this->minimumWidth(), this->minimumHeight()-sizeChange);
this->adjustSize();
} }
void AdvancedSearchDialog::reset() void AdvancedSearchDialog::reset()
{ {
ExpressionWidget *expr;
while (!expressions->isEmpty()) while (!expressions->isEmpty())
{ deleteExpression(expressions->takeLast());
expr = expressions->takeLast();
deleteExpression(expr);
}
// now add a new default expressions // now add a new default expressions
addNewExpression(); addNewExpression();
@ -129,7 +111,6 @@ RsRegularExpression::Expression * AdvancedSearchDialog::getRsExpr()
// process the special case: first expression // process the special case: first expression
wholeExpression = expressions->at(0)->getRsExpression(); wholeExpression = expressions->at(0)->getRsExpression();
// iterate through the items in elements and // iterate through the items in elements and
#warning Phenom (2017-07-21): I don t know if it is a real memLeak for wholeExpression. If not remove this warning and add a comment how it is deleted. #warning Phenom (2017-07-21): I don t know if it is a real memLeak for wholeExpression. If not remove this warning and add a comment how it is deleted.
@ -140,21 +121,20 @@ RsRegularExpression::Expression * AdvancedSearchDialog::getRsExpr()
wholeExpression = new RsRegularExpression::CompoundExpression(expressions->at(i)->getOperator(), wholeExpression = new RsRegularExpression::CompoundExpression(expressions->at(i)->getOperator(),
wholeExpression, wholeExpression,
expressions->at(i)->getRsExpression()); expressions->at(i)->getRsExpression());
} }
return wholeExpression; return wholeExpression;
} }
QString AdvancedSearchDialog::getSearchAsString() QString AdvancedSearchDialog::getSearchAsString()
{ {
QString str = expressions->at(0)->toString(); QString str = expressions->at(0)->toString();
// iterate through the items in elements and // iterate through the items in elements and
for (int i = 1; i < expressions->size(); ++i) { for (int i = 1; i < expressions->size(); ++i) {
// extract the expression information and compound it with the // extract the expression information and compound it with the
// first expression // first expression
str += QString(" ") + expressions->at(i)->toString(); str += QString(" ") + expressions->at(i)->toString();
} }
return str; return str;
} }

View File

@ -22,13 +22,10 @@
#ifndef _AdvancedSearch_h_ #ifndef _AdvancedSearch_h_
#define _AdvancedSearch_h_ #define _AdvancedSearch_h_
#include <QFontMetrics>
#include <QDialog>
#include <QList>
#include <QScrollArea>
#include <QSizePolicy>
#include "ui_AdvancedSearchDialog.h" #include "ui_AdvancedSearchDialog.h"
#include "expressionwidget.h" #include "expressionwidget.h"
#include <retroshare/rsexpr.h> #include <retroshare/rsexpr.h>
class AdvancedSearchDialog : public QDialog, public Ui::AdvancedSearchDialog class AdvancedSearchDialog : public QDialog, public Ui::AdvancedSearchDialog
@ -49,10 +46,7 @@ private slots:
void prepareSearch(); void prepareSearch();
private: private:
QLayout * dialogLayout;
QVBoxLayout * expressionsLayout;
QList<ExpressionWidget*> * expressions; QList<ExpressionWidget*> * expressions;
QFontMetrics * metrics;
}; };
#endif // _AdvancedSearch_h_ #endif // _AdvancedSearch_h_

View File

@ -21,107 +21,60 @@
*******************************************************************************/ *******************************************************************************/
#include "expressionwidget.h" #include "expressionwidget.h"
ExpressionWidget::ExpressionWidget(QWidget * parent, bool initial) : QWidget(parent) ExpressionWidget::ExpressionWidget(QWidget * parent, bool initial)
: QWidget(parent)
, isFirst (initial), inRangedConfig(false)
, searchType (NameSearch) // the default search type
{ {
setupUi(this); setupUi(this);
inRangedConfig = false;
// the default search type
searchType = NameSearch;
exprLayout = this->layout();
exprOpFrame->setLayout (createLayout());
exprTermFrame->setLayout (createLayout());
exprConditionFrame->setLayout (createLayout());
exprParamFrame->setLayout (createLayout());
exprParamFrame->setSizePolicy(QSizePolicy::MinimumExpanding,
QSizePolicy::Fixed);
elements = new QList<GuiExprElement*>();
exprOpElem = new ExprOpElement();
exprOpFrame->layout()->addWidget(exprOpElem);
elements->append(exprOpElem);
exprTermElem = new ExprTermsElement();
exprTermFrame->layout()->addWidget(exprTermElem);
elements->append(exprTermElem);
connect (exprTermElem, SIGNAL(currentIndexChanged(int)),
this, SLOT (adjustExprForTermType(int)));
exprCondElem = new ExprConditionElement(searchType);
exprConditionFrame->layout()->addWidget(exprCondElem);
elements->append(exprCondElem);
connect (exprCondElem, SIGNAL (currentIndexChanged(int)),
this, SLOT (adjustExprForConditionType(int)));
exprParamElem= new ExprParamElement(searchType);
exprParamFrame->layout()->addWidget(exprParamElem);
elements->append(exprParamElem);
// set up the default search: a search on name
adjustExprForTermType(searchType);
isFirst = initial;
deleteExprButton ->setVisible(!isFirst);
exprOpElem ->setVisible(!isFirst);
exprTermFrame ->show();
exprConditionFrame ->show();
exprParamFrame ->show();
// connect the delete button signal
connect (deleteExprButton, SIGNAL (clicked()),
this, SLOT(deleteExpression()));
this->show();
}
QLayout * ExpressionWidget::createLayout(QWidget * parent) connect (exprTermElem, SIGNAL(currentIndexChanged(int)),
{ this, SLOT (adjustExprForTermType(int)));
QHBoxLayout * hboxLayout;
if (parent == 0) connect (exprCondElem, SIGNAL (currentIndexChanged(int)),
{ this, SLOT (adjustExprForConditionType(int)));
hboxLayout = new QHBoxLayout();
} else { // set up the default search: a search on name
hboxLayout = new QHBoxLayout(parent); adjustExprForTermType(searchType);
} exprOpElem ->setVisible(!isFirst);
hboxLayout->setSpacing(0); deleteExprButton ->setVisible(!isFirst);
hboxLayout->setMargin(0);
return hboxLayout; // connect the delete button signal
connect (deleteExprButton, SIGNAL (clicked()),
this, SLOT(deleteExpression()) );
this->show();
} }
bool ExpressionWidget::isStringSearchExpression() bool ExpressionWidget::isStringSearchExpression()
{ {
return (searchType == NameSearch || searchType == PathSearch return ( searchType == NameSearch || searchType == PathSearch
|| searchType == ExtSearch || searchType == HashSearch); || searchType == ExtSearch || searchType == HashSearch);
} }
void ExpressionWidget::adjustExprForTermType(int index) void ExpressionWidget::adjustExprForTermType(int index)
{ {
ExprSearchType type = GuiExprElement::TermsIndexMap[index]; ExprSearchType type = GuiExprElement::TermsIndexMap[index];
searchType = type; searchType = type;
// now adjust the relevant elements // now adjust the relevant elements
// the condition combobox // the condition combobox
exprCondElem->adjustForSearchType(type); exprCondElem->adjustForSearchType(type);
// the parameter expression: can be a date, 1-2 edit fields // the parameter expression: can be a date, 1-2 edit fields
// or a size with units etc // or a size with units etc
exprParamElem->adjustForSearchType(type); exprParamElem->adjustForSearchType(type);
exprParamFrame->adjustSize();
this->setMinimumWidth( exprOpElem->width()+exprTermElem->width()
exprLayout->invalidate(); + exprCondElem->width()+exprParamElem->width()
this->adjustSize(); + deleteExprButton->width() );
} }
void ExpressionWidget::adjustExprForConditionType(int newCondition) void ExpressionWidget::adjustExprForConditionType(int newCondition)
{ {
// we adjust the appearance for a ranged selection // we adjust the appearance for a ranged selection
inRangedConfig = (newCondition == GuiExprElement::RANGE_INDEX); inRangedConfig = (newCondition == GuiExprElement::RANGE_INDEX);
exprParamElem->setRangedSearch(inRangedConfig); exprParamElem->setRangedSearch(inRangedConfig);
exprParamFrame->layout()->invalidate();
exprParamFrame->adjustSize();
} }
void ExpressionWidget::deleteExpression() void ExpressionWidget::deleteExpression()
@ -156,7 +109,11 @@ RsRegularExpression::Expression* ExpressionWidget::getRsExpression()
if (isStringSearchExpression()) if (isStringSearchExpression())
{ {
QString txt = exprParamElem->getStrSearchValue(); QString txt = exprParamElem->getStrSearchValue();
#if QT_VERSION < QT_VERSION_CHECK(5,15,0)
QStringList words = txt.split(" ", QString::SkipEmptyParts); QStringList words = txt.split(" ", QString::SkipEmptyParts);
#else
QStringList words = txt.split(" ", Qt::SkipEmptyParts);
#endif
for (int i = 0; i < words.size(); ++i) for (int i = 0; i < words.size(); ++i)
wordList.push_back(words.at(i).toUtf8().constData()); wordList.push_back(words.at(i).toUtf8().constData());
} else if (inRangedConfig){ } else if (inRangedConfig){
@ -170,7 +127,7 @@ RsRegularExpression::Expression* ExpressionWidget::getRsExpression()
lowVal = lowVal^highVal; lowVal = lowVal^highVal;
} }
} }
switch (searchType) switch (searchType)
{ {
case NameSearch: case NameSearch:
@ -208,20 +165,20 @@ RsRegularExpression::Expression* ExpressionWidget::getRsExpression()
break; break;
case SizeSearch: case SizeSearch:
if (inRangedConfig) if (inRangedConfig)
{ {
if(lowVal >= (uint64_t)(1024*1024*1024) || highVal >= (uint64_t)(1024*1024*1024)) if(lowVal >= (uint64_t)(1024*1024*1024) || highVal >= (uint64_t)(1024*1024*1024))
expr = new RsRegularExpression::SizeExpressionMB(exprCondElem->getRelOperator(), (int)(lowVal / (1024*1024)), (int)(highVal / (1024*1024))); expr = new RsRegularExpression::SizeExpressionMB(exprCondElem->getRelOperator(), (int)(lowVal / (1024*1024)), (int)(highVal / (1024*1024)));
else else
expr = new RsRegularExpression::SizeExpression(exprCondElem->getRelOperator(), lowVal, highVal); expr = new RsRegularExpression::SizeExpression(exprCondElem->getRelOperator(), lowVal, highVal);
} }
else else
{ {
uint64_t s = exprParamElem->getIntValue() ; uint64_t s = exprParamElem->getIntValue() ;
if(s >= (uint64_t)(1024*1024*1024)) if(s >= (uint64_t)(1024*1024*1024))
expr = new RsRegularExpression::SizeExpressionMB(exprCondElem->getRelOperator(), (int)(s/(1024*1024))) ; expr = new RsRegularExpression::SizeExpressionMB(exprCondElem->getRelOperator(), (int)(s/(1024*1024))) ;
else else
expr = new RsRegularExpression::SizeExpression(exprCondElem->getRelOperator(), (int)s) ; expr = new RsRegularExpression::SizeExpression(exprCondElem->getRelOperator(), (int)s) ;
} }
break; break;
}; };

View File

@ -21,14 +21,16 @@
*******************************************************************************/ *******************************************************************************/
#ifndef _ExpressionWidget_h_ #ifndef _ExpressionWidget_h_
#define _ExpressionWidget_h_ #define _ExpressionWidget_h_
#include <iostream>
#include <QWidget>
#include <QLabel>
#include <retroshare/rsexpr.h>
#include "guiexprelement.h"
#include "ui_expressionwidget.h" #include "ui_expressionwidget.h"
#include "guiexprelement.h"
#include <retroshare/rsexpr.h>
#include <QWidget>
#include <iostream>
/** /**
Represents an Advanced Search GUI Expression object which acts as a container Represents an Advanced Search GUI Expression object which acts as a container
@ -74,20 +76,10 @@ private slots:
private: private:
QLayout * createLayout(QWidget* parent = 0);
bool isStringSearchExpression(); bool isStringSearchExpression();
QList <GuiExprElement *> * elements;
QLayout * exprLayout;
ExprOpElement * exprOpElem;
ExprTermsElement * exprTermElem;
ExprConditionElement * exprCondElem;
ExprParamElement* exprParamElem;
bool inRangedConfig;
bool isFirst; bool isFirst;
bool inRangedConfig;
ExprSearchType searchType; ExprSearchType searchType;
}; };

View File

@ -2,104 +2,33 @@
<ui version="4.0"> <ui version="4.0">
<class>ExpressionWidget</class> <class>ExpressionWidget</class>
<widget class="QWidget" name="ExpressionWidget"> <widget class="QWidget" name="ExpressionWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>34</height>
</rect>
</property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum"> <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>800</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>55</height>
</size>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Expression Widget</string> <string>Expression Widget</string>
</property> </property>
<layout class="QHBoxLayout"> <layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>6</number>
</property>
<item> <item>
<widget class="QFrame" name="exprOpFrame"> <widget class="ExprOpElement" name="exprOpElem"/>
</item>
<item>
<widget class="ExprTermsElement" name="exprTermElem"/>
</item>
<item>
<widget class="ExprConditionElement" name="exprCondElem"/>
</item>
<item>
<widget class="ExprParamElement" name="exprParamElem">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>90</width>
<height>26</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="exprTermFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>26</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="exprConditionFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>180</width>
<height>26</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="exprParamFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>350</width>
<height>26</height>
</size>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -113,21 +42,34 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>ExprOpElement</class>
<extends>QFrame</extends>
<header location="global">gui/advsearch/guiexprelement.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ExprTermsElement</class>
<extends>QFrame</extends>
<header location="global">gui/advsearch/guiexprelement.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ExprConditionElement</class>
<extends>QFrame</extends>
<header location="global">gui/advsearch/guiexprelement.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ExprParamElement</class>
<extends>QFrame</extends>
<header location="global">gui/advsearch/guiexprelement.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources> <resources>
<include location="../images.qrc"/> <include location="../images.qrc"/>
</resources> </resources>

View File

@ -21,14 +21,10 @@
*******************************************************************************/ *******************************************************************************/
#include "guiexprelement.h" #include "guiexprelement.h"
#define STR_FIELDS_MIN_WIDTH 200 #define STR_FIELDS_MIN_WFACTOR 20.0
#define SIZE_FIELDS_MIN_WIDTH 80 #define SIZE_FIELDS_MIN_WFACTOR 8.0
#define DATE_FIELDS_MIN_WIDTH 100 #define DATE_FIELDS_MIN_WFACTOR 10.0
#define FIELDS_MIN_HEIGHT 26 #define FIELDS_MIN_HFACTOR 1.2
#define LOGICAL_OP_CB_WIDTH 70
#define STD_CB_WIDTH 90
#define CONDITION_CB_WIDTH 170
const int GuiExprElement::AND_INDEX = 0; const int GuiExprElement::AND_INDEX = 0;
const int GuiExprElement::OR_INDEX = 1; const int GuiExprElement::OR_INDEX = 1;
@ -37,10 +33,10 @@ const int GuiExprElement::XOR_INDEX = 2;
const int GuiExprElement::NAME_INDEX = 0; const int GuiExprElement::NAME_INDEX = 0;
const int GuiExprElement::PATH_INDEX = 1; const int GuiExprElement::PATH_INDEX = 1;
const int GuiExprElement::EXT_INDEX = 2; const int GuiExprElement::EXT_INDEX = 2;
const int GuiExprElement::HASH_INDEX = 3; const int GuiExprElement::HASH_INDEX = 3;
/*const int GuiExprElement::KEYWORDS_INDEX = ???; //const int GuiExprElement::KEYWORDS_INDEX = ???;
const int GuiExprElement::COMMENTS_INDEX = ???; //const int GuiExprElement::COMMENTS_INDEX = ???;
const int GuiExprElement::META_INDEX = ???;*/ //const int GuiExprElement::META_INDEX = ???;
const int GuiExprElement::DATE_INDEX = 4; const int GuiExprElement::DATE_INDEX = 4;
const int GuiExprElement::SIZE_INDEX = 5; const int GuiExprElement::SIZE_INDEX = 5;
const int GuiExprElement::POP_INDEX = 6; const int GuiExprElement::POP_INDEX = 6;
@ -76,14 +72,13 @@ bool GuiExprElement::initialised = false;
GuiExprElement::GuiExprElement(QWidget * parent) GuiExprElement::GuiExprElement(QWidget * parent)
: QWidget(parent) : QFrame(parent), searchType(NameSearch)
{ {
if (!GuiExprElement::initialised) if (!GuiExprElement::initialised)
{ initialiseOptionsLists();
initialiseOptionsLists();
}
searchType = NameSearch;
setObjectName("trans_InternalFrame");
createLayout(this);
} }
@ -96,7 +91,7 @@ void GuiExprElement::initialiseOptionsLists()
const QString NAME = tr("Name"); const QString NAME = tr("Name");
const QString PATH = tr("Path"); const QString PATH = tr("Path");
const QString EXT = tr("Extension"); const QString EXT = tr("Extension");
const QString HASH = tr("Hash"); const QString HASH = tr("Hash");
//const QString KEYWORDS= tr("Keywords"); //const QString KEYWORDS= tr("Keywords");
//const QString COMMENTS= tr("Comments"); //const QString COMMENTS= tr("Comments");
//const QString META = tr("Meta"); //const QString META = tr("Meta");
@ -128,7 +123,7 @@ void GuiExprElement::initialiseOptionsLists()
//GuiExprElement::searchTermsOptionsList.append(META); //GuiExprElement::searchTermsOptionsList.append(META);
GuiExprElement::searchTermsOptionsList.append(DATE); GuiExprElement::searchTermsOptionsList.append(DATE);
GuiExprElement::searchTermsOptionsList.append(SIZE); GuiExprElement::searchTermsOptionsList.append(SIZE);
// GuiExprElement::searchTermsOptionsList.append(POP); //GuiExprElement::searchTermsOptionsList.append(POP);
GuiExprElement::stringOptionsList.append(CONTAINS); GuiExprElement::stringOptionsList.append(CONTAINS);
GuiExprElement::stringOptionsList.append(CONTALL); GuiExprElement::stringOptionsList.append(CONTALL);
@ -220,24 +215,29 @@ QStringList GuiExprElement::getConditionOptions(ExprSearchType t)
return QStringList(); return QStringList();
} }
QHBoxLayout * GuiExprElement::createLayout(QWidget * parent) QHBoxLayout * GuiExprElement::createLayout(QWidget * parent /*= nullptr*/)
{ {
QHBoxLayout * hboxLayout; QHBoxLayout * hboxLayout = new QHBoxLayout(parent);
if (parent == 0)
{
hboxLayout = new QHBoxLayout();
} else {
hboxLayout = new QHBoxLayout(parent);
}
hboxLayout->setMargin(0); hboxLayout->setMargin(0);
hboxLayout->setSpacing(0); hboxLayout->setSpacing(0);
return hboxLayout; return hboxLayout;
} }
QSize GuiExprElement::getMinSize(float widthFactor/*=1*/, float heightFactor/*=1*/)
{
QFontMetrics fm = QFontMetrics(font());
#if QT_VERSION < QT_VERSION_CHECK(5,11,0)
QSize size = QSize(fm.width("_")*widthFactor, fm.height()*heightFactor);
#else
QSize size = QSize(fm.horizontalAdvance("_")*widthFactor, fm.height()*heightFactor);
#endif
return size;
}
bool GuiExprElement::isStringSearchExpression() bool GuiExprElement::isStringSearchExpression()
{ {
return (searchType == NameSearch || searchType == PathSearch return (searchType == NameSearch || searchType == PathSearch
|| searchType == ExtSearch || searchType == HashSearch); || searchType == ExtSearch || searchType == HashSearch);
} }
@ -245,14 +245,12 @@ bool GuiExprElement::isStringSearchExpression()
/* *********** L O G I C A L O P E L E M E N T ******************/ /* *********** L O G I C A L O P E L E M E N T ******************/
/* ********************************************************************/ /* ********************************************************************/
ExprOpElement::ExprOpElement(QWidget * parent) ExprOpElement::ExprOpElement(QWidget * parent)
: GuiExprElement(parent) : GuiExprElement(parent)
{ {
internalframe = new QFrame(this); cb = new RSComboBox(this);
internalframe->setLayout(createLayout()); cb->addItems(GuiExprElement::exprOpsList);
cb = new QComboBox(this); layout()->addWidget(cb);
cb->setMinimumSize(LOGICAL_OP_CB_WIDTH, FIELDS_MIN_HEIGHT); setMinimumSize(cb->sizeHint());
cb->addItems(GuiExprElement::exprOpsList);
internalframe->layout()->addWidget(cb);
} }
QString ExprOpElement::toString() QString ExprOpElement::toString()
@ -271,16 +269,14 @@ RsRegularExpression::LogicalOperator ExprOpElement::getLogicalOperator()
/* *********** T E R M S E L E M E N T ******************/ /* *********** T E R M S E L E M E N T ******************/
/* **********************************************************/ /* **********************************************************/
ExprTermsElement::ExprTermsElement(QWidget * parent) ExprTermsElement::ExprTermsElement(QWidget * parent)
: GuiExprElement(parent) : GuiExprElement(parent)
{ {
internalframe = new QFrame(this); cb = new RSComboBox(this);
internalframe->setLayout(createLayout()); connect (cb, SIGNAL(currentIndexChanged(int)),
cb = new QComboBox(this); this, SIGNAL(currentIndexChanged(int)));
cb->setMinimumSize(STD_CB_WIDTH, FIELDS_MIN_HEIGHT); cb->addItems(GuiExprElement::searchTermsOptionsList);
connect (cb, SIGNAL(currentIndexChanged(int)), layout()->addWidget(cb);
this, SIGNAL(currentIndexChanged(int))); setMinimumSize(cb->sizeHint());
cb->addItems(GuiExprElement::searchTermsOptionsList);
internalframe->layout()->addWidget(cb);
} }
QString ExprTermsElement::toString() QString ExprTermsElement::toString()
{ {
@ -290,17 +286,15 @@ QString ExprTermsElement::toString()
/* ******************************************************************/ /* ******************************************************************/
/* *********** C O N D I T I O N E L E M E N T ******************/ /* *********** C O N D I T I O N E L E M E N T ******************/
/* ******************************************************************/ /* ******************************************************************/
ExprConditionElement::ExprConditionElement(ExprSearchType type, QWidget * parent) ExprConditionElement::ExprConditionElement(QWidget * parent, ExprSearchType type)
: GuiExprElement(parent) : GuiExprElement(parent)
{ {
internalframe = new QFrame(this); cb = new RSComboBox(this);
internalframe->setLayout(createLayout()); connect (cb, SIGNAL(currentIndexChanged(int)),
cb = new QComboBox(this); this, SIGNAL(currentIndexChanged(int)));
cb->setMinimumSize(CONDITION_CB_WIDTH, FIELDS_MIN_HEIGHT); cb->addItems(getConditionOptions(type));
connect (cb, SIGNAL(currentIndexChanged(int)), layout()->addWidget(cb);
this, SIGNAL(currentIndexChanged(int))); setMinimumSize(cb->sizeHint());
cb->addItems(getConditionOptions(type));
internalframe->layout()->addWidget(cb);
} }
@ -334,174 +328,189 @@ void ExprConditionElement::adjustForSearchType(ExprSearchType type)
/* **********************************************************/ /* **********************************************************/
/* *********** P A R A M E L E M E N T ******************/ /* *********** P A R A M E L E M E N T ******************/
/* **********************************************************/ /* **********************************************************/
ExprParamElement::ExprParamElement(ExprSearchType type, QWidget * parent) ExprParamElement::ExprParamElement(QWidget * parent, ExprSearchType type)
: GuiExprElement(parent) : GuiExprElement(parent), inRangedConfig(false)
{ {
internalframe = new QFrame(this); adjustForSearchType(type);
internalframe->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
internalframe->setLayout(createLayout());
inRangedConfig = false;
searchType = type;
adjustForSearchType(type);
} }
QString ExprParamElement::toString() QString ExprParamElement::toString()
{ {
QString str = ""; QString str = "";
if (isStringSearchExpression()) if (isStringSearchExpression())
{ {
str = QString("\"") + getStrSearchValue() + QString("\""); str = QString("\"") + getStrSearchValue() + QString("\"");
// we don't bother with case if hash search // we don't bother with case if hash search
if (searchType != HashSearch) { if (searchType != HashSearch) {
str += (ignoreCase() ? QString(" (ignore case)") str += (ignoreCase() ? QString(" (ignore case)")
: QString(" (case sensitive)")); : QString(" (case sensitive)"));
}
} else
{
if (searchType == DateSearch) {
QDateEdit * dateEdit = findChild<QDateEdit *> ("param1");
str = dateEdit->text();
if (inRangedConfig)
{
str += QString(" ") + tr("to") + QString(" ");
dateEdit = findChild<QDateEdit *> ("param2");
str += dateEdit->text();
}
} else if (searchType == SizeSearch)
{
QLineEdit * lineEditSize = findChild<QLineEdit*>("param1");
str = ("" == lineEditSize->text()) ? "0"
: lineEditSize->text();
RSComboBox * cb = findChild<RSComboBox*> ("unitsCb1");
str += QString(" ") + cb->itemText(cb->currentIndex());
if (inRangedConfig)
{
str += QString(" ") + tr("to") + QString(" ");
lineEditSize = findChild<QLineEdit*>("param2");
str += ("" == lineEditSize->text()) ? "0"
: lineEditSize->text();
cb = findChild<RSComboBox*> ("unitsCb2");
str += QString(" ") + cb->itemText(cb->currentIndex());
}
}
} }
} else return str;
{
if (searchType == DateSearch) {
QDateEdit * dateEdit = internalframe->findChild<QDateEdit *> ("param1");
str = dateEdit->text();
if (inRangedConfig)
{
str += QString(" ") + tr("to") + QString(" ");
dateEdit = internalframe->findChild<QDateEdit *> ("param2");
str += dateEdit->text();
}
} else if (searchType == SizeSearch)
{
QLineEdit * lineEditSize = internalframe->findChild<QLineEdit*>("param1");
str = ("" == lineEditSize->text()) ? "0"
: lineEditSize->text();
QComboBox * cb = internalframe->findChild<QComboBox*> ("unitsCb1");
str += QString(" ") + cb->itemText(cb->currentIndex());
if (inRangedConfig)
{
str += QString(" ") + tr("to") + QString(" ");
lineEditSize = internalframe->findChild<QLineEdit*>("param2");
str += ("" == lineEditSize->text()) ? "0"
: lineEditSize->text();
cb = internalframe->findChild<QComboBox*> ("unitsCb2");
str += QString(" ") + cb->itemText(cb->currentIndex());
}
}
}
return str;
} }
void clearLayout(QLayout *layout) {
if (layout == NULL)
return;
QLayoutItem *item;
while((item = layout->takeAt(0))) {
if (item->layout()) {
clearLayout(item->layout());
delete item->layout();
}
if (item->widget()) {
delete item->widget();
}
delete item;
}
}
void ExprParamElement::adjustForSearchType(ExprSearchType type) void ExprParamElement::adjustForSearchType(ExprSearchType type)
{ {
// record which search type is active // record which search type is active
searchType = type; searchType = type;
QRegExp regExp("0|[1-9][0-9]*"); QRegExp regExp("0|[1-9][0-9]*");
numValidator = new QRegExpValidator(regExp, this); numValidator = new QRegExpValidator(regExp, this);
QRegExp hexRegExp("[A-Fa-f0-9]*"); QRegExp hexRegExp("[A-Fa-f0-9]*");
hexValidator = new QRegExpValidator(hexRegExp, this); hexValidator = new QRegExpValidator(hexRegExp, this);
// remove all elements
QList<QWidget*> children = internalframe->findChildren<QWidget*>();
QWidget* child;
QLayout * lay_out = internalframe->layout();
while (!children.isEmpty())
{
child = children.takeLast();
child->hide();
lay_out->removeWidget(child);
delete child;
}
delete lay_out;
QHBoxLayout* hbox = createLayout(); QHBoxLayout* hbox = static_cast<QHBoxLayout*>(layout());
internalframe->setLayout(hbox); clearLayout(hbox);
internalframe->setMinimumSize(320,26);
setMinimumSize(getMinSize(STR_FIELDS_MIN_WFACTOR,FIELDS_MIN_HFACTOR) );
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
if (isStringSearchExpression())
{
// set up for default of a simple input field
QLineEdit* lineEdit = new QLineEdit(this);
lineEdit->setMinimumSize(getMinSize(STR_FIELDS_MIN_WFACTOR,FIELDS_MIN_HFACTOR));
lineEdit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
lineEdit->setObjectName("param1");
hbox->addWidget(lineEdit);
hbox->addSpacing(9);
QCheckBox* icCb = new QCheckBox(tr("ignore case"), this);
icCb->setMinimumSize(getMinSize(icCb->text().length()+2,FIELDS_MIN_HFACTOR));
icCb->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
icCb->setObjectName("ignoreCaseCB");
icCb->setCheckState(Qt::Checked);
hbox->addWidget(icCb);
// hex search specifics: hidden case sensitivity and hex validator
if (searchType == HashSearch) {
icCb->hide();
lineEdit->setValidator(hexValidator);
}
setMinimumSize(lineEdit->minimumSize()
+ QSize((searchType != HashSearch ? icCb->minimumWidth() : 0),0) );
} else if (searchType == DateSearch)
{
QDateEdit * dateEdit = new QDateEdit(QDate::currentDate(), this);
dateEdit->setMinimumSize(getMinSize(DATE_FIELDS_MIN_WFACTOR, FIELDS_MIN_HFACTOR));
dateEdit->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
dateEdit->setDisplayFormat(tr("yyyy-MM-dd"));
dateEdit->setObjectName("param1");
dateEdit->setMinimumDate(QDate(1970, 1, 1));
dateEdit->setMaximumDate(QDate(2099, 12,31));
hbox->addWidget(dateEdit, Qt::AlignLeft);
hbox->addStretch();
setMinimumSize(dateEdit->minimumSize());
} else if (searchType == SizeSearch)
{
QLineEdit * lineEdit = new QLineEdit(this);
lineEdit->setMinimumSize(getMinSize(SIZE_FIELDS_MIN_WFACTOR, FIELDS_MIN_HFACTOR));
lineEdit->setMaximumSize(getMinSize(SIZE_FIELDS_MIN_WFACTOR, FIELDS_MIN_HFACTOR));
lineEdit->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
lineEdit->setObjectName("param1");
lineEdit->setValidator(numValidator);
hbox->addWidget(lineEdit, Qt::AlignLeft);
hbox->addSpacing(9);
RSComboBox * cb = new RSComboBox(this);
cb->setObjectName("unitsCb1");
cb->addItem(tr("KB"), QVariant(1024));
cb->addItem(tr("MB"), QVariant(1024*1024));
cb->addItem(tr("GB"), QVariant(1024*1024*1024));
hbox->addWidget(cb);
hbox->addStretch();
setMinimumSize(lineEdit->minimumSize() + QSize(9,0)
+ QSize(cb->minimumWidth(),0) );
if (isStringSearchExpression())
{
// set up for default of a simple input field
QLineEdit* lineEdit = new QLineEdit(internalframe);
lineEdit->setMinimumSize(STR_FIELDS_MIN_WIDTH, FIELDS_MIN_HEIGHT);
lineEdit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
lineEdit->setObjectName("param1");
hbox->addWidget(lineEdit);
hbox->addSpacing(9);
QCheckBox* icCb = new QCheckBox(tr("ignore case"), internalframe);
icCb->setObjectName("ignoreCaseCB");
icCb->setCheckState(Qt::Checked);
// hex search specifics: hidden case sensitivity and hex validator
if (searchType == HashSearch) {
icCb->hide();
lineEdit->setValidator(hexValidator);
} }
hbox->addWidget(icCb);
hbox->addStretch();
} else if (searchType == DateSearch)
{
QDateEdit * dateEdit = new QDateEdit(QDate::currentDate(), internalframe);
dateEdit->setMinimumSize(DATE_FIELDS_MIN_WIDTH, FIELDS_MIN_HEIGHT);
dateEdit->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
dateEdit->setDisplayFormat(tr("dd.MM.yyyy"));
dateEdit->setObjectName("param1");
dateEdit->setMinimumDate(QDate(1970, 1, 1));
dateEdit->setMaximumDate(QDate(2099, 12,31));
hbox->addWidget(dateEdit, Qt::AlignLeft);
hbox->addStretch();
} else if (searchType == SizeSearch)
{
QLineEdit * lineEdit = new QLineEdit(internalframe);
lineEdit->setMinimumSize(SIZE_FIELDS_MIN_WIDTH, FIELDS_MIN_HEIGHT);
lineEdit->setMaximumSize(SIZE_FIELDS_MIN_WIDTH, FIELDS_MIN_HEIGHT);
lineEdit->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
lineEdit->setObjectName("param1");
lineEdit->setValidator(numValidator);
hbox->addWidget(lineEdit, Qt::AlignLeft);
QComboBox * cb = new QComboBox(internalframe); /* POP Search not implemented
cb->setObjectName("unitsCb1"); else if (searchType == PopSearch)
cb-> addItem(tr("KB"), QVariant(1024)); {
cb->addItem(tr("MB"), QVariant(1048576)); QLineEdit * lineEdit = new QLineEdit(this);
cb->addItem(tr("GB"), QVariant(1073741824)); lineEdit->setObjectName("param1");
hbox->addSpacing(9); lineEdit->setValidator(numValidator);
internalframe->layout()->addWidget(cb); hbox->addWidget(lineEdit);
hbox->addStretch(); hbox->addStretch();
} setMinimumSize(lineEdit->minimumSize());
}*/
/* POP Search not implemented hbox->invalidate();
else if (searchType == PopSearch) adjustSize();
{ show();
QLineEdit * lineEdit = new QLineEdit(elem);
lineEdit->setObjectName("param1");
lineEdit->setValidator(numValidator);
elem->layout()->addWidget(lineEdit);
}*/
hbox->invalidate();
internalframe->adjustSize();
internalframe->show();
this->adjustSize();
} }
void ExprParamElement::setRangedSearch(bool ranged) void ExprParamElement::setRangedSearch(bool ranged)
{ {
if (inRangedConfig == ranged) return; // nothing to do here if (inRangedConfig == ranged) return; // nothing to do here
inRangedConfig = ranged; inRangedConfig = ranged;
QHBoxLayout* hbox = (dynamic_cast<QHBoxLayout*>(internalframe->layout())); QHBoxLayout* hbox = static_cast<QHBoxLayout*>(layout());
// add additional or remove extra input fields depending on whether // add additional or remove extra input fields depending on whether
// ranged search or not // ranged search or not
if (inRangedConfig) if (inRangedConfig)
{ {
if(hbox->itemAt(hbox->count()-1)->spacerItem())
delete hbox->takeAt(hbox->count()-1);
QLabel * toLbl = new QLabel(tr("to")); QLabel * toLbl = new QLabel(tr("to"));
toLbl->setMinimumSize(10, FIELDS_MIN_HEIGHT); toLbl->setMinimumSize(getMinSize(2, FIELDS_MIN_HFACTOR));
toLbl->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); toLbl->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
if (searchType == DateSearch) { if (searchType == DateSearch) {
internalframe->setMinimumSize(250,26); QDateEdit * dateEdit = new QDateEdit(QDate::currentDate(), this);
QDateEdit * dateEdit = new QDateEdit(QDate::currentDate(), internalframe); dateEdit->setMinimumSize(getMinSize(DATE_FIELDS_MIN_WFACTOR, FIELDS_MIN_HFACTOR));
dateEdit->setMinimumSize(DATE_FIELDS_MIN_WIDTH, FIELDS_MIN_HEIGHT);
dateEdit->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); dateEdit->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
dateEdit->setDisplayFormat(tr("yyyy-MM-dd"));
dateEdit->setObjectName("param2"); dateEdit->setObjectName("param2");
dateEdit->setDisplayFormat(tr("dd.MM.yyyy"));
dateEdit->setMinimumDate(QDate(1970, 1, 1)); dateEdit->setMinimumDate(QDate(1970, 1, 1));
dateEdit->setMaximumDate(QDate(2099, 12,31)); dateEdit->setMaximumDate(QDate(2099, 12,31));
@ -510,18 +519,21 @@ void ExprParamElement::setRangedSearch(bool ranged)
hbox->addSpacing(9); hbox->addSpacing(9);
hbox->addWidget(dateEdit, Qt::AlignLeft); hbox->addWidget(dateEdit, Qt::AlignLeft);
hbox->addStretch(); hbox->addStretch();
setMinimumSize(minimumSize() + QSize(9,0)
+ QSize(toLbl->minimumWidth(),0) + QSize(9,0)
+ QSize(dateEdit->minimumWidth(),0) );
} else if (searchType == SizeSearch) { } else if (searchType == SizeSearch) {
internalframe->setMinimumSize(340,26); QLineEdit * lineEdit = new QLineEdit(this);
QLineEdit * lineEdit = new QLineEdit(internalframe); lineEdit->setMinimumSize(getMinSize(SIZE_FIELDS_MIN_WFACTOR, FIELDS_MIN_HFACTOR));
lineEdit->setMinimumSize(SIZE_FIELDS_MIN_WIDTH, FIELDS_MIN_HEIGHT); lineEdit->setMaximumSize(getMinSize(SIZE_FIELDS_MIN_WFACTOR, FIELDS_MIN_HFACTOR));
lineEdit->setMaximumSize(SIZE_FIELDS_MIN_WIDTH, FIELDS_MIN_HEIGHT);
lineEdit->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); lineEdit->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
lineEdit->setObjectName("param2"); lineEdit->setObjectName("param2");
lineEdit->setValidator(numValidator); lineEdit->setValidator(numValidator);
QComboBox * cb = new QComboBox(internalframe); RSComboBox * cb = new RSComboBox(this);
cb->setObjectName("unitsCb2"); cb->setObjectName("unitsCb2");
cb-> addItem(tr("KB"), QVariant(1024)); cb->addItem(tr("KB"), QVariant(1024));
cb->addItem(tr("MB"), QVariant(1048576)); cb->addItem(tr("MB"), QVariant(1048576));
cb->addItem(tr("GB"), QVariant(1073741824)); cb->addItem(tr("GB"), QVariant(1073741824));
@ -532,28 +544,39 @@ void ExprParamElement::setRangedSearch(bool ranged)
hbox->addSpacing(9); hbox->addSpacing(9);
hbox->addWidget(cb); hbox->addWidget(cb);
hbox->addStretch(); hbox->addStretch();
} setMinimumSize(minimumSize() + QSize(9,0)
// else if (searchType == PopSearch) + QSize(toLbl->minimumWidth(),0) + QSize(9,0)
// { + QSize(lineEdit->minimumWidth(),0) + QSize(9,0)
// elem->layout()->addWidget(new QLabel(tr("to")), Qt::AlignCenter); + QSize(cb->minimumWidth(),0) );
// QLineEdit * lineEdit = new QLineEdit(elem);
// lineEdit->setObjectName("param2"); }
// lineEdit->setValidator(numValidator); // else if (searchType == PopSearch)
// elem->layout()->addWidget(slineEdit); // {
// } // QLineEdit * lineEdit = new QLineEdit(this);
// lineEdit->setObjectName("param2");
// lineEdit->setValidator(numValidator);
// hbox->addSpacing(9);
// hbox->addWidget(toLbl, Qt::AlignLeft);
// hbox->addSpacing(9);
// hbox->addWidget(lineEdit, Qt::AlignLeft);
// hbox->addStretch();
// setMinimumSize(minimumSize() + QSize(9,0)
// + QSize(toLbl->minimumWidth(),0) + QSize(9,0)
// + QSize(lineEdit->minimumWidth(),0) );
// }
hbox->invalidate(); hbox->invalidate();
internalframe->adjustSize(); adjustSize();
internalframe->show(); show();
this->adjustSize();
} else { } else {
adjustForSearchType(searchType); adjustForSearchType(searchType);
} }
} }
bool ExprParamElement::ignoreCase() bool ExprParamElement::ignoreCase()
{ {
return (isStringSearchExpression() return (isStringSearchExpression()
&& (internalframe->findChild<QCheckBox*>("ignoreCaseCB")) && (findChild<QCheckBox*>("ignoreCaseCB"))
->checkState()==Qt::Checked); ->checkState()==Qt::Checked);
} }
@ -561,15 +584,15 @@ QString ExprParamElement::getStrSearchValue()
{ {
if (!isStringSearchExpression()) return ""; if (!isStringSearchExpression()) return "";
QLineEdit * lineEdit = internalframe->findChild<QLineEdit*>("param1"); QLineEdit * lineEdit = findChild<QLineEdit*>("param1");
return lineEdit->displayText(); return lineEdit->displayText();
} }
uint64_t ExprParamElement::getIntValueFromField(QString fieldName, bool isToField,bool *ok) uint64_t ExprParamElement::getIntValueFromField(QString fieldName, bool isToField,bool *ok)
{ {
uint64_t val = 0; uint64_t val = 0;
if(ok!=NULL) if(ok!=NULL)
*ok=true ; *ok=true ;
QString suffix = (isToField) ? "2": "1" ; QString suffix = (isToField) ? "2": "1" ;
// NOTE qFindChild necessary for MSVC 6 compatibility!! // NOTE qFindChild necessary for MSVC 6 compatibility!!
@ -577,25 +600,29 @@ uint64_t ExprParamElement::getIntValueFromField(QString fieldName, bool isToFiel
{ {
case DateSearch: case DateSearch:
{ {
QDateEdit * dateEdit = internalframe->findChild<QDateEdit *> (fieldName + suffix); QDateEdit * dateEdit = findChild<QDateEdit *> (fieldName + suffix);
QDateTime * time = new QDateTime(dateEdit->date()); #if QT_VERSION < QT_VERSION_CHECK(5,15,0)
val = (uint64_t)time->toTime_t(); QDateTime time = QDateTime(dateEdit->date());
#else
QDateTime time = dateEdit->date().startOfDay();
#endif
val = (uint64_t)time.toTime_t();
break; break;
} }
case SizeSearch: case SizeSearch:
{ {
QLineEdit * lineEditSize = internalframe->findChild<QLineEdit*>(fieldName + suffix); QLineEdit * lineEditSize = findChild<QLineEdit*>(fieldName + suffix);
bool ok2 = false; bool ok2 = false;
val = (lineEditSize->displayText()).toULongLong(&ok2); val = (lineEditSize->displayText()).toULongLong(&ok2);
if (ok2) if (ok2)
{ {
QComboBox * cb = internalframe->findChild<QComboBox*>((QString("unitsCb") + suffix)); RSComboBox * cb = findChild<RSComboBox*>((QString("unitsCb") + suffix));
QVariant data = cb->itemData(cb->currentIndex()); QVariant data = cb->itemData(cb->currentIndex());
val *= data.toULongLong(); val *= data.toULongLong();
} }
else else
if(ok!=NULL) if(ok!=NULL)
*ok=false ; *ok=false ;
break; break;
} }
@ -615,8 +642,8 @@ uint64_t ExprParamElement::getIntValueFromField(QString fieldName, bool isToFiel
case HashSearch: case HashSearch:
default: default:
// shouldn't be here...val stays at -1 // shouldn't be here...val stays at -1
if(ok!=NULL) if(ok!=NULL)
*ok=false ; *ok=false ;
} }
return val; return val;

View File

@ -22,25 +22,18 @@
#ifndef _GuiExprElement_h_ #ifndef _GuiExprElement_h_
#define _GuiExprElement_h_ #define _GuiExprElement_h_
#include <QWidget> #include "gui/common/RSComboBox.h"
#include <QObject>
#include <QString> #include "retroshare/rsexpr.h"
#include <QStringList>
#include <QComboBox>
#include <QCheckBox> #include <QCheckBox>
#include <QVariant>
#include <QLineEdit>
#include <QDateEdit> #include <QDateEdit>
#include <QLabel>
#include <QRegExp>
#include <QRegExpValidator>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QMap> #include <QLabel>
#include <QLineEdit>
#include <iostream> #include <iostream>
#include <retroshare/rsexpr.h>
enum ExprSearchType enum ExprSearchType
{ {
NameSearch, NameSearch,
@ -53,13 +46,13 @@ enum ExprSearchType
}; };
class GuiExprElement: public QWidget class GuiExprElement: public QFrame
{ {
Q_OBJECT Q_OBJECT
public: public:
GuiExprElement(QWidget * parent = 0); GuiExprElement(QWidget * parent = 0);
virtual void adjustForSearchType(ExprSearchType) {} void adjustForSearchType(ExprSearchType) {}
virtual ~GuiExprElement(){} virtual ~GuiExprElement(){}
virtual void set(int){} virtual void set(int){}
virtual void set(QObject*){} virtual void set(QObject*){}
@ -103,8 +96,8 @@ protected:
condition combobox */ condition combobox */
QStringList getConditionOptions(ExprSearchType t); QStringList getConditionOptions(ExprSearchType t);
QHBoxLayout* createLayout(QWidget* parent = 0); QHBoxLayout* createLayout(QWidget* parent = nullptr);
QFrame * internalframe; QSize getMinSize(float widthFactor = 1.0, float heightFactor = 1.0);
ExprSearchType searchType; ExprSearchType searchType;
@ -125,7 +118,6 @@ protected:
static QMap<int, QString> strConditionStrMap; static QMap<int, QString> strConditionStrMap;
static QMap<int, QString> relConditionStrMap; static QMap<int, QString> relConditionStrMap;
}; };
/** the Expression operator combobox element */ /** the Expression operator combobox element */
@ -134,11 +126,11 @@ class ExprOpElement : public GuiExprElement
Q_OBJECT Q_OBJECT
public: public:
ExprOpElement(QWidget * parent = 0); ExprOpElement(QWidget * parent = nullptr);
RsRegularExpression::LogicalOperator getLogicalOperator(); RsRegularExpression::LogicalOperator getLogicalOperator();
QString toString(); QString toString();
private: private:
QComboBox * cb; RSComboBox * cb;
}; };
/** the Terms combobox element */ /** the Terms combobox element */
@ -147,7 +139,7 @@ class ExprTermsElement : public GuiExprElement
Q_OBJECT Q_OBJECT
public: public:
ExprTermsElement(QWidget * parent = 0); ExprTermsElement(QWidget * parent = nullptr);
int getTermsIndex(); int getTermsIndex();
RsRegularExpression::RelOperator getRelOperator(); RsRegularExpression::RelOperator getRelOperator();
RsRegularExpression::StringOperator getStringOperator(); RsRegularExpression::StringOperator getStringOperator();
@ -158,7 +150,7 @@ signals:
void currentIndexChanged(int); void currentIndexChanged(int);
private: private:
QComboBox * cb; RSComboBox * cb;
}; };
/** the Conditions combobox element */ /** the Conditions combobox element */
@ -167,7 +159,7 @@ class ExprConditionElement : public GuiExprElement
Q_OBJECT Q_OBJECT
public: public:
ExprConditionElement(ExprSearchType, QWidget * parent = 0); ExprConditionElement(QWidget * parent = nullptr, ExprSearchType type = NameSearch);
RsRegularExpression::RelOperator getRelOperator(); RsRegularExpression::RelOperator getRelOperator();
RsRegularExpression::StringOperator getStringOperator(); RsRegularExpression::StringOperator getStringOperator();
void adjustForSearchType(ExprSearchType); void adjustForSearchType(ExprSearchType);
@ -178,7 +170,7 @@ signals:
void currentIndexChanged(int); void currentIndexChanged(int);
private: private:
QComboBox * cb; RSComboBox * cb;
}; };
/** the Parameter element */ /** the Parameter element */
@ -187,7 +179,7 @@ class ExprParamElement : public GuiExprElement
Q_OBJECT Q_OBJECT
public: public:
ExprParamElement(ExprSearchType, QWidget * parent = 0); ExprParamElement(QWidget * parent = nullptr, ExprSearchType type = NameSearch);
QVariant* getRSExprValue(); QVariant* getRSExprValue();
void adjustForSearchType(ExprSearchType); void adjustForSearchType(ExprSearchType);
void setRangedSearch(bool ranged = true); void setRangedSearch(bool ranged = true);

View File

@ -13,7 +13,7 @@
<property name="windowTitle"> <property name="windowTitle">
<string notr="true">MainWindow</string> <string notr="true">MainWindow</string>
</property> </property>
<layout class="QHBoxLayout" name="ChatLobbyDialogHLayout"> <layout class="QHBoxLayout" name="ChatLobbyDialog_HL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -48,7 +48,7 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QFrame" name="participantsFrame"> <widget class="QFrame" name="trans_Frame_Participants">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding"> <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -61,7 +61,7 @@
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<layout class="QVBoxLayout" name="participantsFrameVLayout"> <layout class="QVBoxLayout" name="trans_Frame_Participants_VL">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -82,7 +82,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Sunken</enum> <enum>QFrame::Sunken</enum>
</property> </property>
<layout class="QHBoxLayout" name="toolBarFrameHLayout"> <layout class="QHBoxLayout" name="toolBarFrame_HL">
<property name="leftMargin"> <property name="leftMargin">
<number>2</number> <number>2</number>
</property> </property>

View File

@ -183,7 +183,7 @@ ChatWidget::ChatWidget(QWidget *parent)
connect(ui->chatTextEdit, SIGNAL(currentCharFormatChanged(QTextCharFormat)), this, SLOT(chatCharFormatChanged())); connect(ui->chatTextEdit, SIGNAL(currentCharFormatChanged(QTextCharFormat)), this, SLOT(chatCharFormatChanged()));
connect(ui->chatTextEdit, SIGNAL(textChanged()), this, SLOT(updateLenOfChatTextEdit())); connect(ui->chatTextEdit, SIGNAL(textChanged()), this, SLOT(updateLenOfChatTextEdit()));
ui->infoFrame->setVisible(false); ui->info_Frame->setVisible(false);
ui->statusMessageLabel->hide(); ui->statusMessageLabel->hide();
setAcceptDrops(true); setAcceptDrops(true);
@ -290,12 +290,12 @@ void ChatWidget::addChatBarWidget(QWidget *w)
void ChatWidget::addTitleBarWidget(QWidget *w) void ChatWidget::addTitleBarWidget(QWidget *w)
{ {
ui->pluginTitleFrame->layout()->addWidget(w) ; ui->trans_Frame_PluginTitle->layout()->addWidget(w) ;
} }
void ChatWidget::addTopBarWidget(QWidget *w) void ChatWidget::addTopBarWidget(QWidget *w)
{ {
ui->pluginTopFrame->layout()->addWidget(w) ; ui->trans_Frame_PluginTop->layout()->addWidget(w) ;
} }
void ChatWidget::hideChatText(bool hidden) void ChatWidget::hideChatText(bool hidden)
@ -642,7 +642,7 @@ bool ChatWidget::eventFilter(QObject *obj, QEvent *event)
} }
} }
} else if (obj == ui->chatTextEdit) { } else if (obj == ui->chatTextEdit) {
if (event->type() == QEvent::KeyPress) { if (event->type() == QEvent::KeyPress) {
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event); QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
@ -1286,7 +1286,7 @@ void ChatWidget::sendChat()
void ChatWidget::on_closeInfoFrameButton_clicked() void ChatWidget::on_closeInfoFrameButton_clicked()
{ {
ui->infoFrame->setVisible(false); ui->info_Frame->setVisible(false);
} }
void ChatWidget::on_searchButton_clicked(bool bValue) void ChatWidget::on_searchButton_clicked(bool bValue)
@ -1804,27 +1804,27 @@ void ChatWidget::updateStatus(const QString &peer_id, int status)
switch (status) { switch (status) {
case RS_STATUS_OFFLINE: case RS_STATUS_OFFLINE:
ui->infoFrame->setVisible(true); ui->info_Frame->setVisible(true);
ui->infoLabel->setText(peerName + " " + tr("appears to be Offline.") +"\n" + tr("Messages you send will be delivered after Friend is again Online.")); ui->infoLabel->setText(peerName + " " + tr("appears to be Offline.") +"\n" + tr("Messages you send will be delivered after Friend is again Online."));
break; break;
case RS_STATUS_INACTIVE: case RS_STATUS_INACTIVE:
ui->infoFrame->setVisible(true); ui->info_Frame->setVisible(true);
ui->infoLabel->setText(peerName + " " + tr("is Idle and may not reply")); ui->infoLabel->setText(peerName + " " + tr("is Idle and may not reply"));
break; break;
case RS_STATUS_ONLINE: case RS_STATUS_ONLINE:
ui->infoFrame->setVisible(false); ui->info_Frame->setVisible(false);
break; break;
case RS_STATUS_AWAY: case RS_STATUS_AWAY:
ui->infoLabel->setText(peerName + " " + tr("is Away and may not reply")); ui->infoLabel->setText(peerName + " " + tr("is Away and may not reply"));
ui->infoFrame->setVisible(true); ui->info_Frame->setVisible(true);
break; break;
case RS_STATUS_BUSY: case RS_STATUS_BUSY:
ui->infoLabel->setText(peerName + " " + tr("is Busy and may not reply")); ui->infoLabel->setText(peerName + " " + tr("is Busy and may not reply"));
ui->infoFrame->setVisible(true); ui->info_Frame->setVisible(true);
break; break;
} }

Some files were not shown because too many files have changed in this diff Show More