ListViewController.h 2.01 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*****************************************************************************
 * ListViewController.h:
 *****************************************************************************
 * Copyright (C) 2008-2009 the VLMC team
 *
 * 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
#ifndef LISTVIEWCONTROLLER_H
#define LISTVIEWCONTROLLER_H

#include <QWidget>
#include <QListView>
#include <QAbstractItemModel>
#include <QScrollArea>
30
#include <QUuid>
Thomas Boquet's avatar
Thomas Boquet committed
31
32
33

#include "ViewController.h"
#include "StackViewController.h"
34
#include "Clip.h"
Thomas Boquet's avatar
Thomas Boquet committed
35
36
37
38


class ListViewController : public ViewController
{
39
    Q_OBJECT
Thomas Boquet's avatar
Thomas Boquet committed
40
41

public:
42
    ListViewController() {}
Thomas Boquet's avatar
Thomas Boquet committed
43
44
45
46
47
48
49
50
51
52
53
54
55
    ListViewController( StackViewController* nav );
    ~ListViewController();

    QWidget*        view() const;
    const QString&  title() const;
    void            addCell( QWidget* cell );

private:
    QString*                    m_title;
    QScrollArea*                m_scrollArea;
    QWidget*                    m_container;
    QVBoxLayout*                m_layout;
    StackViewController*        m_nav;
56
    QUuid*                      m_currentUuid;
57
58
59
60
61
62

public slots:
    void            cellSelected( const QUuid& );

signals:
    void            selectedClipChanged( Clip* );
Thomas Boquet's avatar
Thomas Boquet committed
63
64
65
};

#endif // LISTVIEWCONTROLLER_H