Hello,
I have prepared (together with Caulier Gilles) a patch that lets the user configure the thumbnail and icon size used in Digikam's sidebars (for album, tag, search and date views). This patch works fine, the only thing missing is the ability to redraw the views when the user actually changes the icon size - currently the new setting is only read after a restart of Digikam. I'm guessing I need to extend DigikamApp::slotSetupChanged() to loop over all QListViewItems/QVBoxItems in each sidebar, calling setPixmap() with the new icon for each one. But I'm not sure exactly how to do that, and whether it's the best way. Maybe the Items can be designed in a way that they too receive a size change signal and act "on their own"?. Can anybody help? Thank you! -- Jens Benecke (jens at spamfreemail.de) . Please DO NOT CC: me, I read the lists and newsgroups I post in! _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Jens Benecke wrote:
> missing is the ability to redraw the views when the user actually changes > the icon size - currently the new setting is only read after a restart of > Digikam. > I'm guessing I need to extend DigikamApp::slotSetupChanged() to loop over > all QListViewItems/QVBoxItems in each sidebar, calling setPixmap() with Hello all, (replying to myself): To add a signal in AlbumSettings class it seems required to inherit it from QObject, which then complains about AlbumSettings instance being private (although it was private before, as well!): (see below) I read the Signal/Slot tutorial but I'm not sure where to insert an appropriate signal/slot. My idea is to insert a signal that can be emitted in AlbumSettings class and a slot that gets connected to the signal in e.g. DateFolderView() class, which then loads and redraws the icons with the new settings. I would appreciate a bit of help :) Thanks! g++ -DHAVE_CONFIG_H -I../digikam/utilities/cameragui -I/home/jens/src/digikam/graphics/digikam/utilities/cameragui -I.. -I/home/jens/src/digikam/graphics/digikam/digikam -I/home/jens/src/digikam/graphics/digikam/utilities/imageeditor/editor -I/home/jens/src/digikam/graphics/digikam/libs/jpegutils -I/home/jens/src/digikam/graphics/digikam/libs/imageproperties -I/home/jens/src/digikam/graphics/digikam/libs/widgets/common -I/home/jens/src/digikam/graphics/digikam/libs/dimg -I/home/jens/src/digikam/graphics/digikam/libs/dmetadata -I/home/jens/src/digikam/graphics/digikam/libs/dcraw -I/usr/include/gphoto2 -I/usr/include -I/opt/kde3/include -I/usr/lib/qt3/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_CLEAN_NAMESPACE -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -fPIC -DPIC -c /home/jens/src/digikam/graphics/digikam/utilities/cameragui/dkcamera.cpp -o ../digikam/utilities/cameragui/.libs/dkcamera.o -Wp,-MD,../digikam/utilities/cameragui/.deps/dkcamera.TUlo /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:37: error: expected class-name before ?{? token /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:38: error: ISO C++ forbids declaration of ?Q_OBJECT? with no type /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:39: error: expected ?;? before ?public? /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:78: error: expected ?,? or ?...? before ?order? /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:78: error: ISO C++ forbids declaration of ?AlbumSortOrder? with no type /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:79: error: ?AlbumSortOrder? does not name a type /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:180: error: expected primary-expression before ?int? /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:180: error: ISO C++ forbids declaration of ?signals? with no type /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:180: error: expected ?;? before ?int? /home/jens/src/digikam/graphics/digikam/utilities/cameragui/dkcamera.cpp: In constructor ?Digikam::DKCamera::DKCamera(const QString&, const QString&, const QString&)?: /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:177: error: ?static Digikam::AlbumSettings* Digikam::AlbumSettings::instance()? is private /home/jens/src/digikam/graphics/digikam/utilities/cameragui/dkcamera.cpp:41: error: within this context /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:85: error: ?QString Digikam::AlbumSettings::getImageFileFilter() const? is private /home/jens/src/digikam/graphics/digikam/utilities/cameragui/dkcamera.cpp:42: error: within this context /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:88: error: ?QString Digikam::AlbumSettings::getMovieFileFilter() const? is private /home/jens/src/digikam/graphics/digikam/utilities/cameragui/dkcamera.cpp:43: error: within this context /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:91: error: ?QString Digikam::AlbumSettings::getAudioFileFilter() const? is private /home/jens/src/digikam/graphics/digikam/utilities/cameragui/dkcamera.cpp:44: error: within this context /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:94: error: ?QString Digikam::AlbumSettings::getRawFileFilter() const? is private /home/jens/src/digikam/graphics/digikam/utilities/cameragui/dkcamera.cpp:45: error: within this context Error creating ../digikam/utilities/cameragui/dkcamera.lo. Exit status 1. make: *** [all] Fehler 1 -- Jens Benecke (jens at spamfreemail.de) Please DO NOT CC: me, I read the lists and newsgroups I post in! _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Am Mittwoch 05 Juli 2006 21:43 schrieb Jens Benecke:
> Jens Benecke wrote: > > missing is the ability to redraw the views when the user actually changes > > the icon size - currently the new setting is only read after a restart of > > Digikam. > > I'm guessing I need to extend DigikamApp::slotSetupChanged() to loop over > > all QListViewItems/QVBoxItems in each sidebar, calling setPixmap() with > > Hello all, > > (replying to myself): To add a signal in AlbumSettings class it seems > required to inherit it from QObject, which then complains about > AlbumSettings instance being private (although it was private before, as > well!): (see below) > > I read the Signal/Slot tutorial but I'm not sure where to insert an > appropriate signal/slot. My idea is to insert a signal that can be emitted > in AlbumSettings class and a slot that gets connected to the signal in e.g. > DateFolderView() class, which then loads and redraws the icons with the new > settings. > > I would appreciate a bit of help :) Only look at the very first error and ignore the rest. There is a problem in line 37 or 38. Did you include <qobject.h>? Sorry I did not reply to your initial mail. You could also send the signal from DigikamView or DigikamApp, not sure currently which is an appropriate place. Probably most relevant classes already connect to some signals from AlbumManager, you might even be able reuse the slotAlbumIconChanged? Marcel > > Thanks! > > > g++ -DHAVE_CONFIG_H -I../digikam/utilities/cameragui > -I/home/jens/src/digikam/graphics/digikam/utilities/cameragui -I.. > -I/home/jens/src/digikam/graphics/digikam/digikam > -I/home/jens/src/digikam/graphics/digikam/utilities/imageeditor/editor > -I/home/jens/src/digikam/graphics/digikam/libs/jpegutils > -I/home/jens/src/digikam/graphics/digikam/libs/imageproperties > -I/home/jens/src/digikam/graphics/digikam/libs/widgets/common > -I/home/jens/src/digikam/graphics/digikam/libs/dimg > -I/home/jens/src/digikam/graphics/digikam/libs/dmetadata > -I/home/jens/src/digikam/graphics/digikam/libs/dcraw -I/usr/include/gphoto2 > -I/usr/include -I/opt/kde3/include -I/usr/lib/qt3/include > -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wno-long-long > -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion > -Wchar-subscripts -Wall -W -Wpointer-arith -O2 -Wformat-security > -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions > -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST > -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_CLEAN_NAMESPACE > -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT > -DQT_NO_TRANSLATION -fPIC -DPIC -c > /home/jens/src/digikam/graphics/digikam/utilities/cameragui/dkcamera.cpp -o > ../digikam/utilities/cameragui/.libs/dkcamera.o > -Wp,-MD,../digikam/utilities/cameragui/.deps/dkcamera.TUlo > /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:37: error: > expected class-name before ?{? token > /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:38: error: > ISO C++ forbids declaration of ?Q_OBJECT? with no type > /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:39: error: > expected ?;? before ?public? > /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:78: error: > expected ?,? or ?...? before ?order? > /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:78: error: > ISO C++ forbids declaration of ?AlbumSortOrder? with no type > /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:79: > error: ?AlbumSortOrder? does not name a type > /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:180: error: > expected primary-expression before ?int? > /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:180: error: > ISO C++ forbids declaration of ?signals? with no type > /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:180: error: > expected ?;? before ?int? > /home/jens/src/digikam/graphics/digikam/utilities/cameragui/dkcamera.cpp: > In constructor ?Digikam::DKCamera::DKCamera(const QString&, const QString&, > const QString&)?: > /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:177: > error: ?static Digikam::AlbumSettings* Digikam::AlbumSettings::instance()? > is private > /home/jens/src/digikam/graphics/digikam/utilities/cameragui/dkcamera.cpp:41 >: error: within this context > /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:85: > error: ?QString Digikam::AlbumSettings::getImageFileFilter() const? is > private > /home/jens/src/digikam/graphics/digikam/utilities/cameragui/dkcamera.cpp:42 >: error: within this context > /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:88: > error: ?QString Digikam::AlbumSettings::getMovieFileFilter() const? is > private > /home/jens/src/digikam/graphics/digikam/utilities/cameragui/dkcamera.cpp:43 >: error: within this context > /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:91: > error: ?QString Digikam::AlbumSettings::getAudioFileFilter() const? is > private > /home/jens/src/digikam/graphics/digikam/utilities/cameragui/dkcamera.cpp:44 >: error: within this context > /home/jens/src/digikam/graphics/digikam/digikam/albumsettings.h:94: > error: ?QString Digikam::AlbumSettings::getRawFileFilter() const? is > private > /home/jens/src/digikam/graphics/digikam/utilities/cameragui/dkcamera.cpp:45 >: error: within this context > Error creating ../digikam/utilities/cameragui/dkcamera.lo. Exit status 1. > make: *** [all] Fehler 1 Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Thanks Marcel to help Jens to coding. I'm a little bit busy...
Jens, try to finalize and test your implementation for a possible adding in beta1. If you cannot do it, well take your time. In IRC, with Achim we have planed to release 0.9.0-beta1 : - later 0.8.2 final planed around the 15th july. 0.8.2 package and announce will be done by Achim. - before the end of July (i'm in holliday from 29 July to 21 august : no computer, no internet, just my digital camera (:=)))). I need to be disconnected during sometime to change my mind... Marcel, please check the TODO file and cleanup the pending tasks already completed by you. It's important. Unforget that, like we have talk in the past, you will post the announce of 0.9.0-beta1 (:=)))... Jens, Qt. signals and slots communication is easy to understand. There is a lot of sample in digiKam source code. I recommend you to read the code of image plugins for example, because there are the most simple implementation to understand about this subject. The depencies with digiKam core using signal and slots are very limited. If you try to read all digiKam now, you will be lost. A nice week end. Gilles _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
> Thanks Marcel to help Jens to coding. I'm a little bit busy...
> > Jens, try to finalize and test your implementation for a possible adding in > beta1. If you cannot do it, well take your time. > > In IRC, with Achim we have planed to release 0.9.0-beta1 : > > - later 0.8.2 final planed around the 15th july. 0.8.2 package and announce > will be done by Achim. > - before the end of July (i'm in holliday from 29 July to 21 august : no > computer, no internet, just my digital camera (:=)))). I need to be > disconnected during sometime to change my mind... > > Marcel, please check the TODO file and cleanup the pending tasks already > completed by you. It's important. Unforget that, like we have talk in the > past, you will post the announce of 0.9.0-beta1 (:=)))... I will have a look at that in the next days, and I will commit the fix we talked about a few days ago. I am currently a bit out of sync about any other things where I said "I will fix that / I will code that" and forgot that afterwards. I will write an exam tomorrow, and the next exam is at the end of august (the real big one, then). This means during the next six weeks I will be able to cut the one or other hour for coding, but only after that I will have holidays which means I will be able to cut a few days for coding ;-) Marcel > > Jens, Qt. signals and slots communication is easy to understand. There is a > lot of sample in digiKam source code. I recommend you to read the code of > image plugins for example, because there are the most simple implementation > to understand about this subject. The depencies with digiKam core using > signal and slots are very limited. If you try to read all digiKam now, you > will be lost. > > A nice week end. > > Gilles Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |