Warning, file /graphics/kolourpaint/dialogs/imagelib/transforms/kpTransformRotateDialog.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 0002 /* 0003 Copyright (c) 2003-2007 Clarence Dang <dang@kde.org> 0004 All rights reserved. 0005 0006 Redistribution and use in source and binary forms, with or without 0007 modification, are permitted provided that the following conditions 0008 are met: 0009 0010 1. Redistributions of source code must retain the above copyright 0011 notice, this list of conditions and the following disclaimer. 0012 2. Redistributions in binary form must reproduce the above copyright 0013 notice, this list of conditions and the following disclaimer in the 0014 documentation and/or other materials provided with the distribution. 0015 0016 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 0017 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 0018 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 0019 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 0020 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 0021 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 0022 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 0023 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 0024 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 0025 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 0026 */ 0027 0028 0029 #ifndef kpTransformRotateDialog_H 0030 #define kpTransformRotateDialog_H 0031 0032 0033 #include <QImage> 0034 0035 #include "imagelib/kpColor.h" 0036 #include "dialogs/imagelib/transforms/kpTransformPreviewDialog.h" 0037 0038 0039 class QButtonGroup; 0040 class QRadioButton; 0041 class QSpinBox; 0042 0043 0044 class kpTransformRotateDialog : public kpTransformPreviewDialog 0045 { 0046 Q_OBJECT 0047 0048 public: 0049 kpTransformRotateDialog (bool actOnSelection, 0050 kpTransformDialogEnvironment *_env, 0051 QWidget *parent); 0052 ~kpTransformRotateDialog () override; 0053 0054 private: 0055 static int s_lastWidth, s_lastHeight; 0056 static bool s_lastIsClockwise; 0057 static int s_lastAngleCustom; 0058 0059 void createDirectionGroupBox (); 0060 void createAngleGroupBox (); 0061 0062 public: 0063 bool isNoOp () const override; 0064 int angle () const; // 0 <= angle < 360 (clockwise); 0065 0066 private: 0067 QSize newDimensions () const override; 0068 QImage transformPixmap (const QImage &pixmap, 0069 int targetWidth, int targetHeight) const override; 0070 0071 private Q_SLOTS: 0072 void slotAngleCustomRadioButtonToggled (bool isChecked); 0073 void slotUpdate () override; 0074 0075 private Q_SLOTS: 0076 void accept () override; 0077 0078 private: 0079 QRadioButton *m_antiClockwiseRadioButton, 0080 *m_clockwiseRadioButton; 0081 0082 QRadioButton *m_angle90RadioButton, 0083 *m_angle180RadioButton, 0084 *m_angle270RadioButton, 0085 *m_angleCustomRadioButton; 0086 QSpinBox *m_angleCustomInput; 0087 }; 0088 0089 0090 #endif // kpTransformRotateDialog_H