[mythtv] Develpopment Help: MythPopup

Jochen Kühner jochen.kuehner at gmx.de
Thu Aug 25 07:45:29 UTC 2005





I have following in my source file:

#include <qapplication.h>
#include <qpushbutton.h>
#include <stdlib.h>
#include <iostream>

using namespace std;

#include "searchrom.h"
#include <mythtv/mythdialogs.h>
#include <mythtv/mythwidgets.h>
#include <mythtv/mythcontext.h>
//#include <mythtv/mythcontext.h>
#include <mythtv/mythdbcon.h>
#include <mythtv/mythwidgets.h>
#include <mythtv/uitypes.h>



/*
---------------------------------------------------------------------
*/

void MythSearchRomDialog::dosearch(void)
{
    MythPopupBox *search_rom_popup = new
MythPopupBox(gContext->GetMainWindow(), "search_rom_popup");

    // create the widgets
    search_rom_popup->addLabel(QString("Search for Rom..."));
    editor = new MythRemoteLineEdit(this);
    connect(editor, SIGNAL(textChanged()), this, SLOT(searchTextChanged()));
    search_rom_popup->addWidget(editor);
    editor->setFocus();
    search_rom_popup->addButton(tr("OK"), this, SLOT(okPressed()));
    search_rom_popup->addButton(tr("Cancel"), this, SLOT(cancelPressed()));
}
/*


But I get the following build errors...
What do I wrong??


make[2]: Entering directory `/root/mythplugins/mythgame/mythgame'
g++ -c -pipe -march=pentiumpro -mmmx -Wall -W -O3 -fomit-frame-pointer
-D_REENTRANT -DPIC -fPIC  -D_GNU_SOURCE -DPREFIX=\"/usr\" -DMMX -Di386
-DUSING_DBOX2 -DHAVE_DVDNAV -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG
-DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED -I/usr/share/qt3/mkspecs/default
-I. -I/usr/include -I/usr/kde/3.3/include -I/usr/include -I/usr/include
-I/usr/X11R6/include -I/usr/include/qt3 -o searchrom.o searchrom.cpp
searchrom.cpp: In member function 'void MythSearchRomDialog::dosearch()':
searchrom.cpp:29: error: no matching function for call to
'MythRemoteLineEdit::MythRemoteLineEdit(MythSearchRomDialog* const)'
/usr/include/mythtv/mythwidgets.h:155: note: candidates are:
MythRemoteLineEdit::MythRemoteLineEdit(int, QWidget*, const char*)
/usr/include/mythtv/mythwidgets.h:154: note:
MythRemoteLineEdit::MythRemoteLineEdit(QFont*, QWidget*, const char*)
/usr/include/mythtv/mythwidgets.h:153: note:
MythRemoteLineEdit::MythRemoteLineEdit(const QString&, QWidget*, const
char*)
/usr/include/mythtv/mythwidgets.h:152: note:
MythRemoteLineEdit::MythRemoteLineEdit(QWidget*, const char*)
/usr/include/mythtv/mythwidgets.h:148: note:
MythRemoteLineEdit::MythRemoteLineEdit(const MythRemoteLineEdit&)
searchrom.cpp:30: error: 'connect' was not declared in this scope
searchrom.cpp:33: error: no matching function for call to
'MythPopupBox::addButton(QString, MythSearchRomDialog* const, const char
[13])'
/usr/include/mythtv/mythdialogs.h:191: note: candidates are: QButton*
MythPopupBox::addButton(QString, QObject*, const char*)
searchrom.cpp:34: error: no matching function for call to
'MythPopupBox::addButton(QString, MythSearchRomDialog* const, const char
[17])'
/usr/include/mythtv/mythdialogs.h:191: note: candidates are: QButton*
MythPopupBox::addButton(QString, QObject*, const char*)
make[2]: *** [searchrom.o] Fehler 1
make[2]: Leaving directory `/root/mythplugins/mythgame/mythgame'
make[1]: *** [sub-mythgame] Fehler 2
make[1]: Leaving directory `/root/mythplugins/mythgame'
make: *** [sub-mythgame] Fehler 2



More information about the mythtv-dev mailing list