File indexing completed on 2025-02-02 04:11:26
0001 /* 0002 * SPDX-FileCopyrightText: 2019-2023 Mattia Basaglia <dev@dragon.best> 0003 * 0004 * SPDX-License-Identifier: GPL-3.0-or-later 0005 */ 0006 0007 #ifndef TRACEDIALOG_H 0008 #define TRACEDIALOG_H 0009 0010 #include <memory> 0011 #include <QDialog> 0012 0013 namespace glaxnimate { 0014 0015 namespace model { 0016 class Image; 0017 class DocumentNode; 0018 } // namespace model 0019 0020 namespace gui { 0021 0022 class TraceDialog : public QDialog 0023 { 0024 Q_OBJECT 0025 0026 public: 0027 TraceDialog(model::Image* image, QWidget* parent = nullptr); 0028 ~TraceDialog(); 0029 0030 model::DocumentNode* created() const; 0031 protected: 0032 void changeEvent ( QEvent* e ) override; 0033 void resizeEvent(QResizeEvent * event) override; 0034 void showEvent(QShowEvent * event) override; 0035 0036 private Q_SLOTS: 0037 void update_preview(); 0038 void apply(); 0039 void change_mode(int mode); 0040 void add_color(); 0041 void remove_color(); 0042 void auto_colors(); 0043 void zoom_preview(qreal percent); 0044 void show_help(); 0045 void preview_slide(int percent); 0046 void reset_settings(); 0047 void color_options(); 0048 void toggle_advanced(bool advanced); 0049 0050 private: 0051 class Private; 0052 std::unique_ptr<Private> d; 0053 }; 0054 0055 }} // namespace glaxnimate::gui 0056 0057 #endif // TRACEDIALOG_H