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

Marcel Wiesweg marcel.wiesweg at gmx.de
Fri Jul 7 22:01:38 BST 2006


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



More information about the Digikam-devel mailing list