mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
dolphin: convert statusbar, settings and search to qt5 signals/slot syntax
This commit is contained in:
parent
05f2c9c320
commit
7a26fbc5c5
|
@ -181,7 +181,7 @@ QStringList DolphinFacetsWidget::facetTypes() const
|
||||||
QCheckBox* DolphinFacetsWidget::createCheckBox(const QString& text)
|
QCheckBox* DolphinFacetsWidget::createCheckBox(const QString& text)
|
||||||
{
|
{
|
||||||
QCheckBox* checkBox = new QCheckBox(text);
|
QCheckBox* checkBox = new QCheckBox(text);
|
||||||
connect(checkBox, SIGNAL(clicked()), this, SIGNAL(facetChanged()));
|
connect(checkBox, &QCheckBox::clicked, this, &DolphinFacetsWidget::facetChanged);
|
||||||
return checkBox;
|
return checkBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ QRadioButton* DolphinFacetsWidget::createRadioButton(const QString& text,
|
||||||
QButtonGroup* group)
|
QButtonGroup* group)
|
||||||
{
|
{
|
||||||
QRadioButton* button = new QRadioButton(text);
|
QRadioButton* button = new QRadioButton(text);
|
||||||
connect(button, SIGNAL(clicked()), this, SIGNAL(facetChanged()));
|
connect(button, &QRadioButton::clicked, this, &DolphinFacetsWidget::facetChanged);
|
||||||
group->addButton(button);
|
group->addButton(button);
|
||||||
return button;
|
return button;
|
||||||
}
|
}
|
||||||
|
|
|
@ -289,7 +289,7 @@ void DolphinSearchBox::initButton(QToolButton* button)
|
||||||
button->setAutoExclusive(true);
|
button->setAutoExclusive(true);
|
||||||
button->setAutoRaise(true);
|
button->setAutoRaise(true);
|
||||||
button->setCheckable(true);
|
button->setCheckable(true);
|
||||||
connect(button, SIGNAL(clicked(bool)), this, SLOT(slotConfigurationChanged()));
|
connect(button, &QToolButton::clicked, this, &DolphinSearchBox::slotConfigurationChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DolphinSearchBox::loadSettings()
|
void DolphinSearchBox::loadSettings()
|
||||||
|
@ -324,7 +324,7 @@ void DolphinSearchBox::init()
|
||||||
closeButton->setAutoRaise(true);
|
closeButton->setAutoRaise(true);
|
||||||
closeButton->setIcon(KIcon("dialog-close"));
|
closeButton->setIcon(KIcon("dialog-close"));
|
||||||
closeButton->setToolTip(i18nc("@info:tooltip", "Quit searching"));
|
closeButton->setToolTip(i18nc("@info:tooltip", "Quit searching"));
|
||||||
connect(closeButton, SIGNAL(clicked()), this, SLOT(emitCloseRequest()));
|
connect(closeButton, &QToolButton::clicked, this, &DolphinSearchBox::emitCloseRequest);
|
||||||
|
|
||||||
// Create search label
|
// Create search label
|
||||||
m_searchLabel = new QLabel(this);
|
m_searchLabel = new QLabel(this);
|
||||||
|
@ -335,10 +335,10 @@ void DolphinSearchBox::init()
|
||||||
m_searchInput->setClearButtonShown(true);
|
m_searchInput->setClearButtonShown(true);
|
||||||
m_searchInput->setFont(KGlobalSettings::generalFont());
|
m_searchInput->setFont(KGlobalSettings::generalFont());
|
||||||
setFocusProxy(m_searchInput);
|
setFocusProxy(m_searchInput);
|
||||||
connect(m_searchInput, SIGNAL(returnPressed(QString)),
|
connect(m_searchInput, static_cast<void(KLineEdit::*)(const QString&)>(&KLineEdit::returnPressed),
|
||||||
this, SLOT(slotReturnPressed(QString)));
|
this, &DolphinSearchBox::slotReturnPressed);
|
||||||
connect(m_searchInput, SIGNAL(textChanged(QString)),
|
connect(m_searchInput, &KLineEdit::textChanged,
|
||||||
this, SLOT(slotSearchTextChanged(QString)));
|
this, &DolphinSearchBox::slotSearchTextChanged);
|
||||||
|
|
||||||
// Apply layout for the search input
|
// Apply layout for the search input
|
||||||
QHBoxLayout* searchInputLayout = new QHBoxLayout();
|
QHBoxLayout* searchInputLayout = new QHBoxLayout();
|
||||||
|
@ -379,12 +379,12 @@ void DolphinSearchBox::init()
|
||||||
m_facetsToggleButton = new QToolButton(this);
|
m_facetsToggleButton = new QToolButton(this);
|
||||||
m_facetsToggleButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
m_facetsToggleButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||||
initButton(m_facetsToggleButton);
|
initButton(m_facetsToggleButton);
|
||||||
connect(m_facetsToggleButton, SIGNAL(clicked()), this, SLOT(slotFacetsButtonToggled()));
|
connect(m_facetsToggleButton, &QToolButton::clicked, this, &DolphinSearchBox::slotFacetsButtonToggled);
|
||||||
|
|
||||||
m_facetsWidget = new DolphinFacetsWidget(this);
|
m_facetsWidget = new DolphinFacetsWidget(this);
|
||||||
m_facetsWidget->installEventFilter(this);
|
m_facetsWidget->installEventFilter(this);
|
||||||
m_facetsWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
|
m_facetsWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
|
||||||
connect(m_facetsWidget, SIGNAL(facetChanged()), this, SLOT(slotFacetChanged()));
|
connect(m_facetsWidget, &DolphinFacetsWidget::facetChanged, this, &DolphinSearchBox::slotFacetChanged);
|
||||||
|
|
||||||
// Apply layout for the options
|
// Apply layout for the options
|
||||||
QHBoxLayout* optionsLayout = new QHBoxLayout();
|
QHBoxLayout* optionsLayout = new QHBoxLayout();
|
||||||
|
@ -424,7 +424,7 @@ void DolphinSearchBox::init()
|
||||||
m_startSearchTimer = new QTimer(this);
|
m_startSearchTimer = new QTimer(this);
|
||||||
m_startSearchTimer->setSingleShot(true);
|
m_startSearchTimer->setSingleShot(true);
|
||||||
m_startSearchTimer->setInterval(1000);
|
m_startSearchTimer->setInterval(1000);
|
||||||
connect(m_startSearchTimer, SIGNAL(timeout()), this, SLOT(emitSearchRequest()));
|
connect(m_startSearchTimer, &QTimer::timeout, this, &DolphinSearchBox::emitSearchRequest);
|
||||||
|
|
||||||
updateFacetsToggleButton();
|
updateFacetsToggleButton();
|
||||||
applyReadOnlyState();
|
applyReadOnlyState();
|
||||||
|
|
|
@ -81,8 +81,8 @@ void FileNameSearchProtocol::searchDirectory(const KUrl& directory)
|
||||||
dirLister->openUrl(directory);
|
dirLister->openUrl(directory);
|
||||||
|
|
||||||
QEventLoop eventLoop;
|
QEventLoop eventLoop;
|
||||||
QObject::connect(dirLister, SIGNAL(canceled()), &eventLoop, SLOT(quit()));
|
QObject::connect(dirLister, static_cast<void(KDirLister::*)()>(&KDirLister::canceled), &eventLoop, &QEventLoop::quit);
|
||||||
QObject::connect(dirLister, SIGNAL(completed()), &eventLoop, SLOT(quit()));
|
QObject::connect(dirLister, static_cast<void(KDirLister::*)()>(&KDirLister::completed), &eventLoop, &QEventLoop::quit);
|
||||||
eventLoop.exec();
|
eventLoop.exec();
|
||||||
|
|
||||||
// Visualize all items that match the search pattern
|
// Visualize all items that match the search pattern
|
||||||
|
|
|
@ -82,7 +82,7 @@ AdditionalInfoDialog::AdditionalInfoDialog(QWidget* parent,
|
||||||
const KConfigGroup dialogConfig(KSharedConfig::openConfig("dolphinrc"), "AdditionalInfoDialog");
|
const KConfigGroup dialogConfig(KSharedConfig::openConfig("dolphinrc"), "AdditionalInfoDialog");
|
||||||
restoreDialogSize(dialogConfig);
|
restoreDialogSize(dialogConfig);
|
||||||
|
|
||||||
connect(this, SIGNAL(okClicked()), this, SLOT(slotOk()));
|
connect(this, &AdditionalInfoDialog::okClicked, this, &AdditionalInfoDialog::slotOk);
|
||||||
}
|
}
|
||||||
|
|
||||||
AdditionalInfoDialog::~AdditionalInfoDialog()
|
AdditionalInfoDialog::~AdditionalInfoDialog()
|
||||||
|
|
|
@ -38,8 +38,8 @@ ApplyViewPropsJob::ApplyViewPropsJob(const KUrl& dir,
|
||||||
m_viewProps->setSortOrder(viewProps.sortOrder());
|
m_viewProps->setSortOrder(viewProps.sortOrder());
|
||||||
|
|
||||||
KIO::ListJob* listJob = KIO::listRecursive(dir, KIO::HideProgressInfo);
|
KIO::ListJob* listJob = KIO::listRecursive(dir, KIO::HideProgressInfo);
|
||||||
connect(listJob, SIGNAL(entries(KIO::Job*,KIO::UDSEntryList)),
|
connect(listJob, &KIO::ListJob::entries,
|
||||||
SLOT(slotEntries(KIO::Job*,KIO::UDSEntryList)));
|
this, &ApplyViewPropsJob::slotEntries);
|
||||||
addSubjob(listJob);
|
addSubjob(listJob);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,42 +58,42 @@ DolphinSettingsDialog::DolphinSettingsDialog(const KUrl& url, QWidget* parent) :
|
||||||
KPageWidgetItem* startupSettingsFrame = addPage(startupSettingsPage,
|
KPageWidgetItem* startupSettingsFrame = addPage(startupSettingsPage,
|
||||||
i18nc("@title:group", "Startup"));
|
i18nc("@title:group", "Startup"));
|
||||||
startupSettingsFrame->setIcon(KIcon("go-home"));
|
startupSettingsFrame->setIcon(KIcon("go-home"));
|
||||||
connect(startupSettingsPage, SIGNAL(changed()), this, SLOT(enableApply()));
|
connect(startupSettingsPage, &StartupSettingsPage::changed, this, &DolphinSettingsDialog::enableApply);
|
||||||
|
|
||||||
// View Modes
|
// View Modes
|
||||||
ViewSettingsPage* viewSettingsPage = new ViewSettingsPage(this);
|
ViewSettingsPage* viewSettingsPage = new ViewSettingsPage(this);
|
||||||
KPageWidgetItem* viewSettingsFrame = addPage(viewSettingsPage,
|
KPageWidgetItem* viewSettingsFrame = addPage(viewSettingsPage,
|
||||||
i18nc("@title:group", "View Modes"));
|
i18nc("@title:group", "View Modes"));
|
||||||
viewSettingsFrame->setIcon(KIcon("view-choose"));
|
viewSettingsFrame->setIcon(KIcon("view-choose"));
|
||||||
connect(viewSettingsPage, SIGNAL(changed()), this, SLOT(enableApply()));
|
connect(viewSettingsPage, &ViewSettingsPage::changed, this, &DolphinSettingsDialog::enableApply);
|
||||||
|
|
||||||
// Navigation
|
// Navigation
|
||||||
NavigationSettingsPage* navigationSettingsPage = new NavigationSettingsPage(this);
|
NavigationSettingsPage* navigationSettingsPage = new NavigationSettingsPage(this);
|
||||||
KPageWidgetItem* navigationSettingsFrame = addPage(navigationSettingsPage,
|
KPageWidgetItem* navigationSettingsFrame = addPage(navigationSettingsPage,
|
||||||
i18nc("@title:group", "Navigation"));
|
i18nc("@title:group", "Navigation"));
|
||||||
navigationSettingsFrame->setIcon(KIcon("input-mouse"));
|
navigationSettingsFrame->setIcon(KIcon("input-mouse"));
|
||||||
connect(navigationSettingsPage, SIGNAL(changed()), this, SLOT(enableApply()));
|
connect(navigationSettingsPage, &NavigationSettingsPage::changed, this, &DolphinSettingsDialog::enableApply);
|
||||||
|
|
||||||
// Services
|
// Services
|
||||||
ServicesSettingsPage* servicesSettingsPage = new ServicesSettingsPage(this);
|
ServicesSettingsPage* servicesSettingsPage = new ServicesSettingsPage(this);
|
||||||
KPageWidgetItem* servicesSettingsFrame = addPage(servicesSettingsPage,
|
KPageWidgetItem* servicesSettingsFrame = addPage(servicesSettingsPage,
|
||||||
i18nc("@title:group", "Services"));
|
i18nc("@title:group", "Services"));
|
||||||
servicesSettingsFrame->setIcon(KIcon("services"));
|
servicesSettingsFrame->setIcon(KIcon("services"));
|
||||||
connect(servicesSettingsPage, SIGNAL(changed()), this, SLOT(enableApply()));
|
connect(servicesSettingsPage, &ServicesSettingsPage::changed, this, &DolphinSettingsDialog::enableApply);
|
||||||
|
|
||||||
// Trash
|
// Trash
|
||||||
TrashSettingsPage* trashSettingsPage = new TrashSettingsPage(this);
|
TrashSettingsPage* trashSettingsPage = new TrashSettingsPage(this);
|
||||||
KPageWidgetItem* trashSettingsFrame = addPage(trashSettingsPage,
|
KPageWidgetItem* trashSettingsFrame = addPage(trashSettingsPage,
|
||||||
i18nc("@title:group", "Trash"));
|
i18nc("@title:group", "Trash"));
|
||||||
trashSettingsFrame->setIcon(KIcon("user-trash"));
|
trashSettingsFrame->setIcon(KIcon("user-trash"));
|
||||||
connect(trashSettingsPage, SIGNAL(changed()), this, SLOT(enableApply()));
|
connect(trashSettingsPage, &TrashSettingsPage::changed, this, &DolphinSettingsDialog::enableApply);
|
||||||
|
|
||||||
// General
|
// General
|
||||||
GeneralSettingsPage* generalSettingsPage = new GeneralSettingsPage(url, this);
|
GeneralSettingsPage* generalSettingsPage = new GeneralSettingsPage(url, this);
|
||||||
KPageWidgetItem* generalSettingsFrame = addPage(generalSettingsPage,
|
KPageWidgetItem* generalSettingsFrame = addPage(generalSettingsPage,
|
||||||
i18nc("@title:group General settings", "General"));
|
i18nc("@title:group General settings", "General"));
|
||||||
generalSettingsFrame->setIcon(KIcon("system-run"));
|
generalSettingsFrame->setIcon(KIcon("system-run"));
|
||||||
connect(generalSettingsPage, SIGNAL(changed()), this, SLOT(enableApply()));
|
connect(generalSettingsPage, &GeneralSettingsPage::changed, this, &DolphinSettingsDialog::enableApply);
|
||||||
|
|
||||||
const KConfigGroup dialogConfig(KSharedConfig::openConfig("dolphinrc"), "SettingsDialog");
|
const KConfigGroup dialogConfig(KSharedConfig::openConfig("dolphinrc"), "SettingsDialog");
|
||||||
#pragma message("TODO: port")
|
#pragma message("TODO: port")
|
||||||
|
|
|
@ -79,12 +79,12 @@ BehaviorSettingsPage::BehaviorSettingsPage(const KUrl& url, QWidget* parent) :
|
||||||
|
|
||||||
loadSettings();
|
loadSettings();
|
||||||
|
|
||||||
connect(m_localViewProps, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
connect(m_localViewProps, &QRadioButton::toggled, this, &BehaviorSettingsPage::changed);
|
||||||
connect(m_globalViewProps, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
connect(m_globalViewProps, &QRadioButton::toggled, this, &BehaviorSettingsPage::changed);
|
||||||
connect(m_showToolTips, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
connect(m_showToolTips, &QCheckBox::toggled, this, &BehaviorSettingsPage::changed);
|
||||||
connect(m_showSelectionToggle, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
connect(m_showSelectionToggle, &QCheckBox::toggled, this, &BehaviorSettingsPage::changed);
|
||||||
connect(m_naturalSorting, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
connect(m_naturalSorting, &QCheckBox::toggled, this, &BehaviorSettingsPage::changed);
|
||||||
connect(m_renameInline, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
connect(m_renameInline, &QCheckBox::toggled, this, &BehaviorSettingsPage::changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
BehaviorSettingsPage::~BehaviorSettingsPage()
|
BehaviorSettingsPage::~BehaviorSettingsPage()
|
||||||
|
|
|
@ -60,7 +60,7 @@ ConfigurePreviewPluginDialog::ConfigurePreviewPluginDialog(const QString& plugin
|
||||||
|
|
||||||
setMainWidget(mainWidget);
|
setMainWidget(mainWidget);
|
||||||
|
|
||||||
connect(this, SIGNAL(okClicked()), this, SLOT(slotOk()));
|
connect(this, &ConfigurePreviewPluginDialog::okClicked, this, &ConfigurePreviewPluginDialog::slotOk);
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigurePreviewPluginDialog::~ConfigurePreviewPluginDialog()
|
ConfigurePreviewPluginDialog::~ConfigurePreviewPluginDialog()
|
||||||
|
|
|
@ -68,9 +68,9 @@ ConfirmationsSettingsPage::ConfirmationsSettingsPage(QWidget* parent) :
|
||||||
|
|
||||||
loadSettings();
|
loadSettings();
|
||||||
|
|
||||||
connect(m_confirmMoveToTrash, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
connect(m_confirmMoveToTrash, &QCheckBox::toggled, this, &ConfirmationsSettingsPage::changed);
|
||||||
connect(m_confirmDelete, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
connect(m_confirmDelete, &QCheckBox::toggled, this, &ConfirmationsSettingsPage::changed);
|
||||||
connect(m_confirmClosingMultipleTabs, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
connect(m_confirmClosingMultipleTabs, &QCheckBox::toggled, this, &ConfirmationsSettingsPage::changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfirmationsSettingsPage::~ConfirmationsSettingsPage()
|
ConfirmationsSettingsPage::~ConfirmationsSettingsPage()
|
||||||
|
|
|
@ -46,22 +46,22 @@ GeneralSettingsPage::GeneralSettingsPage(const KUrl& url, QWidget* parent) :
|
||||||
// initialize 'Behavior' tab
|
// initialize 'Behavior' tab
|
||||||
BehaviorSettingsPage* behaviorPage = new BehaviorSettingsPage(url, tabWidget);
|
BehaviorSettingsPage* behaviorPage = new BehaviorSettingsPage(url, tabWidget);
|
||||||
tabWidget->addTab(behaviorPage, i18nc("@title:tab Behavior settings", "Behavior"));
|
tabWidget->addTab(behaviorPage, i18nc("@title:tab Behavior settings", "Behavior"));
|
||||||
connect(behaviorPage, SIGNAL(changed()), this, SIGNAL(changed()));
|
connect(behaviorPage, &BehaviorSettingsPage::changed, this, &GeneralSettingsPage::changed);
|
||||||
|
|
||||||
// initialize 'Previews' tab
|
// initialize 'Previews' tab
|
||||||
PreviewsSettingsPage* previewsPage = new PreviewsSettingsPage(tabWidget);
|
PreviewsSettingsPage* previewsPage = new PreviewsSettingsPage(tabWidget);
|
||||||
tabWidget->addTab(previewsPage, i18nc("@title:tab Previews settings", "Previews"));
|
tabWidget->addTab(previewsPage, i18nc("@title:tab Previews settings", "Previews"));
|
||||||
connect(previewsPage, SIGNAL(changed()), this, SIGNAL(changed()));
|
connect(previewsPage, &PreviewsSettingsPage::changed, this, &GeneralSettingsPage::changed);
|
||||||
|
|
||||||
// initialize 'Context Menu' tab
|
// initialize 'Context Menu' tab
|
||||||
ConfirmationsSettingsPage* confirmationsPage = new ConfirmationsSettingsPage(tabWidget);
|
ConfirmationsSettingsPage* confirmationsPage = new ConfirmationsSettingsPage(tabWidget);
|
||||||
tabWidget->addTab(confirmationsPage, i18nc("@title:tab Confirmations settings", "Confirmations"));
|
tabWidget->addTab(confirmationsPage, i18nc("@title:tab Confirmations settings", "Confirmations"));
|
||||||
connect(confirmationsPage, SIGNAL(changed()), this, SIGNAL(changed()));
|
connect(confirmationsPage, &ConfirmationsSettingsPage::changed, this, &GeneralSettingsPage::changed);
|
||||||
|
|
||||||
// initialize 'Status Bar' tab
|
// initialize 'Status Bar' tab
|
||||||
StatusBarSettingsPage* statusBarPage = new StatusBarSettingsPage(tabWidget);
|
StatusBarSettingsPage* statusBarPage = new StatusBarSettingsPage(tabWidget);
|
||||||
tabWidget->addTab(statusBarPage, i18nc("@title:tab Status Bar settings", "Status Bar"));
|
tabWidget->addTab(statusBarPage, i18nc("@title:tab Status Bar settings", "Status Bar"));
|
||||||
connect(statusBarPage, SIGNAL(changed()), this, SIGNAL(changed()));
|
connect(statusBarPage, &StatusBarSettingsPage::changed, this, &GeneralSettingsPage::changed);
|
||||||
|
|
||||||
m_pages.append(behaviorPage);
|
m_pages.append(behaviorPage);
|
||||||
m_pages.append(previewsPage);
|
m_pages.append(previewsPage);
|
||||||
|
|
|
@ -65,8 +65,8 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) :
|
||||||
m_listView = new QListView(this);
|
m_listView = new QListView(this);
|
||||||
|
|
||||||
ServiceItemDelegate* delegate = new ServiceItemDelegate(m_listView, m_listView);
|
ServiceItemDelegate* delegate = new ServiceItemDelegate(m_listView, m_listView);
|
||||||
connect(delegate, SIGNAL(requestServiceConfiguration(QModelIndex)),
|
connect(delegate, &ServiceItemDelegate::requestServiceConfiguration,
|
||||||
this, SLOT(configureService(QModelIndex)));
|
this, &PreviewsSettingsPage::configureService);
|
||||||
|
|
||||||
ServiceModel* serviceModel = new ServiceModel(this);
|
ServiceModel* serviceModel = new ServiceModel(this);
|
||||||
QSortFilterProxyModel* proxyModel = new QSortFilterProxyModel(this);
|
QSortFilterProxyModel* proxyModel = new QSortFilterProxyModel(this);
|
||||||
|
@ -95,8 +95,8 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) :
|
||||||
|
|
||||||
loadSettings();
|
loadSettings();
|
||||||
|
|
||||||
connect(m_listView, SIGNAL(clicked(QModelIndex)), this, SIGNAL(changed()));
|
connect(m_listView, &QListView::clicked, this, &PreviewsSettingsPage::changed);
|
||||||
connect(m_remoteFileSizeBox, SIGNAL(valueChanged(int)), this, SIGNAL(changed()));
|
connect(m_remoteFileSizeBox, static_cast<void(KIntSpinBox::*)(int)>(&KIntSpinBox::valueChanged), this, &PreviewsSettingsPage::changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
PreviewsSettingsPage::~PreviewsSettingsPage()
|
PreviewsSettingsPage::~PreviewsSettingsPage()
|
||||||
|
|
|
@ -43,8 +43,8 @@ StatusBarSettingsPage::StatusBarSettingsPage(QWidget* parent) :
|
||||||
|
|
||||||
loadSettings();
|
loadSettings();
|
||||||
|
|
||||||
connect(m_showZoomSlider, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
connect(m_showZoomSlider, &QCheckBox::toggled, this, &StatusBarSettingsPage::changed);
|
||||||
connect(m_showSpaceInfo, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
connect(m_showSpaceInfo, &QCheckBox::toggled, this, &StatusBarSettingsPage::changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusBarSettingsPage::~StatusBarSettingsPage()
|
StatusBarSettingsPage::~StatusBarSettingsPage()
|
||||||
|
|
|
@ -55,17 +55,17 @@ DolphinGeneralConfigModule::DolphinGeneralConfigModule(QWidget* parent, const QV
|
||||||
// initialize 'Behavior' tab
|
// initialize 'Behavior' tab
|
||||||
BehaviorSettingsPage* behaviorPage = new BehaviorSettingsPage(QDir::homePath(), tabWidget);
|
BehaviorSettingsPage* behaviorPage = new BehaviorSettingsPage(QDir::homePath(), tabWidget);
|
||||||
tabWidget->addTab(behaviorPage, i18nc("@title:tab Behavior settings", "Behavior"));
|
tabWidget->addTab(behaviorPage, i18nc("@title:tab Behavior settings", "Behavior"));
|
||||||
connect(behaviorPage, SIGNAL(changed()), this, SLOT(changed()));
|
connect(behaviorPage, &BehaviorSettingsPage::changed, this, static_cast<void(DolphinGeneralConfigModule::*)()>(&DolphinGeneralConfigModule::changed));
|
||||||
|
|
||||||
// initialize 'Previews' tab
|
// initialize 'Previews' tab
|
||||||
PreviewsSettingsPage* previewsPage = new PreviewsSettingsPage(tabWidget);
|
PreviewsSettingsPage* previewsPage = new PreviewsSettingsPage(tabWidget);
|
||||||
tabWidget->addTab(previewsPage, i18nc("@title:tab Previews settings", "Previews"));
|
tabWidget->addTab(previewsPage, i18nc("@title:tab Previews settings", "Previews"));
|
||||||
connect(previewsPage, SIGNAL(changed()), this, SLOT(changed()));
|
connect(previewsPage, &PreviewsSettingsPage::changed, this, static_cast<void(DolphinGeneralConfigModule::*)()>(&DolphinGeneralConfigModule::changed));
|
||||||
|
|
||||||
// initialize 'Confirmations' tab
|
// initialize 'Confirmations' tab
|
||||||
ConfirmationsSettingsPage* confirmationsPage = new ConfirmationsSettingsPage(tabWidget);
|
ConfirmationsSettingsPage* confirmationsPage = new ConfirmationsSettingsPage(tabWidget);
|
||||||
tabWidget->addTab(confirmationsPage, i18nc("@title:tab Confirmations settings", "Confirmations"));
|
tabWidget->addTab(confirmationsPage, i18nc("@title:tab Confirmations settings", "Confirmations"));
|
||||||
connect(confirmationsPage, SIGNAL(changed()), this, SLOT(changed()));
|
connect(confirmationsPage, &ConfirmationsSettingsPage::changed, this, static_cast<void(DolphinGeneralConfigModule::*)()>(&DolphinGeneralConfigModule::changed));
|
||||||
|
|
||||||
m_pages.append(behaviorPage);
|
m_pages.append(behaviorPage);
|
||||||
m_pages.append(previewsPage);
|
m_pages.append(previewsPage);
|
||||||
|
|
|
@ -48,7 +48,7 @@ DolphinNavigationConfigModule::DolphinNavigationConfigModule(QWidget* parent, co
|
||||||
topLayout->setSpacing(KDialog::spacingHint());
|
topLayout->setSpacing(KDialog::spacingHint());
|
||||||
|
|
||||||
m_navigation = new NavigationSettingsPage(this);
|
m_navigation = new NavigationSettingsPage(this);
|
||||||
connect(m_navigation, SIGNAL(changed()), this, SLOT(changed()));
|
connect(m_navigation, &NavigationSettingsPage::changed, this, static_cast<void(DolphinNavigationConfigModule::*)()>(&DolphinNavigationConfigModule::changed));
|
||||||
topLayout->addWidget(m_navigation, 0, 0);
|
topLayout->addWidget(m_navigation, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ DolphinServicesConfigModule::DolphinServicesConfigModule(QWidget* parent, const
|
||||||
topLayout->setSpacing(KDialog::spacingHint());
|
topLayout->setSpacing(KDialog::spacingHint());
|
||||||
|
|
||||||
m_services = new ServicesSettingsPage(this);
|
m_services = new ServicesSettingsPage(this);
|
||||||
connect(m_services, SIGNAL(changed()), this, SLOT(changed()));
|
connect(m_services, &ServicesSettingsPage::changed, this, static_cast<void(DolphinServicesConfigModule::*)()>(&DolphinServicesConfigModule::changed));
|
||||||
topLayout->addWidget(m_services, 0, 0);
|
topLayout->addWidget(m_services, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,17 +57,17 @@ DolphinViewModesConfigModule::DolphinViewModesConfigModule(QWidget* parent, cons
|
||||||
// Initialize 'Icons' tab
|
// Initialize 'Icons' tab
|
||||||
ViewSettingsTab* iconsTab = new ViewSettingsTab(ViewSettingsTab::IconsMode, tabWidget);
|
ViewSettingsTab* iconsTab = new ViewSettingsTab(ViewSettingsTab::IconsMode, tabWidget);
|
||||||
tabWidget->addTab(iconsTab, KIcon("view-list-icons"), i18nc("@title:tab", "Icons"));
|
tabWidget->addTab(iconsTab, KIcon("view-list-icons"), i18nc("@title:tab", "Icons"));
|
||||||
connect(iconsTab, SIGNAL(changed()), this, SLOT(viewModeChanged()));
|
connect(iconsTab, &ViewSettingsTab::changed, this, &DolphinViewModesConfigModule::viewModeChanged);
|
||||||
|
|
||||||
// Initialize 'Compact' tab
|
// Initialize 'Compact' tab
|
||||||
ViewSettingsTab* compactTab = new ViewSettingsTab(ViewSettingsTab::CompactMode, tabWidget);
|
ViewSettingsTab* compactTab = new ViewSettingsTab(ViewSettingsTab::CompactMode, tabWidget);
|
||||||
tabWidget->addTab(compactTab, KIcon("view-list-details"), i18nc("@title:tab", "Compact"));
|
tabWidget->addTab(compactTab, KIcon("view-list-details"), i18nc("@title:tab", "Compact"));
|
||||||
connect(compactTab, SIGNAL(changed()), this, SLOT(viewModeChanged()));
|
connect(compactTab, &ViewSettingsTab::changed, this, &DolphinViewModesConfigModule::viewModeChanged);
|
||||||
|
|
||||||
// Initialize 'Details' tab
|
// Initialize 'Details' tab
|
||||||
ViewSettingsTab* detailsTab = new ViewSettingsTab(ViewSettingsTab::DetailsMode, tabWidget);
|
ViewSettingsTab* detailsTab = new ViewSettingsTab(ViewSettingsTab::DetailsMode, tabWidget);
|
||||||
tabWidget->addTab(detailsTab, KIcon("view-list-tree"), i18nc("@title:tab", "Details"));
|
tabWidget->addTab(detailsTab, KIcon("view-list-tree"), i18nc("@title:tab", "Details"));
|
||||||
connect(detailsTab, SIGNAL(changed()), this, SLOT(viewModeChanged()));
|
connect(detailsTab, &ViewSettingsTab::changed, this, &DolphinViewModesConfigModule::viewModeChanged);
|
||||||
|
|
||||||
m_tabs.append(iconsTab);
|
m_tabs.append(iconsTab);
|
||||||
m_tabs.append(compactTab);
|
m_tabs.append(compactTab);
|
||||||
|
|
|
@ -68,10 +68,10 @@ NavigationSettingsPage::NavigationSettingsPage(QWidget* parent) :
|
||||||
|
|
||||||
loadSettings();
|
loadSettings();
|
||||||
|
|
||||||
connect(m_singleClick, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
connect(m_singleClick, &QRadioButton::toggled, this, &NavigationSettingsPage::changed);
|
||||||
connect(m_doubleClick, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
connect(m_doubleClick, &QRadioButton::toggled, this, &NavigationSettingsPage::changed);
|
||||||
connect(m_openArchivesAsFolder, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
connect(m_openArchivesAsFolder, &QCheckBox::toggled, this, &NavigationSettingsPage::changed);
|
||||||
connect(m_autoExpandFolders, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
connect(m_autoExpandFolders, &QCheckBox::toggled, this, &NavigationSettingsPage::changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
NavigationSettingsPage::~NavigationSettingsPage()
|
NavigationSettingsPage::~NavigationSettingsPage()
|
||||||
|
|
|
@ -72,10 +72,10 @@ QList<QWidget*> ServiceItemDelegate::createItemWidgets(const QModelIndex&) const
|
||||||
QPalette palette = checkBox->palette();
|
QPalette palette = checkBox->palette();
|
||||||
palette.setColor(QPalette::WindowText, palette.color(QPalette::Text));
|
palette.setColor(QPalette::WindowText, palette.color(QPalette::Text));
|
||||||
checkBox->setPalette(palette);
|
checkBox->setPalette(palette);
|
||||||
connect(checkBox, SIGNAL(clicked(bool)), this, SLOT(slotCheckBoxClicked(bool)));
|
connect(checkBox, &QCheckBox::clicked, this, &ServiceItemDelegate::slotCheckBoxClicked);
|
||||||
|
|
||||||
KPushButton* configureButton = new KPushButton();
|
KPushButton* configureButton = new KPushButton();
|
||||||
connect(configureButton, SIGNAL(clicked()), this, SLOT(slotConfigureButtonClicked()));
|
connect(configureButton, &KPushButton::clicked, this, &ServiceItemDelegate::slotConfigureButtonClicked);
|
||||||
|
|
||||||
return QList<QWidget*>() << checkBox << configureButton;
|
return QList<QWidget*>() << checkBox << configureButton;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,12 +78,12 @@ ServicesSettingsPage::ServicesSettingsPage(QWidget* parent) :
|
||||||
m_listView->setModel(m_sortModel);
|
m_listView->setModel(m_sortModel);
|
||||||
m_listView->setItemDelegate(delegate);
|
m_listView->setItemDelegate(delegate);
|
||||||
m_listView->setVerticalScrollMode(QListView::ScrollPerPixel);
|
m_listView->setVerticalScrollMode(QListView::ScrollPerPixel);
|
||||||
connect(m_listView, SIGNAL(clicked(QModelIndex)), this, SIGNAL(changed()));
|
connect(m_listView, &QListView::clicked, this, &ServicesSettingsPage::changed);
|
||||||
|
|
||||||
KNS3::Button* downloadButton = new KNS3::Button(i18nc("@action:button", "Download New Services..."),
|
KNS3::Button* downloadButton = new KNS3::Button(i18nc("@action:button", "Download New Services..."),
|
||||||
"servicemenu.knsrc",
|
"servicemenu.knsrc",
|
||||||
this);
|
this);
|
||||||
connect(downloadButton, SIGNAL(dialogFinished(KNS3::Entry::List)), this, SLOT(loadServices()));
|
connect(downloadButton, &KNS3::Button::dialogFinished, this, &ServicesSettingsPage::loadServices);
|
||||||
|
|
||||||
topLayout->addWidget(label);
|
topLayout->addWidget(label);
|
||||||
topLayout->addWidget(m_listView);
|
topLayout->addWidget(m_listView);
|
||||||
|
|
|
@ -70,18 +70,18 @@ StartupSettingsPage::StartupSettingsPage(const KUrl& url, QWidget* parent) :
|
||||||
selectHomeUrlButton->setAccessibleName(i18nc("@action:button", "Select Home Location"));
|
selectHomeUrlButton->setAccessibleName(i18nc("@action:button", "Select Home Location"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
connect(selectHomeUrlButton, SIGNAL(clicked()),
|
connect(selectHomeUrlButton, &QPushButton::clicked,
|
||||||
this, SLOT(selectHomeUrl()));
|
this, &StartupSettingsPage::selectHomeUrl);
|
||||||
|
|
||||||
KHBox* buttonBox = new KHBox(homeBox);
|
KHBox* buttonBox = new KHBox(homeBox);
|
||||||
buttonBox->setSpacing(spacing);
|
buttonBox->setSpacing(spacing);
|
||||||
|
|
||||||
QPushButton* useCurrentButton = new QPushButton(i18nc("@action:button", "Use Current Location"), buttonBox);
|
QPushButton* useCurrentButton = new QPushButton(i18nc("@action:button", "Use Current Location"), buttonBox);
|
||||||
connect(useCurrentButton, SIGNAL(clicked()),
|
connect(useCurrentButton, &QPushButton::clicked,
|
||||||
this, SLOT(useCurrentLocation()));
|
this, &StartupSettingsPage::useCurrentLocation);
|
||||||
QPushButton* useDefaultButton = new QPushButton(i18nc("@action:button", "Use Default Location"), buttonBox);
|
QPushButton* useDefaultButton = new QPushButton(i18nc("@action:button", "Use Default Location"), buttonBox);
|
||||||
connect(useDefaultButton, SIGNAL(clicked()),
|
connect(useDefaultButton, &QPushButton::clicked,
|
||||||
this, SLOT(useDefaultLocation()));
|
this, &StartupSettingsPage::useDefaultLocation);
|
||||||
|
|
||||||
QVBoxLayout* homeBoxLayout = new QVBoxLayout(homeBox);
|
QVBoxLayout* homeBoxLayout = new QVBoxLayout(homeBox);
|
||||||
homeBoxLayout->addWidget(homeUrlBox);
|
homeBoxLayout->addWidget(homeUrlBox);
|
||||||
|
@ -102,11 +102,11 @@ StartupSettingsPage::StartupSettingsPage(const KUrl& url, QWidget* parent) :
|
||||||
|
|
||||||
loadSettings();
|
loadSettings();
|
||||||
|
|
||||||
connect(m_homeUrl, SIGNAL(textChanged(QString)), this, SLOT(slotSettingsChanged()));
|
connect(m_homeUrl, &KLineEdit::textChanged, this, &StartupSettingsPage::slotSettingsChanged);
|
||||||
connect(m_splitView, SIGNAL(toggled(bool)), this, SLOT(slotSettingsChanged()));
|
connect(m_splitView, &QCheckBox::toggled, this, &StartupSettingsPage::slotSettingsChanged);
|
||||||
connect(m_editableUrl, SIGNAL(toggled(bool)), this, SLOT(slotSettingsChanged()));
|
connect(m_editableUrl, &QCheckBox::toggled, this, &StartupSettingsPage::slotSettingsChanged);
|
||||||
connect(m_showFullPath, SIGNAL(toggled(bool)), this, SLOT(slotSettingsChanged()));
|
connect(m_showFullPath, &QCheckBox::toggled, this, &StartupSettingsPage::slotSettingsChanged);
|
||||||
connect(m_filterBar, SIGNAL(toggled(bool)), this, SLOT(slotSettingsChanged()));
|
connect(m_filterBar, &QCheckBox::toggled, this, &StartupSettingsPage::slotSettingsChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
StartupSettingsPage::~StartupSettingsPage()
|
StartupSettingsPage::~StartupSettingsPage()
|
||||||
|
|
|
@ -45,7 +45,7 @@ TrashSettingsPage::TrashSettingsPage(QWidget* parent) :
|
||||||
|
|
||||||
loadSettings();
|
loadSettings();
|
||||||
|
|
||||||
connect(m_proxy, SIGNAL(changed(bool)), this, SIGNAL(changed()));
|
connect(m_proxy, static_cast<void(KCModuleProxy::*)(bool)>(&KCModuleProxy::changed), this, &TrashSettingsPage::changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
TrashSettingsPage::~TrashSettingsPage()
|
TrashSettingsPage::~TrashSettingsPage()
|
||||||
|
|
|
@ -41,12 +41,12 @@ DolphinFontRequester::DolphinFontRequester(QWidget* parent) :
|
||||||
m_modeCombo = new KComboBox(this);
|
m_modeCombo = new KComboBox(this);
|
||||||
m_modeCombo->addItem(i18nc("@item:inlistbox Font", "System Font"));
|
m_modeCombo->addItem(i18nc("@item:inlistbox Font", "System Font"));
|
||||||
m_modeCombo->addItem(i18nc("@item:inlistbox Font", "Custom Font"));
|
m_modeCombo->addItem(i18nc("@item:inlistbox Font", "Custom Font"));
|
||||||
connect(m_modeCombo, SIGNAL(activated(int)),
|
connect(m_modeCombo, static_cast<void(KComboBox::*)(int)>(&KComboBox::activated),
|
||||||
this, SLOT(changeMode(int)));
|
this, &DolphinFontRequester::changeMode);
|
||||||
|
|
||||||
m_chooseFontButton = new QPushButton(i18nc("@action:button Choose font", "Choose..."), this);
|
m_chooseFontButton = new QPushButton(i18nc("@action:button Choose font", "Choose..."), this);
|
||||||
connect(m_chooseFontButton, SIGNAL(clicked()),
|
connect(m_chooseFontButton, &QPushButton::clicked,
|
||||||
this, SLOT(openFontDialog()));
|
this, &DolphinFontRequester::openFontDialog);
|
||||||
|
|
||||||
changeMode(m_modeCombo->currentIndex());
|
changeMode(m_modeCombo->currentIndex());
|
||||||
|
|
||||||
|
|
|
@ -43,17 +43,17 @@ ViewSettingsPage::ViewSettingsPage(QWidget* parent) :
|
||||||
// Initialize 'Icons' tab
|
// Initialize 'Icons' tab
|
||||||
ViewSettingsTab* iconsTab = new ViewSettingsTab(ViewSettingsTab::IconsMode, tabWidget);
|
ViewSettingsTab* iconsTab = new ViewSettingsTab(ViewSettingsTab::IconsMode, tabWidget);
|
||||||
tabWidget->addTab(iconsTab, QIcon::fromTheme("view-list-icons"), i18nc("@title:tab", "Icons"));
|
tabWidget->addTab(iconsTab, QIcon::fromTheme("view-list-icons"), i18nc("@title:tab", "Icons"));
|
||||||
connect(iconsTab, SIGNAL(changed()), this, SIGNAL(changed()));
|
connect(iconsTab, &ViewSettingsTab::changed, this, &ViewSettingsPage::changed);
|
||||||
|
|
||||||
// Initialize 'Compact' tab
|
// Initialize 'Compact' tab
|
||||||
ViewSettingsTab* compactTab = new ViewSettingsTab(ViewSettingsTab::CompactMode, tabWidget);
|
ViewSettingsTab* compactTab = new ViewSettingsTab(ViewSettingsTab::CompactMode, tabWidget);
|
||||||
tabWidget->addTab(compactTab, QIcon::fromTheme("view-list-details"), i18nc("@title:tab", "Compact"));
|
tabWidget->addTab(compactTab, QIcon::fromTheme("view-list-details"), i18nc("@title:tab", "Compact"));
|
||||||
connect(compactTab, SIGNAL(changed()), this, SIGNAL(changed()));
|
connect(compactTab, &ViewSettingsTab::changed, this, &ViewSettingsPage::changed);
|
||||||
|
|
||||||
// Initialize 'Details' tab
|
// Initialize 'Details' tab
|
||||||
ViewSettingsTab* detailsTab = new ViewSettingsTab(ViewSettingsTab::DetailsMode, tabWidget);
|
ViewSettingsTab* detailsTab = new ViewSettingsTab(ViewSettingsTab::DetailsMode, tabWidget);
|
||||||
tabWidget->addTab(detailsTab, QIcon::fromTheme("view-list-tree"), i18nc("@title:tab", "Details"));
|
tabWidget->addTab(detailsTab, QIcon::fromTheme("view-list-tree"), i18nc("@title:tab", "Details"));
|
||||||
connect(detailsTab, SIGNAL(changed()), this, SIGNAL(changed()));
|
connect(detailsTab, &ViewSettingsTab::changed, this, &ViewSettingsPage::changed);
|
||||||
|
|
||||||
m_tabs.append(iconsTab);
|
m_tabs.append(iconsTab);
|
||||||
m_tabs.append(compactTab);
|
m_tabs.append(compactTab);
|
||||||
|
|
|
@ -61,16 +61,16 @@ ViewSettingsTab::ViewSettingsTab(Mode mode, QWidget* parent) :
|
||||||
m_defaultSizeSlider->setPageStep(1);
|
m_defaultSizeSlider->setPageStep(1);
|
||||||
m_defaultSizeSlider->setTickPosition(QSlider::TicksBelow);
|
m_defaultSizeSlider->setTickPosition(QSlider::TicksBelow);
|
||||||
m_defaultSizeSlider->setRange(minRange, maxRange);
|
m_defaultSizeSlider->setRange(minRange, maxRange);
|
||||||
connect(m_defaultSizeSlider, SIGNAL(valueChanged(int)),
|
connect(m_defaultSizeSlider, &QSlider::valueChanged,
|
||||||
this, SLOT(slotDefaultSliderMoved(int)));
|
this, &ViewSettingsTab::slotDefaultSliderMoved);
|
||||||
|
|
||||||
QLabel* previewLabel = new QLabel(i18nc("@label:listbox", "Preview:"), this);
|
QLabel* previewLabel = new QLabel(i18nc("@label:listbox", "Preview:"), this);
|
||||||
m_previewSizeSlider = new QSlider(Qt::Horizontal, this);
|
m_previewSizeSlider = new QSlider(Qt::Horizontal, this);
|
||||||
m_previewSizeSlider->setPageStep(1);
|
m_previewSizeSlider->setPageStep(1);
|
||||||
m_previewSizeSlider->setTickPosition(QSlider::TicksBelow);
|
m_previewSizeSlider->setTickPosition(QSlider::TicksBelow);
|
||||||
m_previewSizeSlider->setRange(minRange, maxRange);
|
m_previewSizeSlider->setRange(minRange, maxRange);
|
||||||
connect(m_previewSizeSlider, SIGNAL(valueChanged(int)),
|
connect(m_previewSizeSlider, &QSlider::valueChanged,
|
||||||
this, SLOT(slotPreviewSliderMoved(int)));
|
this, &ViewSettingsTab::slotPreviewSliderMoved);
|
||||||
|
|
||||||
QGridLayout* layout = new QGridLayout(iconSizeGroup);
|
QGridLayout* layout = new QGridLayout(iconSizeGroup);
|
||||||
layout->addWidget(defaultLabel, 0, 0, Qt::AlignRight);
|
layout->addWidget(defaultLabel, 0, 0, Qt::AlignRight);
|
||||||
|
@ -138,20 +138,20 @@ ViewSettingsTab::ViewSettingsTab(Mode mode, QWidget* parent) :
|
||||||
|
|
||||||
loadSettings();
|
loadSettings();
|
||||||
|
|
||||||
connect(m_defaultSizeSlider, SIGNAL(valueChanged(int)), this, SIGNAL(changed()));
|
connect(m_defaultSizeSlider, &QSlider::valueChanged, this, &ViewSettingsTab::changed);
|
||||||
connect(m_previewSizeSlider, SIGNAL(valueChanged(int)), this, SIGNAL(changed()));
|
connect(m_previewSizeSlider, &QSlider::valueChanged, this, &ViewSettingsTab::changed);
|
||||||
connect(m_fontRequester, SIGNAL(changed()), this, SIGNAL(changed()));
|
connect(m_fontRequester, &DolphinFontRequester::changed, this, &ViewSettingsTab::changed);
|
||||||
|
|
||||||
switch (m_mode) {
|
switch (m_mode) {
|
||||||
case IconsMode:
|
case IconsMode:
|
||||||
connect(m_widthBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(changed()));
|
connect(m_widthBox, static_cast<void(KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &ViewSettingsTab::changed);
|
||||||
connect(m_maxLinesBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(changed()));
|
connect(m_maxLinesBox, static_cast<void(KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &ViewSettingsTab::changed);
|
||||||
break;
|
break;
|
||||||
case CompactMode:
|
case CompactMode:
|
||||||
connect(m_widthBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(changed()));
|
connect(m_widthBox, static_cast<void(KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &ViewSettingsTab::changed);
|
||||||
break;
|
break;
|
||||||
case DetailsMode:
|
case DetailsMode:
|
||||||
connect(m_expandableFolders, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
connect(m_expandableFolders, &QCheckBox::toggled, this, &ViewSettingsTab::changed);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -138,25 +138,25 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
|
||||||
|
|
||||||
topLayout->addWidget(propsBox);
|
topLayout->addWidget(propsBox);
|
||||||
|
|
||||||
connect(m_viewMode, SIGNAL(currentIndexChanged(int)),
|
connect(m_viewMode, static_cast<void(KComboBox::*)(int)>(&KComboBox::currentIndexChanged),
|
||||||
this, SLOT(slotViewModeChanged(int)));
|
this, &ViewPropertiesDialog::slotViewModeChanged);
|
||||||
connect(m_sorting, SIGNAL(currentIndexChanged(int)),
|
connect(m_sorting, static_cast<void(KComboBox::*)(int)>(&KComboBox::currentIndexChanged),
|
||||||
this, SLOT(slotSortingChanged(int)));
|
this, &ViewPropertiesDialog::slotSortingChanged);
|
||||||
connect(m_sortOrder, SIGNAL(currentIndexChanged(int)),
|
connect(m_sortOrder, static_cast<void(KComboBox::*)(int)>(&KComboBox::currentIndexChanged),
|
||||||
this, SLOT(slotSortOrderChanged(int)));
|
this, &ViewPropertiesDialog::slotSortOrderChanged);
|
||||||
connect(m_additionalInfo, SIGNAL(clicked()),
|
connect(m_additionalInfo, &QPushButton::clicked,
|
||||||
this, SLOT(configureAdditionalInfo()));
|
this, &ViewPropertiesDialog::configureAdditionalInfo);
|
||||||
connect(m_sortFoldersFirst, SIGNAL(clicked()),
|
connect(m_sortFoldersFirst, &QCheckBox::clicked,
|
||||||
this, SLOT(slotSortFoldersFirstChanged()));
|
this, &ViewPropertiesDialog::slotSortFoldersFirstChanged);
|
||||||
connect(m_previewsShown, SIGNAL(clicked()),
|
connect(m_previewsShown, &QCheckBox::clicked,
|
||||||
this, SLOT(slotShowPreviewChanged()));
|
this, &ViewPropertiesDialog::slotShowPreviewChanged);
|
||||||
connect(m_showInGroups, SIGNAL(clicked()),
|
connect(m_showInGroups, &QCheckBox::clicked,
|
||||||
this, SLOT(slotGroupedSortingChanged()));
|
this, &ViewPropertiesDialog::slotGroupedSortingChanged);
|
||||||
connect(m_showHiddenFiles, SIGNAL(clicked()),
|
connect(m_showHiddenFiles, &QCheckBox::clicked,
|
||||||
this, SLOT(slotShowHiddenFilesChanged()));
|
this, &ViewPropertiesDialog::slotShowHiddenFilesChanged);
|
||||||
|
|
||||||
connect(this, SIGNAL(okClicked()), this, SLOT(slotOk()));
|
connect(this, &ViewPropertiesDialog::okClicked, this, &ViewPropertiesDialog::slotOk);
|
||||||
connect(this, SIGNAL(applyClicked()), this, SLOT(slotApply()));
|
connect(this, &ViewPropertiesDialog::applyClicked, this, &ViewPropertiesDialog::slotApply);
|
||||||
|
|
||||||
// Only show the following settings if the view properties are remembered
|
// Only show the following settings if the view properties are remembered
|
||||||
// for each directory:
|
// for each directory:
|
||||||
|
@ -187,14 +187,14 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
|
||||||
topLayout->addWidget(applyBox);
|
topLayout->addWidget(applyBox);
|
||||||
topLayout->addWidget(m_useAsDefault);
|
topLayout->addWidget(m_useAsDefault);
|
||||||
|
|
||||||
connect(m_applyToCurrentFolder, SIGNAL(clicked(bool)),
|
connect(m_applyToCurrentFolder, &QRadioButton::clicked,
|
||||||
this, SLOT(markAsDirty(bool)));
|
this, &ViewPropertiesDialog::markAsDirty);
|
||||||
connect(m_applyToSubFolders, SIGNAL(clicked(bool)),
|
connect(m_applyToSubFolders, &QRadioButton::clicked,
|
||||||
this, SLOT(markAsDirty(bool)));
|
this, &ViewPropertiesDialog::markAsDirty);
|
||||||
connect(m_applyToAllFolders, SIGNAL(clicked(bool)),
|
connect(m_applyToAllFolders, &QRadioButton::clicked,
|
||||||
this, SLOT(markAsDirty(bool)));
|
this, &ViewPropertiesDialog::markAsDirty);
|
||||||
connect(m_useAsDefault, SIGNAL(clicked(bool)),
|
connect(m_useAsDefault, &QCheckBox::clicked,
|
||||||
this, SLOT(markAsDirty(bool)));
|
this, &ViewPropertiesDialog::markAsDirty);
|
||||||
}
|
}
|
||||||
|
|
||||||
main->setLayout(topLayout);
|
main->setLayout(topLayout);
|
||||||
|
|
|
@ -75,18 +75,18 @@ ViewPropsProgressInfo::ViewPropsProgressInfo(QWidget* parent,
|
||||||
// allows to give a progress indication for the user when applying the view
|
// allows to give a progress indication for the user when applying the view
|
||||||
// properties later.
|
// properties later.
|
||||||
m_dirSizeJob = KIO::directorySize(dir);
|
m_dirSizeJob = KIO::directorySize(dir);
|
||||||
connect(m_dirSizeJob, SIGNAL(result(KJob*)),
|
connect(m_dirSizeJob, &KIO::DirectorySizeJob::result,
|
||||||
this, SLOT(applyViewProperties()));
|
this, &ViewPropsProgressInfo::applyViewProperties);
|
||||||
|
|
||||||
// The directory size job cannot emit any progress signal, as it is not aware
|
// The directory size job cannot emit any progress signal, as it is not aware
|
||||||
// about the total number of directories. Therefor a timer is triggered, which
|
// about the total number of directories. Therefor a timer is triggered, which
|
||||||
// periodically updates the current directory count.
|
// periodically updates the current directory count.
|
||||||
m_timer = new QTimer(this);
|
m_timer = new QTimer(this);
|
||||||
connect(m_timer, SIGNAL(timeout()),
|
connect(m_timer, &QTimer::timeout,
|
||||||
this, SLOT(updateProgress()));
|
this, &ViewPropsProgressInfo::updateProgress);
|
||||||
m_timer->start(300);
|
m_timer->start(300);
|
||||||
|
|
||||||
connect(this, SIGNAL(cancelClicked()), this, SLOT(cancelApplying()));
|
connect(this, &ViewPropsProgressInfo::cancelClicked, this, &ViewPropsProgressInfo::cancelApplying);
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewPropsProgressInfo::~ViewPropsProgressInfo()
|
ViewPropsProgressInfo::~ViewPropsProgressInfo()
|
||||||
|
@ -128,8 +128,8 @@ void ViewPropsProgressInfo::applyViewProperties()
|
||||||
m_dirSizeJob = 0;
|
m_dirSizeJob = 0;
|
||||||
|
|
||||||
m_applyViewPropsJob = new ApplyViewPropsJob(m_dir, *m_viewProps);
|
m_applyViewPropsJob = new ApplyViewPropsJob(m_dir, *m_viewProps);
|
||||||
connect(m_applyViewPropsJob, SIGNAL(result(KJob*)),
|
connect(m_applyViewPropsJob, &ApplyViewPropsJob::result,
|
||||||
this, SLOT(close()));
|
this, &ViewPropsProgressInfo::close);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewPropsProgressInfo::cancelApplying()
|
void ViewPropsProgressInfo::cancelApplying()
|
||||||
|
|
|
@ -72,8 +72,8 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent) :
|
||||||
m_zoomSlider->setPageStep(1);
|
m_zoomSlider->setPageStep(1);
|
||||||
m_zoomSlider->setRange(ZoomLevelInfo::minimumLevel(), ZoomLevelInfo::maximumLevel());
|
m_zoomSlider->setRange(ZoomLevelInfo::minimumLevel(), ZoomLevelInfo::maximumLevel());
|
||||||
|
|
||||||
connect(m_zoomSlider, SIGNAL(valueChanged(int)), this, SIGNAL(zoomLevelChanged(int)));
|
connect(m_zoomSlider, &QSlider::valueChanged, this, &DolphinStatusBar::zoomLevelChanged);
|
||||||
connect(m_zoomSlider, SIGNAL(sliderMoved(int)), this, SLOT(showZoomSliderToolTip(int)));
|
connect(m_zoomSlider, &QSlider::sliderMoved, this, &DolphinStatusBar::showZoomSliderToolTip);
|
||||||
|
|
||||||
// Initialize space information
|
// Initialize space information
|
||||||
m_spaceInfo = new StatusBarSpaceInfo(this);
|
m_spaceInfo = new StatusBarSpaceInfo(this);
|
||||||
|
@ -85,7 +85,7 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent) :
|
||||||
m_stopButton->setAutoRaise(true);
|
m_stopButton->setAutoRaise(true);
|
||||||
m_stopButton->setToolTip(i18nc("@tooltip", "Stop loading"));
|
m_stopButton->setToolTip(i18nc("@tooltip", "Stop loading"));
|
||||||
m_stopButton->hide();
|
m_stopButton->hide();
|
||||||
connect(m_stopButton, SIGNAL(clicked()), this, SIGNAL(stopPressed()));
|
connect(m_stopButton, &QToolButton::clicked, this, &DolphinStatusBar::stopPressed);
|
||||||
|
|
||||||
m_progressTextLabel = new QLabel(this);
|
m_progressTextLabel = new QLabel(this);
|
||||||
m_progressTextLabel->hide();
|
m_progressTextLabel->hide();
|
||||||
|
@ -96,12 +96,12 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent) :
|
||||||
m_showProgressBarTimer = new QTimer(this);
|
m_showProgressBarTimer = new QTimer(this);
|
||||||
m_showProgressBarTimer->setInterval(500);
|
m_showProgressBarTimer->setInterval(500);
|
||||||
m_showProgressBarTimer->setSingleShot(true);
|
m_showProgressBarTimer->setSingleShot(true);
|
||||||
connect(m_showProgressBarTimer, SIGNAL(timeout()), this, SLOT(updateProgressInfo()));
|
connect(m_showProgressBarTimer, &QTimer::timeout, this, &DolphinStatusBar::updateProgressInfo);
|
||||||
|
|
||||||
m_resetToDefaultTextTimer = new QTimer(this);
|
m_resetToDefaultTextTimer = new QTimer(this);
|
||||||
m_resetToDefaultTextTimer->setInterval(ResetToDefaultTimeout);
|
m_resetToDefaultTextTimer->setInterval(ResetToDefaultTimeout);
|
||||||
m_resetToDefaultTextTimer->setSingleShot(true);
|
m_resetToDefaultTextTimer->setSingleShot(true);
|
||||||
connect(m_resetToDefaultTextTimer, SIGNAL(timeout()), this, SLOT(slotResetToDefaultText()));
|
connect(m_resetToDefaultTextTimer, &QTimer::timeout, this, &DolphinStatusBar::slotResetToDefaultText);
|
||||||
|
|
||||||
// Initialize top layout and size policies
|
// Initialize top layout and size policies
|
||||||
const int fontHeight = QFontMetrics(m_label->font()).height();
|
const int fontHeight = QFontMetrics(m_label->font()).height();
|
||||||
|
|
|
@ -35,7 +35,7 @@ StatusBarSpaceInfo::StatusBarSpaceInfo(QWidget* parent) :
|
||||||
// Use a timer to update the space information. Polling is useful
|
// Use a timer to update the space information. Polling is useful
|
||||||
// here, as files can be deleted/added outside the scope of Dolphin.
|
// here, as files can be deleted/added outside the scope of Dolphin.
|
||||||
m_timer = new QTimer(this);
|
m_timer = new QTimer(this);
|
||||||
connect(m_timer, SIGNAL(timeout()), this, SLOT(calculateSpaceInfo()));
|
connect(m_timer, &QTimer::timeout, this, &StatusBarSpaceInfo::calculateSpaceInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusBarSpaceInfo::~StatusBarSpaceInfo()
|
StatusBarSpaceInfo::~StatusBarSpaceInfo()
|
||||||
|
|
Loading…
Reference in a new issue