buckshot/buckshot/mainwindow.h
Dagen Brock ef19a7a94f add the palette code and clean/fix project for qt 5.7 -> 5.12
- the 5.12 release seems to introduce some bugs on my mac, when you hit preview, rthe code ran but the UI wwouldn't update.  i've added repaint() calls, but this is quite frustrating and could be an issue with qt that might be mitigated otherwise in the future.  sorry future me. :`(
2018-12-28 09:52:41 -06:00

69 lines
1.5 KiB
C++

#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QTemporaryDir>
namespace Ui {
class MainWindow;
}
/*
* 280x192
* ~306 x 210
*/
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();
private slots:
void on_pushButton_sourceFilename_clicked();
void on_horizontalSlider_crossHatch_valueChanged(int value);
void on_horizontalSlider_colorBleed_valueChanged(int value);
void on_comboBox_outputFormat_currentIndexChanged(int);
void on_comboBox_inputResolution_currentIndexChanged(int index);
void on_checkBox_livePreview_stateChanged(int arg1);
void previewTimerTimeout();
void on_actionWhat_is_this_triggered();
void on_pushButton_preview_clicked();
void on_pushButton_saveImage_clicked();
void on_pushButton_saveToProdos_clicked();
void on_comboBox_dithering_currentIndexChanged(int index);
void on_comboBox_previewPalette_currentIndexChanged(int index);
private:
Ui::MainWindow *ui;
void updateInputSize();
void livePreview();
void updateDisplayModes();
int inputWidth;
int inputHeight;
bool updateNeeded;
QTimer *previewTimer;
QTemporaryDir *tmpDir;
QString tmpDirPath;
static const QString imageName; //"saved"
static const QString version; //"0.00"
static const QString programName; //"buckshot"
QString inputImgPath;
QString previewImgPath;
QString outputImgPath;
};
#endif // MAINWINDOW_H