int ImportDiagram::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = Q3MainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: createMdiChild(); break; case 1: timerEvent(); break; case 2: showTable(); break; case 3: showSelector(); break; case 4: screenshort(); break; case 5: refresh(); break; case 6: backcolor(); break; case 7: legendIsClicked((*reinterpret_cast< QwtPlotItem*(*)>(_a[1]))); break; case 8: onAutoscale((*reinterpret_cast< int(*)>(_a[1]))); break; default: ; } _id -= 9; } return _id; }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); QString path=QApplication::applicationDirPath()+"/qml/Wakedo/main.qml"; //bool r = QDesktopServices::openUrl(QUrl::fromLocalFile(path)); ui->view->setSource(QUrl::fromLocalFile(path)); QGraphicsObject *item = ui->view->rootObject(); QObject::connect(item, SIGNAL(selectAlarmType()), this, SLOT(showSelector())); /* // trying http://doc.qt.nokia.com/qt-maemo-4.6/maemo5-stackedwindows.html button1.setText("About"); //ui->layout->addWidget(&button1); ("Click here to open a new stacked window"); QPushButton button1("Click here to open a new stacked window"); //not compatible with harmattan button1.setAttribute(Qt::WA_Maemo5StackedWindow); QPushButton button2("Click here to open another stacked window", &button1); button2.setAttribute(Qt::WA_Maemo5StackedWindow); button2.setWindowFlags(button2.windowFlags() | Qt::Window); QLabel label("<p align=\"center\">This is the last stacked window. " "Press the back arrow on the top-right corner to go back.", &button2, Qt::Window); label.setAttribute(Qt::WA_Maemo5StackedWindow); label.setWordWrap(true); QObject::connect(&button1, SIGNAL(clicked()), &button2, SLOT(show())); QObject::connect(&button2, SIGNAL(clicked()), &label, SLOT(show())); */ //button1.show(); //setAttribute(Qt::WA_Maemo5LandscapeOrientation, true); }