• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

KDECore

  • KAuth
  • HelperSupport
Functions

KAuth::HelperSupport Namespace Reference

Support class with some KDECORE_EXPORT methods useful to the helper's code. More...

Functions

void helperDebugHandler (QtMsgType type, const char *msg)
int helperMain (int argc, char **argv, const char *id, QObject *responder)
bool isStopped ()
void progressStep (const QVariantMap &data)
void progressStep (int step)

Detailed Description

Support class with some KDECORE_EXPORT methods useful to the helper's code.

This class provides the API to write the helper tool that executes your actions. You don't create instances of HelperSupport. Instead, you use its KDECORE_EXPORT methods.

This them you can notify the application of progress in your action's execution and you can check if the application asked you to terminate it.

Since:
4.4

Function Documentation

void KAuth::HelperSupport::helperDebugHandler ( QtMsgType  type,
const char *  msg 
)

Definition at line 70 of file kauthhelpersupport.cpp.

int KAuth::HelperSupport::helperMain ( int  argc,
char **  argv,
const char *  id,
QObject *  responder 
)

Method that implements the main function of the helper tool.

Do not call directly

This method is called in the proper way by the code generated by the KDE4_AUTH_HELPER_MAIN(), which creates a main() function for the helper tool. macro. You shouldn't call this method directly.

Parameters:
argcThe argc parameter from the main() function.
argvThe argv parameter from the main() function.
idThe helper ID as passed to the macro
responderThe responder object for the helper. The macro passes a default-constructed, heap-allocated object of the class specified as the last macro parameter

Definition at line 43 of file kauthhelpersupport.cpp.

bool KAuth::HelperSupport::isStopped ( )

Check if the caller asked the helper to stop the execution.

This method will return true if the helper has been asked to stop the execution of the current action. If this happens, your helper should return (NOT exit). The meaning of the data you return in this case is application-dependent. It's good practice to check it regularly if you have a long-running action

Returns:
true if the helper has been asked to stop, false otherwise

Definition at line 107 of file kauthhelpersupport.cpp.

void KAuth::HelperSupport::progressStep ( const QVariantMap &  data)

Send a progressStep signal to the caller application.

You can use this method to notify progress information about the action execution. When you call this method, the ActionWatcher object associated with the current action will emit the progressStep(QVariantMap) signal. The meaning of the data passed here is totally application dependent. If you only need a simple percentage value, use the other overload which takes an int.

Parameters:
dataThe progress data

Definition at line 102 of file kauthhelpersupport.cpp.

void KAuth::HelperSupport::progressStep ( int  step)

Send a progressStep signal to the caller application.

You can use this method to notify progress information about the action execution. When you call this method, the ActionWatcher object associated with the current action will emit the progressStep(int) signal. The meaning of the integer passed here is totally application dependent, but you'll want to use it as a sort of percentage. If you need to be more expressive, use the other overload which takes a QVariantMap

Parameters:
stepThe progress indicator

Definition at line 97 of file kauthhelpersupport.cpp.

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal