trying to get thumbcreator to work
Jeroen van der Waal
jwaal at kabelfoon.nl
Fri May 19 17:21:28 BST 2006
Hello,
I am working for a large company that is involved in medical software. The
field of medical applications is really interesting and the idea of creating
something for KDE was born. The idea is to make KDE 'Dicom' aware. Dicom is
the image format used for medical applications.
I am working on several KDE plugins. A meta data plugin that shows for a dicom
file the patient, gender, kind of image, date and other related data. This
plug-in works.
Another item I like to make is an thumbnail creator. I tried some tests, but
no success. The problem is that no thumbs are created and it seems that my
application is not picked up by the kde environment. I followed some examples
but no success. At last I am busy making a viewer to open and view dicom
files.
To get the thumbcreator working the next step was to trace the kde system
using kdebugrc. Also some usefull information was available in earlier posts.
I changed kdebugrc using kdebugdialog and changed it manually.
The question I have is that I do not see no informational info in .xsession or
to standard error. I restarted kde via kdeinit but still no informational
output.
I am using kde 3.5 part of suse 10.1.
Who can help me getting my thumbcreator to work? What for information should I
look for? How do I know my thumbcreator is picked up by KDE?
The source code of the test to see I am able to create some thumbnail (an xpm
image)
SRC
------------------
#include <thumbcreator.h>
#include <kdebug.h>
#include <qimage.h>
class DicomThumbCreator : public ThumbCreator
{
public:
DicomThumbCreator()
: ThumbCreator()
{
//empty
}
virtual ~DicomThumbCreator ()
{
//empty
}
virtual bool create(const QString &path, int width, int height, QImage &img)
{
kdDebug() << "thumbcreator file path" << path << endl;
QImage myimage("/home/jeroen/wouter.xpm");
img = myimage.smoothScale( width, height);
return true; ///< false means no image is created
}
virtual Flags flags () const { return ThumbCreator::DrawFrame; }
private:
};
extern "C"
{
ThumbCreator *new_creator()
{
kdDebug( ) << "Dicom thumbcreator active!" << endl;
return new DicomThumbCreator();
}
};
-----------------
dicom_thumbcreator.desktop
---------------------------------
[Desktop Entry]
CacheThumbnail=false
Comment=thumbnail creator for dicom images
Icon=
IgnoreMaximumSize=false
MimeTypes=application/dicom
Name=dicom_thumbcreator
ServiceTypes=ThumbCreator
Type=Service
-----------------
Kind regards,
Jeroen van der Waal
___________________________________________________
This message is from the kde mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.
More information about the kde
mailing list