[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Accessing a QAction in a Kommander Plugin
From:       "Andras Mantia" <amantia () kdewebdev ! org>
Date:       2008-02-21 20:44:25
Message-ID: 32771.217.130.107.29.1203626665.squirrel () mail ! kdewebdev ! org
[Download RAW message or body]

> Hi Eric,
>
> On Thursday 21 February 2008, Eric Laffoon wrote:
>
>> The problem is I have to take in a QString with the name of that action
>> and
>> then call it. For openers, I'm not sure but I think the Actions are
>> named
>> with QCString. I could be wrong. Regardless I'm having a bear of a time
>> figuring out the basic syntax and I don't have time to study this in
>> depth.
>> I have the Action name as declared in the editor, so it's in the ui/kmdr
>> file. Can someone give me the syntax for a simple working function
>> prototype here and the required include files?
>
> If the problem is finding the QAction pointer, you can use the child()
> method
> the main window inherits from QObject.
>
> This returns a QObject* and if you just have to change a property
> like "enabled" you can do it right there through the setProperty() method.
>
> Otherwise you have to cast to QAction*

I am supposed to be on vacation. :) I don't have time to read all the
mails, but what Eric would like is to execute a QAction or make it
enabled/disabled via DCOP (yes, this is KDE3 code), just like you can do
with the KAction's in virtually any KDE application.


Andras

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic