File indexing completed on 2024-04-28 05:45:23
0001 /* 0002 * SPDX-FileCopyrightText: 2009 Rahman Duran <rahman.duran@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef DOLPHINREMOTEENCODING_H 0008 #define DOLPHINREMOTEENCODING_H 0009 0010 #include "dolphin_export.h" 0011 0012 #include <QAction> 0013 #include <QStringList> 0014 #include <QUrl> 0015 0016 class KActionMenu; 0017 class DolphinViewActionHandler; 0018 0019 /** 0020 * @brief Allows to change character encoding for remote urls like ftp. 0021 * 0022 * When browsing remote url, its possible to change encoding from Tools Menu. 0023 */ 0024 0025 class DOLPHIN_EXPORT DolphinRemoteEncoding : public QObject 0026 { 0027 Q_OBJECT 0028 public: 0029 DolphinRemoteEncoding(QObject *parent, DolphinViewActionHandler *actionHandler); 0030 ~DolphinRemoteEncoding() override; 0031 0032 public Q_SLOTS: 0033 void slotAboutToOpenUrl(); 0034 void slotItemSelected(QAction *action); 0035 void slotReload(); 0036 void slotDefault(); 0037 0038 private Q_SLOTS: 0039 void slotAboutToShow(); 0040 0041 private: 0042 void updateView(); 0043 void loadSettings(); 0044 void fillMenu(); 0045 void updateMenu(); 0046 0047 KActionMenu *m_menu; 0048 QStringList m_encodingDescriptions; 0049 QUrl m_currentURL; 0050 DolphinViewActionHandler *m_actionHandler; 0051 0052 bool m_loaded; 0053 int m_idDefault; 0054 }; 0055 0056 #endif