00001 #include <iostream>
00002 using namespace std;
00003
00004 #include <QtGui/QApplication>
00005 #include "mainwindow.h"
00006
00007 class QMyWindow: public QMainWindow {
00008 public:
00009 QMyWindow(QWidget *parent): QMainWindow(parent) {
00010 ui.setupUi(this);
00011 if(!connect(ui.add_face, SIGNAL(clicked()),
00012 ui.area, SLOT(addFace()))) {
00013 cerr << "Could not connect addface\n";
00014 }
00015
00016 if(!connect(ui.add_10_faces, SIGNAL(clicked()),
00017 ui.area, SLOT(add10Faces()))) {
00018 cerr << "Could not connect addface\n";
00019 }
00020
00021 if(!connect(ui.add_100_faces, SIGNAL(clicked()),
00022 ui.area, SLOT(add100Faces()))) {
00023 cerr << "Could not connect addface\n";
00024 }
00025
00026 if(!connect(ui.add_1000_faces, SIGNAL(clicked()),
00027 ui.area, SLOT(add1000Faces()))) {
00028 cerr << "Could not connect addface\n";
00029 }
00030 if(!connect(ui.add_all, SIGNAL(clicked()),
00031 ui.area, SLOT(addAll()))) {
00032 cerr << "Could not connect addface\n";
00033 }
00034
00035 if(!connect(ui.add, SIGNAL(clicked()),
00036 ui.area, SLOT(addTot()))) {
00037 cerr << "Could not connect addface\n";
00038 }
00039
00040
00041 if(!connect(ui.save, SIGNAL(clicked()),
00042 ui.area, SLOT(save()))) {
00043 cerr << "Could not connect addface\n";
00044 }
00045 if(!connect(ui.smooth, SIGNAL(clicked(bool)),
00046 ui.area, SLOT(viewSmooth(bool)))) {
00047 cerr << "Could not connect addface\n";
00048 }
00049 if(!connect(ui.open, SIGNAL(clicked()),
00050 ui.area, SLOT(open()))) {
00051 cerr << "Could not connect addface\n";
00052 }
00053 if(!connect(ui.radius, SIGNAL(valueChanged(double)),
00054 ui.area, SLOT(setRadius(double)))) {
00055 cerr << "Could not connect addface\n";
00056 }
00057 if(!connect(ui.tot, SIGNAL(valueChanged(int)),
00058 ui.area, SLOT(setTot(int)))) {
00059 cerr << "Could not connect addface\n";
00060 }
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074 }
00075 private:
00076 Ui::MainWindow ui;
00077 };
00078
00079 int main(int argc, char *argv[]) {
00080 QApplication app(argc, argv);
00081 QMyWindow *window = new QMyWindow(NULL);
00082
00083 window->show();
00084 return app.exec();
00085 }