"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/permissionsplugin.h" between
krename-4.0.9.tar.gz and krename-4.90.90.tar.gz

About: KRename is a batch file-renamer (KDE).

permissionsplugin.h  (krename-4.0.9):permissionsplugin.h  (krename-4.90.90)
skipping to change at line 18 skipping to change at line 18
/*************************************************************************** /***************************************************************************
* * * *
* This program is free software; you can redistribute it and/or modify * * 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 * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
***************************************************************************/ ***************************************************************************/
#ifndef _PERMISSIONS_PLUGIN_H_ #ifndef PERMISSIONS_PLUGIN_H
#define _PERMISSIONS_PLUGIN_H_ #define PERMISSIONS_PLUGIN_H
#include "plugin.h" #include "plugin.h"
#include <QObject> #include <QObject>
namespace Ui { namespace Ui
class PermissionsPluginWidget; {
class PermissionsPluginWidget;
}; };
/** This is the abstract interface that has to be implemented /** This is the abstract interface that has to be implemented
* by all KRename plugins. * by all KRename plugins.
*/ */
class PermissionsPlugin : public QObject, public Plugin { class PermissionsPlugin : public QObject, public Plugin
{
Q_OBJECT Q_OBJECT
public: public:
PermissionsPlugin( PluginLoader* loader ); explicit PermissionsPlugin(PluginLoader *loader);
virtual ~PermissionsPlugin(); virtual ~PermissionsPlugin();
/** /**
* @returns a name of the plugin that can be displayed * @returns a name of the plugin that can be displayed
* to the user. This name should be internationalized. * to the user. This name should be internationalized.
*/ */
virtual const QString name() const; virtual const QString name() const;
/** /**
* Determines the type of the plugin. * Determines the type of the plugin.
skipping to change at line 94 skipping to change at line 96
* in brackets. If your plugin supports the token [ex ample], * in brackets. If your plugin supports the token [ex ample],
* KRename will pass the strign "example" to your met hod. * KRename will pass the strign "example" to your met hod.
* @param eCurrentType the current type of plugin that is requested (for plu gins that support more than one type) * @param eCurrentType the current type of plugin that is requested (for plu gins that support more than one type)
* *
* @returns the result of the function, depending on type(). * @returns the result of the function, depending on type().
* @returns QString::null if this plugin has nothing to do. * @returns QString::null if this plugin has nothing to do.
* @returns A new filename if type is ePluginType_Filename * @returns A new filename if type is ePluginType_Filename
* @returns the value of the token if type is ePluginType_Token * @returns the value of the token if type is ePluginType_Token
* @returns an error message or QString::null if type is ePluginType_File * @returns an error message or QString::null if type is ePluginType_File
*/ */
virtual QString processFile( BatchRenamer* b, int index, const QString & fil enameOrToken, EPluginType eCurrentType ); virtual QString processFile(BatchRenamer *b, int index, const QString &filen ameOrToken, EPluginType eCurrentType);
/** Get a list of all tokens supported by this plugin. /** Get a list of all tokens supported by this plugin.
* *
* If the token type != ePluginType_Token you have to return an empty list * If the token type != ePluginType_Token you have to return an empty list
* *
* @returns a list of all supported tokens. The returned strings will be tr eated * @returns a list of all supported tokens. The returned strings will be tr eated
* as regular expressions to find a plugin which supports a token. * as regular expressions to find a plugin which supports a token.
*/ */
inline virtual const QStringList & supportedTokens() const; inline virtual const QStringList &supportedTokens() const;
/** Returns help descriptions for the supported tokens /** Returns help descriptions for the supported tokens
* *
* The returned stringlist contains strings that are the tokens * The returned stringlist contains strings that are the tokens
* and the description separated by ;; * and the description separated by ;;
* *
* @returns a stringlist containing help on the supported tokens * @returns a stringlist containing help on the supported tokens
*/ */
inline virtual const QStringList & help() const; inline virtual const QStringList &help() const;
/** Create a user interface for this plugin /** Create a user interface for this plugin
* *
* @param parent the parent widget of this plugin * @param parent the parent widget of this plugin
*/ */
virtual void createUI( QWidget* parent ) const; virtual void createUI(QWidget *parent) const;
private slots: private Q_SLOTS:
void slotEnableControls(); void slotEnableControls();
void slotAdvancedPermissions(); void slotAdvancedPermissions();
void slotUpdatePermissions(); void slotUpdatePermissions();
private: private:
int getGid( const QString & group ) const; int getGid(const QString &group) const;
int getUid( const QString & owner ) const; int getUid(const QString &owner) const;
//void setCurrentPermissions( int perm ); //void setCurrentPermissions( int perm );
private: private:
Ui::PermissionsPluginWidget* m_widget; Ui::PermissionsPluginWidget *m_widget;
int m_curPermission; ///< The current permissions int m_curPermission; ///< The current permissions
QStringList m_tmp; ///< Dummy empty list so that we can return a referenc e for supported tokens and help QStringList m_tmp; ///< Dummy empty list so that we can return a referenc e for supported tokens and help
QStringList m_users; ///< List of all usernames on the system QStringList m_users; ///< List of all usernames on the system
QStringList m_groups; ///< List of all groups on the system QStringList m_groups; ///< List of all groups on the system
}; };
inline int PermissionsPlugin::type() const inline int PermissionsPlugin::type() const
{ {
return ePluginType_File; return ePluginType_File;
} }
inline bool PermissionsPlugin::alwaysEnabled() const inline bool PermissionsPlugin::alwaysEnabled() const
{ {
return false; return false;
} }
inline const QStringList & PermissionsPlugin::supportedTokens() const inline const QStringList &PermissionsPlugin::supportedTokens() const
{ {
return m_tmp; return m_tmp;
} }
inline const QStringList & PermissionsPlugin::help() const inline const QStringList &PermissionsPlugin::help() const
{ {
return m_tmp; return m_tmp;
} }
#endif /* _PERMISSIONS_PLUGIN_H_ */ #endif /* PERMISSIONS_PLUGIN_H */
 End of changes. 16 change blocks. 
20 lines changed or deleted 22 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)