krita
kis_canvas_subject.h
00001 /* 00002 * Copyright (c) 2003 Patrick Julien <freak@codepimps.org> 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #ifndef KIS_CANVAS_SUBJECT_H_ 00020 #define KIS_CANVAS_SUBJECT_H_ 00021 00022 #include "kis_types.h" 00023 #include "kis_id.h" 00024 00025 class KisDoc; 00026 class KisBrush; 00027 class KisCanvasController; 00028 class KisCanvasObserver; 00029 class KisGradient; 00030 class KisPattern; 00031 class KisPaintOpFactory; 00032 class KisToolControllerInterface; 00033 class KisUndoAdapter; 00034 class KisProgressDisplayInterface; 00035 class KisSelectionManager; 00036 class QWidget; 00037 class QCursor; 00038 class KisColor; 00039 class KoPaletteManager; 00040 class KisProfile; 00041 class KisPaintOpSettings; 00042 00051 class KisCanvasSubject { 00052 00053 public: 00054 KisCanvasSubject() {}; 00055 virtual ~KisCanvasSubject() {}; 00056 00057 public: 00058 00064 virtual void attach(KisCanvasObserver *observer) = 0; 00065 00070 virtual void detach(KisCanvasObserver *observer) = 0; 00071 00076 virtual void notifyObservers() = 0; 00077 00081 virtual KisImageSP currentImg() const = 0; 00082 00086 virtual KisColor bgColor() const = 0; 00087 00093 virtual void setBGColor(const KisColor& c) = 0; 00094 00098 virtual KisColor fgColor() const = 0; 00099 00105 virtual void setFGColor(const KisColor& c) = 0; 00106 00110 virtual float HDRExposure() const = 0; 00111 00117 virtual void setHDRExposure(float exposure) = 0; 00118 00122 virtual KisBrush *currentBrush() const = 0; 00123 00127 virtual KisPattern *currentPattern() const = 0; 00128 00132 virtual KisGradient *currentGradient() const = 0; 00133 00137 virtual KisID currentPaintop() const = 0; 00138 00142 virtual const KisPaintOpSettings *currentPaintopSettings() const = 0; 00143 00147 virtual double zoomFactor() const = 0; 00148 00153 virtual KisUndoAdapter *undoAdapter() const = 0; 00154 00158 virtual KisCanvasController *canvasController() const = 0; 00159 00161 virtual KisToolControllerInterface *toolController() const = 0; 00162 00164 virtual KisDoc * document() const = 0; 00165 00167 virtual KisProgressDisplayInterface *progressDisplay() const = 0; 00168 00170 virtual KisSelectionManager * selectionManager() = 0; 00171 00173 virtual KoPaletteManager * paletteManager() = 0; 00174 00179 virtual KisProfile * monitorProfile() = 0; 00180 00181 00182 private: 00183 KisCanvasSubject(const KisCanvasSubject&); 00184 KisCanvasSubject& operator=(const KisCanvasSubject&); 00185 }; 00186 00187 #endif // KIS_CANVAS_SUBJECT_H_ 00188