[Qt-interest] tools in a toolbar (like draw tool, select tool)

Kishore kitts.mailinglists at gmail.com
Mon Aug 17 20:23:55 CEST 2009


On Monday 17 Aug 2009 11:51:06 am Kishore wrote:
> In many applications i see a toolbar that set the current tool that acts on
> the central widget of the mainwindow. For example in an image manipulation
> application the move tool moves the image around, the crop  tool helps cut
> edges and say, a draw tool draws a line on the image. In other words the
> mouse interacts differently with the the central widget based on the
> currently selected tool.
>
> What i am curious here is from a design point of view, is it the toolbar
> button that grabs the mouse (and maybe keyboard) and aids in performing the
> task or is it the central widget itself that has the capability while the
> toolbar just sets the mode on the central widget?
>
> I am looking for a "standard procedure" as this seems to be a fairly
> popular use case. I am inclined to the former as it could easily allow one
> to add more "tools" as plugins

An example of this is qt-designer. The role that the mouse and keyboard 
actions have on the central widget depends on state of the actions "Edit 
Widgets", "Edit Signals/Slots", "Edit Buddies" and "Edit Tab Order".

Would it be possible to add a new tool? I can't think of what the new tools in 
the case of designer would do. But in the case of an image manipulation 
program there can be applications.

In my application, once the user clicks a tool button, he is expected to 
select one or two objects in sequence in within the central widget. Due to 
lack of any experience in developing such a use case, i am lost at what is the 
better way to implement this. In my application i intend that the tool buttons 
themselves are provided by plugins.

I would appreciate any tips/pointers to a solution or even a solution itself! 
:D
-- 
Cheers!
Kishore



More information about the Qt-interest-old mailing list