#endif
// views mechanism
- history = new QStack<QWidget*>();
views = new QStackedWidget();
views->hide();
setCentralWidget(views);
QTimer::singleShot(0, this, SLOT(lazyInit()));
}
-MainWindow::~MainWindow() {
- delete history;
-}
-
void MainWindow::lazyInit() {
#ifdef APP_PHONON
initPhonon();
}
void MainWindow::goBack() {
- if ( history->size() > 1 ) {
- history->pop();
- QWidget *widget = history->pop();
+ if (history.size() > 1) {
+ history.pop();
+ QWidget *widget = history.pop();
showWidget(widget);
}
}
*/
}
- history->push(widget);
+ history.push(widget);
}
void MainWindow::about() {
public:
static MainWindow* instance();
MainWindow();
- ~MainWindow();
#ifdef APP_PHONON_SEEK
Phonon::SeekSlider* getSeekSlider() { return seekSlider; }
#else
// view mechanism
QStackedWidget *views;
- QStack<QWidget*> *history;
+ QStack<QWidget*> history;
QList<QAction*> viewActions;
// view widgets