diff --git a/src/platformtheme/kdeplatformfiledialogbase_p.h b/src/platformtheme/kdeplatformfiledialogbase_p.h index bf4b175..5936dfb 100644 --- a/src/platformtheme/kdeplatformfiledialogbase_p.h +++ b/src/platformtheme/kdeplatformfiledialogbase_p.h @@ -1,57 +1,56 @@ /* This file is part of the KDE libraries * Copyright 2013 Aleix Pol Gonzalez * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2 of the License or ( at * your option ) version 3 or, at the discretion of KDE e.V. ( which shall * act as a proxy as in section 14 of the GPLv3 ), any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KDEPLATFORMFILEDIALOGBASE_H #define KDEPLATFORMFILEDIALOGBASE_H #include #include class KFileWidget; class QDialogButtonBox; class KDEPlatformFileDialogBase : public QDialog { Q_OBJECT public: friend class KDEPlatformFileDialogHelper; explicit KDEPlatformFileDialogBase(); virtual QUrl directory() = 0; virtual void selectNameFilter(const QString &filter) = 0; virtual void setDirectory(const QUrl &directory) = 0; virtual void selectFile(const QUrl &filename) = 0; virtual QString selectedNameFilter() = 0; virtual QList selectedFiles() = 0; Q_SIGNALS: void closed(); void fileSelected(const QUrl &file); void filesSelected(const QList &files); void currentChanged(const QUrl &path); void directoryEntered(const QUrl &directory); void filterSelected(const QString &filter); protected: - void closeEvent(QCloseEvent *e); + void closeEvent(QCloseEvent *e) Q_DECL_OVERRIDE; QDialogButtonBox *m_buttons; - }; #endif diff --git a/src/platformtheme/kdeplatformfiledialoghelper.h b/src/platformtheme/kdeplatformfiledialoghelper.h index 5d429de..682b9e6 100644 --- a/src/platformtheme/kdeplatformfiledialoghelper.h +++ b/src/platformtheme/kdeplatformfiledialoghelper.h @@ -1,79 +1,79 @@ /* This file is part of the KDE libraries * Copyright 2013 Aleix Pol Gonzalez * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2 of the License or ( at * your option ) version 3 or, at the discretion of KDE e.V. ( which shall * act as a proxy as in section 14 of the GPLv3 ), any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KDEPLATFORMFILEDIALOGHELPER_H #define KDEPLATFORMFILEDIALOGHELPER_H #include #include "kdeplatformfiledialogbase_p.h" class KFileWidget; class QDialogButtonBox; class KDEPlatformFileDialog : public KDEPlatformFileDialogBase { Q_OBJECT public: friend class KDEPlatformFileDialogHelper; explicit KDEPlatformFileDialog(); - QUrl directory(); - void selectNameFilter(const QString &filter); - void setDirectory(const QUrl &directory); - void selectFile(const QUrl &filename); + QUrl directory() Q_DECL_OVERRIDE; + void selectNameFilter(const QString &filter) Q_DECL_OVERRIDE; + void setDirectory(const QUrl &directory) Q_DECL_OVERRIDE; + void selectFile(const QUrl &filename) Q_DECL_OVERRIDE; void setViewMode(QFileDialogOptions::ViewMode view); void setFileMode(QFileDialogOptions::FileMode mode); - QString selectedNameFilter(); - QList selectedFiles(); + QString selectedNameFilter() Q_DECL_OVERRIDE; + QList selectedFiles() Q_DECL_OVERRIDE; protected: KFileWidget *m_fileWidget; }; class KDEPlatformFileDialogHelper : public QPlatformFileDialogHelper { Q_OBJECT public: KDEPlatformFileDialogHelper(); virtual ~KDEPlatformFileDialogHelper(); void initializeDialog(); virtual bool defaultNameFilterDisables() const Q_DECL_OVERRIDE; virtual QUrl directory() const Q_DECL_OVERRIDE; virtual QList selectedFiles() const Q_DECL_OVERRIDE; virtual QString selectedNameFilter() const Q_DECL_OVERRIDE; virtual void selectNameFilter(const QString &filter) Q_DECL_OVERRIDE; virtual void selectFile(const QUrl &filename) Q_DECL_OVERRIDE; virtual void setFilter() Q_DECL_OVERRIDE; virtual void setDirectory(const QUrl &directory) Q_DECL_OVERRIDE; virtual bool isSupportedUrl(const QUrl& url) const Q_DECL_OVERRIDE; virtual void exec() Q_DECL_OVERRIDE; virtual void hide() Q_DECL_OVERRIDE; virtual bool show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) Q_DECL_OVERRIDE; private Q_SLOTS: void saveSize(); private: KDEPlatformFileDialogBase *m_dialog; }; #endif // KDEPLATFORMFILEDIALOGHELPER_H diff --git a/src/platformtheme/kdeplatformtheme.h b/src/platformtheme/kdeplatformtheme.h index 7be9675..754e17d 100644 --- a/src/platformtheme/kdeplatformtheme.h +++ b/src/platformtheme/kdeplatformtheme.h @@ -1,58 +1,58 @@ /* This file is part of the KDE libraries * Copyright 2013 Kevin Ottens * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2 of the License or ( at * your option ) version 3 or, at the discretion of KDE e.V. ( which shall * act as a proxy as in section 14 of the GPLv3 ), any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KDEPLATFORMTHEME_H #define KDEPLATFORMTHEME_H #include #include #include #include class KHintsSettings; class KFontSettingsData; class QIconEngine; class KdePlatformTheme : public QPlatformTheme { public: KdePlatformTheme(); ~KdePlatformTheme(); - virtual QVariant themeHint(ThemeHint hint) const; - virtual const QPalette *palette(Palette type = SystemPalette) const; - virtual const QFont *font(Font type) const; - virtual QIconEngine *createIconEngine(const QString &iconName) const; - virtual QList keyBindings(QKeySequence::StandardKey key) const; - - virtual QPlatformDialogHelper *createPlatformDialogHelper(DialogType type) const; - virtual bool usePlatformNativeDialog(DialogType type) const; + virtual QVariant themeHint(ThemeHint hint) const Q_DECL_OVERRIDE; + virtual const QPalette *palette(Palette type = SystemPalette) const Q_DECL_OVERRIDE; + virtual const QFont *font(Font type) const Q_DECL_OVERRIDE; + virtual QIconEngine *createIconEngine(const QString &iconName) const Q_DECL_OVERRIDE; + virtual QList keyBindings(QKeySequence::StandardKey key) const Q_DECL_OVERRIDE; + + virtual QPlatformDialogHelper *createPlatformDialogHelper(DialogType type) const Q_DECL_OVERRIDE; + virtual bool usePlatformNativeDialog(DialogType type) const Q_DECL_OVERRIDE; virtual QPlatformSystemTrayIcon *createPlatformSystemTrayIcon() const Q_DECL_OVERRIDE; private: void loadSettings(); KHintsSettings *m_hints; KFontSettingsData *m_fontsData; }; #endif // KDEPLATFORMTHEME_H diff --git a/src/platformtheme/kdirselectdialog_p.h b/src/platformtheme/kdirselectdialog_p.h index 5a8e758..8359869 100644 --- a/src/platformtheme/kdirselectdialog_p.h +++ b/src/platformtheme/kdirselectdialog_p.h @@ -1,131 +1,131 @@ /* Copyright (C) 2001 Michael Jarrett Copyright (C) 2001 Carsten Pfeiffer Copyright (C) 2009 Shaun Reich This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KDIRSELECTDIALOG_H #define KDIRSELECTDIALOG_H #include "kdeplatformfiledialogbase_p.h" #include class QAbstractItemView; /** * A pretty dialog for a KDirSelect control for selecting directories. * @author Michael Jarrett * @deprecated since 5.0, use QFileDialog::getExistingDirectoryUrl instead. */ class KDirSelectDialog : public KDEPlatformFileDialogBase { Q_OBJECT public: /** * Creates a new directory selection dialog. * @internal use the static selectDirectory function * @param startDir the directory, initially shown * @param localOnly unused. You can only select paths below the startDir * @param parent the parent for the dialog, usually 0L */ explicit KDirSelectDialog(const QUrl &startDir = QUrl(), bool localOnly = false, QWidget *parent = 0L); /** * Destroys the directory selection dialog. */ ~KDirSelectDialog(); /** * Returns the currently selected URL, or an empty one if no item is selected. * * If the URL entered in the combobox is valid and exists, it is returned. * Otherwise, the URL selected in the treeview is returned instead. */ QUrl url() const; /** * Returns a pointer to the view which is used for displaying the directories. */ QAbstractItemView *view() const; /** * Returns whether only local directories can be selected. */ bool localOnly() const; /** * Creates a KDirSelectDialog, and returns the result. * @param startDir the directory, initially shown * The tree will display this directory and subdirectories of it. * @param localOnly unused. You can only select paths below the startDir * @param parent the parent widget to use for the dialog, or NULL to create a parent-less dialog * @param caption the caption to use for the dialog, or QString() for the default caption * @return The URL selected, or an empty URL if the user canceled * or no URL was selected. * * @deprecated since 5.0, use QFileDialog::getExistingDirectory (if localOnly was true) * or QFileDialog::getExistingDirectoryUrl (if localOnly was false) instead. */ static QUrl selectDirectory(const QUrl &startDir = QUrl(), bool localOnly = false, QWidget *parent = 0L, const QString &caption = QString()); /** * @return The path for the root node */ QUrl startDir() const; - virtual QUrl directory(); - virtual void selectNameFilter(const QString &filter); - virtual void setDirectory(const QUrl &directory); - virtual void selectFile(const QUrl &filename); - virtual QString selectedNameFilter(); - virtual QList selectedFiles(); + virtual QUrl directory() Q_DECL_OVERRIDE; + virtual void selectNameFilter(const QString &filter) Q_DECL_OVERRIDE; + virtual void setDirectory(const QUrl &directory) Q_DECL_OVERRIDE; + virtual void selectFile(const QUrl &filename) Q_DECL_OVERRIDE; + virtual QString selectedNameFilter() Q_DECL_OVERRIDE; + virtual QList selectedFiles() Q_DECL_OVERRIDE; public Q_SLOTS: /** * Sets the current @p url in the dialog. */ void setCurrentUrl(const QUrl &url); protected: virtual void accept(); /** * Reimplemented for saving the dialog geometry. */ - virtual void hideEvent(QHideEvent *event); + virtual void hideEvent(QHideEvent *event) Q_DECL_OVERRIDE; private: class Private; Private *const d; Q_PRIVATE_SLOT(d, void slotCurrentChanged()) Q_PRIVATE_SLOT(d, void slotExpand(const QModelIndex &)) Q_PRIVATE_SLOT(d, void slotUrlActivated(const QString &)) Q_PRIVATE_SLOT(d, void slotComboTextChanged(const QString &)) Q_PRIVATE_SLOT(d, void slotContextMenuRequested(const QPoint &)) Q_PRIVATE_SLOT(d, void slotNewFolder()) Q_PRIVATE_SLOT(d, void slotMoveToTrash()) Q_PRIVATE_SLOT(d, void slotDelete()) Q_PRIVATE_SLOT(d, void slotProperties()) }; #endif diff --git a/src/platformtheme/kfiletreeview_p.h b/src/platformtheme/kfiletreeview_p.h index 42530c8..0ed24b1 100644 --- a/src/platformtheme/kfiletreeview_p.h +++ b/src/platformtheme/kfiletreeview_p.h @@ -1,128 +1,128 @@ /* This file is part of the KDE project Copyright (C) 2007 Tobias Koenig This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KFILETREEVIEW_H #define KFILETREEVIEW_H #include #include /** * The file treeview offers a treeview on the filesystem. */ class KFileTreeView : public QTreeView // exported only for kfiletreeviewtest { Q_OBJECT public: /** * Creates a new file tree view. */ KFileTreeView(QWidget *parent = 0); /** * Destroys the file tree view. */ ~KFileTreeView(); /** * Returns the current url. */ QUrl currentUrl() const; /** * Returns the selected url. */ QUrl selectedUrl() const; /** * Returns all selected urls. */ QList selectedUrls() const; /** * Returns the current root url of the view. */ QUrl rootUrl() const; /** * Returns true if the view is currently showing hidden files * @since 4.3 */ bool showHiddenFiles() const; /** * @reimplemented */ - QSize sizeHint() const; + QSize sizeHint() const Q_DECL_OVERRIDE; public Q_SLOTS: /** * Sets whether the dir-only mode is @p enabled. * * In dir-only mode, only directories and subdirectories * are listed in the view. */ void setDirOnlyMode(bool enabled); /** * Sets whether hidden files shall be listed. */ void setShowHiddenFiles(bool enabled); /** * Sets the current @p url of the view. */ void setCurrentUrl(const QUrl &url); /** * Sets the root @p url of the view. * * The default is file:///. */ void setRootUrl(const QUrl &url); Q_SIGNALS: /** * This signal is emitted whenever an @p url has been activated. */ void activated(const QUrl &url); /** * This signal is emitted whenever the current @p url has been changed. */ void currentChanged(const QUrl &url); protected: using QTreeView::currentChanged; virtual void contextMenuEvent(QContextMenuEvent *); private: class Private; Private *const d; Q_PRIVATE_SLOT(d, void _k_activated(const QModelIndex &)) Q_PRIVATE_SLOT(d, void _k_currentChanged(const QModelIndex &, const QModelIndex &)) Q_PRIVATE_SLOT(d, void _k_expanded(const QModelIndex &)) }; #endif