mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Added new basic class for a QLineEdit with a clear button - LineEditClear.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5080 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1df5582e1c
commit
7756b093bf
@ -358,6 +358,7 @@ HEADERS += rshare.h \
|
||||
gui/common/FriendList.h \
|
||||
gui/common/FriendSelectionWidget.h \
|
||||
gui/common/HashBox.h \
|
||||
gui/common/LineEditClear.h \
|
||||
gui/common/LinkTextBrowser.h \
|
||||
gui/style/RSStyle.h \
|
||||
gui/style/StyleDialog.h \
|
||||
@ -607,6 +608,7 @@ SOURCES += main.cpp \
|
||||
gui/common/FriendList.cpp \
|
||||
gui/common/FriendSelectionWidget.cpp \
|
||||
gui/common/HashBox.cpp \
|
||||
gui/common/LineEditClear.cpp \
|
||||
gui/common/LinkTextBrowser.cpp \
|
||||
gui/style/RSStyle.cpp \
|
||||
gui/style/StyleDialog.cpp \
|
||||
|
@ -158,8 +158,7 @@ ForumsDialog::ForumsDialog(QWidget *parent)
|
||||
|
||||
connect(ui.downloadButton, SIGNAL(clicked()), this, SLOT(downloadAllFiles()));
|
||||
|
||||
connect(ui.clearButton, SIGNAL(clicked()), this, SLOT(clearFilter()));
|
||||
connect(ui.filterPatternLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterRegExpChanged()));
|
||||
connect(ui.filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterItems(QString)));
|
||||
connect(ui.filterColumnComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(filterColumnChanged()));
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(forumMsgReadSatusChanged(QString,QString,int)), this, SLOT(forumMsgReadSatusChanged(QString,QString,int)));
|
||||
@ -201,8 +200,6 @@ ForumsDialog::ForumsDialog(QWidget *parent)
|
||||
|
||||
lastViewType = -1;
|
||||
|
||||
ui.clearButton->hide();
|
||||
|
||||
// load settings
|
||||
processSettings(true);
|
||||
|
||||
@ -818,8 +815,8 @@ void ForumsDialog::fillThreadFinished()
|
||||
}
|
||||
thread->itemToExpand.clear();
|
||||
|
||||
if (ui.filterPatternLineEdit->text().isEmpty() == false) {
|
||||
FilterItems();
|
||||
if (ui.filterLineEdit->text().isEmpty() == false) {
|
||||
filterItems(ui.filterLineEdit->text());
|
||||
}
|
||||
|
||||
insertPost ();
|
||||
@ -1557,29 +1554,6 @@ void ForumsDialog::replytomessage()
|
||||
}
|
||||
}
|
||||
|
||||
void ForumsDialog::filterRegExpChanged()
|
||||
{
|
||||
// QRegExp regExp(ui.filterPatternLineEdit->text(), Qt::CaseInsensitive , QRegExp::FixedString);
|
||||
// proxyModel->setFilterRegExp(regExp);
|
||||
|
||||
QString text = ui.filterPatternLineEdit->text();
|
||||
|
||||
if (text.isEmpty()) {
|
||||
ui.clearButton->hide();
|
||||
} else {
|
||||
ui.clearButton->show();
|
||||
}
|
||||
|
||||
FilterItems();
|
||||
}
|
||||
|
||||
/* clear Filter */
|
||||
void ForumsDialog::clearFilter()
|
||||
{
|
||||
ui.filterPatternLineEdit->clear();
|
||||
ui.filterPatternLineEdit->setFocus();
|
||||
}
|
||||
|
||||
void ForumsDialog::changedViewBox()
|
||||
{
|
||||
if (m_bProcessSettings) {
|
||||
@ -1603,21 +1577,20 @@ void ForumsDialog::filterColumnChanged()
|
||||
// need content ... refill
|
||||
insertThreads();
|
||||
} else {
|
||||
FilterItems();
|
||||
filterItems(ui.filterLineEdit->text());
|
||||
}
|
||||
|
||||
// save index
|
||||
Settings->setValueToGroup("ForumsDialog", "filterColumn", filterColumn);
|
||||
}
|
||||
|
||||
void ForumsDialog::FilterItems()
|
||||
void ForumsDialog::filterItems(const QString& text)
|
||||
{
|
||||
QString sPattern = ui.filterPatternLineEdit->text();
|
||||
int filterColumn = FilterColumnFromComboBox(ui.filterColumnComboBox->currentIndex());
|
||||
|
||||
int nCount = ui.threadTreeWidget->topLevelItemCount ();
|
||||
for (int nIndex = 0; nIndex < nCount; nIndex++) {
|
||||
FilterItem(ui.threadTreeWidget->topLevelItem(nIndex), sPattern, filterColumn);
|
||||
filterItem(ui.threadTreeWidget->topLevelItem(nIndex), text, filterColumn);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1627,12 +1600,12 @@ void ForumsDialog::shareKey()
|
||||
shareUi.exec();
|
||||
}
|
||||
|
||||
bool ForumsDialog::FilterItem(QTreeWidgetItem *pItem, QString &sPattern, int filterColumn)
|
||||
bool ForumsDialog::filterItem(QTreeWidgetItem *pItem, const QString &text, int filterColumn)
|
||||
{
|
||||
bool bVisible = true;
|
||||
|
||||
if (sPattern.isEmpty() == false) {
|
||||
if (pItem->text(filterColumn).contains(sPattern, Qt::CaseInsensitive) == false) {
|
||||
if (text.isEmpty() == false) {
|
||||
if (pItem->text(filterColumn).contains(text, Qt::CaseInsensitive) == false) {
|
||||
bVisible = false;
|
||||
}
|
||||
}
|
||||
@ -1640,7 +1613,7 @@ bool ForumsDialog::FilterItem(QTreeWidgetItem *pItem, QString &sPattern, int fil
|
||||
int nVisibleChildCount = 0;
|
||||
int nCount = pItem->childCount();
|
||||
for (int nIndex = 0; nIndex < nCount; nIndex++) {
|
||||
if (FilterItem(pItem->child(nIndex), sPattern, filterColumn)) {
|
||||
if (filterItem(pItem->child(nIndex), text, filterColumn)) {
|
||||
nVisibleChildCount++;
|
||||
}
|
||||
}
|
||||
|
@ -97,8 +97,7 @@ private slots:
|
||||
void changedViewBox();
|
||||
|
||||
void filterColumnChanged();
|
||||
void filterRegExpChanged();
|
||||
void clearFilter();
|
||||
void filterItems(const QString &text);
|
||||
|
||||
void generateMassData();
|
||||
|
||||
@ -127,8 +126,7 @@ private:
|
||||
void processSettings(bool bLoad);
|
||||
void togglethreadview_internal();
|
||||
|
||||
void FilterItems();
|
||||
bool FilterItem(QTreeWidgetItem *pItem, QString &sPattern, int filterColumn);
|
||||
bool filterItem(QTreeWidgetItem *pItem, const QString &text, int filterColumn);
|
||||
|
||||
bool m_bProcessSettings;
|
||||
bool inMsgAsReadUnread;
|
||||
|
@ -1051,58 +1051,9 @@ border: 1px solid #CCCCCC;}</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="filterPatternLineEdit">
|
||||
<widget class="LineEditClear" name="filterLineEdit">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Search forums</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clearButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
border-image: url(:/images/closenormal.png)
|
||||
}
|
||||
|
||||
QPushButton:hover
|
||||
{
|
||||
border-image: url(:/images/closehover.png)
|
||||
}
|
||||
|
||||
QPushButton:pressed {
|
||||
border-image: url(:/images/closepressed.png)
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
<string>Search forums</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -1279,6 +1230,11 @@ border-image: url(:/images/closepressed.png)
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>LineEditClear</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>gui/common/LineEditClear.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>LinkTextBrowser</class>
|
||||
<extends>QTextBrowser</extends>
|
||||
|
@ -172,8 +172,7 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
||||
ui.actionIconOnly->setData(Qt::ToolButtonIconOnly);
|
||||
ui.actionTextUnderIcon->setData(Qt::ToolButtonTextUnderIcon);
|
||||
|
||||
connect(ui.clearButton, SIGNAL(clicked()), this, SLOT(clearFilter()));
|
||||
connect(ui.filterPatternLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterRegExpChanged()));
|
||||
connect(ui.filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterChanged(QString)));
|
||||
|
||||
connect(ui.filterColumnComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(filterColumnChanged()));
|
||||
|
||||
@ -258,13 +257,9 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
||||
//viewmenu->addAction(ui.actionTextUnderIcon);
|
||||
ui.viewtoolButton->setMenu(viewmenu);
|
||||
|
||||
ui.filterPatternLineEdit->setMinimumWidth(20);
|
||||
|
||||
//setting default filter by column as subject
|
||||
proxyModel->setFilterKeyColumn(FilterColumnFromComboBox(ui.filterColumnComboBox->currentIndex()));
|
||||
|
||||
ui.clearButton->hide();
|
||||
|
||||
// load settings
|
||||
processSettings(true);
|
||||
|
||||
@ -1568,21 +1563,10 @@ void MessagesDialog::buttonStyle()
|
||||
setToolbarButtonStyle((Qt::ToolButtonStyle) dynamic_cast<QAction*>(sender())->data().toInt());
|
||||
}
|
||||
|
||||
void MessagesDialog::filterRegExpChanged()
|
||||
void MessagesDialog::filterChanged(const QString& text)
|
||||
{
|
||||
QRegExp regExp(ui.filterPatternLineEdit->text(), Qt::CaseInsensitive , QRegExp::FixedString);
|
||||
QRegExp regExp(text, Qt::CaseInsensitive, QRegExp::FixedString);
|
||||
proxyModel->setFilterRegExp(regExp);
|
||||
|
||||
QString text = ui.filterPatternLineEdit->text();
|
||||
|
||||
if (text.isEmpty())
|
||||
{
|
||||
ui.clearButton->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.clearButton->show();
|
||||
}
|
||||
}
|
||||
|
||||
void MessagesDialog::filterColumnChanged()
|
||||
@ -1802,13 +1786,6 @@ void MessagesDialog::updateMessageSummaryList()
|
||||
}
|
||||
}
|
||||
|
||||
/** clear Filter **/
|
||||
void MessagesDialog::clearFilter()
|
||||
{
|
||||
ui.filterPatternLineEdit->clear();
|
||||
ui.filterPatternLineEdit->setFocus();
|
||||
}
|
||||
|
||||
void MessagesDialog::tagAboutToShow()
|
||||
{
|
||||
TagsMenu *menu = dynamic_cast<TagsMenu*>(ui.tagButton->menu());
|
||||
|
@ -77,10 +77,9 @@ private slots:
|
||||
|
||||
void buttonStyle();
|
||||
|
||||
void filterRegExpChanged();
|
||||
void filterChanged(const QString &text);
|
||||
void filterColumnChanged();
|
||||
|
||||
void clearFilter();
|
||||
void tagAboutToShow();
|
||||
void tagSet(int tagId, bool set);
|
||||
void tagRemoveAll();
|
||||
|
@ -900,47 +900,7 @@ border: 1px solid #CCCCCC;}</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="filterPatternLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clearButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
border-image: url(:/images/closenormal.png)
|
||||
}
|
||||
|
||||
QPushButton:hover
|
||||
{
|
||||
border-image: url(:/images/closehover.png)
|
||||
}
|
||||
|
||||
QPushButton:pressed {
|
||||
border-image: url(:/images/closepressed.png)
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="LineEditClear" name="filterLineEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
@ -1398,6 +1358,11 @@ padding: 4px;
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>LineEditClear</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>gui/common/LineEditClear.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>RSTabWidget</class>
|
||||
<extends>QTabWidget</extends>
|
||||
|
@ -112,10 +112,9 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WFlags flags)
|
||||
connect( ui.shareButton, SIGNAL(clicked()), SLOT(openShareManager()));
|
||||
connect( ui.addIMAccountButton, SIGNAL(clicked( bool ) ), this , SLOT( addFriend() ) );
|
||||
#endif // MINIMAL_RSGUI
|
||||
connect(ui.clearButton, SIGNAL(clicked()), this, SLOT(clearFilter()));
|
||||
|
||||
connect(ui.messagelineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(savestatusmessage()));
|
||||
connect(ui.filterPatternLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterRegExpChanged()));
|
||||
connect(ui.filterLineEdit, SIGNAL(textChanged(QString)), ui.friendList, SLOT(filterItems(QString)));
|
||||
|
||||
#ifndef MINIMAL_RSGUI
|
||||
connect(NotifyQt::getInstance(), SIGNAL(ownAvatarChanged()), this, SLOT(updateAvatar()));
|
||||
@ -185,8 +184,6 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WFlags flags)
|
||||
loadmystatusmessage();
|
||||
#endif // MINIMAL_RSGUI
|
||||
|
||||
ui.clearButton->hide();
|
||||
|
||||
/* Hide platform specific features */
|
||||
#ifdef Q_WS_WIN
|
||||
#endif
|
||||
@ -284,24 +281,3 @@ void MessengerWindow::updateOwnStatus(const QString &peer_id, int status)
|
||||
}
|
||||
|
||||
#endif // MINIMAL_RSGUI
|
||||
|
||||
/* clear Filter */
|
||||
void MessengerWindow::clearFilter()
|
||||
{
|
||||
ui.filterPatternLineEdit->clear();
|
||||
ui.filterPatternLineEdit->setFocus();
|
||||
}
|
||||
|
||||
void MessengerWindow::filterRegExpChanged()
|
||||
{
|
||||
|
||||
QString text = ui.filterPatternLineEdit->text();
|
||||
|
||||
if (text.isEmpty()) {
|
||||
ui.clearButton->hide();
|
||||
} else {
|
||||
ui.clearButton->show();
|
||||
}
|
||||
|
||||
ui.friendList->filterItems(text);
|
||||
}
|
||||
|
@ -65,11 +65,6 @@ private slots:
|
||||
void savestatusmessage();
|
||||
#endif // MINIMAL_RSGUI
|
||||
|
||||
void filterRegExpChanged();
|
||||
void clearFilter();
|
||||
|
||||
signals:
|
||||
|
||||
private:
|
||||
static MessengerWindow *_instance;
|
||||
|
||||
|
@ -275,54 +275,12 @@ subcontrol-position: bottom right;
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="filterPatternLineEdit">
|
||||
<widget class="LineEditClear" name="filterLineEdit">
|
||||
<property name="toolTip">
|
||||
<string>Search Friends</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clearButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
border-image: url(:/images/closenormal.png)
|
||||
}
|
||||
|
||||
QPushButton:hover
|
||||
{
|
||||
border-image: url(:/images/closehover.png)
|
||||
}
|
||||
|
||||
QPushButton:pressed {
|
||||
border-image: url(:/images/closepressed.png)
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
@ -381,6 +339,11 @@ stop:0 #FEFEFE, stop:1 #E8E8E8);
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>LineEditClear</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>gui/common/LineEditClear.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>AvatarWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
|
@ -90,9 +90,8 @@ NetworkDialog::NetworkDialog(QWidget *parent)
|
||||
connect( ui.unvalidGPGkeyWidget, SIGNAL( itemSelectionChanged()), ui.connecttreeWidget, SLOT( clearSelection() ) );
|
||||
connect( ui.unvalidGPGkeyWidget, SIGNAL( itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT( peerdetails () ) );
|
||||
|
||||
connect( ui.filterPatternLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterRegExpChanged()));
|
||||
connect( ui.filterLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterItems(QString)));
|
||||
connect( ui.filterColumnComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(filterColumnChanged()));
|
||||
connect( ui.clearButton, SIGNAL(clicked()), this, SLOT(clearFilter()));
|
||||
|
||||
connect( ui.showUnvalidKeys, SIGNAL(clicked()), this, SLOT(insertConnect()));
|
||||
|
||||
@ -182,8 +181,6 @@ NetworkDialog::NetworkDialog(QWidget *parent)
|
||||
updateNetworkStatus();
|
||||
loadtabsettings();
|
||||
|
||||
ui.clearButton->hide();
|
||||
|
||||
/* Hide platform specific features */
|
||||
#ifdef Q_WS_WIN
|
||||
|
||||
@ -564,8 +561,8 @@ void NetworkDialog::insertConnect()
|
||||
connectWidget->update(); /* update display */
|
||||
ui.unvalidGPGkeyWidget->update(); /* update display */
|
||||
|
||||
if (ui.filterPatternLineEdit->text().isEmpty() == false) {
|
||||
FilterItems();
|
||||
if (ui.filterLineEdit->text().isEmpty() == false) {
|
||||
filterItems(ui.filterLineEdit->text());
|
||||
}
|
||||
|
||||
}
|
||||
@ -841,72 +838,48 @@ void NetworkDialog::loadtabsettings()
|
||||
Settings->endGroup();
|
||||
}
|
||||
|
||||
/* clear Filter */
|
||||
void NetworkDialog::clearFilter()
|
||||
{
|
||||
ui.filterPatternLineEdit->clear();
|
||||
ui.filterPatternLineEdit->setFocus();
|
||||
}
|
||||
|
||||
void NetworkDialog::filterRegExpChanged()
|
||||
{
|
||||
|
||||
QString text = ui.filterPatternLineEdit->text();
|
||||
|
||||
if (text.isEmpty()) {
|
||||
ui.clearButton->hide();
|
||||
} else {
|
||||
ui.clearButton->show();
|
||||
}
|
||||
|
||||
FilterItems();
|
||||
}
|
||||
|
||||
void NetworkDialog::filterColumnChanged()
|
||||
{
|
||||
|
||||
FilterItems();
|
||||
|
||||
filterItems(ui.filterLineEdit->text());
|
||||
}
|
||||
|
||||
void NetworkDialog::FilterItems()
|
||||
void NetworkDialog::filterItems(const QString &text)
|
||||
{
|
||||
QString sPattern = ui.filterPatternLineEdit->text();
|
||||
int nFilterColumn = FilterColumnFromComboBox(ui.filterColumnComboBox->currentIndex());
|
||||
int filterColumn = FilterColumnFromComboBox(ui.filterColumnComboBox->currentIndex());
|
||||
|
||||
int nCount = ui.connecttreeWidget->topLevelItemCount ();
|
||||
for (int nIndex = 0; nIndex < nCount; nIndex++) {
|
||||
FilterItem(ui.connecttreeWidget->topLevelItem(nIndex), sPattern, nFilterColumn);
|
||||
int count = ui.connecttreeWidget->topLevelItemCount ();
|
||||
for (int index = 0; index < count; index++) {
|
||||
filterItem(ui.connecttreeWidget->topLevelItem(index), text, filterColumn);
|
||||
}
|
||||
nCount = ui.unvalidGPGkeyWidget->topLevelItemCount ();
|
||||
for (int nIndex = 0; nIndex < nCount; nIndex++) {
|
||||
FilterItem(ui.unvalidGPGkeyWidget->topLevelItem(nIndex), sPattern, nFilterColumn);
|
||||
count = ui.unvalidGPGkeyWidget->topLevelItemCount ();
|
||||
for (int nIndex = 0; nIndex < count; nIndex++) {
|
||||
filterItem(ui.unvalidGPGkeyWidget->topLevelItem(nIndex), text, filterColumn);
|
||||
}
|
||||
}
|
||||
|
||||
bool NetworkDialog::FilterItem(QTreeWidgetItem *pItem, QString &sPattern, int nFilterColumn)
|
||||
bool NetworkDialog::filterItem(QTreeWidgetItem *item, const QString &text, int filterColumn)
|
||||
{
|
||||
bool bVisible = true;
|
||||
bool visible = true;
|
||||
|
||||
if (sPattern.isEmpty() == false) {
|
||||
if (pItem->text(nFilterColumn).contains(sPattern, Qt::CaseInsensitive) == false) {
|
||||
bVisible = false;
|
||||
if (text.isEmpty() == false) {
|
||||
if (item->text(filterColumn).contains(text, Qt::CaseInsensitive) == false) {
|
||||
visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
int nVisibleChildCount = 0;
|
||||
int nCount = pItem->childCount();
|
||||
for (int nIndex = 0; nIndex < nCount; nIndex++) {
|
||||
if (FilterItem(pItem->child(nIndex), sPattern, nFilterColumn)) {
|
||||
nVisibleChildCount++;
|
||||
int visibleChildCount = 0;
|
||||
int count = item->childCount();
|
||||
for (int index = 0; index < count; index++) {
|
||||
if (filterItem(item->child(index), text, filterColumn)) {
|
||||
visibleChildCount++;
|
||||
}
|
||||
}
|
||||
|
||||
if (bVisible || nVisibleChildCount) {
|
||||
pItem->setHidden(false);
|
||||
if (visible || visibleChildCount) {
|
||||
item->setHidden(false);
|
||||
} else {
|
||||
pItem->setHidden(true);
|
||||
item->setHidden(true);
|
||||
}
|
||||
|
||||
return (bVisible || nVisibleChildCount);
|
||||
return (visible || visibleChildCount);
|
||||
}
|
||||
|
@ -80,8 +80,7 @@ private slots:
|
||||
void on_actionTabsTriangular_activated();
|
||||
|
||||
void filterColumnChanged();
|
||||
void filterRegExpChanged();
|
||||
void clearFilter();
|
||||
void filterItems(const QString &text);
|
||||
|
||||
private:
|
||||
QTreeWidgetItem *getCurrentNeighbour();
|
||||
@ -90,8 +89,7 @@ private:
|
||||
|
||||
class NetworkView *networkview;
|
||||
|
||||
void FilterItems();
|
||||
bool FilterItem(QTreeWidgetItem *pItem, QString &sPattern, int nFilterColumn);
|
||||
bool filterItem(QTreeWidgetItem *item, const QString &text, int filterColumn);
|
||||
|
||||
/** Qt Designer generated object */
|
||||
Ui::NetworkDialog ui;
|
||||
|
@ -171,7 +171,7 @@ border: 1px solid #CCCCCC;}</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>:/images/rs1.png</pixmap>
|
||||
<pixmap resource="images.qrc">:/images/rs1.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
@ -206,62 +206,17 @@ p, li { white-space: pre-wrap; }
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>:/images/find-16.png</pixmap>
|
||||
<pixmap resource="images.qrc">:/images/find-16.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="filterPatternLineEdit">
|
||||
<widget class="LineEditClear" name="filterLineEdit">
|
||||
<property name="toolTip">
|
||||
<string>Search Network</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clearButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Clear Filter</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
border-image: url(:/images/closenormal.png)
|
||||
}
|
||||
|
||||
QPushButton:hover
|
||||
{
|
||||
border-image: url(:/images/closehover.png)
|
||||
}
|
||||
|
||||
QPushButton:pressed {
|
||||
border-image: url(:/images/closepressed.png)
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
@ -323,7 +278,7 @@ subcontrol-position: bottom right;
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/looknfeel.png</normaloff>:/images/looknfeel.png</iconset>
|
||||
</property>
|
||||
<property name="default">
|
||||
@ -376,7 +331,7 @@ subcontrol-position: bottom right;
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>:/images/ledoff1.png</pixmap>
|
||||
<pixmap resource="images.qrc">:/images/ledoff1.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -409,7 +364,7 @@ subcontrol-position: bottom right;
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>:/images/ledoff1.png</pixmap>
|
||||
<pixmap resource="images.qrc">:/images/ledoff1.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -442,7 +397,7 @@ subcontrol-position: bottom right;
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>:/images/ledoff1.png</pixmap>
|
||||
<pixmap resource="images.qrc">:/images/ledoff1.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -570,7 +525,7 @@ subcontrol-position: bottom right;
|
||||
</action>
|
||||
<action name="actionAddFriend">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/user/add_user16.png</normaloff>:/images/user/add_user16.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -584,7 +539,7 @@ subcontrol-position: bottom right;
|
||||
</action>
|
||||
<action name="actionExportKey">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/exportpeers_16x16.png</normaloff>:/images/exportpeers_16x16.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -600,6 +555,15 @@ subcontrol-position: bottom right;
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>LineEditClear</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>gui/common/LineEditClear.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="images.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -96,7 +96,6 @@ SearchDialog::SearchDialog(QWidget *parent)
|
||||
|
||||
_queueIsAlreadyTakenCareOf = false ;
|
||||
ui.lineEdit->setFocus();
|
||||
ui.lineEdit->setToolTip(tr("Enter a keyword here (at least 3 char long)"));
|
||||
|
||||
/* initialise the filetypes mapping */
|
||||
if (!SearchDialog::initialised)
|
||||
@ -115,8 +114,6 @@ SearchDialog::SearchDialog(QWidget *parent)
|
||||
connect( ui.pushButtonsearch, SIGNAL( released ( void ) ), this, SLOT( searchKeywords( void ) ) );
|
||||
connect( ui.pushButtonDownload, SIGNAL( released ( void ) ), this, SLOT( download( void ) ) );
|
||||
connect( ui.cloaseallsearchresultsButton, SIGNAL(clicked()), this, SLOT(searchRemoveAll()));
|
||||
connect( ui.resetButton, SIGNAL(clicked()), this, SLOT(clearKeyword()));
|
||||
connect( ui.lineEdit, SIGNAL( textChanged(const QString &)), this, SLOT(togglereset()));
|
||||
|
||||
connect( ui.searchResultWidget, SIGNAL( itemDoubleClicked ( QTreeWidgetItem *, int)), this, SLOT(download()));
|
||||
|
||||
@ -125,9 +122,8 @@ SearchDialog::SearchDialog(QWidget *parent)
|
||||
|
||||
connect(ui.FileTypeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(selectSearchResults(int)));
|
||||
|
||||
connect( ui.filterPatternLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterRegExpChanged()));
|
||||
connect(ui.filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterItems(QString)));
|
||||
connect( ui.filterColumnComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(filterColumnChanged()));
|
||||
connect( ui.clearButton, SIGNAL(clicked()), this, SLOT(clearFilter()));
|
||||
|
||||
/* hide the Tree +/- */
|
||||
ui.searchResultWidget -> setRootIsDecorated( true );
|
||||
@ -175,9 +171,6 @@ SearchDialog::SearchDialog(QWidget *parent)
|
||||
|
||||
ui.searchResultWidget->sortItems(SR_NAME_COL, Qt::AscendingOrder);
|
||||
|
||||
ui.resetButton->hide();
|
||||
ui.clearButton->hide();
|
||||
|
||||
/* Set initial size the splitter */
|
||||
QList<int> sizes;
|
||||
sizes << 250 << width(); // Qt calculates the right sizes
|
||||
@ -487,13 +480,6 @@ void SearchDialog::searchRemoveAll()
|
||||
nextSearchId = 1;
|
||||
}
|
||||
|
||||
/** clear keywords and ComboBox **/
|
||||
void SearchDialog::clearKeyword()
|
||||
{
|
||||
ui.lineEdit->clear();
|
||||
ui.lineEdit->setFocus();
|
||||
}
|
||||
|
||||
void SearchDialog::copySearchLink()
|
||||
{
|
||||
/* get the current search id from the summary window */
|
||||
@ -870,8 +856,8 @@ void SearchDialog::insertDirectory(const std::string &txt, qulonglong searchId,
|
||||
}
|
||||
}
|
||||
|
||||
if (ui.filterPatternLineEdit->text().isEmpty() == false) {
|
||||
FilterItems();
|
||||
if (ui.filterLineEdit->text().isEmpty() == false) {
|
||||
filterItems(ui.filterLineEdit->text());
|
||||
}
|
||||
}
|
||||
|
||||
@ -924,8 +910,8 @@ void SearchDialog::insertDirectory(const std::string &txt, qulonglong searchId,
|
||||
|
||||
selectSearchResults();
|
||||
|
||||
if (ui.filterPatternLineEdit->text().isEmpty() == false) {
|
||||
FilterItems();
|
||||
if (ui.filterLineEdit->text().isEmpty() == false) {
|
||||
filterItems(ui.filterLineEdit->text());
|
||||
}
|
||||
// TODO: check for duplicate directories
|
||||
}
|
||||
@ -1147,8 +1133,8 @@ void SearchDialog::insertFile(const std::string& txt,qulonglong searchId, const
|
||||
/* select this search result */
|
||||
selectSearchResults();
|
||||
|
||||
if (ui.filterPatternLineEdit->text().isEmpty() == false) {
|
||||
FilterItems();
|
||||
if (ui.filterLineEdit->text().isEmpty() == false) {
|
||||
filterItems(ui.filterLineEdit->text());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1222,7 +1208,7 @@ void SearchDialog::selectSearchResults(int index)
|
||||
}
|
||||
}
|
||||
ui.searchResultWidget->update();
|
||||
ui.filterPatternLineEdit->clear();
|
||||
ui.filterLineEdit->clear();
|
||||
}
|
||||
|
||||
void SearchDialog::setIconAndType(QTreeWidgetItem *item, const QString& filename)
|
||||
@ -1282,21 +1268,6 @@ void SearchDialog::sendLinkTo( )
|
||||
/* window will destroy itself! */
|
||||
}
|
||||
|
||||
void SearchDialog::togglereset()
|
||||
{
|
||||
QString text = ui.lineEdit->text();
|
||||
|
||||
if (text.isEmpty())
|
||||
{
|
||||
ui.resetButton->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.resetButton->show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// not in use for the moment
|
||||
void SearchDialog::onComboIndexChanged(int index)
|
||||
{
|
||||
@ -1359,69 +1330,44 @@ void SearchDialog::onComboIndexChanged(int index)
|
||||
}
|
||||
}
|
||||
|
||||
/* clear Filter */
|
||||
void SearchDialog::clearFilter()
|
||||
{
|
||||
ui.filterPatternLineEdit->clear();
|
||||
ui.filterPatternLineEdit->setFocus();
|
||||
}
|
||||
|
||||
void SearchDialog::filterRegExpChanged()
|
||||
{
|
||||
|
||||
QString text = ui.filterPatternLineEdit->text();
|
||||
|
||||
if (text.isEmpty()) {
|
||||
ui.clearButton->hide();
|
||||
} else {
|
||||
ui.clearButton->show();
|
||||
}
|
||||
|
||||
FilterItems();
|
||||
}
|
||||
|
||||
void SearchDialog::filterColumnChanged()
|
||||
{
|
||||
|
||||
FilterItems();
|
||||
|
||||
filterItems(ui.filterLineEdit->text());
|
||||
}
|
||||
|
||||
void SearchDialog::FilterItems()
|
||||
void SearchDialog::filterItems(const QString &text)
|
||||
{
|
||||
QString sPattern = ui.filterPatternLineEdit->text();
|
||||
int nFilterColumn = FilterColumnFromComboBox(ui.filterColumnComboBox->currentIndex());
|
||||
int filterColumn = FilterColumnFromComboBox(ui.filterColumnComboBox->currentIndex());
|
||||
|
||||
int nCount = ui.searchResultWidget->topLevelItemCount ();
|
||||
for (int nIndex = 0; nIndex < nCount; nIndex++) {
|
||||
FilterItem(ui.searchResultWidget->topLevelItem(nIndex), sPattern, nFilterColumn);
|
||||
int count = ui.searchResultWidget->topLevelItemCount ();
|
||||
for (int index = 0; index < count; index++) {
|
||||
filterItem(ui.searchResultWidget->topLevelItem(index), text, filterColumn);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool SearchDialog::FilterItem(QTreeWidgetItem *pItem, QString &sPattern, int nFilterColumn)
|
||||
bool SearchDialog::filterItem(QTreeWidgetItem *item, const QString &text, int filterColumn)
|
||||
{
|
||||
bool bVisible = true;
|
||||
bool visible = true;
|
||||
|
||||
if (sPattern.isEmpty() == false) {
|
||||
if (pItem->text(nFilterColumn).contains(sPattern, Qt::CaseInsensitive) == false) {
|
||||
bVisible = false;
|
||||
if (text.isEmpty() == false) {
|
||||
if (item->text(filterColumn).contains(text, Qt::CaseInsensitive) == false) {
|
||||
visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
int nVisibleChildCount = 0;
|
||||
int nCount = pItem->childCount();
|
||||
for (int nIndex = 0; nIndex < nCount; nIndex++) {
|
||||
if (FilterItem(pItem->child(nIndex), sPattern, nFilterColumn)) {
|
||||
nVisibleChildCount++;
|
||||
int visibleChildCount = 0;
|
||||
int count = item->childCount();
|
||||
for (int index = 0; index < count; index++) {
|
||||
if (filterItem(item->child(index), text, filterColumn)) {
|
||||
visibleChildCount++;
|
||||
}
|
||||
}
|
||||
|
||||
if (bVisible || nVisibleChildCount) {
|
||||
pItem->setHidden(false);
|
||||
if (visible || visibleChildCount) {
|
||||
item->setHidden(false);
|
||||
} else {
|
||||
pItem->setHidden(true);
|
||||
item->setHidden(true);
|
||||
}
|
||||
|
||||
return (bVisible || nVisibleChildCount);
|
||||
return (visible || visibleChildCount);
|
||||
}
|
||||
|
@ -81,19 +81,12 @@ private slots:
|
||||
|
||||
void selectSearchResults(int index = -1);
|
||||
|
||||
void clearKeyword();
|
||||
|
||||
void sendLinkTo();
|
||||
|
||||
void togglereset();
|
||||
|
||||
void onComboIndexChanged(int index);
|
||||
|
||||
void filterColumnChanged();
|
||||
void filterRegExpChanged();
|
||||
void clearFilter();
|
||||
|
||||
|
||||
void filterItems(const QString &text);
|
||||
|
||||
private:
|
||||
/** render the results to the tree widget display */
|
||||
@ -106,8 +99,6 @@ private:
|
||||
void downloadDirectory(const QTreeWidgetItem *item, const QString &base);
|
||||
void getSourceFriendsForHash(const std::string& hash,std::list<std::string>& srcIds);
|
||||
|
||||
|
||||
|
||||
/** the advanced search dialog instance */
|
||||
AdvancedSearchDialog * advSearchDialog;
|
||||
|
||||
@ -129,8 +120,7 @@ private:
|
||||
|
||||
void processSettings(bool bLoad);
|
||||
|
||||
void FilterItems();
|
||||
bool FilterItem(QTreeWidgetItem *pItem, QString &sPattern, int nFilterColumn);
|
||||
bool filterItem(QTreeWidgetItem *item, const QString &text, int filterColumn);
|
||||
|
||||
bool m_bProcessSettings;
|
||||
|
||||
|
@ -726,7 +726,7 @@ background: white;}</string>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<widget class="LineEditClear" name="lineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>3</horstretch>
|
||||
@ -739,14 +739,8 @@ background: white;}</string>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>1677777</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Enter a Keyword here</string>
|
||||
<string>Enter a keyword here (at least 3 char long)</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLineEdit#lineEdit{background: transparent;
|
||||
@ -755,46 +749,6 @@ border: none;}
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="resetButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
border-image: url(:/images/closenormal.png)
|
||||
}
|
||||
|
||||
QPushButton:hover
|
||||
{
|
||||
border-image: url(:/images/closehover.png)
|
||||
}
|
||||
|
||||
QPushButton:pressed {
|
||||
border-image: url(:/images/closepressed.png)
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="sizePolicy">
|
||||
@ -1023,7 +977,7 @@ border-image: url(:/images/btn_26_pressed.png) 4;
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="filterPatternLineEdit">
|
||||
<widget class="LineEditClear" name="filterLineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
@ -1035,51 +989,6 @@ border-image: url(:/images/btn_26_pressed.png) 4;
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clearButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Clear Filter</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
border-image: url(:/images/closenormal.png)
|
||||
}
|
||||
|
||||
QPushButton:hover
|
||||
{
|
||||
border-image: url(:/images/closehover.png)
|
||||
}
|
||||
|
||||
QPushButton:pressed {
|
||||
border-image: url(:/images/closepressed.png)
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
@ -1433,6 +1342,11 @@ border: 2px solid #CCCCCC;}</string>
|
||||
<extends>QTreeWidget</extends>
|
||||
<header>gui/SearchTreeWidget.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>LineEditClear</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>gui/common/LineEditClear.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="images.qrc"/>
|
||||
|
@ -1806,12 +1806,12 @@ void FriendList::setBigName(bool bigName)
|
||||
/**
|
||||
* Hides all items that don't contain sPattern in the name column.
|
||||
*/
|
||||
void FriendList::filterItems(const QString &sPattern)
|
||||
void FriendList::filterItems(const QString &text)
|
||||
{
|
||||
filterText = sPattern;
|
||||
int nCount = ui->peerTreeWidget->topLevelItemCount();
|
||||
for (int nIndex = 0; nIndex < nCount; nIndex++) {
|
||||
FriendList::filterItem(ui->peerTreeWidget->topLevelItem(nIndex), sPattern);
|
||||
filterText = text;
|
||||
int count = ui->peerTreeWidget->topLevelItemCount();
|
||||
for (int index = 0; index < count; index++) {
|
||||
FriendList::filterItem(ui->peerTreeWidget->topLevelItem(index), filterText);
|
||||
}
|
||||
|
||||
QTreeWidgetItem *c = getCurrentPeer();
|
||||
@ -1821,31 +1821,31 @@ void FriendList::filterItems(const QString &sPattern)
|
||||
}
|
||||
}
|
||||
|
||||
bool FriendList::filterItem(QTreeWidgetItem *pItem, const QString &sPattern)
|
||||
bool FriendList::filterItem(QTreeWidgetItem *item, const QString &text)
|
||||
{
|
||||
bool bVisible = true;
|
||||
bool visible = true;
|
||||
|
||||
if (sPattern.isEmpty() == false) {
|
||||
if (pItem->text(0).contains(sPattern, Qt::CaseInsensitive) == false) {
|
||||
bVisible = false;
|
||||
if (text.isEmpty() == false) {
|
||||
if (item->text(0).contains(text, Qt::CaseInsensitive) == false) {
|
||||
visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
int nVisibleChildCount = 0;
|
||||
int nCount = pItem->childCount();
|
||||
for (int nIndex = 0; nIndex < nCount; nIndex++) {
|
||||
if (FriendList::filterItem(pItem->child(nIndex), sPattern)) {
|
||||
nVisibleChildCount++;
|
||||
int visibleChildCount = 0;
|
||||
int count = item->childCount();
|
||||
for (int index = 0; index < count; index++) {
|
||||
if (FriendList::filterItem(item->child(index), text)) {
|
||||
visibleChildCount++;
|
||||
}
|
||||
}
|
||||
|
||||
if (bVisible || nVisibleChildCount) {
|
||||
pItem->setHidden(false);
|
||||
if (visible || visibleChildCount) {
|
||||
item->setHidden(false);
|
||||
} else {
|
||||
pItem->setHidden(true);
|
||||
item->setHidden(true);
|
||||
}
|
||||
|
||||
return (bVisible || nVisibleChildCount);
|
||||
return (visible || visibleChildCount);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
virtual void updateDisplay();
|
||||
|
||||
public slots:
|
||||
void filterItems(const QString &sPattern);
|
||||
void filterItems(const QString &text);
|
||||
|
||||
void setBigName(bool bigName); // show customStateString in second line of the name cell
|
||||
void setShowGroups(bool show);
|
||||
@ -89,7 +89,7 @@ private:
|
||||
std::set<std::string> *openPeers;
|
||||
|
||||
QTreeWidgetItem *getCurrentPeer() const;
|
||||
static bool filterItem(QTreeWidgetItem *pItem, const QString &sPattern);
|
||||
static bool filterItem(QTreeWidgetItem *item, const QString &text);
|
||||
void updateHeader();
|
||||
void initializeHeader(bool afterLoadSettings);
|
||||
void getSslIdsFromItem(QTreeWidgetItem *item, std::list<std::string> &sslIds);
|
||||
|
@ -85,8 +85,7 @@ FriendSelectionWidget::FriendSelectionWidget(QWidget *parent) :
|
||||
connect(ui->friendList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuRequested(QPoint)));
|
||||
connect(ui->friendList, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(itemDoubleClicked(QTreeWidgetItem*,int)));
|
||||
connect(ui->friendList, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(itemChanged(QTreeWidgetItem*,int)));
|
||||
connect(ui->filterEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterChanged()));
|
||||
connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clearFilter()));
|
||||
connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterItems(QString)));
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(groupsChanged(int)), this, SLOT(fillList()));
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(const QString&,int)), this, SLOT(peerStatusChanged(const QString&,int)));
|
||||
@ -94,8 +93,6 @@ FriendSelectionWidget::FriendSelectionWidget(QWidget *parent) :
|
||||
compareRole = new RSTreeWidgetItemCompareRole;
|
||||
compareRole->setRole(COLUMN_NAME, ROLE_SORT);
|
||||
|
||||
ui->clearButton->hide();
|
||||
|
||||
// sort list by name ascending
|
||||
ui->friendList->sortItems(COLUMN_NAME, Qt::AscendingOrder);
|
||||
}
|
||||
@ -285,8 +282,8 @@ void FriendSelectionWidget::fillList()
|
||||
}
|
||||
}
|
||||
|
||||
if (ui->filterEdit->text().isEmpty() == false) {
|
||||
filterItems();
|
||||
if (ui->filterLineEdit->text().isEmpty() == false) {
|
||||
filterItems(ui->filterLineEdit->text());
|
||||
}
|
||||
|
||||
ui->friendList->update(); /* update display */
|
||||
@ -384,26 +381,11 @@ void FriendSelectionWidget::itemChanged(QTreeWidgetItem *item, int column)
|
||||
inItemChanged = false;
|
||||
}
|
||||
|
||||
void FriendSelectionWidget::clearFilter()
|
||||
{
|
||||
ui->filterEdit->clear();
|
||||
ui->filterEdit->setFocus();
|
||||
}
|
||||
|
||||
void FriendSelectionWidget::filterChanged()
|
||||
{
|
||||
QString text = ui->filterEdit->text();
|
||||
|
||||
ui->clearButton->setVisible(!text.isEmpty());
|
||||
|
||||
filterItems();
|
||||
}
|
||||
|
||||
void FriendSelectionWidget::filterItems()
|
||||
void FriendSelectionWidget::filterItems(const QString& text)
|
||||
{
|
||||
int count = ui->friendList->topLevelItemCount();
|
||||
for (int index = 0; index < count; index++) {
|
||||
filterItem(ui->friendList->topLevelItem(index),ui->filterEdit->text());
|
||||
filterItem(ui->friendList->topLevelItem(index), text);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,14 +76,12 @@ signals:
|
||||
private slots:
|
||||
void fillList();
|
||||
void peerStatusChanged(const QString& peerId, int status);
|
||||
void filterChanged();
|
||||
void clearFilter();
|
||||
void filterItems(const QString &text);
|
||||
void contextMenuRequested(const QPoint &pos);
|
||||
void itemDoubleClicked(QTreeWidgetItem *item, int column);
|
||||
void itemChanged(QTreeWidgetItem *item, int column);
|
||||
|
||||
private:
|
||||
void filterItems();
|
||||
bool filterItem(QTreeWidgetItem *item, const QString &text);
|
||||
|
||||
void selectedIds(IdType idType, std::list<std::string> &ids, bool onlyDirectSelected);
|
||||
|
@ -33,57 +33,12 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLineEdit" name="filterEdit">
|
||||
<widget class="LineEditClear" name="filterLineEdit">
|
||||
<property name="toolTip">
|
||||
<string>Search Friends</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="clearButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
border-image: url(:/images/closenormal.png)
|
||||
}
|
||||
|
||||
QPushButton:hover
|
||||
{
|
||||
border-image: url(:/images/closehover.png)
|
||||
}
|
||||
|
||||
QPushButton:pressed {
|
||||
border-image: url(:/images/closepressed.png)
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
@ -118,6 +73,13 @@ border-image: url(:/images/closepressed.png)
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>LineEditClear</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>gui/common/LineEditClear.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -20,6 +20,7 @@
|
||||
****************************************************************/
|
||||
|
||||
#include <QMenu>
|
||||
#include <QPushButton>
|
||||
|
||||
#include "GroupTreeWidget.h"
|
||||
#include "ui_GroupTreeWidget.h"
|
||||
@ -62,8 +63,7 @@ GroupTreeWidget::GroupTreeWidget(QWidget *parent) :
|
||||
compareRole->setRole(COLUMN_DATA, ROLE_NAME);
|
||||
|
||||
/* Connect signals */
|
||||
connect(ui->clearFilter, SIGNAL(clicked()), this, SLOT(clearFilter()));
|
||||
connect(ui->filterText, SIGNAL(textChanged(const QString &)), this, SLOT(filterChanged()));
|
||||
connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterChanged()));
|
||||
connect(ui->filterCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(filterChanged()));
|
||||
|
||||
connect(ui->treeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(customContextMenuRequested(QPoint)));
|
||||
@ -83,9 +83,6 @@ GroupTreeWidget::GroupTreeWidget(QWidget *parent) :
|
||||
header->resizeSection(COLUMN_NAME, 170);
|
||||
header->setResizeMode(COLUMN_POPULARITY, QHeaderView::Fixed);
|
||||
header->resizeSection(COLUMN_POPULARITY, 25);
|
||||
|
||||
/* Initialize filter */
|
||||
ui->clearFilter->hide();
|
||||
}
|
||||
|
||||
GroupTreeWidget::~GroupTreeWidget()
|
||||
@ -239,6 +236,8 @@ void GroupTreeWidget::fillGroupItems(QTreeWidgetItem *categoryItem, const QList<
|
||||
return;
|
||||
}
|
||||
|
||||
QString filterText = ui->filterLineEdit->text();
|
||||
|
||||
/* Iterate all items */
|
||||
QList<GroupItemInfo>::const_iterator it;
|
||||
for (it = itemList.begin(); it != itemList.end(); it++) {
|
||||
@ -294,7 +293,7 @@ void GroupTreeWidget::fillGroupItems(QTreeWidgetItem *categoryItem, const QList<
|
||||
item->setForeground(COLUMN_NAME, brush);
|
||||
|
||||
/* Calculate score */
|
||||
calculateScore(item);
|
||||
calculateScore(item, filterText);
|
||||
}
|
||||
|
||||
/* Remove all items not in list */
|
||||
@ -377,11 +376,10 @@ QTreeWidgetItem *GroupTreeWidget::activateId(const QString &id, bool focus)
|
||||
return item;
|
||||
}
|
||||
|
||||
void GroupTreeWidget::calculateScore(QTreeWidgetItem *item)
|
||||
void GroupTreeWidget::calculateScore(QTreeWidgetItem *item, const QString &filterText)
|
||||
{
|
||||
if (item) {
|
||||
/* Calculate one item */
|
||||
QString filterText = ui->filterText->text();
|
||||
int score;
|
||||
if (filterText.isEmpty()) {
|
||||
score = 0;
|
||||
@ -422,34 +420,14 @@ void GroupTreeWidget::calculateScore(QTreeWidgetItem *item)
|
||||
continue;
|
||||
}
|
||||
|
||||
calculateScore(item);
|
||||
calculateScore(item, filterText);
|
||||
}
|
||||
}
|
||||
|
||||
void GroupTreeWidget::filterChanged()
|
||||
{
|
||||
if (ui->filterText->text().isEmpty()) {
|
||||
clearFilter();
|
||||
return;
|
||||
}
|
||||
|
||||
ui->clearFilter->setEnabled(true);
|
||||
ui->clearFilter->show();
|
||||
|
||||
/* Recalculate score */
|
||||
calculateScore(NULL);
|
||||
|
||||
resort(NULL);
|
||||
}
|
||||
|
||||
void GroupTreeWidget::clearFilter()
|
||||
{
|
||||
ui->filterText->clear();
|
||||
ui->clearFilter->hide();
|
||||
ui->filterText->setFocus();
|
||||
|
||||
/* Recalculate score */
|
||||
calculateScore(NULL);
|
||||
calculateScore(NULL, ui->filterLineEdit->text());
|
||||
|
||||
resort(NULL);
|
||||
}
|
||||
@ -458,7 +436,7 @@ void GroupTreeWidget::resort(QTreeWidgetItem *categoryItem)
|
||||
{
|
||||
Qt::SortOrder order = (actionSortAscending == NULL || actionSortAscending->isChecked()) ? Qt::AscendingOrder : Qt::DescendingOrder;
|
||||
|
||||
if (ui->filterText->text().isEmpty() == false) {
|
||||
if (ui->filterLineEdit->text().isEmpty() == false) {
|
||||
compareRole->setRole(COLUMN_DATA, ROLE_SEARCH_SCORE);
|
||||
compareRole->addRole(COLUMN_DATA, ROLE_LASTPOST);
|
||||
} else if (actionSortByName && actionSortByName->isChecked()) {
|
||||
|
@ -90,12 +90,11 @@ private slots:
|
||||
void customContextMenuRequested(const QPoint &pos);
|
||||
void currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
|
||||
void filterChanged();
|
||||
void clearFilter();
|
||||
|
||||
void sort();
|
||||
|
||||
private:
|
||||
void calculateScore(QTreeWidgetItem *item);
|
||||
void calculateScore(QTreeWidgetItem *item, const QString &filterText);
|
||||
void resort(QTreeWidgetItem *categoryItem);
|
||||
|
||||
private:
|
||||
|
@ -94,36 +94,19 @@ border: 1px solid #CCCCCC;}
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLineEdit" name="filterText">
|
||||
<widget class="LineEditClear" name="filterLineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>3</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>1677777</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Enter a Keyword here</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLineEdit#searchLine{
|
||||
border: none;}
|
||||
</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<item row="0" column="2">
|
||||
<widget class="QComboBox" name="filterCombo">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@ -143,46 +126,6 @@ border: none;}
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="clearFilter">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
border-image: url(:/images/closenormal.png)
|
||||
}
|
||||
|
||||
QPushButton:hover
|
||||
{
|
||||
border-image: url(:/images/closehover.png)
|
||||
}
|
||||
|
||||
QPushButton:pressed {
|
||||
border-image: url(:/images/closepressed.png)
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -225,12 +168,6 @@ border-image: url(:/images/closepressed.png)
|
||||
<attribute name="headerStretchLastSection">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="headerVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="headerStretchLastSection">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">1</string>
|
||||
@ -240,6 +177,13 @@ border-image: url(:/images/closepressed.png)
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>LineEditClear</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>gui/common/LineEditClear.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
60
retroshare-gui/src/gui/common/LineEditClear.cpp
Normal file
60
retroshare-gui/src/gui/common/LineEditClear.cpp
Normal file
@ -0,0 +1,60 @@
|
||||
/****************************************************************
|
||||
*
|
||||
* RetroShare is distributed under the following license:
|
||||
*
|
||||
* Copyright (C) 2012, RetroShare Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
#include "LineEditClear.h"
|
||||
|
||||
#include <QToolButton>
|
||||
#include <QStyle>
|
||||
|
||||
LineEditClear::LineEditClear(QWidget *parent)
|
||||
: QLineEdit(parent)
|
||||
{
|
||||
clearButton = new QToolButton(this);
|
||||
clearButton->setFixedSize(16, 16);
|
||||
clearButton->setIconSize(QSize(16, 16));
|
||||
clearButton->setCursor(Qt::ArrowCursor);
|
||||
clearButton->setStyleSheet("QToolButton { border: none; padding: 0px; }"
|
||||
"QToolButton { border-image: url(:/images/closenormal.png) }"
|
||||
"QToolButton:hover { border-image: url(:/images/closehover.png) }"
|
||||
"QToolButton:pressed { border-image: url(:/images/closepressed.png) }");
|
||||
clearButton->hide();
|
||||
|
||||
connect(clearButton, SIGNAL(clicked()), this, SLOT(clear()));
|
||||
connect(this, SIGNAL(textChanged(const QString&)), this, SLOT(updateCloseButton(const QString&)));
|
||||
|
||||
int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
|
||||
setStyleSheet(QString("QLineEdit { padding-right: %1px; } ").arg(clearButton->sizeHint().width() + frameWidth + 1));
|
||||
QSize msz = minimumSizeHint();
|
||||
setMinimumSize(qMax(msz.width(), clearButton->sizeHint().height() + frameWidth * 2), qMax(msz.height(), clearButton->sizeHint().height() + frameWidth * 2));
|
||||
}
|
||||
|
||||
void LineEditClear::resizeEvent(QResizeEvent *)
|
||||
{
|
||||
QSize sz = clearButton->sizeHint();
|
||||
int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
|
||||
clearButton->move(rect().right() - frameWidth - sz.width() + 2, (rect().bottom() - sz.height()) / 2 + 2);
|
||||
}
|
||||
|
||||
void LineEditClear::updateCloseButton(const QString& text)
|
||||
{
|
||||
clearButton->setVisible(!text.isEmpty());
|
||||
}
|
47
retroshare-gui/src/gui/common/LineEditClear.h
Normal file
47
retroshare-gui/src/gui/common/LineEditClear.h
Normal file
@ -0,0 +1,47 @@
|
||||
/****************************************************************
|
||||
*
|
||||
* RetroShare is distributed under the following license:
|
||||
*
|
||||
* Copyright (C) 2012, RetroShare Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
#ifndef LINEEDITCLEAR_H
|
||||
#define LINEEDITCLEAR_H
|
||||
|
||||
#include <QLineEdit>
|
||||
|
||||
class QToolButton;
|
||||
|
||||
class LineEditClear : public QLineEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
LineEditClear(QWidget *parent = 0);
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *);
|
||||
|
||||
private slots:
|
||||
void updateCloseButton(const QString &text);
|
||||
|
||||
private:
|
||||
QToolButton *clearButton;
|
||||
};
|
||||
|
||||
#endif // LINEEDITCLEAR_H
|
@ -102,8 +102,7 @@ ImHistoryBrowser::ImHistoryBrowser(const std::string &peerId, QTextEdit *edit, Q
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(historyChanged(uint, int)), this, SLOT(historyChanged(uint, int)));
|
||||
|
||||
connect(ui.clearFilterButton, SIGNAL(clicked()), this, SLOT(clearFilter()));
|
||||
connect(ui.filterPatternLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterRegExpChanged()));
|
||||
connect(ui.filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterChanged(QString)));
|
||||
|
||||
connect(ui.copyButton, SIGNAL(clicked()), SLOT(copyMessage()));
|
||||
connect(ui.removeButton, SIGNAL(clicked()), SLOT(removeMessages()));
|
||||
@ -111,8 +110,6 @@ ImHistoryBrowser::ImHistoryBrowser(const std::string &peerId, QTextEdit *edit, Q
|
||||
connect(ui.listWidget, SIGNAL(itemSelectionChanged()), this, SLOT(itemSelectionChanged()));
|
||||
connect(ui.listWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(customContextMenuRequested(QPoint)));
|
||||
|
||||
ui.clearFilterButton->hide();
|
||||
|
||||
// embed smileys ?
|
||||
if (m_isPrivateChat) {
|
||||
embedSmileys = Settings->valueFromGroup("Chat", "Emoteicons_PrivatChat", true).toBool();
|
||||
@ -166,7 +163,7 @@ void ImHistoryBrowser::createThreadFinished()
|
||||
// clear list
|
||||
m_createThread->m_items.clear();
|
||||
|
||||
filterRegExpChanged();
|
||||
filterChanged(ui.filterLineEdit->text());
|
||||
|
||||
// dummy call for set buttons
|
||||
itemSelectionChanged();
|
||||
@ -217,7 +214,7 @@ void ImHistoryBrowser::historyAdd(HistoryMsg& msg)
|
||||
QListWidgetItem *itemWidget = createItem(msg);
|
||||
if (itemWidget) {
|
||||
ui.listWidget->addItem(itemWidget);
|
||||
filterItems(itemWidget);
|
||||
filterItems(ui.filterLineEdit->text(), itemWidget);
|
||||
}
|
||||
}
|
||||
|
||||
@ -290,29 +287,13 @@ QListWidgetItem *ImHistoryBrowser::createItem(HistoryMsg& msg)
|
||||
return itemWidget;
|
||||
}
|
||||
|
||||
void ImHistoryBrowser::filterRegExpChanged()
|
||||
void ImHistoryBrowser::filterChanged(const QString &text)
|
||||
{
|
||||
QString text = ui.filterPatternLineEdit->text();
|
||||
|
||||
if (text.isEmpty()) {
|
||||
ui.clearFilterButton->hide();
|
||||
} else {
|
||||
ui.clearFilterButton->show();
|
||||
}
|
||||
|
||||
filterItems();
|
||||
filterItems(text);
|
||||
}
|
||||
|
||||
void ImHistoryBrowser::clearFilter()
|
||||
void ImHistoryBrowser::filterItems(const QString &text, QListWidgetItem *item)
|
||||
{
|
||||
ui.filterPatternLineEdit->clear();
|
||||
ui.filterPatternLineEdit->setFocus();
|
||||
}
|
||||
|
||||
void ImHistoryBrowser::filterItems(QListWidgetItem *item)
|
||||
{
|
||||
QString text = ui.filterPatternLineEdit->text();
|
||||
|
||||
if (item == NULL) {
|
||||
int count = ui.listWidget->count();
|
||||
for (int i = 0; i < count; i++) {
|
||||
|
@ -56,8 +56,7 @@ private slots:
|
||||
|
||||
void historyChanged(uint msgId, int type);
|
||||
|
||||
void filterRegExpChanged();
|
||||
void clearFilter();
|
||||
void filterChanged(const QString& text);
|
||||
|
||||
void itemSelectionChanged();
|
||||
void customContextMenuRequested(QPoint pos);
|
||||
@ -73,7 +72,7 @@ private:
|
||||
|
||||
QListWidgetItem *createItem(HistoryMsg& msg);
|
||||
void fillItem(QListWidgetItem *itemWidget, HistoryMsg& msg);
|
||||
void filterItems(QListWidgetItem *item = NULL);
|
||||
void filterItems(const QString &text, QListWidgetItem *item = NULL);
|
||||
|
||||
void getSelectedItems(std::list<uint32_t> &items);
|
||||
|
||||
|
@ -134,44 +134,7 @@ border: 1px solid #CCCCCC;}</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="filterPatternLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clearFilterButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
border-image: url(:/images/closenormal.png)
|
||||
}
|
||||
|
||||
QPushButton:hover
|
||||
{
|
||||
border-image: url(:/images/closehover.png)
|
||||
}
|
||||
|
||||
QPushButton:pressed {
|
||||
border-image: url(:/images/closepressed.png)
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="LineEditClear" name="filterLineEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
@ -300,6 +263,13 @@ border-image: url(:/images/closepressed.png)
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>LineEditClear</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>gui/common/LineEditClear.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
</resources>
|
||||
|
@ -42,11 +42,9 @@ SoundPage::SoundPage(QWidget * parent, Qt::WFlags flags)
|
||||
|
||||
connect(ui.eventTreeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), this, SLOT(eventChanged(QTreeWidgetItem*, QTreeWidgetItem*)));
|
||||
connect(ui.filenameEdit, SIGNAL(textChanged(QString)), this, SLOT(filenameChanged(QString)));
|
||||
connect(ui.clearButton, SIGNAL(clicked()), this, SLOT(clearButtonClicked()));
|
||||
connect(ui.browseButton, SIGNAL(clicked()), this, SLOT(browseButtonClicked()));
|
||||
connect(ui.playButton, SIGNAL(clicked()), this, SLOT(playButtonClicked()));
|
||||
|
||||
ui.clearButton->hide();
|
||||
ui.eventTreeWidget->setColumnCount(COLUMN_COUNT);
|
||||
|
||||
QTreeWidgetItem *headerItem = ui.eventTreeWidget->headerItem();
|
||||
@ -147,7 +145,6 @@ void SoundPage::eventChanged(QTreeWidgetItem *current, QTreeWidgetItem */*previo
|
||||
void SoundPage::filenameChanged(QString filename)
|
||||
{
|
||||
ui.playButton->setEnabled(!filename.isEmpty());
|
||||
ui.clearButton->setVisible(!filename.isEmpty());
|
||||
|
||||
QTreeWidgetItem *item = ui.eventTreeWidget->currentItem();
|
||||
if (item) {
|
||||
@ -155,11 +152,6 @@ void SoundPage::filenameChanged(QString filename)
|
||||
}
|
||||
}
|
||||
|
||||
void SoundPage::clearButtonClicked()
|
||||
{
|
||||
ui.filenameEdit->clear();
|
||||
}
|
||||
|
||||
void SoundPage::browseButtonClicked()
|
||||
{
|
||||
QString filename;
|
||||
|
@ -49,7 +49,6 @@ public:
|
||||
private slots:
|
||||
void eventChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
|
||||
void filenameChanged(QString filename);
|
||||
void clearButtonClicked();
|
||||
void browseButtonClicked();
|
||||
void playButtonClicked();
|
||||
|
||||
|
@ -517,56 +517,7 @@
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="filenameEdit">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clearButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
border-image: url(:/images/closenormal.png)
|
||||
}
|
||||
|
||||
QPushButton:hover
|
||||
{
|
||||
border-image: url(:/images/closehover.png)
|
||||
}
|
||||
|
||||
QPushButton:pressed {
|
||||
border-image: url(:/images/closepressed.png)
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="LineEditClear" name="filenameEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
@ -630,6 +581,13 @@ border-image: url(:/images/closepressed.png)
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>LineEditClear</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>gui/common/LineEditClear.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
</resources>
|
||||
|
Binary file not shown.
@ -4433,7 +4433,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>ForumsDialog</name>
|
||||
<message>
|
||||
<location filename="../gui/ForumsDialog.cpp" line="+294"/>
|
||||
<location filename="../gui/ForumsDialog.cpp" line="+291"/>
|
||||
<source>Subscribe to Forum</source>
|
||||
<translation>Forum abonnieren</translation>
|
||||
</message>
|
||||
@ -4545,7 +4545,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Du kannst einem anonymen Autor nicht antworten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-1359"/>
|
||||
<location line="-1357"/>
|
||||
<source>Your Forums</source>
|
||||
<translation>Deine Foren</translation>
|
||||
</message>
|
||||
@ -4583,12 +4583,12 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Thema:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+344"/>
|
||||
<location line="+295"/>
|
||||
<source>Start new Thread for Selected Forum</source>
|
||||
<translation>Starte ein neues Thema im ausgewählten Forum</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-574"/>
|
||||
<location line="-525"/>
|
||||
<source>Display</source>
|
||||
<translation>Anzeige</translation>
|
||||
</message>
|
||||
@ -4621,29 +4621,29 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<location line="+39"/>
|
||||
<location line="+306"/>
|
||||
<location line="+257"/>
|
||||
<source>Date</source>
|
||||
<translation>Datum</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-320"/>
|
||||
<location line="+325"/>
|
||||
<location line="-271"/>
|
||||
<location line="+276"/>
|
||||
<source>Title</source>
|
||||
<translation>Titel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-403"/>
|
||||
<location line="-354"/>
|
||||
<source>Forum:</source>
|
||||
<translation>Forum:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+97"/>
|
||||
<location line="+311"/>
|
||||
<location line="+262"/>
|
||||
<source>Author</source>
|
||||
<translation>Autor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-306"/>
|
||||
<location line="-257"/>
|
||||
<source>Signed</source>
|
||||
<translation>Unterzeichnet</translation>
|
||||
</message>
|
||||
@ -4680,7 +4680,12 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Nächste ungelesene</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+154"/>
|
||||
<location line="+49"/>
|
||||
<source>Search forums</source>
|
||||
<translation>Suche Foren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+56"/>
|
||||
<source>Reply Message</source>
|
||||
<translation>Auf Beitrag antworten</translation>
|
||||
</message>
|
||||
@ -4690,12 +4695,12 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Lade</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-568"/>
|
||||
<location line="-519"/>
|
||||
<source>Create Forum</source>
|
||||
<translation>Forum erstellen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+614"/>
|
||||
<location line="+565"/>
|
||||
<source>Print</source>
|
||||
<translation>Drucken</translation>
|
||||
</message>
|
||||
@ -4705,31 +4710,29 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Druckvorschau</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/ForumsDialog.cpp" line="+151"/>
|
||||
<location filename="../gui/ForumsDialog.cpp" line="+149"/>
|
||||
<location line="+1129"/>
|
||||
<source>Start New Thread</source>
|
||||
<translation>Erstelle neues Thema</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/ForumsDialog.ui" line="-221"/>
|
||||
<source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Search forums</span></p></body></html></source>
|
||||
<translation><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<translation type="obsolete"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Suche Foren</span></p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+31"/>
|
||||
<source>Reset</source>
|
||||
<translation>Zurücksetzen</translation>
|
||||
<translation type="obsolete">Zurücksetzen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+57"/>
|
||||
<location filename="../gui/ForumsDialog.ui" line="-133"/>
|
||||
<source>Content</source>
|
||||
<translation>Inhalt</translation>
|
||||
</message>
|
||||
@ -4755,7 +4758,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>ForumsFillThread</name>
|
||||
<message>
|
||||
<location line="+1501"/>
|
||||
<location line="+1477"/>
|
||||
<location line="+114"/>
|
||||
<source>Anonymous</source>
|
||||
<translation>Anonym</translation>
|
||||
@ -5272,9 +5275,8 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Suche Freunde</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+27"/>
|
||||
<source>Reset</source>
|
||||
<translation>Zurücksetzen</translation>
|
||||
<translation type="obsolete">Zurücksetzen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -6622,12 +6624,12 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>GroupTreeWidget</name>
|
||||
<message>
|
||||
<location filename="../gui/common/GroupTreeWidget.ui" line="+117"/>
|
||||
<location filename="../gui/common/GroupTreeWidget.ui" line="+105"/>
|
||||
<source>Enter a Keyword here</source>
|
||||
<translation>Gib einen Suchbegriff ein</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+19"/>
|
||||
<location line="+14"/>
|
||||
<source>Title</source>
|
||||
<translation>Titel</translation>
|
||||
</message>
|
||||
@ -6637,12 +6639,11 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Beschreibung</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+23"/>
|
||||
<source>Reset</source>
|
||||
<translation>Zurücksetzen</translation>
|
||||
<translation type="obsolete">Zurücksetzen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/common/GroupTreeWidget.cpp" line="+173"/>
|
||||
<location filename="../gui/common/GroupTreeWidget.cpp" line="+170"/>
|
||||
<source>Sort by Name</source>
|
||||
<translation>Sortiere nach Name</translation>
|
||||
</message>
|
||||
@ -6657,7 +6658,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Sortiere nach letztem Beitrag</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+102"/>
|
||||
<location line="+104"/>
|
||||
<source>Private Key Available</source>
|
||||
<translation>Privater Schlüssel verfügbar</translation>
|
||||
</message>
|
||||
@ -7127,13 +7128,12 @@ p, li { white-space: pre-wrap; }
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt; color:#ffffff;">Nachrichtenverlauf</span></p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+66"/>
|
||||
<source>Reset</source>
|
||||
<translation>Zurücksetzen</translation>
|
||||
<translation type="obsolete">Zurücksetzen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+32"/>
|
||||
<location filename="../gui/im_history/ImHistoryBrowser.cpp" line="+383"/>
|
||||
<location line="+61"/>
|
||||
<location filename="../gui/im_history/ImHistoryBrowser.cpp" line="+364"/>
|
||||
<source>Copy</source>
|
||||
<translation>Kopieren</translation>
|
||||
</message>
|
||||
@ -8442,12 +8442,12 @@ p, li { white-space: pre-wrap; }
|
||||
<name>MessagesDialog</name>
|
||||
<message>
|
||||
<location filename="../gui/MessagesDialog.ui" line="+576"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="+615"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="+610"/>
|
||||
<source>New Message</source>
|
||||
<translation>Neue Nachricht</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+802"/>
|
||||
<location line="+762"/>
|
||||
<source>Reply to Message</source>
|
||||
<translation>Antworten nur an Absender</translation>
|
||||
</message>
|
||||
@ -8468,19 +8468,19 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/MessagesDialog.ui" line="-409"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-402"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-398"/>
|
||||
<source>Date</source>
|
||||
<translation>Datum</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-5"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-1"/>
|
||||
<location line="+735"/>
|
||||
<location line="+731"/>
|
||||
<source>From</source>
|
||||
<translation>Von</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-325"/>
|
||||
<location line="-285"/>
|
||||
<source>Reply</source>
|
||||
<translation>Antworten</translation>
|
||||
</message>
|
||||
@ -8535,27 +8535,26 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Anzeige</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+69"/>
|
||||
<source>Reset</source>
|
||||
<translation>Zurücksetzen</translation>
|
||||
<translation type="obsolete">Zurücksetzen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+31"/>
|
||||
<location line="+60"/>
|
||||
<source>Attachments</source>
|
||||
<translation>Anhänge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+175"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-63"/>
|
||||
<location line="+835"/>
|
||||
<location line="+824"/>
|
||||
<location line="+10"/>
|
||||
<source>Inbox</source>
|
||||
<translation>Posteingang</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+9"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-841"/>
|
||||
<location line="+854"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-830"/>
|
||||
<location line="+843"/>
|
||||
<location line="+8"/>
|
||||
<source>Outbox</source>
|
||||
<translation>Postausgang</translation>
|
||||
@ -8567,7 +8566,7 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<location line="+9"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-854"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-843"/>
|
||||
<source>Sent</source>
|
||||
<translation>Gesendet</translation>
|
||||
</message>
|
||||
@ -8620,12 +8619,12 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<location line="-410"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-686"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-682"/>
|
||||
<source>Subject</source>
|
||||
<translation>Betreff</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-140"/>
|
||||
<location line="-100"/>
|
||||
<source>Print</source>
|
||||
<translation>Drucken</translation>
|
||||
</message>
|
||||
@ -8635,7 +8634,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Gewählte Nachricht weiterleiten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+178"/>
|
||||
<location line="+174"/>
|
||||
<source>Starred</source>
|
||||
<translation>Gekennzeichnet</translation>
|
||||
</message>
|
||||
@ -8655,12 +8654,12 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Nachrichten entfernen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/MessagesDialog.ui" line="+577"/>
|
||||
<location filename="../gui/MessagesDialog.ui" line="+537"/>
|
||||
<source>Forward Message</source>
|
||||
<translation>Weiterleiten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-397"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-393"/>
|
||||
<source>Click to sort by attachments</source>
|
||||
<translation>Klicken, um nach Anhang zu sortieren</translation>
|
||||
</message>
|
||||
@ -8676,12 +8675,12 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<location line="+1"/>
|
||||
<location line="+727"/>
|
||||
<location line="+723"/>
|
||||
<source>Click to sort by from</source>
|
||||
<translation>Klicken, um nach Von zu sortieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-726"/>
|
||||
<location line="-722"/>
|
||||
<source>Click to sort by date</source>
|
||||
<translation>Klicken, um nach Datum zu sortieren</translation>
|
||||
</message>
|
||||
@ -8691,13 +8690,13 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Klicken, um nach Schlagwörter zu sortieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+728"/>
|
||||
<location line="+724"/>
|
||||
<source>Click to sort by to</source>
|
||||
<translation>Klicken, um nach Empfänger zu sortieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/MessagesDialog.ui" line="-9"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-685"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-681"/>
|
||||
<source>Reply to All</source>
|
||||
<translation>Allen antworten</translation>
|
||||
</message>
|
||||
@ -8717,14 +8716,14 @@ p, li { white-space: pre-wrap; }
|
||||
<location line="+11"/>
|
||||
<location line="+3"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-1"/>
|
||||
<location line="+88"/>
|
||||
<location line="+84"/>
|
||||
<source>Tags</source>
|
||||
<translation>Schlagwörter</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+172"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="+598"/>
|
||||
<location line="+881"/>
|
||||
<location line="+870"/>
|
||||
<location line="+5"/>
|
||||
<source>Trash</source>
|
||||
<translation>Papierkorb</translation>
|
||||
@ -8735,7 +8734,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Ordner</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-1204"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-1193"/>
|
||||
<source>Mark as read</source>
|
||||
<translation>Als gelesen markieren</translation>
|
||||
</message>
|
||||
@ -8761,28 +8760,28 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<location line="+245"/>
|
||||
<location line="+870"/>
|
||||
<location line="+859"/>
|
||||
<location line="+8"/>
|
||||
<source>Drafts</source>
|
||||
<translation>Entwürfe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-820"/>
|
||||
<location line="-809"/>
|
||||
<source>To</source>
|
||||
<translation>An</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-726"/>
|
||||
<location line="-722"/>
|
||||
<source>Click to sort by star</source>
|
||||
<translation>Klicken, um nach Kennzeichnung zu sortieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+701"/>
|
||||
<location line="+697"/>
|
||||
<source>No starred messages available. Stars let you give messages a special status to make them easier to find. To star a message, click on the light grey star beside any message.</source>
|
||||
<translation>Es sind keine gekennzeichneten Nachrichten vorhanden. Durch die Kennzeichnung kannst du Nachrichten mit einem speziellen Status versehen, sodass sie leichter zu finden sind. Klicke zum Kennzeichnen einer Nachricht auf den hellgrauen Stern neben der jeweiligen Nachricht.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+765"/>
|
||||
<location line="+754"/>
|
||||
<location line="+4"/>
|
||||
<location line="+4"/>
|
||||
<location line="+4"/>
|
||||
@ -8889,9 +8888,8 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="obsolete">Verstecke offline Freunde</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+24"/>
|
||||
<source>Reset</source>
|
||||
<translation>Zurücksetzen</translation>
|
||||
<translation type="obsolete">Zurücksetzen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sort by State</source>
|
||||
@ -8902,7 +8900,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="obsolete">Freund weiterempfehlen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-290"/>
|
||||
<location line="-266"/>
|
||||
<source>RetroShare Messenger</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
@ -9051,7 +9049,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>NetworkDialog</name>
|
||||
<message>
|
||||
<location filename="../gui/NetworkDialog.cpp" line="+461"/>
|
||||
<location filename="../gui/NetworkDialog.cpp" line="+458"/>
|
||||
<source>Personal signature</source>
|
||||
<translation>Persönliche Unterschrift</translation>
|
||||
</message>
|
||||
@ -9089,40 +9087,39 @@ Rechtsklick und als Freund hinzufügen um zu verbinden.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/NetworkDialog.ui" line="+114"/>
|
||||
<location line="+171"/>
|
||||
<location line="+126"/>
|
||||
<location line="+226"/>
|
||||
<source>Name</source>
|
||||
<translation>Name</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-392"/>
|
||||
<location line="+397"/>
|
||||
<location line="-347"/>
|
||||
<location line="+352"/>
|
||||
<source>Did I authenticated peer</source>
|
||||
<translation>Habe ich den Peer authentifiziert</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-394"/>
|
||||
<location line="-349"/>
|
||||
<source>Did I sign his gpg key</source>
|
||||
<translation>Habe ich seinen GPG Schlüssel unterzeichnet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+10"/>
|
||||
<location line="+394"/>
|
||||
<location line="+349"/>
|
||||
<source>Cert Id</source>
|
||||
<translation>ID des Zertifikates</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-310"/>
|
||||
<location line="-265"/>
|
||||
<source>Search Network</source>
|
||||
<translation>Netzwerksuche</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+27"/>
|
||||
<source>Clear Filter</source>
|
||||
<translation>Filter leeren</translation>
|
||||
<translation type="obsolete">Filter leeren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+65"/>
|
||||
<location line="+47"/>
|
||||
<source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
@ -9175,13 +9172,13 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Erstelle ein neues Profil</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-563"/>
|
||||
<location line="-518"/>
|
||||
<source>Network</source>
|
||||
<translation>Netzwerk</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+91"/>
|
||||
<location line="+394"/>
|
||||
<location line="+349"/>
|
||||
<source>Did peer authenticated me</source>
|
||||
<translation>Hat mich der Peer authentifiziert</translation>
|
||||
</message>
|
||||
@ -9231,7 +9228,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Unbekannt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-326"/>
|
||||
<location line="-324"/>
|
||||
<source>Authentication matrix</source>
|
||||
<translation>Authentifizierungsmatrix</translation>
|
||||
</message>
|
||||
@ -9241,7 +9238,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Netzwerk Ansicht</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+402"/>
|
||||
<location line="+400"/>
|
||||
<source>yourself</source>
|
||||
<translation>selbst</translation>
|
||||
</message>
|
||||
@ -9281,7 +9278,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Setze Tabs Form Dreieck</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-378"/>
|
||||
<location line="-333"/>
|
||||
<source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
@ -9294,7 +9291,7 @@ p, li { white-space: pre-wrap; }
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Netzwerk</span></p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+100"/>
|
||||
<location line="+55"/>
|
||||
<source>Peer ID</source>
|
||||
<translation>Peer ID</translation>
|
||||
</message>
|
||||
@ -11592,12 +11589,12 @@ p, li { white-space: pre-wrap; }
|
||||
<message>
|
||||
<location line="+12"/>
|
||||
<source>Down</source>
|
||||
<translation type="unfinished">Runter</translation>
|
||||
<translation>Runter</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+0"/>
|
||||
<source>Up</source>
|
||||
<translation type="unfinished">Hoch</translation>
|
||||
<translation>Hoch</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><strong>Down:</strong></source>
|
||||
@ -11933,28 +11930,28 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>SearchDialog</name>
|
||||
<message>
|
||||
<location filename="../gui/SearchDialog.ui" line="+1161"/>
|
||||
<location filename="../gui/SearchDialog.ui" line="+1070"/>
|
||||
<source>Sources</source>
|
||||
<translation>Quellen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-170"/>
|
||||
<location line="-125"/>
|
||||
<source>Results</source>
|
||||
<translation>Ergebnisse</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+319"/>
|
||||
<location filename="../gui/SearchDialog.cpp" line="+285"/>
|
||||
<location line="+274"/>
|
||||
<location filename="../gui/SearchDialog.cpp" line="+278"/>
|
||||
<source>Download</source>
|
||||
<translation>Herunterladen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/SearchDialog.cpp" line="-186"/>
|
||||
<location line="-476"/>
|
||||
<source>Enter a keyword here (at least 3 char long)</source>
|
||||
<translation>Gib einen Suchbegriff ein (min. 3 Zeichen)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+188"/>
|
||||
<location filename="../gui/SearchDialog.cpp" line="+2"/>
|
||||
<location line="+144"/>
|
||||
<source>Copy RetroShare Link</source>
|
||||
<translation>Kopiere RetroShare Link</translation>
|
||||
@ -11980,7 +11977,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Alle entfernen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+397"/>
|
||||
<location line="+390"/>
|
||||
<location line="+68"/>
|
||||
<source>Folder</source>
|
||||
<translation>Ordner</translation>
|
||||
@ -11991,7 +11988,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Neu(e) RetroShare Link(s)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/SearchDialog.ui" line="-718"/>
|
||||
<location filename="../gui/SearchDialog.ui" line="-151"/>
|
||||
<source>Any</source>
|
||||
<translation>Alle</translation>
|
||||
</message>
|
||||
@ -12006,17 +12003,16 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Video</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+94"/>
|
||||
<source>Enter a Keyword here</source>
|
||||
<translation>Gib einen Suchbegriff ein</translation>
|
||||
<translation type="obsolete">Gib einen Suchbegriff ein</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+285"/>
|
||||
<location line="+333"/>
|
||||
<source>Filter Search Result</source>
|
||||
<translation>Filter Suchergebnis</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+117"/>
|
||||
<location line="+72"/>
|
||||
<source>Filename</source>
|
||||
<translation>Dateiname</translation>
|
||||
</message>
|
||||
@ -12031,7 +12027,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Prüfsumme</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-190"/>
|
||||
<location line="-145"/>
|
||||
<source>KeyWords</source>
|
||||
<translation>Schlüsselwörter</translation>
|
||||
</message>
|
||||
@ -12041,7 +12037,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Such ID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/SearchDialog.cpp" line="-931"/>
|
||||
<location filename="../gui/SearchDialog.cpp" line="-924"/>
|
||||
<source>Download Notice</source>
|
||||
<translation>Download</translation>
|
||||
</message>
|
||||
@ -12063,7 +12059,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Diese Funktion ist noch nicht eingebaut.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/SearchDialog.ui" line="+160"/>
|
||||
<location filename="../gui/SearchDialog.ui" line="+115"/>
|
||||
<source>Size</source>
|
||||
<translation>Größe</translation>
|
||||
</message>
|
||||
@ -12073,7 +12069,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Typ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-565"/>
|
||||
<location line="-474"/>
|
||||
<source>Archive</source>
|
||||
<translation>Archiv</translation>
|
||||
</message>
|
||||
@ -12103,7 +12099,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Ordner</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+182"/>
|
||||
<location line="+136"/>
|
||||
<source>Start Search</source>
|
||||
<translation>Starte Suche</translation>
|
||||
</message>
|
||||
@ -12113,12 +12109,11 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Suchen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+192"/>
|
||||
<source>Clear Filter</source>
|
||||
<translation>Filter leeren</translation>
|
||||
<translation type="obsolete">Filter leeren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+51"/>
|
||||
<location line="+198"/>
|
||||
<source>File Name</source>
|
||||
<translation>Dateiname</translation>
|
||||
</message>
|
||||
@ -12175,12 +12170,11 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Begrenze Anzahl der Resultate auf :</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-613"/>
|
||||
<source>Reset</source>
|
||||
<translation>Zurücksetzen</translation>
|
||||
<translation type="obsolete">Zurücksetzen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+118"/>
|
||||
<location line="-450"/>
|
||||
<source>Advanced Search</source>
|
||||
<translation>Erweiterte Suche</translation>
|
||||
</message>
|
||||
@ -12190,7 +12184,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Erweitert</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+294"/>
|
||||
<location line="+249"/>
|
||||
<source>Close All Search Results</source>
|
||||
<translation>Schließe alle Suchergebnisse</translation>
|
||||
</message>
|
||||
@ -13088,7 +13082,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="obsolete">Soundereignisse</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/settings/SoundPage.cpp" line="+53"/>
|
||||
<location filename="../gui/settings/SoundPage.cpp" line="+51"/>
|
||||
<source>Event</source>
|
||||
<translation>Ereignis</translation>
|
||||
</message>
|
||||
@ -13103,7 +13097,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Online</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+50"/>
|
||||
<location line="+44"/>
|
||||
<source>Open File</source>
|
||||
<translation>Datei öffnen</translation>
|
||||
</message>
|
||||
@ -13124,7 +13118,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="obsolete">Eingehend</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-48"/>
|
||||
<location line="-42"/>
|
||||
<source>Chatmessage</source>
|
||||
<translation>Chatnachricht</translation>
|
||||
</message>
|
||||
@ -13146,12 +13140,11 @@ p, li { white-space: pre-wrap; }
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Suche Foren</span></p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/settings/SoundPage.ui" line="+549"/>
|
||||
<source>Reset</source>
|
||||
<translation>Zurücksetzen</translation>
|
||||
<translation type="obsolete">Zurücksetzen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+34"/>
|
||||
<location filename="../gui/settings/SoundPage.ui" line="+534"/>
|
||||
<source>Event:</source>
|
||||
<translation>Ereignis:</translation>
|
||||
</message>
|
||||
|
Loading…
Reference in New Issue
Block a user