You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
627 B
28 lines
627 B
11 years ago
|
#include <QtGui/QApplication>
|
||
|
#include <QtGui/QMainWindow>
|
||
|
#include <QtGui/QMenuBar>
|
||
|
|
||
|
#include <QtCore/QTime>
|
||
|
|
||
|
|
||
|
#include "graphwidget.hpp"
|
||
|
|
||
|
int main(int argc, char **argv)
|
||
|
{
|
||
|
QApplication app(argc, argv);
|
||
|
qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
|
||
|
|
||
|
GraphWidget *widget = new GraphWidget;
|
||
|
|
||
|
QMainWindow mainWindow;
|
||
|
mainWindow.setCentralWidget(widget);
|
||
|
|
||
|
|
||
|
mainWindow.menuBar()->addAction("Shuffle", widget, SLOT(shuffle()));
|
||
|
mainWindow.menuBar()->addAction("Zoom In", widget, SLOT(zoomIn()));
|
||
|
mainWindow.menuBar()->addAction("Zoom Out", widget, SLOT(zoomOut()));
|
||
|
|
||
|
mainWindow.show();
|
||
|
return app.exec();
|
||
|
}
|