This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Problems Creating a Config Dialog for a plasmoid

Tags: None
(comma "," separated)
pukyxd
Registered Member
Posts
5
Karma
0
I'm doing a new plasmoid and I have problems doing the configuration Dialog. I've done it with QT Designer and with uic I converted it to a header file.

I'm following the code of plasmoids of the websvn and I created the next function:

Code: Select all
void PlasmaTimetable::createTimetableConfigurationInterface(KConfigDialog *parent)
{
    QWidget *widget = new QWidget();
    ui.setupUi(widget);
    parent->addPage(widget, i18n("General"), icon());
}


The problem is that it doesn't compile:

Generating plasma-timetable.moc
[ 0%] Built target plasma_applet_timetable_automoc
[ 50%] Building CXX object CMakeFiles/plasma_applet_timetable.dir/plasma-timetable.o
/home/pukyxd/tmp/timetable-plamoid/plasma-timetable.cpp:53: warning: unused parameter ‘option’
/home/pukyxd/tmp/timetable-plamoid/plasma-timetable.cpp: In member function ‘void PlasmaTimetable::createTimetableConfigurationInterface(KConfigDialog*)’:
/home/pukyxd/tmp/timetable-plamoid/plasma-timetable.cpp:73: error: invalid use of incomplete type ‘struct KConfigDialog’
/usr/include/KDE/Plasma/../../plasma/applet.h:42: error: forward declaration of ‘struct KConfigDialog’
make[2]: *** [CMakeFiles/plasma_applet_timetable.dir/plasma-timetable.o] Error 1
make[1]: *** [CMakeFiles/plasma_applet_timetable.dir/all] Error 2
make: *** [all] Error 2


I'm using Arch Linux with KDE 4.2.0.

Any ideas of what may be the problem?
User avatar
ComaWhite
KDE Developer
Posts
100
Karma
0
OS
are you including #include in the source file?


Image
KDE Version: 4.6 (Beta 2) | Qt Version: 4.7.1
Aki IRC Developer http://www.akiirc.org/
pukyxd
Registered Member
Posts
5
Karma
0
:-$ Oh! Yes, you are right! I missed to put the include. Watching at the code of other plasmoid, there they didn't put the include and for this reason I missed it.

Thanks a lot! :)


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell