2024-11-20 08:15:45 -08:00
|
|
|
#pragma once
|
|
|
|
#include "playback.h"
|
|
|
|
#include "util.hpp"
|
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QSlider>
|
|
|
|
#include <QWidget>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QTextEdit>
|
|
|
|
#include <QBoxLayout>
|
|
|
|
#include <QMenu>
|
|
|
|
#include <QTimer>
|
|
|
|
#include <QFileDialog>
|
|
|
|
#include <QApplication>
|
|
|
|
#include <util.hpp>
|
|
|
|
#include "preferences.h"
|
|
|
|
#include "aboutwindow.h"
|
|
|
|
#include "slider.hpp"
|
|
|
|
class LooperWindow : public QMainWindow {
|
|
|
|
Q_OBJECT;
|
|
|
|
bool labels_visible;
|
|
|
|
bool icons_visible;
|
|
|
|
LooperSlider *volume_slider;
|
|
|
|
LooperSlider *speed_slider;
|
|
|
|
LooperSlider *tempo_slider;
|
|
|
|
LooperSlider *pitch_slider;
|
|
|
|
std::thread *update_thread = nullptr;
|
|
|
|
bool done = false;
|
|
|
|
void Pulse();
|
|
|
|
void ThreadFunc();
|
|
|
|
const char *file_to_play = nullptr;
|
|
|
|
QPushButton *restart_btn;
|
|
|
|
QPushButton *stop_btn;
|
|
|
|
QPushButton *pause_resume_btn;
|
|
|
|
Playback *playback;
|
|
|
|
LooperSlider *slider;
|
|
|
|
QMenu *file_menu;
|
|
|
|
QAction *open_item;
|
|
|
|
QAction *prefs_item;
|
|
|
|
QAction *quit_item;
|
|
|
|
QMenu *help_menu;
|
|
|
|
QAction *about_item;
|
|
|
|
QFileDialog *file_dialog;
|
|
|
|
QBoxLayout *root_layout;
|
2024-12-21 14:23:00 -08:00
|
|
|
QLabel *cat_disp;
|
2024-11-20 08:15:45 -08:00
|
|
|
void update_label_setting(bool labels_visible, bool icons_visible);
|
2024-12-21 14:23:00 -08:00
|
|
|
void update_cat(QPixmap &img);
|
|
|
|
void clear_cat();
|
2024-11-20 08:15:45 -08:00
|
|
|
public:
|
|
|
|
AboutWindow *about_window;
|
|
|
|
PrefsWindow *prefs_window;
|
|
|
|
explicit LooperWindow(Playback *playback);
|
|
|
|
};
|