mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
* Enabled the Filter Line edit for filtering friends, by nick/ID for Create Circles Dialog's Known Identities Widget.
* Set some minimum header sizes for some items * Enabled sorting for the QTreeWidget's git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6991 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3e13311be0
commit
b7bb1c25cb
@ -79,6 +79,14 @@ CirclesDialog::CirclesDialog(QWidget *parent)
|
|||||||
|
|
||||||
/* Setup TokenQueue */
|
/* Setup TokenQueue */
|
||||||
mCircleQueue = new TokenQueue(rsGxsCircles->getTokenService(), this);
|
mCircleQueue = new TokenQueue(rsGxsCircles->getTokenService(), this);
|
||||||
|
|
||||||
|
/* Set header resize modes and initial section sizes */
|
||||||
|
QHeaderView * membership_header = ui.treeWidget_membership->header () ;
|
||||||
|
membership_header->resizeSection ( CIRCLEGROUP_CIRCLE_COL_GROUPNAME, 200 );
|
||||||
|
|
||||||
|
QHeaderView * friends_header = ui.treeWidget_friends->header () ;
|
||||||
|
friends_header->resizeSection ( CIRCLEGROUP_FRIEND_COL_NAME, 200 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CirclesDialog::todo()
|
void CirclesDialog::todo()
|
||||||
|
@ -117,6 +117,9 @@
|
|||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeWidget" name="treeWidget_membership">
|
<widget class="QTreeWidget" name="treeWidget_membership">
|
||||||
|
<property name="sortingEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Name</string>
|
<string>Name</string>
|
||||||
@ -129,12 +132,12 @@
|
|||||||
</column>
|
</column>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Personal Circles</string>
|
<string>Public Circles</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Public Circles</string>
|
<string>Personal Circles</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
@ -153,6 +156,9 @@
|
|||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeWidget" name="treeWidget_friends">
|
<widget class="QTreeWidget" name="treeWidget_friends">
|
||||||
|
<property name="sortingEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Name</string>
|
<string>Name</string>
|
||||||
@ -170,7 +176,7 @@
|
|||||||
</column>
|
</column>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Friends</string>
|
<string>Others</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
@ -186,7 +192,7 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Others</string>
|
<string>Friends</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
@ -238,6 +244,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../images.qrc"/>
|
<include location="../images.qrc"/>
|
||||||
|
<include location="../images.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -61,7 +61,16 @@ CreateCircleDialog::CreateCircleDialog()
|
|||||||
|
|
||||||
connect(ui.treeWidget_membership, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(selectedMember(QTreeWidgetItem*, QTreeWidgetItem*)));
|
connect(ui.treeWidget_membership, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(selectedMember(QTreeWidgetItem*, QTreeWidgetItem*)));
|
||||||
connect(ui.treeWidget_IdList, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(selectedId(QTreeWidgetItem*, QTreeWidgetItem*)));
|
connect(ui.treeWidget_IdList, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(selectedId(QTreeWidgetItem*, QTreeWidgetItem*)));
|
||||||
|
|
||||||
|
connect(ui.IdFilter, SIGNAL(textChanged(QString)), this, SLOT(filterChanged(QString)));
|
||||||
|
|
||||||
|
/* Add filter actions */
|
||||||
|
QTreeWidgetItem *headerItem = ui.treeWidget_IdList->headerItem();
|
||||||
|
QString headerText = headerItem->text(RSCIRCLEID_COL_NICKNAME);
|
||||||
|
ui.IdFilter->addFilter(QIcon(), headerText, RSCIRCLEID_COL_NICKNAME, QString("%1 %2").arg(tr("Search"), headerText));
|
||||||
|
headerText = headerItem->text(RSCIRCLEID_COL_KEYID);
|
||||||
|
ui.IdFilter->addFilter(QIcon(), headerItem->text(RSCIRCLEID_COL_KEYID), RSCIRCLEID_COL_KEYID, QString("%1 %2").arg(tr("Search"), headerText));
|
||||||
|
|
||||||
ui.removeButton->setEnabled(false);
|
ui.removeButton->setEnabled(false);
|
||||||
ui.addButton->setEnabled(false);
|
ui.addButton->setEnabled(false);
|
||||||
ui.radioButton_ListKnownPGP->setChecked(true);
|
ui.radioButton_ListKnownPGP->setChecked(true);
|
||||||
@ -418,6 +427,8 @@ void CreateCircleDialog::getPgpIdentities()
|
|||||||
|
|
||||||
tree->addTopLevelItem(item);
|
tree->addTopLevelItem(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
filterIds();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -540,3 +551,16 @@ void CreateCircleDialog::loadRequest(const TokenQueue *queue, const TokenRequest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CreateCircleDialog::filterChanged(const QString& /*text*/)
|
||||||
|
{
|
||||||
|
filterIds();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CreateCircleDialog::filterIds()
|
||||||
|
{
|
||||||
|
int filterColumn = ui.IdFilter->currentFilter();
|
||||||
|
QString text = ui.IdFilter->text();
|
||||||
|
|
||||||
|
ui.treeWidget_IdList->filterItems(filterColumn, text);
|
||||||
|
}
|
||||||
|
@ -52,6 +52,7 @@ private slots:
|
|||||||
void selectedMember(QTreeWidgetItem*, QTreeWidgetItem*);
|
void selectedMember(QTreeWidgetItem*, QTreeWidgetItem*);
|
||||||
|
|
||||||
void createCircle();
|
void createCircle();
|
||||||
|
void filterChanged(const QString &text);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setupForPersonalCircle();
|
void setupForPersonalCircle();
|
||||||
@ -66,6 +67,8 @@ private:
|
|||||||
void requestCircle(const RsGxsGroupId &groupId);
|
void requestCircle(const RsGxsGroupId &groupId);
|
||||||
void requestGxsIdentities();
|
void requestGxsIdentities();
|
||||||
void getPgpIdentities();
|
void getPgpIdentities();
|
||||||
|
|
||||||
|
void filterIds();
|
||||||
|
|
||||||
TokenQueue *mCircleQueue;
|
TokenQueue *mCircleQueue;
|
||||||
TokenQueue *mIdQueue;
|
TokenQueue *mIdQueue;
|
||||||
|
@ -49,6 +49,9 @@
|
|||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeWidget" name="treeWidget_membership">
|
<widget class="QTreeWidget" name="treeWidget_membership">
|
||||||
|
<property name="sortingEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Name</string>
|
<string>Name</string>
|
||||||
@ -81,15 +84,29 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="addButton">
|
<widget class="QPushButton" name="addButton">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Add</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><< Add</string>
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images.qrc">
|
||||||
|
<normaloff>:/images/back.png</normaloff>:/images/back.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="removeButton">
|
<widget class="QPushButton" name="removeButton">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Remove </string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>>> Remove </string>
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images.qrc">
|
||||||
|
<normaloff>:/images/forward.png</normaloff>:/images/forward.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -156,12 +173,15 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="IdFilter"/>
|
<widget class="LineEditClear" name="IdFilter"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeWidget" name="treeWidget_IdList">
|
<widget class="RSTreeWidget" name="treeWidget_IdList">
|
||||||
|
<property name="sortingEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Nickname</string>
|
<string>Nickname</string>
|
||||||
@ -305,8 +325,6 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
<zorder>buttonBox</zorder>
|
|
||||||
<zorder>groupBox_title</zorder>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@ -328,7 +346,19 @@
|
|||||||
<header>gui/common/HeaderFrame.h</header>
|
<header>gui/common/HeaderFrame.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>LineEditClear</class>
|
||||||
|
<extends>QLineEdit</extends>
|
||||||
|
<header>gui/common/LineEditClear.h</header>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>RSTreeWidget</class>
|
||||||
|
<extends>QTreeWidget</extends>
|
||||||
|
<header>gui/common/RSTreeWidget.h</header>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources>
|
||||||
|
<include location="../images.qrc"/>
|
||||||
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
Loading…
Reference in New Issue
Block a user