From: <pa...@rc...> - 2001-03-05 00:41:41
|
Joe Piolunek wrote: > I modified the xojpanel code to compile in the *.xpm's instead of loading > them at runtime. Hi, Joe. Thanks for looking into this. It will help simplify the build and install sequence. > I get compiler errors when using the default *.xpm array declaration. The > only way I could make it work was to hand-modify the declaration inside each > pixmap. It was quite simple to do, but is there a better way to #include > *.xpm's? It would need to be something that Qt will accept. That's unfortunate. What is the exact error you got (perhaps something about the "static" keyword?), and what specifically did you have to change to make it work? > I'm working on a different 'cover graphic' that can be substituted for the > one that reads 'HP OfficeJet for Linux'. The new one reads 'HP OfficeJet LCD > Monitor' in the same style and color as the older one. The only change is a > substitution of 'LCD Monitor' for 'for Linux'. Which one would be better for > the next release, or would something else be more appropriate? The new one sounds good, since it better conveys the function of xojpanel, and it doesn't make it sound Linux-specific. > I should be able to make the code and pixmaps available a couple of days > after your answer, unless I get lost in a snowdrift. We're expecting a really > big storm here on the east coast. If you're not ready to provide the code changes yet, perhaps you could post a screenshot on your webpage, which I link to from a couple of places on the hpoj website. BTW, when I check in the new I/O driver I will have to temporarily disable xojpanel in the build sequence, since I'm removing ojlib but haven't finished the PTAL PML code yet. You'll probably want to keep your current source tree around for now if you decide to try out the new code. The PML support is next on my TODO list, and once I finalize the API then you can make those changes too, or I can help out if you'd like. BTW#2, I think your clock may be set to the wrong time zone (GMT instead of EST), or else KMail might be getting it wrong in the message header. David |
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 |
From: Joe P. <joe...@sn...> - 2001-03-06 17:59:03
|
On Monday 05 March 2001 08:13 pm, PASCHAL,DAVID (HP-Roseville,ex1) wrote: <...> > 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 It works. Thanks very much, David. > > 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. I found a small number of references to 'cv-quals' in a google / deja.com search for the error. It seems to be shorthand for 'const / volatile qualifiers'. > > 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. Right. > I think it would be preferable to avoid hacking/renaming the file, to make > it easier to change the image. I agree with that. I didn't know any other way until you suggested the '#define' wrapper. > > 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). I'll work on it some more. -- Joe |
From: Joe P. <joe...@sn...> - 2001-03-06 23:57:08
|
On Monday 05 March 2001 08:13 pm, PASCHAL,DAVID (HP-Roseville,ex1) wrote: <...> > > 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). I put up three new xojpanel screenshots. They are stacked on the page in reversed order of my preference (favorite is on the bottom). I'll probably use the bottom one, but haven't quite decided. Comments are welcome. The URL is above. -- Joe |
From: <pa...@rc...> - 2001-03-07 00:12:19
|
Joe Piolunek wrote: > I put up three new xojpanel screenshots. They are stacked on the page in > reversed order of my preference (favorite is on the bottom). I'll probably > use the bottom one, but haven't quite decided. > > Comments are welcome. The URL is above. Hi, Joe. I like the third one too. My second preference would be the first one. Thanks, David |
From: Joe P. <joe...@sn...> - 2001-03-05 05:03:35
|
On Sunday 04 March 2001 19:42, David Paschal wrote: > > I get compiler errors when using the default *.xpm array declaration. The > > only way I could make it work was to hand-modify the declaration inside > > each pixmap. It was quite simple to do, but is there a better way to > > #include *.xpm's? It would need to be something that Qt will accept. > > That's unfortunate. What is the exact error you got (perhaps something > about the "static" keyword?), and what specifically did you have to change > to make it work? 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> }; 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 I'm using gcc-2.95-2. I think the errors may be due to a requirement of Qt. When I use the contents of an #included pixmap, I've been using the internal array name. 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; 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. -- Joe |
From: Joe P. <joe...@sn...> - 2001-03-05 22:59:18
|
On Sunday 04 March 2001 07:42 pm, David Paschal wrote: <...> > > I'm working on a different 'cover graphic' that can be substituted for > > the one that reads 'HP OfficeJet for Linux'. The new one reads 'HP > > OfficeJet LCD Monitor' in the same style and color as the older one. The > > only change is a substitution of 'LCD Monitor' for 'for Linux'. Which one > > would be better for the next release, or would something else be more > > appropriate? > > The new one sounds good, since it better conveys the function of xojpanel, > and it doesn't make it sound Linux-specific. > <...> > If you're not ready to provide the code changes yet, perhaps you could post > a screenshot on your webpage, which I link to from a couple of places on > the hpoj website. 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 > > BTW, when I check in the new I/O driver I will have to temporarily disable > xojpanel in the build sequence, since I'm removing ojlib but haven't > finished the PTAL PML code yet. You'll probably want to keep your current > source tree around for now if you decide to try out the new code. The PML > support is next on my TODO list, and once I finalize the API then you can > make those changes too, or I can help out if you'd like. If I have enough information and it doesn't involve anything too complicated, I may be able to do it myself. If I have trouble, I'll let you know. -- Joe |