KontactInterface::PimUniqueApplication

Search for usage in LXR

#include <pimuniqueapplication.h>

Inheritance diagram for KontactInterface::PimUniqueApplication:

Public Slots

Q_SCRIPTABLE int newInstance ()
 
virtual Q_SCRIPTABLE int newInstance (const QByteArray &startupId, const QStringList &arguments, const QString &workingDirectory)
 

Public Member Functions

 PimUniqueApplication (int &argc, char **argv[])
 
QCommandLineParsercmdArgs () const
 
void setAboutData (KAboutData &aboutData)
 
- Public Member Functions inherited from QApplication
 QApplication (int &argc, char **argv)
 
bool autoSipEnabled () const const
 
void focusChanged (QWidget *old, QWidget *now)
 
virtual bool notify (QObject *receiver, QEvent *e) override
 
 qApp qApp
 
void setAutoSipEnabled (const bool enabled)
 
void setStyleSheet (const QString &sheet)
 
QString styleSheet () const const
 
- Public Member Functions inherited from QGuiApplication
 QGuiApplication (int &argc, char **argv)
 
void applicationDisplayNameChanged ()
 
void applicationStateChanged (Qt::ApplicationState state)
 
void commitDataRequest (QSessionManager &manager)
 
qreal devicePixelRatio () const const
 
void focusObjectChanged (QObject *focusObject)
 
void focusWindowChanged (QWindow *focusWindow)
 
void fontChanged (const QFont &font)
 
void fontDatabaseChanged ()
 
bool isSavingSession () const const
 
bool isSessionRestored () const const
 
void lastWindowClosed ()
 
void layoutDirectionChanged (Qt::LayoutDirection direction)
 
QNativeInterface * nativeInterface () const const
 
void paletteChanged (const QPalette &palette)
 
void primaryScreenChanged (QScreen *screen)
 
 qGuiApp qGuiApp
 
void saveStateRequest (QSessionManager &manager)
 
void screenAdded (QScreen *screen)
 
void screenRemoved (QScreen *screen)
 
QString sessionId () const const
 
QString sessionKey () const const
 
void setBadgeNumber (qint64 number)
 
- Public Member Functions inherited from QCoreApplication
 QCoreApplication (int &argc, char **argv)
 
void aboutToQuit ()
 
void applicationNameChanged ()
 
void applicationVersionChanged ()
 
Qt::PermissionStatus checkPermission (const QPermission &permission)
 
void installNativeEventFilter (QAbstractNativeEventFilter *filterObj)
 
void organizationDomainChanged ()
 
void organizationNameChanged ()
 
 Q_COREAPP_STARTUP_FUNCTION (QtStartUpFunction ptr)
 
 Q_DECLARE_TR_FUNCTIONS (context)
 
void qAddPostRoutine (QtCleanUpFunction ptr)
 
void qRemovePostRoutine (QtCleanUpFunction ptr)
 
void removeNativeEventFilter (QAbstractNativeEventFilter *filterObject)
 
void requestPermission (const QPermission &permission, const QObject *context, Functor functor)
 
void requestPermission (const QPermission &permission, Functor &&functor)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
QBindable< QStringbindableObjectName ()
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo () const const
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isQuickItemType () const const
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_GADGET_EXPORT (EXPORT_MACRO)
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_MOC_INCLUDE Q_MOC_INCLUDE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setObjectName (QAnyStringView name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool setProperty (const char *name, QVariant &&value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType)
 
QThreadthread () const const
 

Static Public Member Functions

static bool start (const QStringList &arguments)
 
- Static Public Member Functions inherited from QApplication
void aboutQt ()
 
QWidgetactiveModalWidget ()
 
QWidgetactivePopupWidget ()
 
QWidgetactiveWindow ()
 
void alert (QWidget *widget, int msec)
 
QWidgetList allWidgets ()
 
void beep ()
 
void closeAllWindows ()
 
int cursorFlashTime ()
 
int doubleClickInterval ()
 
int exec ()
 
QWidgetfocusWidget ()
 
QFont font ()
 
QFont font (const char *className)
 
QFont font (const QWidget *widget)
 
QFontMetrics fontMetrics ()
 
bool isEffectEnabled (Qt::UIEffect effect)
 
int keyboardInputInterval ()
 
Qt::NavigationMode navigationMode ()
 
QPalette palette (const char *className)
 
QPalette palette (const QWidget *widget)
 
void setActiveWindow (QWidget *active)
 
void setCursorFlashTime (int)
 
void setDoubleClickInterval (int)
 
void setEffectEnabled (Qt::UIEffect effect, bool enable)
 
void setFont (const QFont &font, const char *className)
 
void setKeyboardInputInterval (int)
 
void setNavigationMode (Qt::NavigationMode mode)
 
void setPalette (const QPalette &palette, const char *className)
 
void setStartDragDistance (int l)
 
void setStartDragTime (int ms)
 
QStylesetStyle (const QString &style)
 
void setStyle (QStyle *style)
 
void setWheelScrollLines (int)
 
int startDragDistance ()
 
int startDragTime ()
 
QStylestyle ()
 
QWidgettopLevelAt (const QPoint &point)
 
QWidgettopLevelAt (int x, int y)
 
QWidgetList topLevelWidgets ()
 
int wheelScrollLines ()
 
QWidgetwidgetAt (const QPoint &point)
 
QWidgetwidgetAt (int x, int y)
 
- Static Public Member Functions inherited from QGuiApplication
QWindowList allWindows ()
 
QString applicationDisplayName ()
 
Qt::ApplicationState applicationState ()
 
void changeOverrideCursor (const QCursor &cursor)
 
QClipboardclipboard ()
 
QString desktopFileName ()
 
bool desktopSettingsAware ()
 
int exec ()
 
QObjectfocusObject ()
 
QWindowfocusWindow ()
 
QFont font ()
 
Qt::HighDpiScaleFactorRoundingPolicy highDpiScaleFactorRoundingPolicy ()
 
QInputMethodinputMethod ()
 
bool isLeftToRight ()
 
bool isRightToLeft ()
 
Qt::KeyboardModifiers keyboardModifiers ()
 
Qt::LayoutDirection layoutDirection ()
 
QWindowmodalWindow ()
 
Qt::MouseButtons mouseButtons ()
 
QCursoroverrideCursor ()
 
QPalette palette ()
 
QString platformName ()
 
QScreenprimaryScreen ()
 
Qt::KeyboardModifiers queryKeyboardModifiers ()
 
bool quitOnLastWindowClosed ()
 
void restoreOverrideCursor ()
 
QScreenscreenAt (const QPoint &point)
 
QList< QScreen * > screens ()
 
void setApplicationDisplayName (const QString &name)
 
void setDesktopFileName (const QString &name)
 
void setDesktopSettingsAware (bool on)
 
void setFont (const QFont &font)
 
void setHighDpiScaleFactorRoundingPolicy (Qt::HighDpiScaleFactorRoundingPolicy policy)
 
void setLayoutDirection (Qt::LayoutDirection direction)
 
void setOverrideCursor (const QCursor &cursor)
 
void setPalette (const QPalette &pal)
 
void setQuitOnLastWindowClosed (bool quit)
 
void setWindowIcon (const QIcon &icon)
 
QStyleHintsstyleHints ()
 
void sync ()
 
QWindowtopLevelAt (const QPoint &pos)
 
QWindowList topLevelWindows ()
 
QIcon windowIcon ()
 
- Static Public Member Functions inherited from QCoreApplication
void addLibraryPath (const QString &path)
 
QString applicationDirPath ()
 
QString applicationFilePath ()
 
QString applicationName ()
 
qint64 applicationPid ()
 
QString applicationVersion ()
 
QStringList arguments ()
 
bool closingDown ()
 
QAbstractEventDispatchereventDispatcher ()
 
int exec ()
 
void exit (int returnCode)
 
bool installTranslator (QTranslator *translationFile)
 
QCoreApplicationinstance ()
 
bool isQuitLockEnabled ()
 
bool isSetuidAllowed ()
 
QStringList libraryPaths ()
 
QString organizationDomain ()
 
QString organizationName ()
 
void postEvent (QObject *receiver, QEvent *event, int priority)
 
void processEvents (QEventLoop::ProcessEventsFlags flags)
 
void processEvents (QEventLoop::ProcessEventsFlags flags, int ms)
 
void quit ()
 
void removeLibraryPath (const QString &path)
 
void removePostedEvents (QObject *receiver, int eventType)
 
bool removeTranslator (QTranslator *translationFile)
 
bool sendEvent (QObject *receiver, QEvent *event)
 
void sendPostedEvents (QObject *receiver, int event_type)
 
void setApplicationName (const QString &application)
 
void setApplicationVersion (const QString &version)
 
void setAttribute (Qt::ApplicationAttribute attribute, bool on)
 
void setEventDispatcher (QAbstractEventDispatcher *eventDispatcher)
 
void setLibraryPaths (const QStringList &paths)
 
void setOrganizationDomain (const QString &orgDomain)
 
void setOrganizationName (const QString &orgName)
 
void setQuitLockEnabled (bool enabled)
 
void setSetuidAllowed (bool allow)
 
bool startingUp ()
 
bool testAttribute (Qt::ApplicationAttribute attribute)
 
QString translate (const char *context, const char *sourceText, const char *disambiguation, int n)
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 

Protected Member Functions

virtual int activate (const QStringList &arguments, const QString &workingDirectory)
 
- Protected Member Functions inherited from QApplication
virtual bool event (QEvent *e) override
 
- Protected Member Functions inherited from QGuiApplication
- Protected Member Functions inherited from QCoreApplication
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Additional Inherited Members

- Public Types inherited from QObject
typedef  QObjectList
 
- Properties inherited from QApplication
 autoSipEnabled
 
 cursorFlashTime
 
 doubleClickInterval
 
 keyboardInputInterval
 
 startDragDistance
 
 startDragTime
 
 styleSheet
 
 wheelScrollLines
 
- Properties inherited from QGuiApplication
 applicationDisplayName
 
 desktopFileName
 
 layoutDirection
 
 platformName
 
 primaryScreen
 
 quitOnLastWindowClosed
 
 windowIcon
 
- Properties inherited from QCoreApplication
 applicationName
 
 applicationVersion
 
 organizationDomain
 
 organizationName
 
 quitLockEnabled
 
- Properties inherited from QObject
 objectName
 

Detailed Description

KDEPIM applications which can be integrated into kontact should use PimUniqueApplication instead of QApplication + Dbus unique.

This makes command-line handling work, i.e. you can launch "korganizer" and if kontact is already running, it will load the korganizer part and switch to it.

Definition at line 26 of file pimuniqueapplication.h.

Constructor & Destructor Documentation

◆ PimUniqueApplication()

PimUniqueApplication::PimUniqueApplication ( int & argc,
char ** argv[] )
explicit

Definition at line 73 of file pimuniqueapplication.cpp.

Member Function Documentation

◆ activate()

int PimUniqueApplication::activate ( const QStringList & arguments,
const QString & workingDirectory )
protectedvirtual

Definition at line 190 of file pimuniqueapplication.cpp.

◆ cmdArgs()

QCommandLineParser * PimUniqueApplication::cmdArgs ( ) const
nodiscard

Definition at line 93 of file pimuniqueapplication.cpp.

◆ newInstance [1/2]

int PimUniqueApplication::newInstance ( )
slot

Definition at line 123 of file pimuniqueapplication.cpp.

◆ newInstance [2/2]

int PimUniqueApplication::newInstance ( const QByteArray & startupId,
const QStringList & arguments,
const QString & workingDirectory )
virtualslot

Definition at line 165 of file pimuniqueapplication.cpp.

◆ setAboutData()

void PimUniqueApplication::setAboutData ( KAboutData & aboutData)

Definition at line 98 of file pimuniqueapplication.cpp.

◆ start()

bool PimUniqueApplication::start ( const QStringList & arguments)
static

Register this process as a unique application, if not already running.

Typically called in main().

Parameters
argumentsshould start with the appname, as QCoreApplication::arguments() does.

Definition at line 128 of file pimuniqueapplication.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.