mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fixed GxsGroup TreeWidget's Context Menu by Phenom
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7387 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f54162db76
commit
5e1099f47f
@ -297,12 +297,22 @@ QString GroupTreeWidget::itemId(QTreeWidgetItem *item)
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
return item->data(COLUMN_DATA, ROLE_ID).toString();
|
return item->data(COLUMN_DATA, ROLE_ID).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GroupTreeWidget::fillGroupItems(QTreeWidgetItem *categoryItem, const QList<GroupItemInfo> &itemList)
|
QString GroupTreeWidget::itemIdAt(QPoint &point)
|
||||||
{
|
{
|
||||||
if (categoryItem == NULL) {
|
QTreeWidgetItem *item = ui->treeWidget->itemAt(point);
|
||||||
|
if (item == NULL) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
return item->data(COLUMN_DATA, ROLE_ID).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GroupTreeWidget::fillGroupItems(QTreeWidgetItem *categoryItem, const QList<GroupItemInfo> &itemList)
|
||||||
|
{
|
||||||
|
if (categoryItem == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,12 +80,13 @@ public:
|
|||||||
void processSettings(RshareSettings *settings, bool load);
|
void processSettings(RshareSettings *settings, bool load);
|
||||||
|
|
||||||
// Add a new category item
|
// Add a new category item
|
||||||
QTreeWidgetItem *addCategoryItem(const QString &name, const QIcon &icon, bool expand);
|
QTreeWidgetItem *addCategoryItem(const QString &name, const QIcon &icon, bool expand);
|
||||||
// Get id of item
|
// Get id of item
|
||||||
QString itemId(QTreeWidgetItem *item);
|
QString itemId(QTreeWidgetItem *item);
|
||||||
// Fill items of a group
|
QString itemIdAt(QPoint &point);
|
||||||
void fillGroupItems(QTreeWidgetItem *categoryItem, const QList<GroupItemInfo> &itemList);
|
// Fill items of a group
|
||||||
// Set the unread count of an item
|
void fillGroupItems(QTreeWidgetItem *categoryItem, const QList<GroupItemInfo> &itemList);
|
||||||
|
// Set the unread count of an item
|
||||||
void setUnreadCount(QTreeWidgetItem *item, int unreadCount);
|
void setUnreadCount(QTreeWidgetItem *item, int unreadCount);
|
||||||
|
|
||||||
QTreeWidgetItem *getItemFromId(const QString &id);
|
QTreeWidgetItem *getItemFromId(const QString &id);
|
||||||
|
@ -206,7 +206,7 @@ void GxsGroupFrameDialog::todo()
|
|||||||
|
|
||||||
void GxsGroupFrameDialog::groupTreeCustomPopupMenu(QPoint point)
|
void GxsGroupFrameDialog::groupTreeCustomPopupMenu(QPoint point)
|
||||||
{
|
{
|
||||||
QString id = "" ;//ui->groupTreeWidget->itemIdAt(point);
|
QString id = ui->groupTreeWidget->itemIdAt(point);
|
||||||
if (id.isEmpty()) return;
|
if (id.isEmpty()) return;
|
||||||
|
|
||||||
mGroupId = RsGxsGroupId(id.toStdString());
|
mGroupId = RsGxsGroupId(id.toStdString());
|
||||||
|
Loading…
Reference in New Issue
Block a user