]> git.sesse.net Git - kdenlive/blob - src/headertrack.h
93d70548d55bbf739961b83b1d13e0fffb5fd6fe
[kdenlive] / src / headertrack.h
1 /***************************************************************************
2  *   Copyright (C) 2008 by Jean-Baptiste Mardelle (jb@kdenlive.org)        *
3  *                                                                         *
4  *   This program is free software; you can redistribute it and/or modify  *
5  *   it under the terms of the GNU General Public License as published by  *
6  *   the Free Software Foundation; either version 2 of the License, or     *
7  *   (at your option) any later version.                                   *
8  *                                                                         *
9  *   This program is distributed in the hope that it will be useful,       *
10  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12  *   GNU General Public License for more details.                          *
13  *                                                                         *
14  *   You should have received a copy of the GNU General Public License     *
15  *   along with this program; if not, write to the                         *
16  *   Free Software Foundation, Inc.,                                       *
17  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA          *
18  ***************************************************************************/
19
20 #ifndef HEADERTRACK_H
21 #define HEADERTRACK_H
22
23 #include <QContextMenuEvent>
24 #include <QMenu>
25
26 #include "definitions.h"
27 #include "ui_trackheader_ui.h"
28
29 class HeaderTrack : public QWidget {
30     Q_OBJECT
31
32 public:
33     HeaderTrack(int index, TrackInfo info, QWidget *parent = 0);
34
35 protected:
36     //virtual void paintEvent(QPaintEvent * /*e*/);
37     virtual void contextMenuEvent(QContextMenuEvent * event);
38
39 private:
40     int m_index;
41     TRACKTYPE m_type;
42     Ui::TrackHeader_UI view;
43     QMenu *m_contextMenu;
44
45 private slots:
46     void switchAudio();
47     void switchVideo();
48     void slotDeleteTrack();
49     void slotAddTrack();
50
51 signals:
52     void switchTrackAudio(int);
53     void switchTrackVideo(int);
54     void insertTrack(int);
55     void deleteTrack(int);
56 };
57
58 #endif