mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 07:29:33 -05:00
Added placeholder text to RSFeedWidget
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7933 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0c0f35e064
commit
326501f1f7
@ -139,6 +139,16 @@ void RSFeedWidget::disconnectSignals(FeedItem *feedItem)
|
||||
disconnect(feedItem, SIGNAL(sizeChanged(FeedItem*)), this, SLOT(feedItemSizeChanged(FeedItem*)));
|
||||
}
|
||||
|
||||
QString RSFeedWidget::placeholderText()
|
||||
{
|
||||
return ui->treeWidget->placeholderText();
|
||||
}
|
||||
|
||||
void RSFeedWidget::setPlaceholderText(const QString &placeholderText)
|
||||
{
|
||||
ui->treeWidget->setPlaceholderText(placeholderText);
|
||||
}
|
||||
|
||||
FeedItem *RSFeedWidget::feedItemFromTreeItem(QTreeWidgetItem *treeItem)
|
||||
{
|
||||
return dynamic_cast<FeedItem*>(ui->treeWidget->itemWidget(treeItem, COLUMN_FEED));
|
||||
|
@ -51,6 +51,9 @@ public:
|
||||
RSFeedWidget(QWidget *parent = 0);
|
||||
virtual ~RSFeedWidget();
|
||||
|
||||
QString placeholderText();
|
||||
void setPlaceholderText(const QString &placeholderText);
|
||||
|
||||
void addFeedItem(FeedItem *feedItem, Qt::ItemDataRole sortRole, const QVariant &value);
|
||||
void addFeedItem(FeedItem *feedItem, const QMap<Qt::ItemDataRole, QVariant> &sort);
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTreeWidget" name="treeWidget">
|
||||
<widget class="RSTreeWidget" name="treeWidget">
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
@ -55,6 +55,13 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>RSTreeWidget</class>
|
||||
<extends>QTreeWidget</extends>
|
||||
<header>gui/common/RSTreeWidget.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -32,6 +32,7 @@ class RSTreeWidget : public QTreeWidget
|
||||
public:
|
||||
RSTreeWidget(QWidget *parent = 0);
|
||||
|
||||
QString placeholderText() { return mPlaceholderText; }
|
||||
void setPlaceholderText(const QString &text);
|
||||
|
||||
void filterItems(int filterColumn, const QString &text);
|
||||
|
Loading…
Reference in New Issue
Block a user