mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 15:39:27 -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*)));
|
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)
|
FeedItem *RSFeedWidget::feedItemFromTreeItem(QTreeWidgetItem *treeItem)
|
||||||
{
|
{
|
||||||
return dynamic_cast<FeedItem*>(ui->treeWidget->itemWidget(treeItem, COLUMN_FEED));
|
return dynamic_cast<FeedItem*>(ui->treeWidget->itemWidget(treeItem, COLUMN_FEED));
|
||||||
|
@ -51,6 +51,9 @@ public:
|
|||||||
RSFeedWidget(QWidget *parent = 0);
|
RSFeedWidget(QWidget *parent = 0);
|
||||||
virtual ~RSFeedWidget();
|
virtual ~RSFeedWidget();
|
||||||
|
|
||||||
|
QString placeholderText();
|
||||||
|
void setPlaceholderText(const QString &placeholderText);
|
||||||
|
|
||||||
void addFeedItem(FeedItem *feedItem, Qt::ItemDataRole sortRole, const QVariant &value);
|
void addFeedItem(FeedItem *feedItem, Qt::ItemDataRole sortRole, const QVariant &value);
|
||||||
void addFeedItem(FeedItem *feedItem, const QMap<Qt::ItemDataRole, QVariant> &sort);
|
void addFeedItem(FeedItem *feedItem, const QMap<Qt::ItemDataRole, QVariant> &sort);
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeWidget" name="treeWidget">
|
<widget class="RSTreeWidget" name="treeWidget">
|
||||||
<property name="editTriggers">
|
<property name="editTriggers">
|
||||||
<set>QAbstractItemView::NoEditTriggers</set>
|
<set>QAbstractItemView::NoEditTriggers</set>
|
||||||
</property>
|
</property>
|
||||||
@ -55,6 +55,13 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>RSTreeWidget</class>
|
||||||
|
<extends>QTreeWidget</extends>
|
||||||
|
<header>gui/common/RSTreeWidget.h</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -32,6 +32,7 @@ class RSTreeWidget : public QTreeWidget
|
|||||||
public:
|
public:
|
||||||
RSTreeWidget(QWidget *parent = 0);
|
RSTreeWidget(QWidget *parent = 0);
|
||||||
|
|
||||||
|
QString placeholderText() { return mPlaceholderText; }
|
||||||
void setPlaceholderText(const QString &text);
|
void setPlaceholderText(const QString &text);
|
||||||
|
|
||||||
void filterItems(int filterColumn, const QString &text);
|
void filterItems(int filterColumn, const QString &text);
|
||||||
|
Loading…
Reference in New Issue
Block a user