Qt Designer, button groups and the periodic table widget

I’ve been working on a periodic table widget, mainly for the draw
tool. I looked at the Kalzium periodictableview code, but it was a
bit too much, IMHO.

So I’ve just about finished a slimmed-down periodic table dialog box,
but I have a few questions for the Qt/KDE experts. I did the layout
in Qt Designer – but that doesn’t have QButtonGroup. So right now I
have a huge number of QToolButtons, one for each element. But there’s
no handy way to group them so only one is highlighted, etc.

Any suggestions?

I’d be glad to upload my code to SVN for review.

Thanks,
-Geoff

Moin

molSketch recentely added a PSE widget as well. I think we should
share the code/GUI, whatever we do.

I am getting a compilation issue. I will try to fix it after I got a coffee :slight_smile:

kde4@moinmoin:~/build/avo> LANG=C make
[ 1%] Building CXX object
libavogadro/src/tools/CMakeFiles/drawtool.dir/drawtool.o
In file included from
/home/carsten/svn/avogadro/trunk/libavogadro/src/tools/drawtool.h:31,
from
/home/carsten/svn/avogadro/trunk/libavogadro/src/tools/drawtool.cpp:25:
/home/carsten/svn/avogadro/trunk/libavogadro/src/tools/periodictabledialog.h:25:36:
error: ui_periodictabledialog.h: No such file or directory
/home/carsten/svn/avogadro/trunk/libavogadro/src/tools/periodictabledialog.h:43:
error: ‘Ui’ has not been declared
/home/carsten/svn/avogadro/trunk/libavogadro/src/tools/periodictabledialog.h:43:
error: ISO C++ forbids declaration of ‘PeriodicTableDialog’ with no
type
/home/carsten/svn/avogadro/trunk/libavogadro/src/tools/periodictabledialog.h:43:
error: expected ‘;’ before 'ui’
make[2]: *** [libavogadro/src/tools/CMakeFiles/drawtool.dir/drawtool.o] Error 1
make[1]: *** [libavogadro/src/tools/CMakeFiles/drawtool.dir/all] Error 2
make: *** [all] Error 2

I have not use this feature yet in Qt4 but in designer there is a button box
tool (Buttons tools)

I’ve been working on a periodic table widget, mainly for the draw
tool. I looked at the Kalzium periodictableview code, but it was a
bit too much, IMHO.

So I’ve just about finished a slimmed-down periodic table dialog box,
but I have a few questions for the Qt/KDE experts. I did the layout
in Qt Designer – but that doesn’t have QButtonGroup. So right now I
have a huge number of QToolButtons, one for each element. But there’s
no handy way to group them so only one is highlighted, etc.

Any suggestions?

I’d be glad to upload my code to SVN for review.

Thanks,
-Geoff


This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/


Avogadro-devel mailing list
Avogadro-devel@lists.sourceforge.net
avogadro-devel List Signup and Options


Dr. Armando Navarro-Vázquez
RIAIDT. Univdade de Resonancia Magnetica
Universidade de Santiago de Compostela
http://desoft03.usc.es/armando/index.html

On May 31, 2007, at 5:25 AM, Armando Navarro Vázquez wrote:

I have not use this feature yet in Qt4 but in designer there is a
button box
tool (Buttons tools)

That’s for QDialogButtonBox, unfortunately. So it groups “OK” and
“Cancel” buttons and the like. These are great, but not quite what I
want for the elements.

I guess I’ll contact the Troll mailing lists.

molSketch recentely added a PSE widget as well. I think we should
share the code/GUI, whatever we do.

I think I like this widget a bit better (if I can get it to work).
This uses real buttons, but molSketch uses text.

I am getting a compilation issue. I will try to fix it after I got
a coffee :slight_smile:

Sorry about that, I think the CMakeLists.txt must not be right for
the uic step. If you can fix that, I’d really appreciate it – I’m
heading to the airport now.

Thanks!
-Geoff