KMainWindowInterface Class
D-Bus interface to KMainWindow. More...
Header: | #include <KMainWindowInterface> |
CMake: | find_package(KF6 REQUIRED COMPONENTS XmlGui) target_link_libraries(mytarget PRIVATE KF6::XmlGui) |
Public Functions
KMainWindowInterface(KXmlGuiWindow *mainWindow) | |
virtual | ~KMainWindowInterface() override |
Public Slots
bool | actionIsEnabled(const QString &action) |
QString | actionToolTip(const QString &action) |
QStringList | actions() |
bool | activateAction(const QString &action) |
bool | disableAction(const QString &action) |
bool | enableAction(const QString &action) |
void | grabWindowToClipBoard() |
qlonglong | winId() |
Detailed Description
This is the main interface to the KMainWindow. This provides a consistent D-Bus interface to all KDE applications that use it.
Member Function Documentation
[explicit]
KMainWindowInterface::KMainWindowInterface(KXmlGuiWindow *mainWindow)
Constructs a new interface object.
mainWindow - The parent KMainWindow object that will provide us with the QAction objects.
[override virtual noexcept]
KMainWindowInterface::~KMainWindowInterface()
Destructor.
Cleans up the dcop action proxy object.
[slot]
bool KMainWindowInterface::actionIsEnabled(const QString &action)
Returns the status of the requested action.
The names of valid actions can be found by calling actions().
[slot]
QString KMainWindowInterface::actionToolTip(const QString &action)
Returns the tool tip text of the requested action. The names of valid actions can be found by calling actions().
[slot]
QStringList KMainWindowInterface::actions()
Returns a list of actions available to the application's window.
[slot]
bool KMainWindowInterface::activateAction(const QString &action)
Activates the requested action.
The names of valid actions can be found by calling actions().
Returns the success of the operation.
[slot]
bool KMainWindowInterface::disableAction(const QString &action)
Disables the requested action.
The names of valid actions can be found by calling actions().
Returns the success of the operation.
[slot]
bool KMainWindowInterface::enableAction(const QString &action)
Enables the requested action.
The names of valid actions can be found by calling actions().
Returns the success of the operation.
[slot]
void KMainWindowInterface::grabWindowToClipBoard()
Copies a pixmap representation of the current main window to the clipboard. *
[slot]
qlonglong KMainWindowInterface::winId()
Returns the ID of the current main window.
This is useful for automated screen captures or other evil widget fun.
Returns A integer value of the main window's ID. *