[Digikam-devel] Digikam patch - a little C++ help needed

Jens Benecke jens at spamfreemail.de
Wed Jul 5 20:43:33 BST 2006


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!




More information about the Digikam-devel mailing list