StackViewController.h 2.04 KB
Newer Older
Thomas Boquet's avatar
Thomas Boquet committed
1 2 3
/*****************************************************************************
 * StackViewController.h
 *****************************************************************************
Ludovic Fauvet's avatar
Ludovic Fauvet committed
4
 * Copyright (C) 2008-2010 VideoLAN
Thomas Boquet's avatar
Thomas Boquet committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
 *
 * Authors: Thomas Boquet <thomas.boquet@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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/

Thomas Boquet's avatar
Thomas Boquet committed
23 24 25 26 27 28 29 30 31 32 33 34
#ifndef STACKVIEWCONTROLLER_H
#define STACKVIEWCONTROLLER_H

#include <QWidget>
#include <QPushButton>
#include <QHBoxLayout>
#include <QLabel>
#include <QStack>

#include "StackViewNavController.h"
#include "ViewController.h"

35 36
class ImportController;

Thomas Boquet's avatar
Thomas Boquet committed
37 38 39 40 41
class StackViewController : public QWidget
{
    Q_OBJECT

public:
42
    StackViewController( QWidget* parent = 0 );
Thomas Boquet's avatar
Thomas Boquet committed
43 44
    ~StackViewController();

45 46 47
    void                    pushViewController( ViewController* viewController,
                                                bool animated = false );
    void                    popViewController( bool animated = false );
Thomas Boquet's avatar
Thomas Boquet committed
48 49 50 51 52 53 54 55 56

private:
    StackViewNavController*     m_nav;
    QVBoxLayout*                m_layout;
    ViewController*             m_current;
    QStack<ViewController*>*    m_controllerStack;

public slots:
    void                        previous();
57
    void                        viewDestroyed();
Thomas Boquet's avatar
Thomas Boquet committed
58

59
signals:
60
    void                        previousButtonPushed();
61

Thomas Boquet's avatar
Thomas Boquet committed
62 63 64
};

#endif // STACKVIEWCONTROLLER_H