/*************************************************************************** * Copyright (C) 2008 by David Cuadrado * * krawek@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include #include #include #include #include #include #include #include #include #include #include #include "sif/mainwindow.h" #include "sif/view.h" #include "sif/aerobutton.h" int main(int argc, char **argv) { QApplication app(argc, argv); app.setApplicationName("Player"); SIF::MainWindow mw; mw.setWindowFlags(mw.windowFlags() | Qt::FramelessWindowHint); QObject::connect(&mw, SIGNAL(titleClicked()), qApp, SLOT(aboutQt())); mw.addPage("View", new QGraphicsView); SIF::View *view1 = new SIF::View; view1->addPage("Collection", new QCalendarWidget); view1->addPage("Information", new QTableWidget(10, 10)); mw.addPage("Music", view1); SIF::View *view2 = new SIF::View; view2->addPage("Collection", new QTextEdit("An editor")); view2->addPage("Information", new QDial); QGraphicsView *qgv = new QGraphicsView; qgv->setRenderHints(QPainter::Antialiasing); QGraphicsScene *scene = new QGraphicsScene; scene->addRect(QRect(25, 150, 100, 100))->setBrush(Qt::red); scene->addEllipse(QRect(100, 20, 40, 100))->setBrush(Qt::blue); qgv->setScene(scene); view2->addPage("Graphics", qgv); mw.addPage("Video", view2); QObject::connect(mw.addButton("Quit"), SIGNAL(clicked()), &app, SLOT(closeAllWindows())); mw.show(); return app.exec(); }