mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-26 07:16:11 -05:00
removed some unused buttons
This commit is contained in:
parent
730a3be2e4
commit
405fd2b5ca
@ -277,31 +277,24 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
|
||||
ui->postButton->setText(tr("Add new post"));
|
||||
|
||||
/* add filter actions */
|
||||
ui->filterLineEdit->addFilter(QIcon(), tr("Title"), FILTER_TITLE, tr("Search Title"));
|
||||
ui->filterLineEdit->addFilter(QIcon(), tr("Message"), FILTER_MSG, tr("Search Message"));
|
||||
ui->filterLineEdit->addFilter(QIcon(), tr("Filename"), FILTER_FILE_NAME, tr("Search Filename"));
|
||||
#ifdef TODO
|
||||
connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), ui->feedWidget, SLOT(setFilterText(QString)));
|
||||
connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), ui->fileWidget, SLOT(setFilterText(QString)));
|
||||
#endif
|
||||
connect(ui->filterLineEdit, SIGNAL(filterChanged(int)), this, SLOT(filterChanged()));
|
||||
connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterChanged()));
|
||||
connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterChanged(QString)));
|
||||
|
||||
/* Initialize view button */
|
||||
//setViewMode(VIEW_MODE_FEEDS); see processSettings
|
||||
//ui->infoWidget->hide();
|
||||
|
||||
QSignalMapper *signalMapper = new QSignalMapper(this);
|
||||
connect(ui->feedToolButton, SIGNAL(clicked()), signalMapper, SLOT(map()));
|
||||
connect(ui->fileToolButton, SIGNAL(clicked()), signalMapper, SLOT(map()));
|
||||
signalMapper->setMapping(ui->feedToolButton, VIEW_MODE_FEEDS);
|
||||
signalMapper->setMapping(ui->fileToolButton, VIEW_MODE_FILES);
|
||||
connect(signalMapper, SIGNAL(mapped(int)), this, SLOT(setViewMode(int)));
|
||||
//QSignalMapper *signalMapper = new QSignalMapper(this);
|
||||
//connect(ui->feedToolButton, SIGNAL(clicked()), signalMapper, SLOT(map()));
|
||||
//connect(ui->fileToolButton, SIGNAL(clicked()), signalMapper, SLOT(map()));
|
||||
//signalMapper->setMapping(ui->feedToolButton, VIEW_MODE_FEEDS);
|
||||
//signalMapper->setMapping(ui->fileToolButton, VIEW_MODE_FILES);
|
||||
//connect(signalMapper, SIGNAL(mapped(int)), this, SLOT(setViewMode(int)));
|
||||
|
||||
/*************** Setup Left Hand Side (List of Channels) ****************/
|
||||
|
||||
ui->loadingLabel->hide();
|
||||
ui->progressBar->hide();
|
||||
//ui->loadingLabel->hide();
|
||||
//ui->progressBar->hide();
|
||||
|
||||
ui->postsTree->setPlaceholderText(tr("Thumbnails"));
|
||||
ui->postsTree->setMinimumWidth(COLUMN_SIZE_FONT_FACTOR_W*QFontMetricsF(font()).height()+1);
|
||||
|
||||
@ -521,21 +514,25 @@ void GxsChannelPostsWidgetWithModel::processSettings(bool load)
|
||||
Settings->beginGroup(QString("ChannelPostsWidget"));
|
||||
|
||||
if (load) {
|
||||
#ifdef TO_REMOVE
|
||||
// load settings
|
||||
|
||||
/* Filter */
|
||||
ui->filterLineEdit->setCurrentFilter(Settings->value("filter", FILTER_TITLE).toInt());
|
||||
//ui->filterLineEdit->setCurrentFilter(Settings->value("filter", FILTER_TITLE).toInt());
|
||||
|
||||
/* View mode */
|
||||
setViewMode(Settings->value("viewMode", VIEW_MODE_FEEDS).toInt());
|
||||
//setViewMode(Settings->value("viewMode", VIEW_MODE_FEEDS).toInt());
|
||||
#endif
|
||||
} else {
|
||||
#ifdef TO_REMOVE
|
||||
// save settings
|
||||
|
||||
/* Filter */
|
||||
Settings->setValue("filter", ui->filterLineEdit->currentFilter());
|
||||
//Settings->setValue("filter", ui->filterLineEdit->currentFilter());
|
||||
|
||||
/* View mode */
|
||||
Settings->setValue("viewMode", viewMode());
|
||||
//Settings->setValue("viewMode", viewMode());
|
||||
#endif
|
||||
}
|
||||
|
||||
Settings->endGroup();
|
||||
@ -629,8 +626,8 @@ void GxsChannelPostsWidgetWithModel::insertChannelDetails(const RsGxsChannelGrou
|
||||
if (IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags))
|
||||
{
|
||||
ui->subscribeToolButton->setText(tr("Subscribed") + " " + QString::number(group.mMeta.mPop) );
|
||||
ui->feedToolButton->setEnabled(true);
|
||||
ui->fileToolButton->setEnabled(true);
|
||||
//ui->feedToolButton->setEnabled(true);
|
||||
//ui->fileToolButton->setEnabled(true);
|
||||
ui->channel_TW->setTabEnabled(CHANNEL_TABS_POSTS,true);
|
||||
ui->details_TW->setEnabled(true);
|
||||
}
|
||||
@ -698,14 +695,15 @@ void GxsChannelPostsWidgetWithModel::insertChannelDetails(const RsGxsChannelGrou
|
||||
ui->infoWidget->show();
|
||||
ui->feedWidget->hide();
|
||||
ui->fileWidget->hide();
|
||||
#endif
|
||||
|
||||
ui->feedToolButton->setEnabled(false);
|
||||
ui->fileToolButton->setEnabled(false);
|
||||
//ui->feedToolButton->setEnabled(false);
|
||||
//ui->fileToolButton->setEnabled(false);
|
||||
#endif
|
||||
|
||||
ui->subscribeToolButton->setText(tr("Subscribe ") + " " + QString::number(group.mMeta.mPop) );
|
||||
}
|
||||
|
||||
#ifdef TODO
|
||||
int GxsChannelPostsWidgetWithModel::viewMode()
|
||||
{
|
||||
if (ui->feedToolButton->isChecked()) {
|
||||
@ -717,6 +715,7 @@ int GxsChannelPostsWidgetWithModel::viewMode()
|
||||
/* Default */
|
||||
return VIEW_MODE_FEEDS;
|
||||
}
|
||||
#endif
|
||||
|
||||
void GxsChannelPostsWidgetWithModel::setViewMode(int viewMode)
|
||||
{
|
||||
@ -745,9 +744,9 @@ void GxsChannelPostsWidgetWithModel::setViewMode(int viewMode)
|
||||
#endif
|
||||
}
|
||||
|
||||
void GxsChannelPostsWidgetWithModel::filterChanged()
|
||||
void GxsChannelPostsWidgetWithModel::filterChanged(QString s)
|
||||
{
|
||||
QStringList ql = ui->filterLineEdit->text().split(' ',QString::SkipEmptyParts);
|
||||
QStringList ql = s.split(' ',QString::SkipEmptyParts);
|
||||
uint32_t count;
|
||||
mChannelPostsModel->setFilter(ql,count);
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ private slots:
|
||||
void createMsg();
|
||||
void toggleAutoDownload();
|
||||
void subscribeGroup(bool subscribe);
|
||||
void filterChanged();
|
||||
void filterChanged(QString);
|
||||
void setViewMode(int viewMode);
|
||||
void settingsChanged();
|
||||
void handlePostsTreeSizeChange(QSize s);
|
||||
|
@ -120,78 +120,15 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="loadingLabel">
|
||||
<property name="text">
|
||||
<string>Loading</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="viewModeLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QToolButton" name="feedToolButton">
|
||||
<property name="toolTip">
|
||||
<string>Show feeds</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/view-feeds.png</normaloff>:/images/view-feeds.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="fileToolButton">
|
||||
<property name="toolTip">
|
||||
<string>Show files</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/view-files.png</normaloff>:/images/view-files.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="LineEditClear" name="filterLineEdit">
|
||||
<widget class="QLineEdit" name="filterLineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
@ -583,11 +520,6 @@ p, li { white-space: pre-wrap; }
|
||||
<extends>QToolButton</extends>
|
||||
<header>gui/common/SubscribeToolButton.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>LineEditClear</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header location="global">gui/common/LineEditClear.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>RSTreeView</class>
|
||||
<extends>QTreeView</extends>
|
||||
@ -601,7 +533,6 @@ p, li { white-space: pre-wrap; }
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../icons.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user