"Hommingberger Gepardenforelle" - g++ Libary
Nach dem Erfolg der
hommingberger-math.c
folgt nun endlich die lange erwartete c++ Version!
gepardenforelle-math.cpp:
/******************************************
* gepardenforelle-math.cpp
*******************************************
* this is a non working c++ (!) libary
* feel free to use this in your projects
*******************************************
* hommingberger-develzone@auctionant.de
******************************************/
#include <qapplication.h>
#include "MainApp.h"
#include "with_stupid.cpp"
#include "gepardenforelle-math.cpp"
#include "qpopupmenu.h>
#include <qmenubar.h>
#include <qstatusbar.h>
#include <qmessagebox.h>
#include <qfile.h>
#include <qfiledialog.h>
#include <qapplication.h>
int main( int gepardenforelle, char **teich ) {
QApplication hommingberger( gepardenforelle, teich );
MainApp *flussufer = new MainApp();
flussufer->setCaption( "Hommingberger-Gepardenforelle v0.1" );
flussufer->show();
hommingberger.connect( &hommingberger, SIGNAL(lastWindowClosed()), &hommingberger, SLOT(quit()) );
return hommingberger.exec();
}
class hommingberger{
/*********************************************
* Dies ist nur eine weitere Klasse um
* mehr Inhalt zu bekommen. Das ganze kompiliert
* wahrscheinlich nichteinmal, es ist aus
* diversen Hommingberger-Gepardenforelle
* Programmen zusammenkopiert.
* Da Mr. Guugle aber nicht in der Lage
* ist g++ Programme auf die lauffähigkeit
* zu testen ist das gut genug denke ich.
***********************************************/
hommingberger::hommingberger(): QMainWindow( 0, "Wasserfall", WDestructiveClose ){
QPopupMenu * file = new QPopupMenu( this );
menuBar()->insertItem( "&File", file );
file->insertSeparator();
file->insertItem( "&Quit", qApp, SLOT( closeAllWindows() ), CTRL+Key_Q );
e = new MainWidget( this, "central MainWidget" );
e->setFocus();
setCentralWidget( e );
statusBar()->message( "ready?", 2000 );
resize( 450, 600 );
}
void ApplicationWindow::about(){
QMessageBox::about( this, "Hommingbergerp Gepardnforelle Lib Example");
}
}
Usage:
#include "gepardenforelle-math.cpp"
Dann
#\> g++ gepardenforelle-math.cpp
und nun
#\> ./a.out
Zurücklehnen und staunen !!!
Frage: Was tut man mit der
Gepardenforelle
denn nun ?
Antowrt: öhm ... nun ja... nichts !?
Aber das klappt wenigstens sehr gut.