1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

Enabling sorting for Table/Tree Widgets everywhere.

This commit is contained in:
nowrep 2012-09-01 13:56:00 +02:00
parent b442492c27
commit 9f376ac14c
12 changed files with 36 additions and 1 deletions

View File

@ -68,6 +68,7 @@ BookmarksManager::BookmarksManager(QupZilla* mainClass, QWidget* parent)
connect(deleteAction, SIGNAL(activated()), this, SLOT(deleteItem())); connect(deleteAction, SIGNAL(activated()), this, SLOT(deleteItem()));
ui->bookmarksTree->setDefaultItemShowMode(TreeWidget::ItemsExpanded); ui->bookmarksTree->setDefaultItemShowMode(TreeWidget::ItemsExpanded);
ui->bookmarksTree->sortByColumn(-1);
} }
void BookmarksManager::importBookmarks() void BookmarksManager::importBookmarks()

View File

@ -22,6 +22,9 @@
<property name="alternatingRowColors"> <property name="alternatingRowColors">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<attribute name="headerDefaultSectionSize"> <attribute name="headerDefaultSectionSize">
<number>330</number> <number>330</number>
</attribute> </attribute>

View File

@ -38,6 +38,7 @@ SearchEnginesDialog::SearchEnginesDialog(QWidget* parent)
connect(ui->treeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), this, SLOT(editEngine())); connect(ui->treeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), this, SLOT(editEngine()));
ui->treeWidget->sortByColumn(-1);
reloadEngines(); reloadEngines();
} }

View File

@ -68,6 +68,9 @@
</item> </item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QTreeWidget" name="treeWidget"> <widget class="QTreeWidget" name="treeWidget">
<property name="sortingEnabled">
<bool>true</bool>
</property>
<attribute name="headerDefaultSectionSize"> <attribute name="headerDefaultSectionSize">
<number>200</number> <number>200</number>
</attribute> </attribute>

View File

@ -78,6 +78,9 @@ void AutoFillManager::loadPasswords()
item->setData(0, Qt::UserRole + 10, query.value(1).toString()); item->setData(0, Qt::UserRole + 10, query.value(1).toString());
ui->treeExcept->addTopLevelItem(item); ui->treeExcept->addTopLevelItem(item);
} }
ui->treePass->sortByColumn(-1);
ui->treeExcept->sortByColumn(-1);
} }
void AutoFillManager::showPasswords() void AutoFillManager::showPasswords()

View File

@ -32,6 +32,9 @@
<property name="indentation"> <property name="indentation">
<number>0</number> <number>0</number>
</property> </property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<attribute name="headerMinimumSectionSize"> <attribute name="headerMinimumSectionSize">
<number>100</number> <number>100</number>
</attribute> </attribute>
@ -143,6 +146,9 @@
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<item> <item>
<widget class="QTreeWidget" name="treeExcept"> <widget class="QTreeWidget" name="treeExcept">
<property name="sortingEnabled">
<bool>true</bool>
</property>
<column> <column>
<property name="text"> <property name="text">
<string>Server</string> <string>Server</string>

View File

@ -124,6 +124,9 @@
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" rowspan="3"> <item row="0" column="0" rowspan="3">
<widget class="QTreeWidget" name="whitelist"> <widget class="QTreeWidget" name="whitelist">
<property name="sortingEnabled">
<bool>true</bool>
</property>
<column> <column>
<property name="text"> <property name="text">
<string>Whitelist</string> <string>Whitelist</string>

View File

@ -56,6 +56,8 @@ PluginsManager::PluginsManager(QWidget* parent)
connect(ui->remove, SIGNAL(clicked()), this, SLOT(removeWhitelist())); connect(ui->remove, SIGNAL(clicked()), this, SLOT(removeWhitelist()));
connect(ui->allowClick2Flash, SIGNAL(clicked(bool)), this, SLOT(allowC2FChanged(bool))); connect(ui->allowClick2Flash, SIGNAL(clicked(bool)), this, SLOT(allowC2FChanged(bool)));
ui->whitelist->sortByColumn(-1);
settings.beginGroup("ClickToFlash"); settings.beginGroup("ClickToFlash");
QStringList whitelist = mApp->plugins()->c2f_getWhiteList(); QStringList whitelist = mApp->plugins()->c2f_getWhiteList();
ui->allowClick2Flash->setChecked(settings.value("Enable", true).toBool()); ui->allowClick2Flash->setChecked(settings.value("Enable", true).toBool());

View File

@ -60,9 +60,10 @@ UserAgentDialog::UserAgentDialog(QWidget* parent)
ui->table->insertRow(row); ui->table->insertRow(row);
ui->table->setItem(row, 0, siteItem); ui->table->setItem(row, 0, siteItem);
ui->table->setItem(row, 1, userAgentItem); ui->table->setItem(row, 1, userAgentItem);
} }
ui->table->sortByColumn(-1);
connect(ui->add, SIGNAL(clicked()), this, SLOT(addSite())); connect(ui->add, SIGNAL(clicked()), this, SLOT(addSite()));
connect(ui->remove, SIGNAL(clicked()), this, SLOT(removeSite())); connect(ui->remove, SIGNAL(clicked()), this, SLOT(removeSite()));
connect(ui->edit, SIGNAL(clicked()), this, SLOT(editSite())); connect(ui->edit, SIGNAL(clicked()), this, SLOT(editSite()));

View File

@ -72,6 +72,9 @@
<property name="showGrid"> <property name="showGrid">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<attribute name="horizontalHeaderStretchLastSection"> <attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool> <bool>true</bool>
</attribute> </attribute>

View File

@ -167,6 +167,9 @@ SiteInfo::SiteInfo(WebView* view, QWidget* parent)
connect(ui->treeImages, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(imagesCustomContextMenuRequested(const QPoint &))); connect(ui->treeImages, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(imagesCustomContextMenuRequested(const QPoint &)));
ui->treeImages->setContextMenuPolicy(Qt::CustomContextMenu); ui->treeImages->setContextMenuPolicy(Qt::CustomContextMenu);
ui->treeImages->sortByColumn(-1);
ui->treeTags->sortByColumn(-1);
} }
void SiteInfo::imagesCustomContextMenuRequested(const QPoint &p) void SiteInfo::imagesCustomContextMenuRequested(const QPoint &p)

View File

@ -195,6 +195,9 @@
</item> </item>
<item row="3" column="0" colspan="4"> <item row="3" column="0" colspan="4">
<widget class="QTreeWidget" name="treeTags"> <widget class="QTreeWidget" name="treeTags">
<property name="sortingEnabled">
<bool>true</bool>
</property>
<attribute name="headerMinimumSectionSize"> <attribute name="headerMinimumSectionSize">
<number>200</number> <number>200</number>
</attribute> </attribute>
@ -294,6 +297,9 @@
<property name="itemsExpandable"> <property name="itemsExpandable">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<attribute name="headerMinimumSectionSize"> <attribute name="headerMinimumSectionSize">
<number>200</number> <number>200</number>
</attribute> </attribute>