]> git.sesse.net Git - kdenlive/blob - src/headertrack.h
4950051efca68b1e14e9db6625f366569c053497
[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     ~HeaderTrack();
35     void setLock(bool lock);
36
37 protected:
38     //virtual void paintEvent(QPaintEvent * /*e*/);
39     virtual void contextMenuEvent(QContextMenuEvent * event);
40
41 private:
42     int m_index;
43     TRACKTYPE m_type;
44     Ui::TrackHeader_UI view;
45     QMenu *m_contextMenu;
46
47 private slots:
48     void switchAudio();
49     void switchVideo();
50     void slotDeleteTrack();
51     void slotAddTrack();
52     void slotChangeTrack();
53     void switchLock(bool emitSignal = true);
54
55 signals:
56     void switchTrackAudio(int);
57     void switchTrackVideo(int);
58     void switchTrackLock(int);
59     void insertTrack(int);
60     void deleteTrack(int);
61     void changeTrack(int);
62 };
63
64 #endif