ich habe eine Anwendung mit folgendem Code
main.cpp:
Code: Alles auswählen
//--- main.cpp - start ---
#include "Plan3x.h"
#include "NeuesZiel.h"
#include <QApplication>
#include <QMainWindow>
#include <QProcess>
#include <QWidget>
int main( int argc, char* argv[]){
QApplication a(argc, argv);
Plan3x w;
w.show();
return a.exec();
}Code: Alles auswählen
#ifndef Plan3x_H
#define Plan3x_H
#include "ui_Plan3x.h"
class Plan3x : public QMainWindow, public Ui::MainWindow{
Q_OBJECT
public:
Plan3x (QMainWindow *parent = 0);
~Plan3x();
private slots:
void mousePressEvent( QMouseEvent* event );
void mouseMoveEvent( QMouseEvent* event );
void mouseReleaseEvent( QMouseEvent* event );
//etc. hier sind halt diverse slots
};
#endif //Plan3x_H
Code: Alles auswählen
#include "math.h"
#include <QProcess>
#include <QFileDialog>
#include <QMessageBox>
#include <QImage>
#include <QPixmap>
#include <QWidget>
#include <QPainter>
#include <QTimer>
#include <QtGui>
#include <QWidget>
#include <QApplication>
#include "Plan3x.h"
#include "NeuesZiel.h"
Plan3x::Plan3x(QMainWindow *parent) : QMainWindow(parent){
setupUi(this);
connect(actionNeu, SIGNAL (triggered()), this, SLOT(neues_projekt()));
connect(action_ffnen, SIGNAL (triggered()), this, SLOT(projekte_oeffnen()));
connect(actionSpeichern, SIGNAL (triggered()), this, SLOT(speichern()));
connect(zoomen, SIGNAL(valueChanged(int)), zoomstufe, SLOT(setNum(int)));
connect(zoomen, SIGNAL(valueChanged(int)), this, SLOT(karte_ausschneiden()));
}
Plan3x::~Plan3x(){
}
void Plan3x::plausibilitaet_pruefen() {
close();
}
//etc. die funktionen halt
void Plan3x::neues_ziel() {
QWidget *widget = new QWidget;
Ui_NeuesZiel::Ui_NeuesZiel ui3;
ui3.setupUi(widget);
widget->show();
}ich hab leider total den überblick verloren: jetzt muss ich doch irgendwo dessen slots und signale und funktionen ablegen oder? leider kommt gar nichst an, kann mir jemand das mal erklären
ich weiß verraffter post aber ich sitze schon seit stunden dran und kann nicht mehr so gut denken 8) [/code]