PDA

View Full Version : advanced split widget



vitaly
17th January 2006, 15:17
Hi

I need the widget like in the attached picture. It consists of some child widgets (like dock widgets of dock area) but they haven't been undocked. The split configuration is set with use of some methods and user haven't an ability to change this configuration. User may hide some child widgets by pressing on 'X' button and maximize particular child widget by pressing 'M' (other widgets will be hidden). The ability to show hidden (iconified) widgets should be provided.

QDockArea is not the case because it manages widgets only whether horizontally or vertically but not in the grid, isn't it?

40


The desired use of the class:



SmarlSplitWidget container;

// Add a widget at 0 row and 0 col like in QGridLayout.
container.addWidget(
new QWidget(container), // pointer to widget
"First", // label
0, // row 0 (like in QGridLayout)
0); // column 0

container.addWidget( new QWidget(container), "Second", 1, 0);
container.addMultiCellWidget( new QWidget(container), "Fourth", 0, 1, 1, 1);
container.addMultiCellWidget( new QWidget(container), "Third", 2, 2, 0, 1);


Is anybody may help to find the widget like this?

Thanks,
Vitaly

wysota
17th January 2006, 17:08
You can have such behaviour by using splitters. Buttons "X" just hide the current widget and "M" hide all other widgets and that's it (I guess you also need opposite actions to get those widgets back on screen).

vitaly
17th January 2006, 17:31
I know it but it is better to implement this functionality in a separate class. It will hide all manipulations with splitters and widgets and work with arbitrary number of widgets. Of course, it is not hard to implement for me but i waht to reuse any existing class.

P.S. The attached picture in my first post I've created in Qt Designer using QSplitters and then captured the widget with GIMP.

wysota
17th January 2006, 20:11
Then make one. I doubt anyone made such a class.

vitaly
17th January 2006, 20:28
I'll implement it in some time and will post it. But what do you think, may this widget be really usable? Is there any storage for Qt-based C++ classes exist like CPAN for perl? I've looked at Qt store. This store has so few classes now.

wysota
17th January 2006, 22:06
But what do you think, may this widget be really usable?
I really don't know. It's usable for you, so I guess it's usable :)


Is there any storage for Qt-based C++ classes exist like CPAN for perl? I've looked at Qt store. This store has so few classes now.
We've been planing to make such a catalog here, but someone has to fill it with content. There is no point in making such thing if there are only 2-3 things to put there.

yop
17th January 2006, 22:24
We've been planing to make such a catalog here, but someone has to fill it with content. There is no point in making such thing if there are only 2-3 things to put there.Is there any "content" available? Since you've been around the qt community much more than most of us, are there any contributed widgets, classes, whatever, or even the will to provide some?

wysota
17th January 2006, 23:25
Is there any "content" available? Since you've been around the qt community much more than most of us, are there any contributed widgets, classes, whatever, or even the will to provide some?

Sure, there are Qt Widgets for Technical Applications (http://qwt.sourceforge.net/), Johan's JSeries (http://www.digitalfanatics.org/e8johan/projects/jseries/) or mine wwWidgets (http://www.wysota.eu.org/wwwidgets/) and more.

Some of them are listed on Johan's widget gallery (http://digitalfanatics.org/e8johan/projects/widgets/).

If you have widgets you'd like to share with Qt Community, you can send them to me (wysota@qtcentre.org) and I'll put them into the widget repository when we decide to make one.

yop
18th January 2006, 07:47
Sure, there are Qt Widgets for Technical Applications (http://qwt.sourceforge.net/), Johan's JSeries (http://www.digitalfanatics.org/e8johan/projects/jseries/) or mine wwWidgets (http://www.wysota.eu.org/wwwidgets/) and more.

Some of them are listed on Johan's widget gallery (http://digitalfanatics.org/e8johan/projects/widgets/).

If you have widgets you'd like to share with Qt Community, you can send them to me (wysota@qtcentre.org) and I'll put them into the widget repository when we decide to make one.
Thank's it's good to know

vitaly
18th January 2006, 07:59
I found KDCloseableWidget in KD Tools pack of ICS (http://www.ics.com) but I didn't find any documentation related to this class. Only the datasheet with common information is available. Is anybody know does this class support multiple widgets with splitting and restoring ones from hidden state? Lot of thanks for your previous replies. The common store for Qt code is really needed for the community!

It will be fine if there will be a place where all known Qt related links will be stored in the structured way. Qt center may be a good place for it.

vitaly
24th January 2006, 20:00
I implemented the first version of grid split widget. This widget I implemented at home at free time. I haven't lots of time to fully done this work. So this version has many additional features whose I'll implement later. The current version supports closing and maximizing of widgets.

If you desire to help develop this widget, please, contact with me or upload your patches or versions into this site. I will upload newest versions as soon as I find free time for improvement.

TODO (I plan to do this later):

1. Make setting of margins of widgets in the splitters.
2. Fix initial size of child widgets.
3. Make icons.
4. Improve restore of widgets.
5. Optimize it.

I will appreciate any bugreport or feedback about this widget.

Vitaly