mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-07 00:25:16 -04:00
Moved the filter edit and the display button from FriendsDialog and MessengerWindow into FriendList.
Updated english translation git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6649 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0fb66c4af4
commit
cc92fdfc81
9 changed files with 115 additions and 182 deletions
|
@ -156,6 +156,11 @@ FriendList::FriendList(QWidget *parent) :
|
|||
connect(ui->actionSortPeersAscendingOrder, SIGNAL(triggered()), this, SLOT(sortPeersAscendingOrder()));
|
||||
connect(ui->actionSortPeersDescendingOrder, SIGNAL(triggered()), this, SLOT(sortPeersDescendingOrder()));
|
||||
|
||||
connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterItems(QString)));
|
||||
|
||||
ui->filterLineEdit->setPlaceholderText(tr("Search")) ;
|
||||
ui->filterLineEdit->showFilterIcon();
|
||||
|
||||
initializeHeader(false);
|
||||
|
||||
ui->peerTreeWidget->sortItems(COLUMN_NAME, Qt::AscendingOrder);
|
||||
|
@ -170,6 +175,9 @@ FriendList::FriendList(QWidget *parent) :
|
|||
// http://bugreports.qt.nokia.com/browse/QTBUG-8270
|
||||
QShortcut *Shortcut = new QShortcut(QKeySequence(Qt::Key_Delete), ui->peerTreeWidget, 0, 0, Qt::WidgetShortcut);
|
||||
connect(Shortcut, SIGNAL(activated()), this, SLOT(removefriend()));
|
||||
|
||||
/* Initialize display menu */
|
||||
createDisplayMenu();
|
||||
}
|
||||
|
||||
FriendList::~FriendList()
|
||||
|
@ -178,6 +186,20 @@ FriendList::~FriendList()
|
|||
delete(m_compareRole);
|
||||
}
|
||||
|
||||
void FriendList::addToolButton(QToolButton *toolButton)
|
||||
{
|
||||
if (!toolButton) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialize button */
|
||||
toolButton->setAutoRaise(true);
|
||||
toolButton->setIconSize(ui->displayButton->iconSize());
|
||||
toolButton->setFocusPolicy(ui->displayButton->focusPolicy());
|
||||
|
||||
ui->titleBarFrame->layout()->addWidget(toolButton);
|
||||
}
|
||||
|
||||
void FriendList::processSettings(bool bLoad)
|
||||
{
|
||||
int peerTreeVersion = 2; // version number for the settings to solve problems when modifying the column count
|
||||
|
@ -1965,7 +1987,7 @@ void FriendList::addPeerToExpand(const std::string &gpgId)
|
|||
openPeers->insert(gpgId);
|
||||
}
|
||||
|
||||
QMenu *FriendList::createDisplayMenu()
|
||||
void FriendList::createDisplayMenu()
|
||||
{
|
||||
QMenu *displayMenu = new QMenu(this);
|
||||
connect(displayMenu, SIGNAL(aboutToShow()), this, SLOT(updateMenu()));
|
||||
|
@ -1993,7 +2015,7 @@ QMenu *FriendList::createDisplayMenu()
|
|||
// group->addAction(ui->actionSortByLastContact);
|
||||
// group->addAction(ui->actionSortByIP);
|
||||
|
||||
return displayMenu;
|
||||
ui->displayButton->setMenu(displayMenu);
|
||||
}
|
||||
|
||||
void FriendList::updateMenu()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue