[SOLVED] CS #ifndef MAINWINDOW_H

$25

File Name: CS_#ifndef_MAINWINDOW_H.zip
File Size: 216.66 KB

5/5 - (1 vote)

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include
class CanvasWidget;

// No fancy color picker by default. It depends on another library.
#ifndef FANCY_COLOR_PICKER
#define FANCY_COLOR_PICKER 0
#endif

#if FANCY_COLOR_PICKER
namespace color_widgets { class ColorDialog; }
#endif

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
Q_OBJECT

public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();

protected:
// Overload the close event to ask the user about saving.
void closeEvent( QCloseEvent* event ) override;

private slots:
bool open();
bool saveAs();
void chooseColor();

void updateBrushPreview( const QImage& brush );

private:
bool saveChangesIfNeeded();

private:
Ui::MainWindow* ui;
CanvasWidget* canvas;

#if FANCY_COLOR_PICKER
color_widgets::ColorDialog* colorPicker;
#endif
};

#endif // MAINWINDOW_H

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS #ifndef MAINWINDOW_H
$25