diff options
| author | Rahman Duran <[email protected]> | 2009-03-25 22:00:50 +0000 |
|---|---|---|
| committer | Rahman Duran <[email protected]> | 2009-03-25 22:00:50 +0000 |
| commit | bd2f7179de1b42399b5f04ef65221e8e81250392 (patch) | |
| tree | 3ed1e361a19414eeb5049c2c079e161a5d9ebb0c /src/dolphinremoteencoding.h | |
| parent | 750bb9e12c9ef1ef85e93535e619f91f17ae04cc (diff) | |
BUG: 175658
GUI:
The remote encoding code adapted from Konqueror to Dolphin. Now user can change
encoding for remote urls like ftp. Konqueror doesn't use
KRemoteEncodingPlugin anymore. Instead, this feature is supplied to
Konqueror via DolphinPart.
svn path=/trunk/KDE/kdebase/apps/; revision=944659
Diffstat (limited to 'src/dolphinremoteencoding.h')
| -rw-r--r-- | src/dolphinremoteencoding.h | 82 |
1 files changed, 43 insertions, 39 deletions
diff --git a/src/dolphinremoteencoding.h b/src/dolphinremoteencoding.h index a61d1fee1..97b6f8b60 100644 --- a/src/dolphinremoteencoding.h +++ b/src/dolphinremoteencoding.h @@ -1,61 +1,65 @@ -/* - Copyright (c) 2003 Thiago Macieira <[email protected]> +/*************************************************************************** + * Copyright (C) 2009 by Rahman Duran <[email protected]> * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License (LGPL) as published by the Free Software Foundation; - either version 2 of the License, or (at your option) any later - version. +#ifndef DOLPHINREMOTEENCODING_H +#define DOLPHINREMOTEENCODING_H - 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 REMOTEENCODING_PLUGIN_H -#define REMOTEENCODING_PLUGIN_H - -#include <QtCore/QStringList> +#include <QStringList> +#include <QtGui/QAction> #include <kurl.h> -#include <klibloader.h> -#include <kparts/plugin.h> + class KActionMenu; -namespace KParts { class ReadOnlyPart; } +class DolphinViewActionHandler; + +/** + * @brief Allows to chnage character encoding for remote urls like ftp. + * + * When browsing remote url, its possible to change encoding from Tools Menu. + */ -class KRemoteEncodingPlugin: public KParts::Plugin +class DolphinRemoteEncoding: public QObject { Q_OBJECT public: - KRemoteEncodingPlugin(QObject * parent, const QStringList &); - ~KRemoteEncodingPlugin(); + DolphinRemoteEncoding(QObject* parent, DolphinViewActionHandler* actionHandler); + ~DolphinRemoteEncoding(); -protected Q_SLOTS: - void slotAboutToOpenURL(); - void slotAboutToShow(); - void slotItemSelected(int); +public Q_SLOTS: + void slotAboutToOpenUrl(); + void slotItemSelected(QAction* action); void slotReload(); void slotDefault(); - -protected: - virtual bool eventFilter(QObject*obj, QEvent *ev); - + +private Q_SLOTS: + void slotAboutToShow(); + private: - void updateBrowser(); + void updateView(); void loadSettings(); void fillMenu(); void updateMenu(); - KParts::ReadOnlyPart *m_part; - KActionMenu *m_menu; + KActionMenu* m_menu; QStringList m_encodingDescriptions; KUrl m_currentURL; + DolphinViewActionHandler* m_actionHandler; bool m_loaded; int m_idDefault; |
