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()));
ui->bookmarksTree->setDefaultItemShowMode(TreeWidget::ItemsExpanded);
ui->bookmarksTree->sortByColumn(-1);
}
void BookmarksManager::importBookmarks()

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -72,6 +72,9 @@
<property name="showGrid">
<bool>false</bool>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</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 &)));
ui->treeImages->setContextMenuPolicy(Qt::CustomContextMenu);
ui->treeImages->sortByColumn(-1);
ui->treeTags->sortByColumn(-1);
}
void SiteInfo::imagesCustomContextMenuRequested(const QPoint &p)

View File

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