OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ak::uiAPI Namespace Reference

Namespaces

namespace  action
 
namespace  checkBox
 
namespace  container
 
namespace  crypto
 
namespace  dialog
 
namespace  lineEdit
 
namespace  niceLineEdit
 
namespace  object
 
namespace  settings
 
namespace  special
 
namespace  timer
 
namespace  toolButton
 
namespace  window
 

Classes

class  apiManager
 The API manager is used to manage the global objects required for this API to work. More...
 

Functions

UICORE_API_EXPORT void ini (QApplication *_applicationInstance, const QString &_organizationName, const QString &_applicationName)
 Will initialize the application.
 
UICORE_API_EXPORT void destroy (void)
 Will destroy all objects created by this API.
 
UICORE_API_EXPORT void enableEventTypes (eventType _types)
 Will enable the provided event types to be send.
 
UICORE_API_EXPORT void disableEventTypes (eventType _types)
 Will disable the provided event types to be send.
 
UICORE_API_EXPORT void setMessengerEnabled (bool _enabled)
 Will set the enabled state of the messenger.
 
UICORE_API_EXPORT bool messengerIsEnabled (void)
 Will return the current enabled state for the messenger.
 
UICORE_API_EXPORT std::vector< eventTypeenabledEventTypes (void)
 Will return the enabled event types that will be send.
 
UICORE_API_EXPORT std::vector< eventTypedisabledEventTypes (void)
 Will return the disabled event types that will be send.
 
UICORE_API_EXPORT QWidget * getWidget (UID _objectUid)
 Will return the QWidget of the specifed object.
 
UICORE_API_EXPORT UID getObjectCreator (UID _objectUID)
 Will return the creator UID of the specified object.
 
UICORE_API_EXPORT aObjectManagergetObjectManager (void)
 Will return the object manager used in this API.
 
UICORE_API_EXPORT void registerUidNotifier (UID _senderUid, ak::aNotifier *_notifier)
 Will register the notifier at the messenger The provided notifier will get a new uid if not done so before. Returns the UID of the notifier.
 
UICORE_API_EXPORT void registerEventTypeNotifier (eventType _event, ak::aNotifier *_notifier)
 Will register the notifier at the messenger The provided notifier will get a new uid if not done so before. Returns the UID of the notifier.
 
UICORE_API_EXPORT void registerAllMessagesNotifier (ak::aNotifier *_notifier)
 Will register the notifier for all messages send at the global messenger The provided notifier will get a new uid if not done so before. Returns the UID of the notifier.
 
UICORE_API_EXPORT void sendMessage (UID _senderUid, eventType _event, int _info1=0, int _info2=0)
 Will send a message to the messanger.
 
UICORE_API_EXPORT void setSurfaceFormatDefaultSamplesCount (int _count)
 Will set the samples count for the default surface formt.
 
UICORE_API_EXPORT UID createAction (UID _creatorUid, const QString &_text, const QString &_iconName, const QString &_iconSubFolder=QString("32"))
 Will create a new Action and return its UID.
 
UICORE_API_EXPORT UID createAction (UID _craetorUid, const QString &_text, const QIcon &_icon)
 Will create a new Action and return its UID.
 
UICORE_API_EXPORT UID createCheckbox (UID _creatorUid, const QString &_text, bool _checked=false)
 Will create a new CheckBox and return its UID.
 
UICORE_API_EXPORT UID createLineEdit (UID _creatorUid, const QString &_initialText=QString(""))
 Will create a line edit and return its UID param _creatorUid The UID of the creator.
 
UICORE_API_EXPORT UID createNiceLineEdit (UID _creatorUid, const QString &_initialText, const QString &_infoLabelText)
 Will create a nice line edit.
 
UICORE_API_EXPORT UID createTabToolBarSubContainer (UID _creatorUid, UID _parentUid, const QString &_text=QString(""))
 Will create a new TabToolBar subcountainer and return its UID.
 
UICORE_API_EXPORT UID createTimer (UID _creatorUid)
 Will create a new timer and return its UID.
 
UICORE_API_EXPORT UID createToolButton (UID _creatorUid)
 Will create a toolButton and return its UID.
 
UICORE_API_EXPORT UID createToolButton (UID _creatorUid, const QString &_text)
 Will create a toolButton and return its UID.
 
UICORE_API_EXPORT UID createToolButton (UID _creatorUid, const QString &_text, const QIcon &_icon)
 Will create a toolButton and return its UID.
 
UICORE_API_EXPORT UID createToolButton (UID _creatorUid, const QString &_text, const QString &_iconName, const QString &_iconFolder)
 Will create a toolButton and return its UID.
 
UICORE_API_EXPORT UID createWindow (UID _creatorUid)
 Will create a new UI manager and return its UID.
 
UICORE_API_EXPORT void creatorDestroyed (UID _creatorUid)
 Will destroy all objects created by this creator.
 
UICORE_API_EXPORT UID createUid (void)
 Will generate a new UID and return it.
 
UICORE_API_EXPORT aMessengergetMessenger (void)
 Will return the messenger.
 
UICORE_API_EXPORT const QIcon & getIcon (const QString &_iconName, const QString &_iconSubPath)
 WIll return the icon with the specified name and path.
 
UICORE_API_EXPORT const QIcon & getApplicationIcon (const QString &_iconName)
 Will return the application icon with the specified name and path.
 
UICORE_API_EXPORT const QPixmap & getPixmap (const QString &_name)
 Will return the icon with the specified name and path.
 
UICORE_API_EXPORT QMovie * getMovie (const QString &_name)
 Will return the movie with the specified name and path.
 

Function Documentation

◆ createAction() [1/2]

ak::UID ak::uiAPI::createAction ( UID _craetorUid,
const QString & _text,
const QIcon & _icon )

Will create a new Action and return its UID.

Parameters
_creatorUidThe UID of the creator who creates this object
_textThe text of the action
_iconThe icon of the action
Exceptions
ak::Exceptionif the API is not initialized

◆ createAction() [2/2]

ak::UID ak::uiAPI::createAction ( UID _creatorUid,
const QString & _text,
const QString & _iconName,
const QString & _iconSubFolder = QString("32") )

Will create a new Action and return its UID.

Parameters
_creatorUidThe UID of the creator who creates this object
_textThe text of the action
_iconSubFolderThe sub folder the icon is located at (Folder depends on the search directories)
_iconNameThe name of the icon to display in the action (requires also the icon size to be provided)
Exceptions
ak::Exceptionif the API is not initialized

◆ createCheckbox()

ak::UID ak::uiAPI::createCheckbox ( UID _creatorUid,
const QString & _text,
bool _checked = false )

Will create a new CheckBox and return its UID.

Parameters
_creatorUidThe UID of the creator who creates this object
_textThe initial text of the CheckBox
_checkedThe initial checked state of the checkbox
Exceptions
ak::Exceptionif the API is not initialized

◆ createLineEdit()

ak::UID ak::uiAPI::createLineEdit ( UID _creatorUid,
const QString & _initialText = QString("") )

Will create a line edit and return its UID param _creatorUid The UID of the creator.

Parameters
_initialTextThe initial text to display

◆ createNiceLineEdit()

ak::UID ak::uiAPI::createNiceLineEdit ( UID _creatorUid,
const QString & _initialText,
const QString & _infoLabelText )

Will create a nice line edit.

Parameters
_initialTextThe initial text of the edit field
_infoLabelTextThe initial text of the information label

◆ createTabToolBarSubContainer()

ak::UID ak::uiAPI::createTabToolBarSubContainer ( UID _creatorUid,
UID _parentUid,
const QString & _text = QString("") )

Will create a new TabToolBar subcountainer and return its UID.

Parameters
_creatorUidThe UID of the creator who creates this object
_parentUidThe UID of the parent TabToolBar object (may be a uiManager, TabToolBarPage or TabToolBarGroup)
_textThe text of the SubContainer
Exceptions
ak::Exceptionif the provided UID is invalid or the API is not initialized

◆ createTimer()

ak::UID ak::uiAPI::createTimer ( UID _creatorUid)

Will create a new timer and return its UID.

Parameters
_creatorUidThe UID of the creator who creates this object

◆ createToolButton() [1/4]

ak::UID ak::uiAPI::createToolButton ( UID _creatorUid)

Will create a toolButton and return its UID.

Parameters
_creatorUidThe UID of the creator

◆ createToolButton() [2/4]

ak::UID ak::uiAPI::createToolButton ( UID _creatorUid,
const QString & _text )

Will create a toolButton and return its UID.

Parameters
_creatorUidThe UID of the creator
_textThe initial text of the toolButton

◆ createToolButton() [3/4]

ak::UID ak::uiAPI::createToolButton ( UID _creatorUid,
const QString & _text,
const QIcon & _icon )

Will create a toolButton and return its UID.

Parameters
_creatorUidThe UID of the creator
_textThe initial text of the toolButton
_iconThe initial icon of the toolButton

◆ createToolButton() [4/4]

ak::UID ak::uiAPI::createToolButton ( UID _creatorUid,
const QString & _text,
const QString & _iconName,
const QString & _iconFolder )

Will create a toolButton and return its UID.

Parameters
_creatorUidThe UID of the creator
_textThe initial text of the toolButton
_iconNameThe name of the initial icon for the toolButton
_iconFolderThe folder of the initial icon for the toolButton

◆ createUid()

ak::UID ak::uiAPI::createUid ( void )

Will generate a new UID and return it.

Exceptions
ak::Exceptionif the API is not initialized

◆ createWindow()

ak::UID ak::uiAPI::createWindow ( UID _creatorUid)

Will create a new UI manager and return its UID.

Parameters
_creatorUidThe UID of the creator who creates this object
Exceptions
ak::Exceptionif the provided UID is invalid or the API is not initialized

◆ creatorDestroyed()

void ak::uiAPI::creatorDestroyed ( UID _creatorUid)

Will destroy all objects created by this creator.

Parameters
_creatorUidThe UID of the creator
Exceptions
ak::Exceptionif the API is not initialized

◆ destroy()

void ak::uiAPI::destroy ( void )

Will destroy all objects created by this API.

◆ disabledEventTypes()

std::vector< ak::eventType > ak::uiAPI::disabledEventTypes ( void )

Will return the disabled event types that will be send.

◆ disableEventTypes()

void ak::uiAPI::disableEventTypes ( eventType _types)

Will disable the provided event types to be send.

Parameters
_typesThe types to disable

◆ enabledEventTypes()

std::vector< ak::eventType > ak::uiAPI::enabledEventTypes ( void )

Will return the enabled event types that will be send.

◆ enableEventTypes()

void ak::uiAPI::enableEventTypes ( eventType _types)

Will enable the provided event types to be send.

Parameters
_typesThe types to allow

◆ getApplicationIcon()

const QIcon & ak::uiAPI::getApplicationIcon ( const QString & _iconName)

Will return the application icon with the specified name and path.

◆ getIcon()

const QIcon & ak::uiAPI::getIcon ( const QString & _iconName,
const QString & _iconSubPath )

WIll return the icon with the specified name and path.

Exceptions
ak::Exceptionif the API is not initialized

◆ getMessenger()

ak::aMessenger * ak::uiAPI::getMessenger ( void )

Will return the messenger.

Exceptions
ak::Exceptionif the API is not initialized

◆ getMovie()

QMovie * ak::uiAPI::getMovie ( const QString & _name)

Will return the movie with the specified name and path.

Parameters
_nameThe name of the movie

◆ getObjectCreator()

ak::UID ak::uiAPI::getObjectCreator ( UID _objectUID)

Will return the creator UID of the specified object.

Parameters
_objectUIDThe UID of the object to get its cretor from

◆ getObjectManager()

ak::aObjectManager * ak::uiAPI::getObjectManager ( void )

Will return the object manager used in this API.

◆ getPixmap()

const QPixmap & ak::uiAPI::getPixmap ( const QString & _name)

Will return the icon with the specified name and path.

◆ getWidget()

QWidget * ak::uiAPI::getWidget ( UID _objectUid)

Will return the QWidget of the specifed object.

Parameters
_objectUidThe UID of the object

◆ ini()

void ak::uiAPI::ini ( QApplication * _applicationInstance,
const QString & _organizationName,
const QString & _applicationName )

Will initialize the application.

Parameters
_argcThe program start argument count
_argvThe program start arguments
_organizationNameThe name of the organization (required for settings set/get)
_applicationNameThe name of the application (required for settings set/get)

◆ messengerIsEnabled()

bool ak::uiAPI::messengerIsEnabled ( void )

Will return the current enabled state for the messenger.

◆ registerAllMessagesNotifier()

void ak::uiAPI::registerAllMessagesNotifier ( ak::aNotifier * _notifier)

Will register the notifier for all messages send at the global messenger The provided notifier will get a new uid if not done so before. Returns the UID of the notifier.

Parameters
_notifierThe notifier which to register
Exceptions
ak::Exceptionif the API is not initialized

◆ registerEventTypeNotifier()

void ak::uiAPI::registerEventTypeNotifier ( eventType _event,
ak::aNotifier * _notifier )

Will register the notifier at the messenger The provided notifier will get a new uid if not done so before. Returns the UID of the notifier.

Parameters
_eventThe event type for which to register the provided notifier
_notifierThe notifier which to register
Exceptions
ak::Exceptionif the API is not initialized

◆ registerUidNotifier()

void ak::uiAPI::registerUidNotifier ( UID _senderUid,
ak::aNotifier * _notifier )

Will register the notifier at the messenger The provided notifier will get a new uid if not done so before. Returns the UID of the notifier.

Parameters
_senderUidThe sender UID for which to register the provided notifier
_notifierThe notifier which to register
Exceptions
ak::Exceptionif the API is not initialized

◆ sendMessage()

void ak::uiAPI::sendMessage ( UID _senderUid,
eventType _event,
int _info1 = 0,
int _info2 = 0 )

Will send a message to the messanger.

Parameters
_senderUidWho sends this message
_messageTypeWhat type of message is send
_messageThe message itself
_info1Additional information 1
_info2Additional information 2
Exceptions
ak::Exceptionif the API is not initialized
ak::ExceptionAt any kind of error that may occur in any subroutine call when calling the receivers

◆ setMessengerEnabled()

void ak::uiAPI::setMessengerEnabled ( bool _enabled)

Will set the enabled state of the messenger.

Parameters
_enabledThe enabled state to set. If false, no messages will be sent

◆ setSurfaceFormatDefaultSamplesCount()

void ak::uiAPI::setSurfaceFormatDefaultSamplesCount ( int _count)

Will set the samples count for the default surface formt.

Parameters
_countThe count of samples