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

View File

@ -86,7 +86,14 @@
</widget>
</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">
<string>Feeds</string>
</property>
@ -178,11 +185,6 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
<customwidget>
<class>RSTreeWidget</class>
<extends>QTreeWidget</extends>

View File

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

View File

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

View File

@ -1,9 +1,3 @@
/* Default stylesheet
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>
<qresource prefix="/qss/stylesheet/FeedReader">
<file>FeedReader_qss.default</file>
<file>FeedReader_default.qss</file>
<file>FeedReader_Standard.qss</file>
</qresource>
</RCC>

View File

@ -375,7 +375,7 @@ void VOIPConfigPanel::on_qpbAudioWizard_clicked() {
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();

View File

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

View File

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

View File

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

View File

@ -1,9 +1,3 @@
/* Default stylesheet
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>
<qresource prefix="/qss/stylesheet/VOIP">
<file>VOIP_qss.default</file>
<file>VOIP_default.qss</file>
<file>VOIP_Standard.qss</file>
</qresource>
</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)
- 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)
- 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)
- 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.
@ -586,7 +586,7 @@ Changes for 0.5.4c
- GUI
* 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
* 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.
* Added multiselective mute/unmute to chat lobby. Added mute/unmute with double click on icon.
* 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.
* Removed some unnecessary style sheets.
* 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
- 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.
- Added clear chat history to the context menu of the message text browser

View File

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

View File

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

View File

@ -94,14 +94,14 @@ ChatLobbyWidget::ChatLobbyWidget(QWidget *parent, Qt::WindowFlags flags)
myInviteIdChooser = NULL;
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( 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(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.createLobbyToolButton, SIGNAL(clicked()), this, SLOT(createChatLobby()));
@ -212,7 +212,7 @@ ChatLobbyWidget::ChatLobbyWidget(QWidget *parent, Qt::WindowFlags flags)
Note: For the chat rooms to work properly, your computer needs be on time. So check your system clock!\
</p> \
"
).arg(QString::number(2*S)).arg(QString::number(S)) ;
).arg(QString::number(2*S), QString::number(S)) ;
registerHelpButton(ui.helpButton,help_str,"ChatLobbyDialog") ;
@ -232,7 +232,7 @@ ChatLobbyWidget::~ChatLobbyWidget()
UserNotify *ChatLobbyWidget::createUserNotify(QObject *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;
}
@ -920,7 +920,7 @@ void ChatLobbyWidget::showBlankPage(ChatLobbyId id, bool subscribed /*= false*/)
}
}
ui.lobbyInfoLabel->setText(text);
ui.info_Label_Lobby->setText(text);
return ;
}
@ -932,7 +932,7 @@ void ChatLobbyWidget::showBlankPage(ChatLobbyId id, bool subscribed /*= false*/)
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.") ;
ui.lobbyInfoLabel->setText(text) ;
ui.info_Label_Lobby->setText(text) ;
}
void ChatLobbyWidget::subscribeItem()
@ -1116,6 +1116,7 @@ void ChatLobbyWidget::updateCurrentLobby()
filterItems(ui.filterLineEdit->text());
}
}
void ChatLobbyWidget::updateMessageChanged(bool incoming, ChatLobbyId id, QDateTime time, QString senderName, QString msg)
{
QTreeWidgetItem *current_item = ui.lobbyTreeWidget->currentItem();
@ -1174,9 +1175,11 @@ void ChatLobbyWidget::readChatLobbyInvites()
if(found)
continue ;
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)),
QMessageBox::Question, QMessageBox::Yes,QMessageBox::No, 0);
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())
, RsHtml::plainText(it->lobby_name))
, QMessageBox::Question, QMessageBox::Yes,QMessageBox::No, 0);
QLabel *label;

View File

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

View File

@ -49,7 +49,14 @@
</widget>
</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">
<string>Circles</string>
</property>
@ -247,13 +254,6 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../images.qrc"/>
<include location="../icons.qrc"/>

View File

@ -98,7 +98,7 @@ CreateCircleDialog::CreateCircleDialog()
connect(ui.addButton, SIGNAL(clicked()), this, SLOT(addMember()));
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.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.createButton->setText(tr("Update"));
ui.postButton->setText(tr("Update"));
ui.addButton->setEnabled(!readonly) ;
ui.removeButton->setEnabled(!readonly) ;
if(readonly)
{
ui.createButton->hide() ;
ui.postButton->hide() ;
ui.cancelButton->setText(tr("Close"));
ui.peersSelection_GB->hide() ;
ui.addButton->hide() ;
@ -216,7 +216,7 @@ void CreateCircleDialog::editNewId(bool isExternal)
{
setupForExternalCircle();
ui.headerFrame->setHeaderText(tr("Create New Circle"));
ui.createButton->setText(tr("Create"));
ui.postButton->setText(tr("Create"));
}
else
{

View File

@ -13,7 +13,7 @@
<property name="windowTitle">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<layout class="QGridLayout" name="CreateCircleDialog_GL">
<property name="leftMargin">
<number>0</number>
</property>
@ -40,24 +40,25 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QFrame" name="frame">
<widget class="QFrame" name="gradFrame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gradFrame_GL">
<item row="0" column="0" colspan="3">
<widget class="QGroupBox" name="groupBox_title">
<property name="title">
<string>Circle Details</string>
</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">
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="circleNameLabel">
<property name="font">
<font>
<weight>75</weight>
@ -116,7 +117,7 @@
</widget>
</item>
<item row="1" column="3">
<spacer name="horizontalSpacer_2">
<spacer name="idChooserHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -132,7 +133,7 @@
</spacer>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<widget class="QLabel" name="distributionLabel">
<property name="font">
<font>
<weight>75</weight>
@ -155,7 +156,7 @@
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<layout class="QGridLayout" name="frame_Distribution_GL">
<property name="leftMargin">
<number>2</number>
</property>
@ -232,7 +233,7 @@
<widget class="GxsCircleChooser" name="circleComboBox"/>
</item>
<item row="0" column="4">
<spacer name="horizontalSpacer">
<spacer name="frame_Distribution_HSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -248,18 +249,16 @@
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="1" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<layout class="QHBoxLayout" name="id_HL">
<item>
<widget class="QGroupBox" name="members_groupBox">
<property name="title">
<string>Invited Members</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<layout class="QVBoxLayout" name="members_groupBox_VL">
<item>
<widget class="QTreeWidget" name="treeWidget_membership">
<property name="contextMenuPolicy">
@ -287,9 +286,9 @@
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<layout class="QVBoxLayout" name="add_rem_VL">
<item>
<spacer name="verticalSpacer">
<spacer name="add_rem_Top_VSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@ -330,7 +329,7 @@
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<spacer name="add_rem_Bot_VSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@ -378,7 +377,7 @@
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<layout class="QHBoxLayout" name="frame_PgpTypes_HL">
<property name="spacing">
<number>0</number>
</property>
@ -419,9 +418,9 @@
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<layout class="QHBoxLayout" name="IdFilter_HL">
<item>
<widget class="QLabel" name="label">
<widget class="QLabel" name="IdFilter_Label">
<property name="text">
<string>Filter</string>
</property>
@ -438,7 +437,7 @@
</layout>
</item>
<item row="2" column="0">
<spacer name="horizontalSpacer_3">
<spacer name="bottumHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -451,7 +450,14 @@
</spacer>
</item>
<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">
<string>Create</string>
</property>
@ -503,7 +509,6 @@
</customwidget>
</customwidgets>
<resources>
<include location="../images.qrc"/>
<include location="../icons.qrc"/>
</resources>
<connections/>

View File

@ -121,10 +121,10 @@ SearchDialog::SearchDialog(QWidget *parent)
connect( ui.searchSummaryWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( searchSummaryWidgetCustomPopupMenu( QPoint ) ) );
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.pushButtonSearch, SIGNAL( released ( void ) ), this, SLOT( searchKeywords( void ) ) );
connect( ui.pushButtonDownload, SIGNAL( released ( void ) ), this, SLOT( download( void ) ) );
connect( ui.searchButton, SIGNAL( released () ), this, SLOT( searchKeywords() ) );
connect( ui.pushButtonDownload, SIGNAL( released () ), this, SLOT( download() ) );
connect( ui.cloaseallsearchresultsButton, SIGNAL(clicked()), this, SLOT(searchRemoveAll()));
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_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);
/* Set initial size the splitter */
@ -276,30 +271,9 @@ void SearchDialog::processSettings(bool bLoad)
void SearchDialog::checkText(const QString& txt)
{
bool valid;
QColor color;
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.searchButton->setDisabled(txt.length() < 3);
ui.searchLineFrame->setProperty("valid", (txt.length() >= 3));
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);
}
@ -393,11 +367,10 @@ void SearchDialog::download()
/* should also be able to handle multi-selection */
QList<QTreeWidgetItem*> itemsForDownload = ui.searchResultWidget->selectedItems() ;
int numdls = itemsForDownload.size() ;
QTreeWidgetItem * item ;
bool attemptDownloadLocal = false ;
for (int i = 0; i < numdls; ++i) {
item = itemsForDownload.at(i) ;
QTreeWidgetItem *item = itemsForDownload.at(i) ;
// call the download
// *
if (item->text(SR_HASH_COL).isEmpty()) { // we have a folder
@ -421,8 +394,8 @@ void SearchDialog::download()
std::cout << *it << "-" << std::endl;
QColor foreground = textColorDownloading();
for (int i = 0; i < item->columnCount(); ++i)
item->setData(i, Qt::ForegroundRole, foreground );
for (int j = 0; j < item->columnCount(); ++j)
item->setData(j, Qt::ForegroundRole, foreground );
}
}
}
@ -1209,17 +1182,16 @@ void SearchDialog::insertFile(qulonglong searchId, const FileDetail& file, int s
//
bool found = false ;
bool altname = false ;
int sources;
int friendSource = 0;
int anonymousSource = 0;
QString modifiedResult;
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)
if((*it)->text(SR_SEARCH_ID_COL) == sid_hexa)
for(auto &it : itms)
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);
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);
float fltRes = friendSource + (float)anonymousSource/1000;
(*it)->setText(SR_SOURCES_COL,modifiedResult);
(*it)->setData(SR_SOURCES_COL, ROLE_SORT, fltRes);
QTreeWidgetItem *item = (*it);
it->setText(SR_SOURCES_COL,modifiedResult);
it->setData(SR_SOURCES_COL, ROLE_SORT, fltRes);
QTreeWidgetItem *item = it;
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;
if (!item->data(SR_DATA_COL, SR_ROLE_LOCAL).toBool()) {
@ -1282,15 +1254,14 @@ void SearchDialog::insertFile(qulonglong searchId, const FileDetail& file, int s
if(altname)
{
QTreeWidgetItem *item = new RSTreeWidgetItem(compareResultRole);
item->setText(SR_NAME_COL, QString::fromUtf8(file.name.c_str()));
item->setText(SR_HASH_COL, QString::fromStdString(file.hash.toStdString()));
setIconAndType(item, QString::fromUtf8(file.name.c_str()));
item->setText(SR_SIZE_COL, QString::number(file.size));
setIconAndType(item, QString::fromUtf8(file.name.c_str()));
(*it)->addChild(item);
QTreeWidgetItem *altItem = new RSTreeWidgetItem(compareResultRole);
altItem->setText(SR_NAME_COL, QString::fromUtf8(file.name.c_str()));
altItem->setText(SR_HASH_COL, QString::fromStdString(file.hash.toStdString()));
setIconAndType(altItem, QString::fromUtf8(file.name.c_str()));
altItem->setText(SR_SIZE_COL, QString::number(file.size));
setIconAndType(altItem, QString::fromUtf8(file.name.c_str()));
it->addChild(altItem);
}
}
if(!found)
@ -1314,6 +1285,8 @@ void SearchDialog::insertFile(qulonglong searchId, const FileDetail& file, int s
item->setText(SR_AGE_COL, QString::number(file.age));
item->setData(SR_AGE_COL, ROLE_SORT, file.age);
item->setTextAlignment( SR_SIZE_COL, Qt::AlignRight );
int friendSource = 0;
int anonymousSource = 0;
if(searchType == FRIEND_SEARCH)
{
friendSource = 1;
@ -1344,7 +1317,7 @@ void SearchDialog::insertFile(qulonglong searchId, const FileDetail& file, int s
} else {
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)
{
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 */
hideOrShowSearchResult(item);
}
/* update the summary as well */
if(!found) // only increment result when it's a new item.
{
// only increment result when it's a new item.
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)->setData(SS_RESULTS_COL, ROLE_SORT, s+1);

View File

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

View File

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

View File

@ -213,15 +213,20 @@ SharedFilesDialog::SharedFilesDialog(bool remote_mode, QWidget *parent)
/* Set header resize modes and initial section sizes */
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_FILENB, 70 );
header->resizeSection ( COLUMN_SIZE, 70 );
header->resizeSection ( COLUMN_AGE, 100 );
header->resizeSection ( COLUMN_FRIEND_ACCESS,100);
header->resizeSection ( COLUMN_WN_VISU_DIR, 100 );
header->resizeSection ( COLUMN_NAME , charWidth*100 );
header->resizeSection ( COLUMN_FILENB , charWidth*15 );
header->resizeSection ( COLUMN_SIZE , charWidth*10 );
header->resizeSection ( COLUMN_AGE , charWidth*6 );
header->resizeSection ( COLUMN_FRIEND_ACCESS, charWidth*10 );
header->resizeSection ( COLUMN_WN_VISU_DIR , charWidth*20 );
header->setStretchLastSection(false);
header->setStretchLastSection(true);
/* Set Multi Selection */
ui.dirTreeView->setSelectionMode(QAbstractItemView::ExtendedSelection);

View File

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

View File

@ -70,7 +70,14 @@
</widget>
</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">
<string>File Transfers</string>
</property>
@ -300,11 +307,6 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
<customwidget>
<class>LineEditClear</class>
<extends>QLineEdit</extends>

View File

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

View File

@ -53,7 +53,7 @@
class EntropyCollectorWidget: public QTextBrowser
{
public:
EntropyCollectorWidget(QProgressBar *pr,QWidget *p = NULL)
explicit EntropyCollectorWidget(QProgressBar *pr,QWidget *p = NULL)
: QTextBrowser(p)
{
progress = pr ;
@ -288,8 +288,6 @@ void GenCertDialog::setupState()
break;
}
//ui.no_node_label->setVisible(false);
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"));
@ -300,15 +298,9 @@ void GenCertDialog::setupState()
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_input->setVisible(generate_new);
//ui.header_label->setVisible(false) ;
ui.nickname_label->setVisible(adv_state && !mOnlyGenerateIdentity);
ui.nickname_input->setVisible(adv_state && !mOnlyGenerateIdentity);
@ -352,8 +344,8 @@ void GenCertDialog::setupState()
ui.genButton->setVisible(false) ;
ui.generate_label->setVisible(false) ;
ui.info_label->setText("Please choose a profile name and password...") ;
ui.info_label->setVisible(true) ;
ui.info_Label->setText("Please choose a profile name and password...") ;
ui.info_Label->setVisible(true) ;
}
else if(!mEntropyOk)
{
@ -361,8 +353,8 @@ void GenCertDialog::setupState()
ui.genButton->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->setVisible(true) ;
ui.info_Label->setText("Please move your mouse randomly to generate enough random data to create your profile.") ;
ui.info_Label->setVisible(true) ;
}
else
{
@ -371,7 +363,7 @@ void GenCertDialog::setupState()
ui.genButton->setToolTip(tr("Click to create your node and/or profile")) ;
ui.genButton->setVisible(true) ;
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
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."));
//ui.no_gpg_key_label->show();
//ui.reuse_existing_node_CB->hide();
ui.name_label->hide();
ui.name_input->hide();
@ -609,7 +600,6 @@ void GenCertDialog::genPerson()
ui.node_input->hide();
ui.genButton->hide();
ui.importIdentity_PB->hide();
//ui.genprofileinfo_label->hide();
ui.nodeType_CB->hide();
//ui.adv_checkbox->hide();
ui.keylength_label->hide();

View File

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

View File

@ -111,7 +111,7 @@
</widget>
</item>
<item>
<widget class="QComboBox" name="nodeType_CB">
<widget class="RSComboBox" name="nodeType_CB">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@ -187,7 +187,7 @@
<item row="1" column="0">
<layout class="QGridLayout" name="profilGLayout">
<item row="14" column="2">
<widget class="QComboBox" name="keylength_comboBox">
<widget class="RSComboBox" name="keylength_comboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@ -245,6 +245,12 @@
<height>0</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<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>
</property>
@ -303,6 +309,12 @@
<height>0</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<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>
</property>
@ -340,6 +352,12 @@
<height>32</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<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>
</property>
@ -352,13 +370,19 @@
</widget>
</item>
<item>
<widget class="QComboBox" name="genPGPuser">
<widget class="RSComboBox" name="genPGPuser">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="toolTip">
<string>Your profile is associated with a PGP key pair. RetroShare currently ignores DSA keys.</string>
</property>
@ -417,6 +441,12 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<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>
</property>
@ -456,6 +486,12 @@
<height>32</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<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>
</property>
@ -479,6 +515,12 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<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>
</property>
@ -510,6 +552,12 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<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>
</property>
@ -532,6 +580,8 @@
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
@ -721,7 +771,12 @@
</layout>
</item>
<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">
<string>TextLabel</string>
</property>
@ -751,6 +806,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>name_input</tabstop>
<tabstop>node_input</tabstop>

View File

@ -105,8 +105,7 @@ void GetStartedDialog::showEvent ( QShowEvent * /*event*/ )
void GetStartedDialog::updateFromUserLevel()
{
RsConfigUserLvl userLevel = RsConfigUserLvl::NEW;
userLevel = rsConfig->getUserLevel();
RsConfigUserLvl userLevel = rsConfig->getUserLevel();
ui.inviteCheckBox->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;
mailstr += "?subject=" + subject;
mailstr += "&body=" + body;
mailstr += "?subject=" + QUrl::toPercentEncoding(subject);
mailstr += "&body=" + QUrl::toPercentEncoding(body);
std::cerr << "MAIL STRING:" << mailstr.toStdString() << std::endl;
@ -240,7 +234,7 @@ void GetStartedDialog::inviteFriends()
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);
}
@ -427,7 +421,9 @@ void GetStartedDialog::emailSupport()
sysVersion = "Linux";
#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)
, sysVersion
).arg(static_cast<typename std::underlying_type<RsConfigUserLvl>::type>(userLevel)) + "\n";
text += "\n";
text += QString("I am having trouble with RetroShare.");

View File

@ -10,7 +10,7 @@
<height>582</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<layout class="QVBoxLayout" name="GetStartedDialog_VL">
<property name="leftMargin">
<number>0</number>
</property>
@ -32,11 +32,20 @@
<attribute name="title">
<string>Getting Started</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="GetStartedTab_VL">
<property name="spacing">
<number>0</number>
</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>
</property>
<item>
@ -53,12 +62,12 @@
<height>732</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<layout class="QVBoxLayout" name="scrollAreaWidgetContents_VL">
<property name="spacing">
<number>0</number>
</property>
<item>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="invite_GL">
<item row="0" column="0">
<widget class="QCheckBox" name="inviteCheckBox">
<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;
&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; }
&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;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;-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; 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;-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; 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-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;/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: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-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-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-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-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-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>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_4">
<layout class="QGridLayout" name="add_GL">
<item row="0" column="0">
<widget class="QCheckBox" name="addCheckBox">
<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;
&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; }
&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;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;-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; 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;/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: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-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-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>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_2">
<layout class="QGridLayout" name="connect_GL">
<property name="horizontalSpacing">
<number>0</number>
</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;
&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; }
&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;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;-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; 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-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; 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;-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; 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-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; 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;/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: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-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-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-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-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-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-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-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-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-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-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>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_3">
<layout class="QGridLayout" name="firewall_GL">
<item row="0" column="0">
<widget class="QCheckBox" name="firewallCheckBox">
<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;
&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; }
&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;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-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; 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-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; 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;-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-size:8pt;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&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: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;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-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-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-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-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-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-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-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<spacer name="GetStartedTab_VSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@ -407,31 +416,31 @@ p, li { white-space: pre-wrap; }
<attribute name="title">
<string>Further Help and Support</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QHBoxLayout" name="FurtherHelpTab_HL">
<item>
<widget class="QTextBrowser" name="textBrowser_2">
<widget class="QTextBrowser" name="FurtherHelpTabTextBrowser">
<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;
&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; }
&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;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;-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; 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;-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; 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;-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; 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-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; 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;-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; 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;/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: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-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-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-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-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-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-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-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-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-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-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-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>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_6">
<layout class="QVBoxLayout" name="buttons_VL">
<item>
<widget class="QPushButton" name="pushButton_Website">
<property name="text">
@ -454,7 +463,7 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<spacer name="buttonsTop_VSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@ -481,7 +490,7 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<spacer name="buttonsBottom1_VSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@ -494,7 +503,7 @@ p, li { white-space: pre-wrap; }
</spacer>
</item>
<item>
<spacer name="verticalSpacer_2">
<spacer name="buttonsBottom2_VSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>

View File

@ -56,7 +56,7 @@
<property name="spacing">
<number>6</number>
</property>
<item row="2" column="0" colspan="3">
<item row="1" column="0" colspan="3">
<widget class="QTextBrowser" name="version">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
@ -72,13 +72,13 @@
</property>
</widget>
</item>
<item row="1" column="0" colspan="3">
<item row="0" column="0" colspan="3">
<widget class="QTextBrowser" name="about">
<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;
&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; }
&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;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;
@ -97,16 +97,6 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</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>
</widget>
<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;
&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; }
&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;-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;

View File

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

View File

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

View File

@ -259,7 +259,7 @@ IdDialog::IdDialog(QWidget *parent)
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"));
@ -475,10 +475,10 @@ void IdDialog::clearPerson()
{
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->inviteFrame->hide();
ui->info_Frame_Invite->hide();
ui->avatarLabel->clear();
whileBlocking(ui->ownOpinion_CB)->setCurrentIndex(1);
@ -2490,7 +2490,7 @@ void IdDialog::sendInvite()
{
MessageComposer::sendInvite(id,false);
ui->inviteFrame->show();
ui->info_Frame_Invite->show();
ui->inviteButton->setEnabled(false);
}
@ -2572,9 +2572,9 @@ void IdDialog::removefromContacts()
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.

View File

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

View File

@ -88,7 +88,14 @@
</widget>
</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">
<string>People</string>
</property>
@ -287,7 +294,7 @@
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>-155</x>
<x>0</x>
<y>0</y>
<width>634</width>
<height>523</height>
@ -295,7 +302,7 @@
</property>
<layout class="QVBoxLayout" name="scrollAreaWidgetContentsVLayout">
<item>
<widget class="QFrame" name="headerFramePerson">
<widget class="QFrame" name="headerBFramePerson">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
@ -308,14 +315,19 @@
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="headerFramePersonGLayout">
<layout class="QGridLayout" name="headerBFramePersonGLayout">
<property name="horizontalSpacing">
<number>12</number>
</property>
<item row="0" column="3">
<layout class="QVBoxLayout" name="headerFramePersonVLayout">
<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">
<string>People</string>
</property>
@ -335,10 +347,19 @@
</spacer>
</item>
<item>
<widget class="QFrame" name="inviteFrame">
<widget class="QFrame" name="info_Frame_Invite">
<property name="palette">
<palette>
<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">
<brush brushstyle="SolidPattern">
<color alpha="255">
@ -359,6 +380,15 @@
</colorrole>
</active>
<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">
<brush brushstyle="SolidPattern">
<color alpha="255">
@ -379,6 +409,15 @@
</colorrole>
</inactive>
<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">
<brush brushstyle="SolidPattern">
<color alpha="255">
@ -409,7 +448,7 @@
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<layout class="QHBoxLayout" name="inviteFrameHLayout">
<layout class="QHBoxLayout" name="info_Frame_Invite_HL">
<property name="leftMargin">
<number>6</number>
</property>
@ -423,7 +462,7 @@
<number>6</number>
</property>
<item>
<widget class="QLabel" name="infoPixmap">
<widget class="QLabel" name="infoPixmap_Invite">
<property name="maximumSize">
<size>
<width>16</width>
@ -442,14 +481,14 @@
</widget>
</item>
<item>
<widget class="QLabel" name="infoLabel">
<widget class="QLabel" name="infoLabel_Invite">
<property name="text">
<string notr="true">Invite messages stay into your Outbox until an acknowledgement of receipt has been received.</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="closeInfoFrameButton">
<widget class="QToolButton" name="closeInfoFrameButton_Invite">
<property name="maximumSize">
<size>
<width>16</width>
@ -803,7 +842,7 @@ border-image: url(:/images/closepressed.png)
</widget>
</item>
<item row="9" column="1" rowspan="2">
<widget class="QComboBox" name="ownOpinion_CB">
<widget class="RSComboBox" name="ownOpinion_CB">
<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>
</property>
@ -938,7 +977,7 @@ border-image: url(:/images/closepressed.png)
</layout>
<zorder>detailsGroupBox</zorder>
<zorder>usageStatisticsGBox</zorder>
<zorder>headerFramePerson</zorder>
<zorder>headerBFramePerson</zorder>
</widget>
</widget>
</item>
@ -954,19 +993,19 @@ border-image: url(:/images/closepressed.png)
</attribute>
<layout class="QVBoxLayout" name="circleTabVLayout">
<item>
<widget class="QFrame" name="headerFrameCircle">
<widget class="QFrame" name="headerBFrameCircle">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="headerFrameCircleGLayout">
<layout class="QGridLayout" name="headerBFrameCircleGLayout">
<property name="horizontalSpacing">
<number>12</number>
</property>
<item row="0" column="0" rowspan="2">
<widget class="QLabel" name="avlabel_Circles">
<widget class="QLabel" name="avLabel_Circles">
<property name="minimumSize">
<size>
<width>64</width>
@ -991,7 +1030,12 @@ border-image: url(:/images/closepressed.png)
</widget>
</item>
<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">
<string>Circles</string>
</property>
@ -1074,7 +1118,7 @@ border-image: url(:/images/closepressed.png)
<customwidget>
<class>LineEditClear</class>
<extends>QLineEdit</extends>
<header>gui/common/LineEditClear.h</header>
<header location="global">gui/common/LineEditClear.h</header>
</customwidget>
<customwidget>
<class>RSTreeWidget</class>
@ -1082,14 +1126,14 @@ border-image: url(:/images/closepressed.png)
<header>gui/common/RSTreeWidget.h</header>
</customwidget>
<customwidget>
<class>StyledElidedLabel</class>
<class>ElidedLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledElidedLabel.h</header>
<header>gui/common/ElidedLabel.h</header>
</customwidget>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
<customwidget>
<class>RSTextBrowser</class>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -74,7 +74,7 @@
<item row="0" column="1">
<layout class="QGridLayout" name="gridLayout_4">
<item row="1" column="0" colspan="2">
<widget class="QComboBox" name="messagelineEdit">
<widget class="RSComboBox" name="messagelineEdit">
<property name="editable">
<bool>true</bool>
</property>
@ -124,7 +124,7 @@
</widget>
</item>
<item row="2" column="0">
<widget class="LogoBar" name="logoFrame">
<widget class="LogoBar" name="gradFrame_Logo">
<property name="minimumSize">
<size>
<width>0</width>
@ -175,7 +175,7 @@
<x>0</x>
<y>0</y>
<width>258</width>
<height>21</height>
<height>27</height>
</rect>
</property>
</widget>
@ -199,6 +199,11 @@
<header>gui/LogoBar.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
</customwidgets>
<resources>
<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 backgroundColorHasSignedMe READ backgroundColorHasSignedMe WRITE setBackgroundColorHasSignedMe)
Q_PROPERTY(QColor backgroundColorDenied READ backgroundColorDenied WRITE setBackgroundColorDenied)
Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor)
public:
/** Default Constructor */
@ -55,12 +56,14 @@ public:
QColor backgroundColorAcceptConnection() const { return mBackgroundColorAcceptConnection; }
QColor backgroundColorHasSignedMe() const { return mBackgroundColorHasSignedMe; }
QColor backgroundColorDenied() const { return mBackgroundColorDenied; }
QColor textColor() const { return mTextColor; }
void setBackgroundColorSelf(QColor color) { PGPIdItemModel->setBackgroundColorSelf(color); mBackgroundColorSelf = color; }
void setBackgroundColorOwnSign(QColor color) { PGPIdItemModel->setBackgroundColorOwnSign(color); mBackgroundColorOwnSign = color; }
void setBackgroundColorAcceptConnection(QColor color) { PGPIdItemModel->setBackgroundColorAcceptConnection(color); mBackgroundColorAcceptConnection = color; }
void setBackgroundColorHasSignedMe(QColor color) { PGPIdItemModel->setBackgroundColorHasSignedMe(color); mBackgroundColorHasSignedMe = color; }
void setBackgroundColorDenied(QColor color) { PGPIdItemModel->setBackgroundColorDenied(color); mBackgroundColorDenied = color; }
void setTextColor(QColor color) { PGPIdItemModel->setTextColor(color); mTextColor = color; }
protected:
void changeEvent(QEvent *e);
@ -89,12 +92,13 @@ private:
void removeKeys(std::set<RsPgpId> selected) ;
/* Color definitions (for standard see qss.default) */
/* Color definitions (for standard see default.qss) */
QColor mBackgroundColorSelf;
QColor mBackgroundColorOwnSign;
QColor mBackgroundColorAcceptConnection;
QColor mBackgroundColorHasSignedMe;
QColor mBackgroundColorDenied;
QColor mTextColor;
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();
}

View File

@ -60,6 +60,7 @@ public:
void setBackgroundColorAcceptConnection(QColor color) { mBackgroundColorAcceptConnection = color; }
void setBackgroundColorHasSignedMe(QColor color) { mBackgroundColorHasSignedMe = color; }
void setBackgroundColorDenied(QColor color) { mBackgroundColorDenied = color; }
void setTextColor(QColor color) { mTextColor = color; }
public slots:
@ -73,6 +74,7 @@ private:
QColor mBackgroundColorAcceptConnection;
QColor mBackgroundColorHasSignedMe;
QColor mBackgroundColorDenied;
QColor mTextColor;
};
#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 + ")"));
}
void NewsFeed::testFeeds(uint notifyFlags)
void NewsFeed::testFeeds(uint /*notifyFlags*/)
{
#ifdef TO_REMOVE
if (!instance) {

View File

@ -67,7 +67,14 @@
</widget>
</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">
<string>Activity Stream</string>
</property>
@ -87,7 +94,7 @@
</spacer>
</item>
<item>
<widget class="QComboBox" name="sortComboBox"/>
<widget class="RSComboBox" name="sortComboBox"/>
</item>
<item>
<widget class="QPushButton" name="feedOptionsButton">
@ -143,9 +150,9 @@
</widget>
<customwidgets>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
<customwidget>
<class>RSFeedWidget</class>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -114,9 +114,9 @@ void BoardPostDisplayWidgetBase::setReadStatus(bool isNew, bool isUnread)
newLabel()->setVisible(isNew);
mainFrame()->setProperty("new", isNew);
mainFrame()->style()->unpolish(mainFrame());
mainFrame()->style()->polish(mainFrame());
feedFrame()->setProperty("new", isNew);
feedFrame()->style()->unpolish(feedFrame());
feedFrame()->style()->polish( feedFrame());
}
void BoardPostDisplayWidget_compact::doExpand(bool e)
@ -174,8 +174,9 @@ void BoardPostDisplayWidgetBase::setup()
menu->addAction(CopyLinkAction);
menu->addSeparator();
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);
bool redacted = (overall_reputation == RsReputationLevel::LOCALLY_NEGATIVE);
@ -296,12 +297,12 @@ BoardPostDisplayWidget_compact::BoardPostDisplayWidget_compact(const RsPostedPos
ui->setupUi(this);
setup();
ui->verticalLayout->addStretch();
ui->verticalLayout->setAlignment(Qt::AlignTop);
ui->right_VL->addStretch();
ui->right_VL->setAlignment(Qt::AlignTop);
ui->topLayout->setAlignment(Qt::AlignTop);
ui->arrowsLayout->addStretch();
ui->arrowsLayout->setAlignment(Qt::AlignTop);
ui->verticalLayout_2->addStretch();
ui->feedFrame_VL->addStretch();
adjustSize();
}
@ -414,9 +415,9 @@ QLabel *BoardPostDisplayWidget_compact::dateLabel() { return ui->da
QLabel *BoardPostDisplayWidget_compact::titleLabel() { return ui->titleLabel; }
QLabel *BoardPostDisplayWidget_compact::scoreLabel() { return ui->scoreLabel; }
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; }
QFrame *BoardPostDisplayWidget_compact::mainFrame() { return ui->mainFrame; }
QFrame *BoardPostDisplayWidget_compact::feedFrame() { return ui->feedFrame; }
//===================================================================================================================================
//== class BoardPostDisplayWidget_card ==
@ -428,12 +429,12 @@ BoardPostDisplayWidget_card::BoardPostDisplayWidget_card(const RsPostedPost& pos
ui->setupUi(this);
setup();
ui->verticalLayout->addStretch();
ui->verticalLayout->setAlignment(Qt::AlignTop);
ui->right_VL->addStretch();
ui->right_VL->setAlignment(Qt::AlignTop);
ui->topLayout->setAlignment(Qt::AlignTop);
ui->arrowsLayout->addStretch();
ui->arrowsLayout->setAlignment(Qt::AlignTop);
ui->verticalLayout_2->addStretch();
ui->feedFrame_VL->addStretch();
adjustSize();
}
@ -493,7 +494,7 @@ QLabel *BoardPostDisplayWidget_card::dateLabel() { return ui->dateL
QLabel *BoardPostDisplayWidget_card::titleLabel() { return ui->titleLabel; }
QLabel *BoardPostDisplayWidget_card::scoreLabel() { return ui->scoreLabel; }
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; }
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 *pictureLabel()=0;
virtual QToolButton *readButton() =0;
virtual QPushButton *shareButton() =0;
virtual QFrame *mainFrame() =0;
virtual QToolButton *shareButton() =0;
virtual QFrame *feedFrame() =0;
void loadComments(bool e);
void readToggled();
@ -126,8 +126,8 @@ public:
QLabel *notes() override;
QLabel *pictureLabel() override;
QToolButton *readButton() override;
QPushButton *shareButton() override;
QFrame *mainFrame() override;
QToolButton *shareButton() override;
QFrame *feedFrame() override;
public slots:
void viewPicture() ;
@ -164,9 +164,9 @@ public:
QLabel *scoreLabel() override;
QLabel *notes() override;
QToolButton *readButton() override;
QPushButton *shareButton() override;
QToolButton *shareButton() override;
QLabel *pictureLabel() override;
QFrame *mainFrame() override;
QFrame *feedFrame() override;
protected slots:
/* GxsGroupFeedItem */

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -53,10 +53,10 @@ PostedCreatePostDialog::PostedCreatePostDialog(RsPosted *posted, const RsGxsGrou
ui->setupUi(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->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->setHeaderText(tr("Create a new Post"));
@ -74,13 +74,13 @@ PostedCreatePostDialog::PostedCreatePostDialog(RsPosted *posted, const RsGxsGrou
ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, default_author);
QSignalMapper *signalMapper = new QSignalMapper(this);
connect(ui->postButton, SIGNAL(clicked()), signalMapper, SLOT(map()));
connect(ui->imageButton, SIGNAL(clicked()), signalMapper, SLOT(map()));
connect(ui->linkButton, SIGNAL(clicked()), signalMapper, SLOT(map()));
connect(ui->viewPostButton, SIGNAL(clicked()), signalMapper, SLOT(map()));
connect(ui->viewImageButton, SIGNAL(clicked()), signalMapper, SLOT(map()));
connect(ui->viewLinkButton, SIGNAL(clicked()), signalMapper, SLOT(map()));
signalMapper->setMapping(ui->postButton, VIEW_POST);
signalMapper->setMapping(ui->imageButton, VIEW_IMAGE);
signalMapper->setMapping(ui->linkButton, VIEW_LINK);
signalMapper->setMapping(ui->viewPostButton, VIEW_POST);
signalMapper->setMapping(ui->viewImageButton, VIEW_IMAGE);
signalMapper->setMapping(ui->viewLinkButton, VIEW_LINK);
connect(signalMapper, SIGNAL(mapped(int)), this, SLOT(setPage(int)));
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()));
ui->linkEdit->setText(link.toString());
}
ui->submitButton->setEnabled(true);
ui->postButton->setEnabled(true);
ui->addPicButton->setEnabled(true);
}
@ -233,7 +233,7 @@ void PostedCreatePostDialog::addPicture()
//If still yes then link it
if(answer == QMessageBox::Yes) {
ui->submitButton->setEnabled(false);
ui->postButton->setEnabled(false);
ui->addPicButton->setEnabled(false);
QStringList files;
files.append(imagefilename);
@ -245,11 +245,11 @@ void PostedCreatePostDialog::addPicture()
int PostedCreatePostDialog::viewMode()
{
if (ui->postButton->isChecked()) {
if (ui->viewPostButton->isChecked()) {
return VIEW_POST;
} else if (ui->imageButton->isChecked()) {
} else if (ui->viewImageButton->isChecked()) {
return VIEW_IMAGE;
} else if (ui->linkButton->isChecked()) {
} else if (ui->viewLinkButton->isChecked()) {
return VIEW_LINK;
}
@ -263,25 +263,25 @@ void PostedCreatePostDialog::setPage(int viewMode)
case VIEW_POST:
ui->stackedWidget->setCurrentIndex(0);
ui->postButton->setChecked(true);
ui->imageButton->setChecked(false);
ui->linkButton->setChecked(false);
ui->viewPostButton->setChecked(true);
ui->viewImageButton->setChecked(false);
ui->viewLinkButton->setChecked(false);
break;
case VIEW_IMAGE:
ui->stackedWidget->setCurrentIndex(1);
ui->imageButton->setChecked(true);
ui->postButton->setChecked(false);
ui->linkButton->setChecked(false);
ui->viewImageButton->setChecked(true);
ui->viewPostButton->setChecked(false);
ui->viewLinkButton->setChecked(false);
break;
case VIEW_LINK:
ui->stackedWidget->setCurrentIndex(2);
ui->linkButton->setChecked(true);
ui->postButton->setChecked(false);
ui->imageButton->setChecked(false);
ui->viewLinkButton->setChecked(true);
ui->viewPostButton->setChecked(false);
ui->viewImageButton->setChecked(false);
break;
default:

View File

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

View File

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

View File

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

View File

@ -102,7 +102,7 @@ PostedListWidget::PostedListWidget(const RsGxsGroupId &postedId, QWidget *parent
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>"));
ui->infoframe->hide();
ui->infoFrame->hide();
/* load settings */
processSettings(true);
@ -417,7 +417,7 @@ void PostedListWidget::insertPostedDetails(const RsPostedGroup &group)
if (IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags)) {
ui->infoframe->hide();
ui->infoFrame->hide();
} else {
@ -472,7 +472,7 @@ void PostedListWidget::insertPostedDetails(const RsPostedGroup &group)
ui->infoDistribution->setText(distrib_string);
ui->infoframe->show();
ui->infoFrame->show();
}
}
@ -771,7 +771,7 @@ void PostedListWidget::applyRanking()
void PostedListWidget::blank()
{
clearPosts();
ui->infoframe->hide();
ui->infoFrame->hide();
}
void PostedListWidget::clearPosts()
{

View File

@ -30,7 +30,7 @@
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QFrame" name="headerFrame">
<widget class="QFrame" name="toolBarFrame">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
@ -106,7 +106,7 @@
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox">
<widget class="RSComboBox" name="comboBox">
<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>
</property>
@ -260,7 +260,7 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QFrame" name="infoframe">
<widget class="QFrame" name="infoFrame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</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;
&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; }
&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>
</property>
<property name="textInteractionFlags">
@ -515,7 +515,10 @@ p, li { white-space: pre-wrap; }
<widget class="QLabel" name="namelabel">
<property name="font">
<font>
<pointsize>14</pointsize>
<pointsize>11</pointsize>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
</font>
</property>
<property name="text">
@ -658,16 +661,21 @@ p, li { white-space: pre-wrap; }
<extends>QLabel</extends>
<header>gui/gxs/GxsIdLabel.h</header>
</customwidget>
<customwidget>
<class>SubscribeToolButton</class>
<extends>QToolButton</extends>
<header>gui/common/SubscribeToolButton.h</header>
</customwidget>
<customwidget>
<class>GxsIdChooser</class>
<extends>QComboBox</extends>
<header>gui/gxs/GxsIdChooser.h</header>
</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>
<resources>
<include location="../icons.qrc"/>

View File

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

View File

@ -46,7 +46,7 @@
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="0">
<widget class="QTextBrowser" name="infoDescription">
<widget class="QTextBrowser" name="trans_Description">
<property name="styleSheet">
<string notr="true"/>
</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;
&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; }
&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>
</property>
<property name="textInteractionFlags">
@ -271,9 +271,10 @@ p, li { white-space: pre-wrap; }
</property>
<property name="font">
<font>
<weight>50</weight>
<pointsize>15</pointsize>
<weight>75</weight>
<italic>false</italic>
<bold>false</bold>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
@ -300,7 +301,7 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="0" column="1" colspan="3">
<widget class="StyledElidedLabel" name="namelabel">
<widget class="ElidedLabel" name="namelabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@ -309,7 +310,9 @@ p, li { white-space: pre-wrap; }
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
</font>
</property>
@ -344,7 +347,7 @@ p, li { white-space: pre-wrap; }
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QFrame" name="headerFrame">
<widget class="QFrame" name="toolBarFrame">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
@ -372,6 +375,12 @@ p, li { white-space: pre-wrap; }
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Create Post</string>
</property>
@ -394,7 +403,13 @@ p, li { white-space: pre-wrap; }
</widget>
</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">
<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>
@ -572,14 +587,15 @@ p, li { white-space: pre-wrap; }
</widget>
<customwidgets>
<customwidget>
<class>LineEditClear</class>
<extends>QLineEdit</extends>
<header>gui/common/LineEditClear.h</header>
<class>ElidedLabel</class>
<extends>QLabel</extends>
<header>gui/common/ElidedLabel.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>SubscribeToolButton</class>
<extends>QToolButton</extends>
<header>gui/common/SubscribeToolButton.h</header>
<class>GxsIdChooser</class>
<extends>QComboBox</extends>
<header>gui/gxs/GxsIdChooser.h</header>
</customwidget>
<customwidget>
<class>GxsIdLabel</class>
@ -587,15 +603,14 @@ p, li { white-space: pre-wrap; }
<header>gui/gxs/GxsIdLabel.h</header>
</customwidget>
<customwidget>
<class>RSTreeView</class>
<extends>QTreeView</extends>
<header>gui/common/RSTreeView.h</header>
<container>1</container>
<class>LineEditClear</class>
<extends>QLineEdit</extends>
<header>gui/common/LineEditClear.h</header>
</customwidget>
<customwidget>
<class>StyledElidedLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledElidedLabel.h</header>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
<customwidget>
<class>RSTabWidget</class>
@ -604,9 +619,15 @@ p, li { white-space: pre-wrap; }
<container>1</container>
</customwidget>
<customwidget>
<class>GxsIdChooser</class>
<extends>QComboBox</extends>
<header>gui/gxs/GxsIdChooser.h</header>
<class>RSTreeView</class>
<extends>QTreeView</extends>
<header>gui/common/RSTreeView.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>SubscribeToolButton</class>
<extends>QToolButton</extends>
<header>gui/common/SubscribeToolButton.h</header>
</customwidget>
</customwidgets>
<resources>

View File

@ -20,20 +20,23 @@
#include "QuickStartWizard.h"
#include <QFileDialog>
#include <QSettings>
#include <QCheckBox>
#include <QMessageBox>
#include <QComboBox>
#include <QHeaderView>
#include <retroshare/rsfiles.h>
#include <retroshare/rsconfig.h>
#include <retroshare/rspeers.h>
#include <retroshare/rstypes.h>
#include "gui/common/FilesDefs.h"
#ifdef USE_COMBOBOX
#include "gui/common/RSComboBox.h"
#endif
#include "settings/rsharesettings.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) :
QDialog(parent)
@ -299,7 +302,7 @@ void QuickStartWizard::loadShare()
listWidget->insertRow(row) ;
listWidget->setItem(row,0,new QTableWidgetItem(QString::fromStdString((*it).filename)));
#ifdef USE_COMBOBOX
QComboBox *cb = new QComboBox ;
RSComboBox *cb = new RSComboBox ;
cb->addItem(tr("Network Wide")) ;
cb->addItem(tr("Browsable")) ;
cb->addItem(tr("Universal")) ;
@ -494,7 +497,6 @@ void QuickStartWizard::loadNetwork()
void QuickStartWizard::saveChanges()
{
QString str;
//bool saveAddr = false;

View File

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

View File

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

View File

@ -66,7 +66,7 @@ ShareManager::ShareManager()
Settings->loadWidgetInformation(this);
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.shareddirList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(shareddirListCustomPopupMenu(QPoint)));

View File

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

View File

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

View File

@ -35,7 +35,7 @@ PulseAddDialog::PulseAddDialog(QWidget *parent)
{
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_ClearDisplayAs, SIGNAL( clicked( void ) ), this, SLOT( clearDisplayAs( 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();
// completely delete layout and sublayouts
QLayoutItem * item;
QWidget * widget;
while ((item = layout->takeAt(0)))
{
if ((widget = item->widget()) != 0)
if (QWidget *widget = item->widget())
{
std::cerr << "PulseAddDialog::cleanup() removing widget";
std::cerr << std::endl;
@ -129,8 +128,8 @@ void PulseAddDialog::cleanup()
ui.frame_URL->setEnabled(false);
ui.frame_URL->hide();
ui.pushButton_Post->setEnabled(false);
ui.pushButton_Post->setText(tr("Post"));
ui.postButton->setEnabled(false);
ui.postButton->setText(tr("Post"));
ui.textEdit_Pulse->setPlaceholderText(tr("Whats happening?"));
ui.frame_input->setVisible(true);
ui.widget_sentiment->setVisible(true);
@ -163,12 +162,12 @@ void PulseAddDialog::pulseTextChanged()
{
std::string pulseText = ui.textEdit_Pulse->toPlainText().toStdString();
bool enable = (pulseText.size() > 0) && (pulseText.size() < PULSE_MAX_SIZE);
ui.pushButton_Post->setEnabled(enable);
ui.postButton->setEnabled(enable);
}
// Old Interface, deprecate / make internal.
// 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;
mReplyToPulse = pulse;
@ -191,21 +190,21 @@ void PulseAddDialog::setReplyTo(RsWirePulse &pulse, RsWirePulseSPtr pPulse, std:
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"));
}
else
{
// cannot add msg for like / republish.
ui.pushButton_Post->setEnabled(true);
ui.postButton->setEnabled(true);
ui.frame_input->setVisible(false);
ui.widget_sentiment->setVisible(false);
if (mReplyType & WIRE_PULSE_TYPE_REPUBLISH) {
ui.pushButton_Post->setText(tr("Republish Pulse"));
ui.postButton->setText(tr("Republish Pulse"));
ui.pushButton_picture->hide();
}
else if (mReplyType & WIRE_PULSE_TYPE_LIKE) {
ui.pushButton_Post->setText(tr("Like Pulse"));
ui.postButton->setText(tr("Like Pulse"));
ui.pushButton_picture->hide();
}
}

View File

@ -57,7 +57,7 @@ private slots:
private:
// OLD VERSIONs, private now.
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 postReplyPulse();

View File

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

View File

@ -50,7 +50,7 @@ void PulseReply::setup()
// connect(pushButton_tmpViewGroup, SIGNAL(clicked()), this, SLOT(actionViewGroup()));
// 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_reply, SIGNAL(clicked()), this, SLOT(actionReply()));
@ -118,7 +118,7 @@ void PulseReply::setPulseStatus(PulseStatus status)
{
widget_actions->setVisible(status == PulseStatus::FULL);
widget_follow->setVisible(status != PulseStatus::FULL);
toolButton_follow->setEnabled(status == PulseStatus::UNSUBSCRIBED);
followButton->setEnabled(status == PulseStatus::UNSUBSCRIBED);
switch(status)
{

View File

@ -26,7 +26,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QFrame" name="frame">
<widget class="QFrame" name="plainFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
@ -48,7 +48,7 @@
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="plainFrame_GL">
<property name="bottomMargin">
<number>0</number>
</property>
@ -380,7 +380,14 @@
</spacer>
</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">
<string>FOLLOW</string>
</property>

View File

@ -48,7 +48,7 @@ void PulseTopLevel::setup()
{
connect(toolButton_viewGroup, SIGNAL(clicked()), this, SLOT(actionViewGroup()));
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_rate, SIGNAL(clicked()), this, SLOT(rate()));
@ -58,7 +58,7 @@ void PulseTopLevel::setup()
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.
//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">
<string notr="true"/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<layout class="QVBoxLayout" name="PulseTopLevel_VL">
<item>
<widget class="QFrame" name="frame">
<widget class="QFrame" name="plainFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
@ -48,7 +48,7 @@
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="plainFrame_VL">
<item>
<widget class="QWidget" name="widget_prefix" native="true">
<property name="sizePolicy">
@ -63,7 +63,7 @@
<height>40</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<layout class="QHBoxLayout" name="widget_prefix_HL">
<property name="leftMargin">
<number>0</number>
</property>
@ -77,7 +77,7 @@
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer_14">
<spacer name="widget_prefix_LHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -171,7 +171,7 @@
</widget>
</item>
<item>
<spacer name="horizontalSpacer_15">
<spacer name="widget_prefix_RHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -200,9 +200,9 @@
<height>60</height>
</size>
</property>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="widget_header_GL">
<item row="2" column="1">
<spacer name="verticalSpacer">
<spacer name="widget_header_VSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@ -256,7 +256,7 @@
</widget>
</item>
<item row="0" column="3" rowspan="3">
<spacer name="horizontalSpacer_13">
<spacer name="widget_header_HSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -336,7 +336,7 @@
<height>16777215</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<layout class="QHBoxLayout" name="widget_publish_HL">
<item>
<widget class="QLabel" name="label_date">
<property name="text">
@ -345,7 +345,7 @@
</widget>
</item>
<item>
<spacer name="horizontalSpacer_12">
<spacer name="widget_publish_HSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -361,7 +361,7 @@
</widget>
</item>
<item>
<widget class="Line" name="line_2">
<widget class="Line" name="line_1">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -381,9 +381,9 @@
<height>40</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<layout class="QHBoxLayout" name="widget_replies_HL">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_611">
<layout class="QHBoxLayout" name="extra_replies_HL">
<item>
<widget class="QLabel" name="label_extra_replies">
<property name="text">
@ -392,14 +392,14 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_911">
<widget class="QLabel" name="extra_replies_Label">
<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>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_1011">
<spacer name="extra_replies_HSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -417,7 +417,7 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<layout class="QHBoxLayout" name="extra_republishes_HL">
<item>
<widget class="QLabel" name="label_extra_republishes">
<property name="text">
@ -426,14 +426,14 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_9">
<widget class="QLabel" name="extra_republishe_Label">
<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>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_10">
<spacer name="extra_republishes_HSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -451,7 +451,7 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<layout class="QHBoxLayout" name="extra_likes_HL">
<item>
<widget class="QLabel" name="label_extra_likes">
<property name="text">
@ -460,14 +460,14 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_11">
<widget class="QLabel" name="extra_likes_Label">
<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>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_11">
<spacer name="extra_likes_HSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -485,7 +485,7 @@
</layout>
</item>
<item>
<spacer name="horizontalSpacer_9">
<spacer name="widget_replies_HSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -501,7 +501,7 @@
</widget>
</item>
<item>
<widget class="Line" name="line">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -521,11 +521,11 @@
<height>40</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<layout class="QHBoxLayout" name="widget_actions_HL">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QHBoxLayout" name="replies_HL">
<item>
<spacer name="horizontalSpacer_8">
<spacer name="replies_LHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -562,7 +562,7 @@
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7">
<spacer name="replies_RHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -577,9 +577,9 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<layout class="QHBoxLayout" name="republishes_HL">
<item>
<spacer name="horizontalSpacer_6">
<spacer name="republishes_LHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -616,7 +616,7 @@
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<spacer name="republishes_RHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -631,9 +631,9 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<layout class="QHBoxLayout" name="likes_HL">
<item>
<spacer name="horizontalSpacer_4">
<spacer name="likes_LHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -670,7 +670,7 @@
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<spacer name="likes_RHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -685,9 +685,9 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<layout class="QHBoxLayout" name="view_HL">
<item>
<spacer name="horizontalSpacer">
<spacer name="view_LHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -717,7 +717,7 @@
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<spacer name="view_RHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -748,9 +748,9 @@
<height>40</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<layout class="QHBoxLayout" name="widget_actionsFollow_HL">
<item>
<spacer name="horizontalSpacer_20">
<spacer name="widget_actionsFollow_LHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -763,7 +763,14 @@
</spacer>
</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">
<string>FOLLOW</string>
</property>
@ -773,7 +780,7 @@
</widget>
</item>
<item>
<spacer name="horizontalSpacer_21">
<spacer name="widget_actionsFollow_RHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>

View File

@ -42,7 +42,7 @@ PulseViewGroup::PulseViewGroup(PulseViewHolder *holder, RsWireGroupSPtr group)
void PulseViewGroup::setup()
{
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_authorName->setText(BoldString(QString::fromStdString(mGroup->mMeta.mAuthorId.toStdString())));

View File

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

View File

@ -58,13 +58,11 @@
/** Constructor */
WireDialog::WireDialog(QWidget *parent)
: MainPage(parent), mGroupSet(GROUP_SET_ALL)
, mAddDialog(nullptr), mGroupSelected(nullptr), mWireQueue(nullptr)
, mHistoryIndex(-1)
{
ui.setupUi(this);
mAddDialog = NULL;
mGroupSelected = NULL;
mHistoryIndex = -1;
connect( ui.toolButton_createAccount, SIGNAL(clicked()), this, SLOT(createGroup()));
connect( ui.toolButton_createPulse, SIGNAL(clicked()), this, SLOT(createPulse()));
connect( ui.toolButton_refresh, SIGNAL(clicked()), this, SLOT(refreshGroups()));
@ -98,6 +96,7 @@ WireDialog::~WireDialog()
// save settings
processSettings(false);
clearTwitterView();
delete(mWireQueue);
}
@ -127,7 +126,7 @@ void WireDialog::refreshGroups()
void WireDialog::addGroup(QWidget *item)
{
QLayout *alayout = ui.scrollAreaWidgetContents_groups->layout();
QLayout *alayout = ui.groupsWidget->layout();
alayout->addWidget(item);
}
@ -268,7 +267,7 @@ void WireDialog::deleteGroups()
mGroupSelected = NULL;
QLayout *alayout = ui.scrollAreaWidgetContents_groups->layout();
QLayout *alayout = ui.groupsWidget->layout();
QLayoutItem *item;
int i = 0;
while (i < alayout->count())
@ -300,17 +299,16 @@ void WireDialog::updateGroups(std::vector<RsWireGroup>& groups)
mOwnGroups.clear();
ui.groupChooser->clear();
std::vector<RsWireGroup>::const_iterator it;
for(it = groups.begin(); it != groups.end(); it++) {
for(auto &it : 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.
// setup Chooser too.
mOwnGroups.push_back(*it);
ui.groupChooser->addItem(QString::fromStdString(it->mMeta.mGroupName));
mOwnGroups.push_back(it);
ui.groupChooser->addItem(QString::fromStdString(it.mMeta.mGroupName));
}
}
}
@ -362,16 +360,15 @@ void WireDialog::showGroups()
std::list<RsGxsGroupId> allGroupIds;
/* depends on the comboBox */
std::map<RsGxsGroupId, RsWireGroup>::const_iterator it;
for (it = mAllGroups.begin(); it != mAllGroups.end(); it++)
for (auto &it : mAllGroups)
{
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) {
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) {
add = true;
}
@ -383,11 +380,11 @@ void WireDialog::showGroups()
}
if (add) {
addGroup(it->second);
addGroup(it.second);
// request data.
std::list<RsGxsGroupId> grpIds;
grpIds.push_back(it->second.mMeta.mGroupId);
allGroupIds.push_back(it->second.mMeta.mGroupId);
grpIds.push_back(it.second.mMeta.mGroupId);
allGroupIds.push_back(it.second.mMeta.mGroupId);
}
}
@ -790,8 +787,8 @@ void WireDialog::showPulseFocus(const RsGxsGroupId groupId, const RsGxsMessageId
// fetch data from backend.
RsWirePulseSPtr pPulse;
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 */
@ -804,6 +801,7 @@ void WireDialog::showPulseFocus(const RsGxsGroupId groupId, const RsGxsMessageId
postPulseFocus(pPulse);
}, this);
}
});
}
@ -822,10 +820,9 @@ void WireDialog::postPulseFocus(RsWirePulseSPtr pPulse)
addTwitterView(new PulseTopLevel(this, pPulse));
std::list<RsWirePulseSPtr>::iterator it;
for(it = pPulse->mReplies.begin(); it != pPulse->mReplies.end(); it++)
for(auto &it : pPulse->mReplies)
{
RsWirePulseSPtr reply = *it;
RsWirePulseSPtr reply = it;
PulseReply *firstReply = new PulseReply(this, reply);
addTwitterView(firstReply);
@ -857,9 +854,9 @@ void WireDialog::postPulseFocus(RsWirePulseSPtr pPulse)
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);
firstRepub->showReplyLine(false);
@ -928,10 +925,9 @@ void WireDialog::postGroupFocus(RsWireGroupSPtr group, std::list<RsWirePulseSPtr
addTwitterView(new PulseViewGroup(this, group));
std::list<RsWirePulseSPtr>::iterator it;
for(it = pulses.begin(); it != pulses.end(); it++)
for(auto &it : pulses)
{
RsWirePulseSPtr reply = *it;
RsWirePulseSPtr reply = it;
// don't show likes
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;
view.viewType = WireViewType::GROUPS;
@ -959,7 +955,7 @@ void WireDialog::requestGroupsPulses(const std::list<RsGxsGroupId> groupIds)
showGroupsPulses(groupIds);
}
void WireDialog::showGroupsPulses(const std::list<RsGxsGroupId> groupIds)
void WireDialog::showGroupsPulses(const std::list<RsGxsGroupId>& groupIds)
{
clearTwitterView();
@ -968,8 +964,8 @@ void WireDialog::showGroupsPulses(const std::list<RsGxsGroupId> groupIds)
{
// fetch data from backend.
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 */
@ -982,6 +978,7 @@ void WireDialog::showGroupsPulses(const std::list<RsGxsGroupId> groupIds)
postGroupsPulses(pulses);
}, this);
}
});
}
@ -992,10 +989,9 @@ void WireDialog::postGroupsPulses(std::list<RsWirePulseSPtr> pulses)
ui.label_viewMode->setText("Groups Pulses");
std::list<RsWirePulseSPtr>::iterator it;
for(it = pulses.begin(); it != pulses.end(); it++)
for(auto &it : pulses)
{
RsWirePulseSPtr reply = *it;
RsWirePulseSPtr reply = it;
// don't show likes
if (reply->mPulseType & WIRE_PULSE_TYPE_LIKE) {
std::cerr << "WireDialog::postGroupsPulses() Not showing LIKE";

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -21,97 +21,79 @@
*******************************************************************************/
#include "advancedsearchdialog.h"
#include "gui/common/FilesDefs.h"
#include <QGridLayout>
AdvancedSearchDialog::AdvancedSearchDialog(QWidget * parent) : QDialog (parent)
{
setupUi(this);
dialogLayout = this->layout();
metrics = new QFontMetrics(this->font());
QFontMetrics metrics = QFontMetrics(this->font());
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);
// Save current default size as minimum to only add expresssions size to it.
this->adjustSize();
this->setMinimumSize(this->size());
// the list of expressions
expressions = new QList<ExpressionWidget*>();
// a area for holding the objects
expressionsLayout = new QVBoxLayout();
expressionsLayout->setSpacing(0);
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
// we now add the first expression widgets to the dialog
reset();//addNewExpression();
connect (this->addExprButton, SIGNAL(clicked()),
this, SLOT(addNewExpression()));
connect (this->resetButton, SIGNAL(clicked()),
this, SLOT(reset()));
connect(this->executeButton, SIGNAL(clicked()),
this, SLOT(prepareSearch()));
addExprButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/add.png"));
connect ( addExprButton, SIGNAL(clicked())
, this, SLOT(addNewExpression()));
connect ( resetButton, SIGNAL(clicked())
, this, SLOT(reset()));
connect ( searchButton, SIGNAL(clicked())
, this, SLOT(prepareSearch()));
}
void AdvancedSearchDialog::addNewExpression()
{
int sizeChange = metrics->height() + 26;
ExpressionWidget *expr;
if (expressions->size() == 0)
{
//create an initial expression
expr = new ExpressionWidget(expressionsFrame, true);
} else {
expr = new ExpressionWidget(expressionsFrame);
}
ExpressionWidget *expr = new ExpressionWidget(searchCriteriaBox, (expressions->size() == 0));
expressions->append(expr);
expressionsLayout->addWidget(expr, 1, Qt::AlignLeft);
searchCriteriaBox_VL->addWidget(expr);
searchCriteriaBox_VL->setAlignment(Qt::AlignTop);
expr->adjustSize();
if (searchCriteriaBox->minimumWidth() < expr->minimumWidth())
searchCriteriaBox->setMinimumWidth(expr->minimumWidth());
connect(expr, SIGNAL(signalDelete(ExpressionWidget*)),
this, SLOT(deleteExpression(ExpressionWidget*)));
QSize exprHeight = QSize(0,expr->height());
//expressionsLayout->invalidate();
//searchCriteriaBox->setMinimumSize(searchCriteriaBox->minimumWidth(),
// searchCriteriaBox->minimumHeight() + sizeChange);
//searchCriteriaBox->adjustSize();
expressionsFrame->adjustSize();
this->setMinimumSize(this->minimumWidth(), this->minimumHeight()+sizeChange);
this->adjustSize();
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)
{
int sizeChange = metrics->height() + 26;
QSize exprHeight = QSize(0,expr->height());
expressions->removeAll(expr);
expr->hide();
expressionsLayout->removeWidget(expr);
searchCriteriaBox_VL->removeWidget(expr);
delete expr;
expressionsLayout->invalidate();
//searchCriteriaBox->setMinimumSize(searchCriteriaBox->minimumWidth(),
// searchCriteriaBox->minimumHeight() - sizeChange);
//searchCriteriaBox->adjustSize();
expressionsFrame->adjustSize();
this->setMinimumSize(this->minimumWidth(), this->minimumHeight()-sizeChange);
this->adjustSize();
this->setMinimumSize(this->minimumSize() - exprHeight);
this->resize(this->size() - exprHeight);
}
void AdvancedSearchDialog::reset()
{
ExpressionWidget *expr;
while (!expressions->isEmpty())
{
expr = expressions->takeLast();
deleteExpression(expr);
}
deleteExpression(expressions->takeLast());
// now add a new default expressions
addNewExpression();
@ -130,7 +112,6 @@ RsRegularExpression::Expression * AdvancedSearchDialog::getRsExpr()
// process the special case: first expression
wholeExpression = expressions->at(0)->getRsExpression();
// 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.
// cppcheck-suppress memleak
@ -148,7 +129,6 @@ QString AdvancedSearchDialog::getSearchAsString()
{
QString str = expressions->at(0)->toString();
// iterate through the items in elements and
for (int i = 1; i < expressions->size(); ++i) {
// extract the expression information and compound it with the

View File

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

View File

@ -21,54 +21,23 @@
*******************************************************************************/
#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);
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();
deleteExprButton ->setVisible(!isFirst);
// connect the delete button signal
connect (deleteExprButton, SIGNAL (clicked()),
@ -77,20 +46,6 @@ ExpressionWidget::ExpressionWidget(QWidget * parent, bool initial) : QWidget(par
this->show();
}
QLayout * ExpressionWidget::createLayout(QWidget * parent)
{
QHBoxLayout * hboxLayout;
if (parent == 0)
{
hboxLayout = new QHBoxLayout();
} else {
hboxLayout = new QHBoxLayout(parent);
}
hboxLayout->setSpacing(0);
hboxLayout->setMargin(0);
return hboxLayout;
}
bool ExpressionWidget::isStringSearchExpression()
{
return ( searchType == NameSearch || searchType == PathSearch
@ -109,10 +64,10 @@ void ExpressionWidget::adjustExprForTermType(int index)
// the parameter expression: can be a date, 1-2 edit fields
// or a size with units etc
exprParamElem->adjustForSearchType(type);
exprParamFrame->adjustSize();
exprLayout->invalidate();
this->adjustSize();
this->setMinimumWidth( exprOpElem->width()+exprTermElem->width()
+ exprCondElem->width()+exprParamElem->width()
+ deleteExprButton->width() );
}
void ExpressionWidget::adjustExprForConditionType(int newCondition)
@ -120,8 +75,6 @@ void ExpressionWidget::adjustExprForConditionType(int newCondition)
// we adjust the appearance for a ranged selection
inRangedConfig = (newCondition == GuiExprElement::RANGE_INDEX);
exprParamElem->setRangedSearch(inRangedConfig);
exprParamFrame->layout()->invalidate();
exprParamFrame->adjustSize();
}
void ExpressionWidget::deleteExpression()
@ -156,7 +109,11 @@ RsRegularExpression::Expression* ExpressionWidget::getRsExpression()
if (isStringSearchExpression())
{
QString txt = exprParamElem->getStrSearchValue();
#if QT_VERSION < QT_VERSION_CHECK(5,15,0)
QStringList words = txt.split(" ", QString::SkipEmptyParts);
#else
QStringList words = txt.split(" ", Qt::SkipEmptyParts);
#endif
for (int i = 0; i < words.size(); ++i)
wordList.push_back(words.at(i).toUtf8().constData());
} else if (inRangedConfig){

View File

@ -21,14 +21,16 @@
*******************************************************************************/
#ifndef _ExpressionWidget_h_
#define _ExpressionWidget_h_
#include <iostream>
#include <QWidget>
#include <QLabel>
#include <retroshare/rsexpr.h>
#include "guiexprelement.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
@ -74,20 +76,10 @@ private slots:
private:
QLayout * createLayout(QWidget* parent = 0);
bool isStringSearchExpression();
QList <GuiExprElement *> * elements;
QLayout * exprLayout;
ExprOpElement * exprOpElem;
ExprTermsElement * exprTermElem;
ExprConditionElement * exprCondElem;
ExprParamElement* exprParamElem;
bool inRangedConfig;
bool isFirst;
bool inRangedConfig;
ExprSearchType searchType;
};

View File

@ -2,104 +2,33 @@
<ui version="4.0">
<class>ExpressionWidget</class>
<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">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</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">
<string>Expression Widget</string>
</property>
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>6</number>
</property>
<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">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</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>
</item>
<item>
@ -113,21 +42,34 @@
</property>
</widget>
</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>
</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>
<include location="../images.qrc"/>
</resources>

View File

@ -21,14 +21,10 @@
*******************************************************************************/
#include "guiexprelement.h"
#define STR_FIELDS_MIN_WIDTH 200
#define SIZE_FIELDS_MIN_WIDTH 80
#define DATE_FIELDS_MIN_WIDTH 100
#define FIELDS_MIN_HEIGHT 26
#define LOGICAL_OP_CB_WIDTH 70
#define STD_CB_WIDTH 90
#define CONDITION_CB_WIDTH 170
#define STR_FIELDS_MIN_WFACTOR 20.0
#define SIZE_FIELDS_MIN_WFACTOR 8.0
#define DATE_FIELDS_MIN_WFACTOR 10.0
#define FIELDS_MIN_HFACTOR 1.2
const int GuiExprElement::AND_INDEX = 0;
const int GuiExprElement::OR_INDEX = 1;
@ -38,9 +34,9 @@ const int GuiExprElement::NAME_INDEX = 0;
const int GuiExprElement::PATH_INDEX = 1;
const int GuiExprElement::EXT_INDEX = 2;
const int GuiExprElement::HASH_INDEX = 3;
/*const int GuiExprElement::KEYWORDS_INDEX = ???;
const int GuiExprElement::COMMENTS_INDEX = ???;
const int GuiExprElement::META_INDEX = ???;*/
//const int GuiExprElement::KEYWORDS_INDEX = ???;
//const int GuiExprElement::COMMENTS_INDEX = ???;
//const int GuiExprElement::META_INDEX = ???;
const int GuiExprElement::DATE_INDEX = 4;
const int GuiExprElement::SIZE_INDEX = 5;
const int GuiExprElement::POP_INDEX = 6;
@ -76,14 +72,13 @@ bool GuiExprElement::initialised = false;
GuiExprElement::GuiExprElement(QWidget * parent)
: QWidget(parent)
: QFrame(parent), searchType(NameSearch)
{
if (!GuiExprElement::initialised)
{
initialiseOptionsLists();
}
searchType = NameSearch;
setObjectName("trans_InternalFrame");
createLayout(this);
}
@ -220,20 +215,25 @@ QStringList GuiExprElement::getConditionOptions(ExprSearchType t)
return QStringList();
}
QHBoxLayout * GuiExprElement::createLayout(QWidget * parent)
QHBoxLayout * GuiExprElement::createLayout(QWidget * parent /*= nullptr*/)
{
QHBoxLayout * hboxLayout;
if (parent == 0)
{
hboxLayout = new QHBoxLayout();
} else {
hboxLayout = new QHBoxLayout(parent);
}
QHBoxLayout * hboxLayout = new QHBoxLayout(parent);
hboxLayout->setMargin(0);
hboxLayout->setSpacing(0);
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()
{
return (searchType == NameSearch || searchType == PathSearch
@ -247,12 +247,10 @@ bool GuiExprElement::isStringSearchExpression()
ExprOpElement::ExprOpElement(QWidget * parent)
: GuiExprElement(parent)
{
internalframe = new QFrame(this);
internalframe->setLayout(createLayout());
cb = new QComboBox(this);
cb->setMinimumSize(LOGICAL_OP_CB_WIDTH, FIELDS_MIN_HEIGHT);
cb = new RSComboBox(this);
cb->addItems(GuiExprElement::exprOpsList);
internalframe->layout()->addWidget(cb);
layout()->addWidget(cb);
setMinimumSize(cb->sizeHint());
}
QString ExprOpElement::toString()
@ -273,14 +271,12 @@ RsRegularExpression::LogicalOperator ExprOpElement::getLogicalOperator()
ExprTermsElement::ExprTermsElement(QWidget * parent)
: GuiExprElement(parent)
{
internalframe = new QFrame(this);
internalframe->setLayout(createLayout());
cb = new QComboBox(this);
cb->setMinimumSize(STD_CB_WIDTH, FIELDS_MIN_HEIGHT);
cb = new RSComboBox(this);
connect (cb, SIGNAL(currentIndexChanged(int)),
this, SIGNAL(currentIndexChanged(int)));
cb->addItems(GuiExprElement::searchTermsOptionsList);
internalframe->layout()->addWidget(cb);
layout()->addWidget(cb);
setMinimumSize(cb->sizeHint());
}
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 ******************/
/* ******************************************************************/
ExprConditionElement::ExprConditionElement(ExprSearchType type, QWidget * parent)
ExprConditionElement::ExprConditionElement(QWidget * parent, ExprSearchType type)
: GuiExprElement(parent)
{
internalframe = new QFrame(this);
internalframe->setLayout(createLayout());
cb = new QComboBox(this);
cb->setMinimumSize(CONDITION_CB_WIDTH, FIELDS_MIN_HEIGHT);
cb = new RSComboBox(this);
connect (cb, SIGNAL(currentIndexChanged(int)),
this, SIGNAL(currentIndexChanged(int)));
cb->addItems(getConditionOptions(type));
internalframe->layout()->addWidget(cb);
layout()->addWidget(cb);
setMinimumSize(cb->sizeHint());
}
@ -334,14 +328,9 @@ void ExprConditionElement::adjustForSearchType(ExprSearchType type)
/* **********************************************************/
/* *********** P A R A M E L E M E N T ******************/
/* **********************************************************/
ExprParamElement::ExprParamElement(ExprSearchType type, QWidget * parent)
: GuiExprElement(parent)
ExprParamElement::ExprParamElement(QWidget * parent, ExprSearchType type)
: GuiExprElement(parent), inRangedConfig(false)
{
internalframe = new QFrame(this);
internalframe->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
internalframe->setLayout(createLayout());
inRangedConfig = false;
searchType = type;
adjustForSearchType(type);
}
@ -359,28 +348,28 @@ QString ExprParamElement::toString()
} else
{
if (searchType == DateSearch) {
QDateEdit * dateEdit = internalframe->findChild<QDateEdit *> ("param1");
QDateEdit * dateEdit = findChild<QDateEdit *> ("param1");
str = dateEdit->text();
if (inRangedConfig)
{
str += QString(" ") + tr("to") + QString(" ");
dateEdit = internalframe->findChild<QDateEdit *> ("param2");
dateEdit = findChild<QDateEdit *> ("param2");
str += dateEdit->text();
}
} else if (searchType == SizeSearch)
{
QLineEdit * lineEditSize = internalframe->findChild<QLineEdit*>("param1");
QLineEdit * lineEditSize = findChild<QLineEdit*>("param1");
str = ("" == lineEditSize->text()) ? "0"
: lineEditSize->text();
QComboBox * cb = internalframe->findChild<QComboBox*> ("unitsCb1");
RSComboBox * cb = findChild<RSComboBox*> ("unitsCb1");
str += QString(" ") + cb->itemText(cb->currentIndex());
if (inRangedConfig)
{
str += QString(" ") + tr("to") + QString(" ");
lineEditSize = internalframe->findChild<QLineEdit*>("param2");
lineEditSize = findChild<QLineEdit*>("param2");
str += ("" == lineEditSize->text()) ? "0"
: lineEditSize->text();
cb = internalframe->findChild<QComboBox*> ("unitsCb2");
cb = findChild<RSComboBox*> ("unitsCb2");
str += QString(" ") + cb->itemText(cb->currentIndex());
}
}
@ -388,6 +377,21 @@ QString ExprParamElement::toString()
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)
{
@ -398,86 +402,88 @@ void ExprParamElement::adjustForSearchType(ExprSearchType type)
QRegExp hexRegExp("[A-Fa-f0-9]*");
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 = static_cast<QHBoxLayout*>(layout());
clearLayout(hbox);
QHBoxLayout* hbox = createLayout();
internalframe->setLayout(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(internalframe);
lineEdit->setMinimumSize(STR_FIELDS_MIN_WIDTH, FIELDS_MIN_HEIGHT);
lineEdit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
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"), internalframe);
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);
}
hbox->addWidget(icCb);
hbox->addStretch();
setMinimumSize(lineEdit->minimumSize()
+ QSize((searchType != HashSearch ? icCb->minimumWidth() : 0),0) );
} else if (searchType == DateSearch)
{
QDateEdit * dateEdit = new QDateEdit(QDate::currentDate(), internalframe);
dateEdit->setMinimumSize(DATE_FIELDS_MIN_WIDTH, FIELDS_MIN_HEIGHT);
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("dd.MM.yyyy"));
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(internalframe);
lineEdit->setMinimumSize(SIZE_FIELDS_MIN_WIDTH, FIELDS_MIN_HEIGHT);
lineEdit->setMaximumSize(SIZE_FIELDS_MIN_WIDTH, FIELDS_MIN_HEIGHT);
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);
QComboBox * cb = new QComboBox(internalframe);
hbox->addSpacing(9);
RSComboBox * cb = new RSComboBox(this);
cb->setObjectName("unitsCb1");
cb->addItem(tr("KB"), QVariant(1024));
cb->addItem(tr("MB"), QVariant(1048576));
cb->addItem(tr("GB"), QVariant(1073741824));
hbox->addSpacing(9);
internalframe->layout()->addWidget(cb);
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) );
}
/* POP Search not implemented
else if (searchType == PopSearch)
{
QLineEdit * lineEdit = new QLineEdit(elem);
QLineEdit * lineEdit = new QLineEdit(this);
lineEdit->setObjectName("param1");
lineEdit->setValidator(numValidator);
elem->layout()->addWidget(lineEdit);
hbox->addWidget(lineEdit);
hbox->addStretch();
setMinimumSize(lineEdit->minimumSize());
}*/
hbox->invalidate();
internalframe->adjustSize();
internalframe->show();
this->adjustSize();
adjustSize();
show();
}
void ExprParamElement::setRangedSearch(bool ranged)
@ -485,23 +491,26 @@ void ExprParamElement::setRangedSearch(bool ranged)
if (inRangedConfig == ranged) return; // nothing to do here
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
// ranged search or not
if (inRangedConfig)
{
if(hbox->itemAt(hbox->count()-1)->spacerItem())
delete hbox->takeAt(hbox->count()-1);
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);
if (searchType == DateSearch) {
internalframe->setMinimumSize(250,26);
QDateEdit * dateEdit = new QDateEdit(QDate::currentDate(), internalframe);
dateEdit->setMinimumSize(DATE_FIELDS_MIN_WIDTH, FIELDS_MIN_HEIGHT);
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("param2");
dateEdit->setDisplayFormat(tr("dd.MM.yyyy"));
dateEdit->setMinimumDate(QDate(1970, 1, 1));
dateEdit->setMaximumDate(QDate(2099, 12,31));
@ -510,16 +519,19 @@ void ExprParamElement::setRangedSearch(bool ranged)
hbox->addSpacing(9);
hbox->addWidget(dateEdit, Qt::AlignLeft);
hbox->addStretch();
setMinimumSize(minimumSize() + QSize(9,0)
+ QSize(toLbl->minimumWidth(),0) + QSize(9,0)
+ QSize(dateEdit->minimumWidth(),0) );
} else if (searchType == SizeSearch) {
internalframe->setMinimumSize(340,26);
QLineEdit * lineEdit = new QLineEdit(internalframe);
lineEdit->setMinimumSize(SIZE_FIELDS_MIN_WIDTH, FIELDS_MIN_HEIGHT);
lineEdit->setMaximumSize(SIZE_FIELDS_MIN_WIDTH, FIELDS_MIN_HEIGHT);
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("param2");
lineEdit->setValidator(numValidator);
QComboBox * cb = new QComboBox(internalframe);
RSComboBox * cb = new RSComboBox(this);
cb->setObjectName("unitsCb2");
cb->addItem(tr("KB"), QVariant(1024));
cb->addItem(tr("MB"), QVariant(1048576));
@ -532,19 +544,30 @@ void ExprParamElement::setRangedSearch(bool ranged)
hbox->addSpacing(9);
hbox->addWidget(cb);
hbox->addStretch();
setMinimumSize(minimumSize() + QSize(9,0)
+ QSize(toLbl->minimumWidth(),0) + QSize(9,0)
+ QSize(lineEdit->minimumWidth(),0) + QSize(9,0)
+ QSize(cb->minimumWidth(),0) );
}
// else if (searchType == PopSearch)
// {
// elem->layout()->addWidget(new QLabel(tr("to")), Qt::AlignCenter);
// QLineEdit * lineEdit = new QLineEdit(elem);
// QLineEdit * lineEdit = new QLineEdit(this);
// lineEdit->setObjectName("param2");
// lineEdit->setValidator(numValidator);
// elem->layout()->addWidget(slineEdit);
// 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();
internalframe->adjustSize();
internalframe->show();
this->adjustSize();
adjustSize();
show();
} else {
adjustForSearchType(searchType);
}
@ -553,7 +576,7 @@ void ExprParamElement::setRangedSearch(bool ranged)
bool ExprParamElement::ignoreCase()
{
return (isStringSearchExpression()
&& (internalframe->findChild<QCheckBox*>("ignoreCaseCB"))
&& (findChild<QCheckBox*>("ignoreCaseCB"))
->checkState()==Qt::Checked);
}
@ -561,7 +584,7 @@ QString ExprParamElement::getStrSearchValue()
{
if (!isStringSearchExpression()) return "";
QLineEdit * lineEdit = internalframe->findChild<QLineEdit*>("param1");
QLineEdit * lineEdit = findChild<QLineEdit*>("param1");
return lineEdit->displayText();
}
@ -577,19 +600,23 @@ uint64_t ExprParamElement::getIntValueFromField(QString fieldName, bool isToFiel
{
case DateSearch:
{
QDateEdit * dateEdit = internalframe->findChild<QDateEdit *> (fieldName + suffix);
QDateTime * time = new QDateTime(dateEdit->date());
val = (uint64_t)time->toTime_t();
QDateEdit * dateEdit = findChild<QDateEdit *> (fieldName + suffix);
#if QT_VERSION < QT_VERSION_CHECK(5,15,0)
QDateTime time = QDateTime(dateEdit->date());
#else
QDateTime time = dateEdit->date().startOfDay();
#endif
val = (uint64_t)time.toTime_t();
break;
}
case SizeSearch:
{
QLineEdit * lineEditSize = internalframe->findChild<QLineEdit*>(fieldName + suffix);
QLineEdit * lineEditSize = findChild<QLineEdit*>(fieldName + suffix);
bool ok2 = false;
val = (lineEditSize->displayText()).toULongLong(&ok2);
if (ok2)
{
QComboBox * cb = internalframe->findChild<QComboBox*>((QString("unitsCb") + suffix));
RSComboBox * cb = findChild<RSComboBox*>((QString("unitsCb") + suffix));
QVariant data = cb->itemData(cb->currentIndex());
val *= data.toULongLong();
}

View File

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

View File

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

View File

@ -183,7 +183,7 @@ ChatWidget::ChatWidget(QWidget *parent)
connect(ui->chatTextEdit, SIGNAL(currentCharFormatChanged(QTextCharFormat)), this, SLOT(chatCharFormatChanged()));
connect(ui->chatTextEdit, SIGNAL(textChanged()), this, SLOT(updateLenOfChatTextEdit()));
ui->infoFrame->setVisible(false);
ui->info_Frame->setVisible(false);
ui->statusMessageLabel->hide();
setAcceptDrops(true);
@ -290,12 +290,12 @@ void ChatWidget::addChatBarWidget(QWidget *w)
void ChatWidget::addTitleBarWidget(QWidget *w)
{
ui->pluginTitleFrame->layout()->addWidget(w) ;
ui->trans_Frame_PluginTitle->layout()->addWidget(w) ;
}
void ChatWidget::addTopBarWidget(QWidget *w)
{
ui->pluginTopFrame->layout()->addWidget(w) ;
ui->trans_Frame_PluginTop->layout()->addWidget(w) ;
}
void ChatWidget::hideChatText(bool hidden)
@ -1286,7 +1286,7 @@ void ChatWidget::sendChat()
void ChatWidget::on_closeInfoFrameButton_clicked()
{
ui->infoFrame->setVisible(false);
ui->info_Frame->setVisible(false);
}
void ChatWidget::on_searchButton_clicked(bool bValue)
@ -1804,27 +1804,27 @@ void ChatWidget::updateStatus(const QString &peer_id, int status)
switch (status) {
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."));
break;
case RS_STATUS_INACTIVE:
ui->infoFrame->setVisible(true);
ui->info_Frame->setVisible(true);
ui->infoLabel->setText(peerName + " " + tr("is Idle and may not reply"));
break;
case RS_STATUS_ONLINE:
ui->infoFrame->setVisible(false);
ui->info_Frame->setVisible(false);
break;
case RS_STATUS_AWAY:
ui->infoLabel->setText(peerName + " " + tr("is Away and may not reply"));
ui->infoFrame->setVisible(true);
ui->info_Frame->setVisible(true);
break;
case RS_STATUS_BUSY:
ui->infoLabel->setText(peerName + " " + tr("is Busy and may not reply"));
ui->infoFrame->setVisible(true);
ui->info_Frame->setVisible(true);
break;
}

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