mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Moved Search Filter to the top of the Selection Widget
Added a Filter ComboBox for Message Composer, to switch Show types. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7835 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
bec858b9d5
commit
3755d540b7
@ -14,6 +14,34 @@
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="filterLabel">
|
||||
<property name="text">
|
||||
<string>Search :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="LineEditClear" name="filterLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="selectAll_PB">
|
||||
<property name="text">
|
||||
<string>All</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="deselectAll_PB">
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTreeWidget" name="friendList">
|
||||
<property name="minimumSize">
|
||||
@ -44,34 +72,6 @@
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="filterLabel">
|
||||
<property name="text">
|
||||
<string>Search :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="LineEditClear" name="filterLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="selectAll_PB">
|
||||
<property name="text">
|
||||
<string>All</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="deselectAll_PB">
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
|
@ -195,10 +195,8 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WindowFlags flags)
|
||||
connect(ui.msgText, SIGNAL(copyAvailable(bool)), actionCopy, SLOT(setEnabled(bool)));
|
||||
|
||||
connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(clipboardDataChanged()));
|
||||
|
||||
connect(ui.onlyTrustedKeys, SIGNAL(clicked(bool)), this, SLOT(toggleShowNonFriend(bool)));
|
||||
ui.onlyTrustedKeys->setMinimumWidth(20);
|
||||
ui.onlyTrustedKeys->setChecked(Settings->valueFromGroup("MessageComposer", "ShowOnlyTrustedKeys",false).toBool());
|
||||
|
||||
connect(ui.filterComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(filterComboBoxChanged(int)));
|
||||
|
||||
connect(ui.addToButton, SIGNAL(clicked(void)), this, SLOT(addTo()));
|
||||
connect(ui.addCcButton, SIGNAL(clicked(void)), this, SLOT(addCc()));
|
||||
@ -218,7 +216,7 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WindowFlags flags)
|
||||
ui.friendSelectionWidget->setModus(FriendSelectionWidget::MODUS_MULTI);
|
||||
ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GROUP
|
||||
| FriendSelectionWidget::SHOW_SSL
|
||||
| (ui.onlyTrustedKeys->isChecked() ? FriendSelectionWidget::SHOW_NONE : FriendSelectionWidget::SHOW_GXS));
|
||||
| FriendSelectionWidget::SHOW_GXS);
|
||||
ui.friendSelectionWidget->start();
|
||||
|
||||
QActionGroup *grp = new QActionGroup(this);
|
||||
@ -240,15 +238,12 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WindowFlags flags)
|
||||
setupFormatActions();
|
||||
|
||||
ui.respond_to_CB->setFlags(IDCHOOSER_ID_REQUIRED) ;
|
||||
|
||||
/*ui.comboStyle->addItem("Standard");
|
||||
ui.comboStyle->addItem("Bullet List (Disc)");
|
||||
ui.comboStyle->addItem("Bullet List (Circle)");
|
||||
ui.comboStyle->addItem("Bullet List (Square)");
|
||||
ui.comboStyle->addItem("Ordered List (Decimal)");
|
||||
ui.comboStyle->addItem("Ordered List (Alpha lower)");
|
||||
ui.comboStyle->addItem("Ordered List (Alpha upper)");*/
|
||||
//connect(ui.comboStyle, SIGNAL(activated(int)),this, SLOT(textStyle(int)));
|
||||
|
||||
/* Add filter types */
|
||||
ui.filterComboBox->addItem(tr("All"));
|
||||
ui.filterComboBox->addItem(tr("Friends"));
|
||||
ui.filterComboBox->addItem(tr("Friends of Friends"));
|
||||
ui.filterComboBox->setCurrentIndex(0);
|
||||
|
||||
connect(ui.comboStyle, SIGNAL(activated(int)),this, SLOT(changeFormatType(int)));
|
||||
connect(ui.comboFont, SIGNAL(activated(const QString &)), this, SLOT(textFamily(const QString &)));
|
||||
@ -257,7 +252,7 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WindowFlags flags)
|
||||
|
||||
QFontDatabase db;
|
||||
foreach(int size, db.standardSizes())
|
||||
ui.comboSize->addItem(QString::number(size));
|
||||
ui.comboSize->addItem(QString::number(size));
|
||||
|
||||
connect(ui.comboSize, SIGNAL(activated(const QString &)),this, SLOT(textSize(const QString &)));
|
||||
ui.comboSize->setCurrentIndex(ui.comboSize->findText(QString::number(QApplication::font().pointSize())));
|
||||
@ -350,6 +345,11 @@ void MessageComposer::processSettings(bool bLoad)
|
||||
// state of splitter
|
||||
ui.splitter->restoreState(Settings->value("Splitter").toByteArray());
|
||||
ui.splitter_2->restoreState(Settings->value("Splitter2").toByteArray());
|
||||
|
||||
// state of filter combobox
|
||||
int index = Settings->value("ShowType", 0).toInt();
|
||||
ui.filterComboBox->setCurrentIndex(index);
|
||||
|
||||
} else {
|
||||
// save settings
|
||||
|
||||
@ -359,6 +359,10 @@ void MessageComposer::processSettings(bool bLoad)
|
||||
// state of splitter
|
||||
Settings->setValue("Splitter", ui.splitter->saveState());
|
||||
Settings->setValue("Splitter2", ui.splitter_2->saveState());
|
||||
|
||||
// state of filter combobox
|
||||
Settings->setValue("ShowType", ui.filterComboBox->currentIndex());
|
||||
|
||||
}
|
||||
|
||||
Settings->endGroup();
|
||||
@ -2357,13 +2361,24 @@ void MessageComposer::addContact(enumType type)
|
||||
addRecipient(type, *idIt);
|
||||
}
|
||||
|
||||
void MessageComposer::toggleShowNonFriend(bool bValue)
|
||||
void MessageComposer::filterComboBoxChanged(int i)
|
||||
{
|
||||
ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GROUP
|
||||
switch(i)
|
||||
{
|
||||
case 0: ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GROUP
|
||||
| FriendSelectionWidget::SHOW_SSL
|
||||
| (bValue?FriendSelectionWidget::SHOW_NONE : FriendSelectionWidget::SHOW_GXS));
|
||||
| FriendSelectionWidget::SHOW_GXS) ;
|
||||
break ;
|
||||
|
||||
case 1: ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GROUP
|
||||
| FriendSelectionWidget::SHOW_SSL) ;
|
||||
break ;
|
||||
|
||||
case 2: ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GXS) ;
|
||||
break ;
|
||||
default: ;
|
||||
}
|
||||
|
||||
Settings->setValueToGroup("MessageComposer", "ShowOnlyTrustedKeys", bValue);
|
||||
}
|
||||
|
||||
void MessageComposer::addTo()
|
||||
|
@ -95,6 +95,7 @@ private slots:
|
||||
void buildCompleter();
|
||||
void updatecontactsviewicons();
|
||||
|
||||
void filterComboBoxChanged(int);
|
||||
|
||||
void fileNew();
|
||||
void fileOpen();
|
||||
@ -136,7 +137,6 @@ private slots:
|
||||
void titleChanged();
|
||||
|
||||
// Add to To/Cc/Bcc address fields
|
||||
void toggleShowNonFriend(bool bValue);
|
||||
void addTo();
|
||||
void addCc();
|
||||
void addBcc();
|
||||
|
@ -63,7 +63,7 @@
|
||||
<property name="margin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="FriendSelectionWidget" name="friendSelectionWidget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
@ -100,15 +100,8 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="3" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="onlyTrustedKeys">
|
||||
<property name="text">
|
||||
<string>Only show people you trusted</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
@ -175,6 +168,23 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Show:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="filterComboBox"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
Loading…
Reference in New Issue
Block a user