mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-06 21:34:22 -04:00
Changed the Buttons layout on ChannelsFeed
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4793 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
fbcc3f2070
commit
d09c94296a
2 changed files with 79 additions and 85 deletions
|
@ -57,12 +57,12 @@ ChannelFeed::ChannelFeed(QWidget *parent)
|
||||||
/* Invoke the Qt Designer generated object setup routine */
|
/* Invoke the Qt Designer generated object setup routine */
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
|
||||||
connect(newChannelButton, SIGNAL(clicked()), this, SLOT(createChannel()));
|
connect(newChannelButton, SIGNAL(clicked()), this, SLOT(createChannel()));
|
||||||
connect(postButton, SIGNAL(clicked()), this, SLOT(createMsg()));
|
connect(postButton, SIGNAL(clicked()), this, SLOT(createMsg()));
|
||||||
connect(subscribeButton, SIGNAL( clicked( void ) ), this, SLOT( subscribeChannel ( void ) ) );
|
connect(subscribeButton, SIGNAL( clicked( void ) ), this, SLOT( subscribeChannel ( void ) ) );
|
||||||
connect(unsubscribeButton, SIGNAL( clicked( void ) ), this, SLOT( unsubscribeChannel ( void ) ) );
|
connect(unsubscribeButton, SIGNAL( clicked( void ) ), this, SLOT( unsubscribeChannel ( void ) ) );
|
||||||
connect(setAllAsReadButton, SIGNAL(clicked()), this, SLOT(setAllAsReadClicked()));
|
connect(actionsetAllAsRead, SIGNAL(triggered()), this, SLOT(setAllAsReadClicked()));
|
||||||
connect(autoDownload, SIGNAL(clicked()), this, SLOT(toggleAutoDownload()));
|
connect(actionEnable_Auto_Download, SIGNAL(triggered()), this, SLOT(toggleAutoDownload()));
|
||||||
|
|
||||||
connect(NotifyQt::getInstance(), SIGNAL(channelMsgReadSatusChanged(QString,QString,int)), this, SLOT(channelMsgReadSatusChanged(QString,QString,int)));
|
connect(NotifyQt::getInstance(), SIGNAL(channelMsgReadSatusChanged(QString,QString,int)), this, SLOT(channelMsgReadSatusChanged(QString,QString,int)));
|
||||||
|
|
||||||
|
@ -86,6 +86,10 @@ ChannelFeed::ChannelFeed(QWidget *parent)
|
||||||
popularChannels = treeWidget->addCategoryItem(tr("Popular Channels"), QIcon(), false);
|
popularChannels = treeWidget->addCategoryItem(tr("Popular Channels"), QIcon(), false);
|
||||||
otherChannels = treeWidget->addCategoryItem(tr("Other Channels"), QIcon(), false);
|
otherChannels = treeWidget->addCategoryItem(tr("Other Channels"), QIcon(), false);
|
||||||
|
|
||||||
|
QMenu * channeloptsmenu = new QMenu();
|
||||||
|
channeloptsmenu->addAction(actionsetAllAsRead);
|
||||||
|
channeloptsmenu->addAction(actionEnable_Auto_Download);
|
||||||
|
channeloptions_Button->setMenu(channeloptsmenu);
|
||||||
|
|
||||||
//added from ahead
|
//added from ahead
|
||||||
updateChannelList();
|
updateChannelList();
|
||||||
|
@ -436,8 +440,10 @@ void ChannelFeed::updateChannelMsgs()
|
||||||
postButton->setEnabled(false);
|
postButton->setEnabled(false);
|
||||||
subscribeButton->setEnabled(false);
|
subscribeButton->setEnabled(false);
|
||||||
unsubscribeButton->setEnabled(false);
|
unsubscribeButton->setEnabled(false);
|
||||||
setAllAsReadButton->setEnabled(false);
|
subscribeButton->hide();
|
||||||
autoDownload->setEnabled(false);
|
unsubscribeButton->hide();
|
||||||
|
actionsetAllAsRead->setEnabled(false);
|
||||||
|
actionEnable_Auto_Download->setEnabled(false);
|
||||||
nameLabel->setText(tr("No Channel Selected"));
|
nameLabel->setText(tr("No Channel Selected"));
|
||||||
iconLabel->setPixmap(QPixmap(":/images/channels.png"));
|
iconLabel->setPixmap(QPixmap(":/images/channels.png"));
|
||||||
iconLabel->setEnabled(false);
|
iconLabel->setEnabled(false);
|
||||||
|
@ -467,25 +473,29 @@ void ChannelFeed::updateChannelMsgs()
|
||||||
/* do buttons */
|
/* do buttons */
|
||||||
if (ci.channelFlags & RS_DISTRIB_SUBSCRIBED) {
|
if (ci.channelFlags & RS_DISTRIB_SUBSCRIBED) {
|
||||||
subscribeButton->setEnabled(false);
|
subscribeButton->setEnabled(false);
|
||||||
|
subscribeButton->hide();
|
||||||
|
unsubscribeButton->show();
|
||||||
unsubscribeButton->setEnabled(true);
|
unsubscribeButton->setEnabled(true);
|
||||||
setAllAsReadButton->setEnabled(true);
|
actionsetAllAsRead->setEnabled(true);
|
||||||
} else {
|
} else {
|
||||||
subscribeButton->setEnabled(true);
|
subscribeButton->setEnabled(true);
|
||||||
|
subscribeButton->show();
|
||||||
unsubscribeButton->setEnabled(false);
|
unsubscribeButton->setEnabled(false);
|
||||||
setAllAsReadButton->setEnabled(false);
|
unsubscribeButton->hide();
|
||||||
autoDownload->setEnabled(false);
|
actionsetAllAsRead->setEnabled(false);
|
||||||
|
actionEnable_Auto_Download->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ci.channelFlags & RS_DISTRIB_PUBLISH) {
|
if (ci.channelFlags & RS_DISTRIB_PUBLISH) {
|
||||||
postButton->setEnabled(true);
|
postButton->setEnabled(true);
|
||||||
autoDownload->setEnabled(false);
|
actionsetAllAsRead->setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
postButton->setEnabled(false);
|
postButton->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!(ci.channelFlags & RS_DISTRIB_PUBLISH) &&
|
if(!(ci.channelFlags & RS_DISTRIB_PUBLISH) &&
|
||||||
(ci.channelFlags & RS_DISTRIB_SUBSCRIBED))
|
(ci.channelFlags & RS_DISTRIB_SUBSCRIBED))
|
||||||
autoDownload->setEnabled(true);
|
actionsetAllAsRead->setEnabled(true);
|
||||||
|
|
||||||
|
|
||||||
std::list<ChannelMsgSummary> msgs;
|
std::list<ChannelMsgSummary> msgs;
|
||||||
|
@ -638,8 +648,8 @@ bool ChannelFeed::navigate(const std::string& channelId, const std::string& msgI
|
||||||
void ChannelFeed::setAutoDownloadButton(bool autoDl)
|
void ChannelFeed::setAutoDownloadButton(bool autoDl)
|
||||||
{
|
{
|
||||||
if (autoDl) {
|
if (autoDl) {
|
||||||
autoDownload->setText(tr("Disable Auto-Download"));
|
actionEnable_Auto_Download->setText(tr("Disable Auto-Download"));
|
||||||
}else{
|
}else{
|
||||||
autoDownload->setText(tr("Enable Auto-Download"));
|
actionEnable_Auto_Download->setText(tr("Enable Auto-Download"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -405,78 +405,6 @@ border-image: url(:/images/btn_26_pressed.png) 4;
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="5">
|
|
||||||
<widget class="QToolButton" name="setAllAsReadButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>26</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">QToolButton, QPushButton, QComboBox {
|
|
||||||
border-image: url(:/images/btn_26.png) 4;
|
|
||||||
border-width: 4;
|
|
||||||
padding: 0px 6px;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
QToolButton:hover, QPushButton:hover, QComboBox:hover {
|
|
||||||
border-image: url(:/images/btn_26_hover.png) 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
QToolButton:disabled, QPushButton:disabled, QComboBox::disabled {
|
|
||||||
color:gray;
|
|
||||||
}
|
|
||||||
|
|
||||||
QToolButton:pressed, QPushButton:pressed{
|
|
||||||
border-image: url(:/images/btn_26_pressed.png) 4;
|
|
||||||
}</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Set all to read</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="6">
|
|
||||||
<widget class="QPushButton" name="autoDownload">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>26</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">QToolButton, QPushButton, QComboBox {
|
|
||||||
border-image: url(:/images/btn_26.png) 4;
|
|
||||||
border-width: 4;
|
|
||||||
padding: 0px 6px;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
QToolButton:hover, QPushButton:hover, QComboBox:hover {
|
|
||||||
border-image: url(:/images/btn_26_hover.png) 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
QToolButton:disabled, QPushButton:disabled, QComboBox::disabled {
|
|
||||||
color:gray;
|
|
||||||
}
|
|
||||||
|
|
||||||
QToolButton:pressed, QPushButton:pressed{
|
|
||||||
border-image: url(:/images/btn_26_pressed.png) 4;
|
|
||||||
}</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Enable Auto-download</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QToolButton" name="postButton">
|
<widget class="QToolButton" name="postButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -518,6 +446,46 @@ border-image: url(:/images/btn_26_pressed.png) 4;
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="5">
|
||||||
|
<widget class="QPushButton" name="channeloptions_Button">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>26</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QToolButton, QPushButton, QComboBox {
|
||||||
|
border-image: url(:/images/btn_26.png) 4;
|
||||||
|
border-width: 4;
|
||||||
|
padding: 0px 6px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QToolButton:hover, QPushButton:hover, QComboBox:hover {
|
||||||
|
border-image: url(:/images/btn_26_hover.png) 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
QToolButton:disabled, QPushButton:disabled, QComboBox::disabled {
|
||||||
|
color:gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
QToolButton:pressed, QPushButton:pressed{
|
||||||
|
border-image: url(:/images/btn_26_pressed.png) 4;
|
||||||
|
}</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="images.qrc">
|
||||||
|
<normaloff>:/images/kcmsystem24.png</normaloff>:/images/kcmsystem24.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -536,7 +504,7 @@ border-image: url(:/images/btn_26_pressed.png) 4;
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>486</width>
|
<width>392</width>
|
||||||
<height>333</height>
|
<height>333</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -578,6 +546,22 @@ border-image: url(:/images/btn_26_pressed.png) 4;
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
<action name="actionsetAllAsRead">
|
||||||
|
<property name="text">
|
||||||
|
<string>Set all as read</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Set all as read</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionEnable_Auto_Download">
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable Auto-Download</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Enable Auto-Download</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue