All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Slots | Public Member Functions
Qtilities::Plugins::Help::HelpMode Class Reference

An implementation of Qtilities::CoreGui::Interfaces::IMode which make a GUI frontend for the HELP_MANAGER available as a mode in an application. More...

#include <HelpMode.h>

Inheritance diagram for Qtilities::Plugins::Help::HelpMode:
Inheritance graph
[legend]

List of all members.

Public Slots

void handleHomePageChanged (const QUrl &url)
 Handle home page changed.
void handleNewHelpWidget (QWidget *widget)
 Handles a new help widget. This function makes the necessary connections.
void handleUrl (const QUrl &url)
 Display the page at url.
void handleUrlRequest (const QUrl &url, bool ensure_visible)
 Handle requests from the help manager to display the url.
void toggleDock (bool toggle)
 Toggles the visibility of the dynamic help dock widget.

Public Member Functions

QString contextHelpId () const
 Returns a help ID for this context.
QString contextString () const
 Returns a context string for the context associated with this mode.
void initializeMode ()
 This function is called in the initializeDependencies() function, thus all objects implementing interfaces in which a mode might be interested will be present in the global object pool.
void initiallize ()
 Initializes the help mode.
QIcon modeIcon () const
 An icon for the mode.
int modeID () const
 Returns a unique ID for this mode.
QString modeName () const
 The name of the mode which is the text used to represent it.
QWidget * modeWidget ()
 The main window's central widget for the mode.
QObject * objectBase ()
 Returns the QObject* base of the interface.
const QObject * objectBase () const
 Returns a const QObject* base of the interface.
bool setModeIcon (QIcon icon)
 A function which can be implemented by modes if they allow their icon to be changed. By default this function does nothing and returns false.
- Public Member Functions inherited from Qtilities::CoreGui::Interfaces::IMode
virtual void aboutToBeActivated ()
 This function is called when the mode is about to be activated. That is, when the user clicks on the mode and it is going to become the active mode.
virtual void justActivated ()
 This function is called after a mode was activated. That is, when the user clicked on the mode and it became the active mode.
void setModeID (int mode_id)
 Sets the mode ID for this mode.
void setTargetManagerIDs (QList< int > new_target_manager_ids)
 Sets the list of mode managers in which this mode must appear.
int supportedExtensionWidgetLocations () const
 Returns the supported locations of extension widgets in this mode.
QList< int > targetManagerIDs () const
 Gets the list of mode managers in which this mode must appear.
- Public Member Functions inherited from Qtilities::Core::Interfaces::IObjectBase
QString objectOriginID () const
 Allows interfaces to provide some sort of source identification.
void setObjectOriginID (const QString &object_origin_id)
 Allows setting of the object source ID of this interface implementation.

Detailed Description

An implementation of Qtilities::CoreGui::Interfaces::IMode which make a GUI frontend for the HELP_MANAGER available as a mode in an application.


Member Function Documentation

QString Qtilities::Plugins::Help::HelpMode::contextString ( ) const
inlinevirtual

Returns a context string for the context associated with this mode.

By default no context will be associated with a mode.

Reimplemented from Qtilities::CoreGui::Interfaces::IMode.

QIcon HelpMode::modeIcon ( ) const
virtual

An icon for the mode.

The expected mode icon size is 48x48.

See also:
setModeIcon()

Implements Qtilities::CoreGui::Interfaces::IMode.

int Qtilities::Plugins::Help::HelpMode::modeID ( ) const
inlinevirtual

Returns a unique ID for this mode.

A mode ID is an unique number which is associated with a mode in an application. This allows modes with the same name to be added if desired. From the developer's perspective you don't have to reimplement this function in your interface implementation. In that case the Qtilities::CoreGui::ModeManager class will assign an unique mode ID when the mode is added to the mode manager and a debug message will be printed with information about the newly assigned mode ID.

It is however desired to specify your own mode ID in some cases, more specifically if you use the Qtilities::CoreGui::DynamicSideWidgetViewer widget in your application and you want dynamic side viewer widgets to appear only in specific application modes. To achieve this your modeID() must appear in the list of Qtilities::CoreGui::Interfaces::ISideViewerWidget::destinationModes() for a specific side viewer widget implementation.

Note:
Mode IDs available for user modes range from 100 - 999. The mode manager starts to auto-assign unique mode IDs from 1000 onwards for modes which does not have their own IDs.

Reimplemented from Qtilities::CoreGui::Interfaces::IMode.

QWidget * HelpMode::modeWidget ( )
virtual

The main window's central widget for the mode.

This widget must have a proper layout in order to be displayed correctly.

Implements Qtilities::CoreGui::Interfaces::IMode.

const QObject* Qtilities::Plugins::Help::HelpMode::objectBase ( ) const
inlinevirtual

Returns a const QObject* base of the interface.

This function can be used in const methods, but make sure that you don't modify things that should stay const. An example where this is used is when we want to get a property on an object in a const method. This is a const operation.

Implements Qtilities::Core::Interfaces::IObjectBase.

bool HelpMode::setModeIcon ( QIcon  icon)
virtual

A function which can be implemented by modes if they allow their icon to be changed. By default this function does nothing and returns false.

The expected mode icon size is 48x48.

See also:
modeIcon()

Reimplemented from Qtilities::CoreGui::Interfaces::IMode.



Qtilities : Reference Documentation Back to top Copyright © 2009-2013, Jaco Naudé