From: PASCHAL,DAVID (HP-Roseville,ex1) <dav...@hp...> - 2001-03-06 01:48:27
|
Hi, Joe. Joe Piolunek wrote: > There are no errors reported during compilation if I change > the pixmaps' > internal array declarations. > > Original declaration inside file hpoj_mini.xpm: > /* XPM */ > static char * hpoj_mini_xpm[] = { > <data> > }; > > The 'const' keyword needs to be added to make it work. > /* XPM */ > static const char * hpoj_mini_xpm[] = { > <data> > }; In order to avoid having to hack the .xpm files, perhaps you could use a trick similar to what I did in ptal-mlcd, something like the following: #define static static const #include <foo1.xpm> #include <foo2.xpm> // etc. #undef static > This is the error reported if I don't modify the pixmap's > array declaration: > ... > ... > ojstatus.cpp: In method `void XojPanel::createInterface()': > ojstatus.cpp:160: passing `char **' as argument 1 of > `QPixmap::QPixmap(const > char **)' adds cv-quals without intervening `const' > make: *** [ojstatus.o] Error 1 Strange -- I haven't the slightest idea what "cv-quals" means. I'm only familiar with the situation where the compiler complains when you pass a const pointer to a function that takes a non-const pointer, which can be fixed either by adding the const in a typecast, or by adding "const" to the function prototype. > In the case of hpoj_mini.xpm, this is the line of code: > this->setIcon(QPixmap(hpoj_mini_xpm)); > > For the LCD background pixmap: > *lcdPixmap = (QPixmap)hpojlcd_xpm; I'm assuming these typecasts cause an implicit construction of a QPixmap object, taking its input from the XPM string array. > To avoid causing confusion, I may be able to simply change > the modified > pixmaps' filenames to indicate that they are a source of > data, not regular > pixmaps. A name could be changed from 'hpoj_mini.xpm' to > 'hpoj_mini_xpm.data' > for example. I think it would be preferable to avoid hacking/renaming the file, to make it easier to change the image. > I put a couple of xojpanel screenshots on my site with > different versions of > the graphic. I'm not totally pleased with either one of them, > but you can > take a look. I'll probably try out some different fonts, etc. > to see if the > appearance can be improved a little more. > > http://pages.cthome.net/jsp/hpoj-linux-gui/index.html I think either one is fine. Personally I would sort of lean towards the first one with the smaller font for the second line, but perhaps you could try squeezing the letters in a bit more (the way it is with the larger font). David |