MainWindow::MainWindow() : updater_(new qtsparkle::Updater(QUrl("http://dev.latest.clementine-player.appspot.com/sparkle"), this)) { resize(600, 400); QPushButton* c = new QPushButton("Check for updates", this); c->setGeometry(100, 100, c->sizeHint().width(), c->sizeHint().height()); QPushButton* e = new QPushButton("Exit", this); e->setGeometry(100, 200, e->sizeHint().width(), e->sizeHint().height()); connect(c, SIGNAL(clicked()), updater_, SLOT(CheckNow())); connect(e, SIGNAL(clicked()), SLOT(close())); }
void MetaWindow::createActions(){ quitAction = new QAction(tr("&Quit"), this); quitAction->setShortcuts(QKeySequence::Quit); addMusicAction = new QAction(tr("Add &Music Folder"), this); addMusicAction->setShortcut(tr("Ctrl+M")); addSongAction = new QAction(tr("A&dd Single Song"), this); addSongAction->setShortcut(tr("Ctrl+D")); viewLogAction = new QAction(tr("View Lo&g"), this); viewLogAction->setShortcut(tr("Ctrl+G")); viewAboutAction = new QAction(tr("About"), this); rescanItunesAction = new QAction(tr("Rescan iTunes Library"), this); #if IS_WINDOWS_BUILD checkUpdateAction = new QAction(tr("Check For Updates"), this); connect(checkUpdateAction, SIGNAL(triggered()), updater, SLOT(CheckNow())); #endif connect(addMusicAction, SIGNAL(triggered()), this, SLOT(addMusicToLibrary())); connect(quitAction, SIGNAL(triggered()), this, SLOT(close())); connect(addSongAction, SIGNAL(triggered()), this, SLOT(addSongToLibrary())); connect(viewLogAction, SIGNAL(triggered()), this, SLOT(displayLogView())); connect(viewAboutAction, SIGNAL(triggered()), this, SLOT(displayAboutWidget())); connect(rescanItunesAction, SIGNAL(triggered()), this, SLOT(scanItunesLibrary())); }