66 lines
1.8 KiB
C++
66 lines
1.8 KiB
C++
#ifndef CUETRACKLISTWIDGET_H
|
|
#define CUETRACKLISTWIDGET_H
|
|
#include <vector>
|
|
#include <QWidget>
|
|
#include <QScrollArea>
|
|
#include <QEvent>
|
|
#include <QKeyEvent>
|
|
#include <QShortcut>
|
|
#include <QVBoxLayout>
|
|
#include <QTableWidget>
|
|
#include <QTableWidgetItem>
|
|
#include "defines.h"
|
|
|
|
class CueTrackListWidget : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit CueTrackListWidget(QWidget *parent = nullptr);
|
|
|
|
public slots:
|
|
CueTrack* getSelectedTrack(bool advance);
|
|
void createNewCueTrack();
|
|
void editCueTrack();
|
|
void deleteCueTrack();
|
|
int getSelectedIndex() { return selectedIndex; };
|
|
CueTrack* getTrackAtIndex(int index);
|
|
QString *getFileName(std::string s);
|
|
void loadCueTrackList(std::string filename);
|
|
void saveCueTrackList(std::string filename);
|
|
void clearCueTrackList();
|
|
void setLastUserCueNumber(size_t n) { lastUserCueNumber = n; }
|
|
size_t getLastUserCueNumber() { return lastUserCueNumber; }
|
|
void cueTrackAtEnd(int layer);
|
|
void redrawCueTrackList();
|
|
|
|
private:
|
|
std::vector<CueTrack *> cueTracks;
|
|
QVBoxLayout* layout;
|
|
QTableWidget* tableWidget;
|
|
int m_size = 0;
|
|
int size() { return m_size; }
|
|
int selectedIndex = 0;
|
|
int lastUserCueNumber = 0;
|
|
CueTrack* copiedCue = nullptr;
|
|
|
|
private slots:
|
|
void addCueTrack(CueTrack* cue);
|
|
void removeCueTrack(int index);
|
|
void key_up();
|
|
void key_down();
|
|
void displayCueTrackInTable(CueTrack *cueTrack, int index);
|
|
void updateSelectedCueTrack(bool highlightRow);
|
|
void cueTrackLoadDefaults(CueTrack * t);
|
|
void copyCueTrack(CueTrack *src, CueTrack *dst);
|
|
void sortCueTrackList();
|
|
void clearTableWidget();
|
|
std::string cueTrackToXml(const CueTrack& cueTrack);
|
|
void copyCueTrack();
|
|
void pasteCueTrack();
|
|
void cutCueTrack();
|
|
|
|
signals:
|
|
void changeSelectedIndex(int index);
|
|
void goAction(int channel);
|
|
};
|
|
#endif
|