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

List:       kde-devel
Subject:    Re: KStandardAction source code
From:       Kevin Krammer <krammer () kde ! org>
Date:       2012-11-21 18:27:00
Message-ID: 201211211927.09629.krammer () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Friday, 2012-11-09, Jan Kalcic wrote:
> On 11/08/2012 07:04 AM, Kevin Krammer wrote:
> > Hi,
> > 
> > On Wednesday, 2012-11-07, Jan Kalcic wrote:
> >> Hi,
> >> 
> >> I have a Qt app which I am little-by-little "moving" to KDE, with this I
> >> mean I am switching from Qt classes to KDE ones where possible.
> >> 
> >> With this I am now adding new KStandardAction(s), very quick and easy,
> >> but AFAIU these only provides predefined menu items via XMLGUI
> >> technology, but not the slot implementation code. So for example, if I
> >> want to use the copy KStandardAction, I anyway need to write the source
> >> code for the slot this action is connected to.
> > 
> > Yes, because what "copy" means is very much dependent on what I fully 
> > the application does, i.e. what kind of content your application is
> > editing.
> > 
> > A file manager will copy a list of file URLs to the clipboard, a text
> > editor would copy some plain text, a web browser might copy plain text
> > and/or HTML, an image editor some pixel data.
> > 
> > The classes holding the data will have different API, different variable
> > names, etc.
> > 
> > There is just no way to share this in a generic way.
> 
> I understand, it really makes sense to me.
> 
> However my wondering was because of the behavior of "copy" and "paste",
> for example, which just copy and paste what selected whatever and
> whereever it is, like if it was "over" the applications and shared by
> them. Trying to say it with different words, in my app I can easily do
> Ctrl+C and Ctrl-C and this simply work. However, if I want the same for
> my actions I have to write the whole code while it seems it is already
> there somewhere :-)

It is more likely that whatever widget you are dealing with has built-in 
support for clipboard operations. For example QTextEdit does.

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring

["signature.asc" (application/pgp-signature)]

>> 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