]> cloud.milkyroute.net Git - dolphin.git/blob - src/views/dolphinremoteencoding.h
Apply 2 suggestion(s) to 1 file(s)
[dolphin.git] / src / views / dolphinremoteencoding.h
1 /*
2 * SPDX-FileCopyrightText: 2009 Rahman Duran <rahman.duran@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7 #ifndef DOLPHINREMOTEENCODING_H
8 #define DOLPHINREMOTEENCODING_H
9
10 #include "dolphin_export.h"
11
12 #include <QAction>
13 #include <QStringList>
14 #include <QUrl>
15
16 class KActionMenu;
17 class DolphinViewActionHandler;
18
19 /**
20 * @brief Allows to change character encoding for remote urls like ftp.
21 *
22 * When browsing remote url, its possible to change encoding from Tools Menu.
23 */
24
25 class DOLPHIN_EXPORT DolphinRemoteEncoding : public QObject
26 {
27 Q_OBJECT
28 public:
29 DolphinRemoteEncoding(QObject *parent, DolphinViewActionHandler *actionHandler);
30 ~DolphinRemoteEncoding() override;
31
32 public Q_SLOTS:
33 void slotAboutToOpenUrl();
34 void slotItemSelected(QAction *action);
35 void slotReload();
36 void slotDefault();
37
38 private Q_SLOTS:
39 void slotAboutToShow();
40
41 private:
42 void updateView();
43 void loadSettings();
44 void fillMenu();
45 void updateMenu();
46
47 KActionMenu *m_menu;
48 QStringList m_encodingDescriptions;
49 QUrl m_currentURL;
50 DolphinViewActionHandler *m_actionHandler;
51
52 bool m_loaded;
53 int m_idDefault;
54 };
55
56 #endif