Taskmanager with grouping support preview version
Aaron J. Seigo
aseigo at kde.org
Thu Jul 10 18:04:10 CEST 2008
On Thursday 10 July 2008, christian mollekopf wrote:
> To get around the TaskPtr problem, i derived a new class from
> AbstractGroupableItem called TaskItem in the libs part. It basically just
> holds a copy of the TaskPtr. Its a bit overhead but in favour we can work
> with the AbstractGroupaleItems and manage Groups and Tasks therefore the
> same way. This way the Task class isn't affected in any way by the grouping
> ability.
ok; i guess when i can see the code this paragraph will be clearer to me =)
> I'm not sure what this factory class would do.
create standard sets of actions in a standard ordering?
> I cant think of a case where a set of tasks would be handed in.
> The menu is just for Tasks or TaskGroups.
previously a "set of tasks" served the same purpose as your TaskGroup class.
> :QAction(parent)
>
> {
> connect(this, SIGNAL(triggered()), task.data(),
> SLOT(toggleMaximized())); setText(i18n("Ma&ximize"));
> setCheckable(true);
> setChecked(task->isMaximized());
> setEnabled(!KWindowSystem::allowedActionsSupported() ||
> task->info().actionSupported(NET::ActionMax)); }
i'm not 100% sure, but these items may want to update themselves when the task
changes (e.g. change the setChecked status if the window become minimized
after creation, but not through this action). i suppose whether or not that's
acually needed is something we'll find out as things go on; but this approach
is flexible enough to do things like this should we find the need to do so
later.
> For basic menus like the "toDesktop" menu i would also create subclasses.
right; and QActions can represent (sub-)menus, so this can completely
transparent to the visualization.. it will look just like any other action to
it.
> The main menu would then be created where it is used, so we can easely
> insert actions like "collapse/expand Group" which are specific to each
> visualization.
precisely =)
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080710/845fe52f/attachment.pgp
More information about the Panel-devel
mailing list