summaryrefslogtreecommitdiffstats
path: root/kpovmodeler/pmpatternedit.h
blob: 9f36ccf4df14700bcdea66415cb7d46244026b74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
//-*-C++-*-
/*
**************************************************************************
                                 description
                             --------------------
    copyright            : (C) 2001 by Luis Carvalho
    email                : lpassos@mail.telepac.pt
    copyright            : (C) 2001 by Andreas Zehender
    email                : zehender@kde.org
**************************************************************************

**************************************************************************
*                                                                        *
*  This program is free software; you can redistribute it and/or modify  *
*  it under the terms of the GNU General Public License as published by  *
*  the Free Software Foundation; either version 2 of the License, or     *
*  (at your option) any later version.                                   *
*                                                                        *
**************************************************************************/


#ifndef PMPATTERNEDIT_H
#define PMPATTERNEDIT_H

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include "pmdialogeditbase.h"

class PMPattern;
class PMVectorEdit;
class QComboBox;
class PMFloatEdit;
class PMIntEdit;
class QLabel;
class QCheckBox;
class QWidget;
class QLineEdit;
class QPushButton;

/**
 * Dialog edit class for @ref PMPattern.
 */
class PMPatternEdit : public PMDialogEditBase
{
   Q_OBJECT
   typedef PMDialogEditBase Base;
public:
   /**
    * Creates a PMPatternEdit with parent and name
    */
   PMPatternEdit( QWidget* parent, const char* name = 0 );

   /** */
   virtual void displayObject( PMObject* o );

   /** */
   virtual bool isDataValid( );
protected:
   /** */
   virtual void createTopWidgets( );
   /** */
   virtual void saveContents( );

protected slots:
   /**
    * Slot called whenever a new pattern type is selected.
    */
   void slotComboChanged( int c );
   /**
    * Slot called when the browse button is pressed for selection of the
    * density file
    */
   void slotDensityFileBrowseClicked( );
   /**
    * Slot called when fractal magnet clicked
    */
   void slotFractalMagnetClicked( );
   /**
    * Slot called when the slope altitude flag is clicked
    */
   void slotSlopeAltFlagClicked( );
   /**
    * Slot called when turbulence is activated/deactivated.
    */
   void slotTurbulenceClicked( );

private:
   /**
    * Set's the combo box and enables/disables widgets.
    */
   void setPatternType( int i );
   /**
    * m_noDepth is false is the editor must show the depth field
    */
   bool m_noDepth;
   PMPattern*     m_pDisplayedObject;
   QComboBox*     m_pTypeCombo;

   QLabel*        m_pAgateTurbulenceLabel;
   PMFloatEdit*   m_pAgateTurbulenceEdit;

   QWidget*       m_pCrackleWidget;
   PMVectorEdit*  m_pCrackleForm;
   PMIntEdit*     m_pCrackleMetric;
   PMFloatEdit*   m_pCrackleOffset;
   QCheckBox*     m_pCrackleSolid;

   QWidget*       m_pDensityWidget;
   QComboBox*     m_pDensityInterpolate;
   QLineEdit*     m_pDensityFile;
   QPushButton*   m_pDensityFileBrowse;

   QLabel*        m_pGradientLabel;
   PMVectorEdit*  m_pGradientEdit;

   QLabel*        m_pJuliaComplexLabel;
   PMVectorEdit*  m_pJuliaComplex;
   QWidget*       m_pFractalWidget;
   QCheckBox*     m_pFractalMagnet;
   QComboBox*     m_pFractalMagnetType;
   PMIntEdit*     m_pMaxIterationsEdit;
   QLabel*        m_pFractalExponentLabel;
   PMIntEdit*     m_pFractalExponent;
   QComboBox*     m_pFractalExtType;
   PMFloatEdit*   m_pFractalExtFactor;
   QComboBox*     m_pFractalIntType;
   PMFloatEdit*   m_pFractalIntFactor;

   QLabel*        m_pQuiltControlsLabel;
   PMFloatEdit*   m_pQuiltControl0Edit;
   PMFloatEdit*   m_pQuiltControl1Edit;

   QWidget*       m_pSlopeWidget;
   PMVectorEdit*  m_pSlopeDirection;
   PMFloatEdit*   m_pSlopeLoSlope;
   PMFloatEdit*   m_pSlopeHiSlope;
   QCheckBox*     m_pSlopeAltFlag;
   PMVectorEdit*  m_pSlopeAltitude;
   QLabel*        m_pSlopeLoAltLabel;
   PMFloatEdit*   m_pSlopeLoAlt;
   QLabel*        m_pSlopeHiAltLabel;
   PMFloatEdit*   m_pSlopeHiAlt;

   QLabel*        m_pSpiralNumberLabel;
   PMIntEdit*     m_pSpiralNumberEdit;

   QLabel*        m_pNoiseGeneratorLabel;
   QComboBox*     m_pNoiseGenerator;

   QCheckBox*     m_pEnableTurbulenceEdit;
   QWidget*       m_pTurbulenceWidget;
   PMVectorEdit*  m_pValueVectorEdit;
   PMIntEdit*     m_pOctavesEdit;
   PMFloatEdit*   m_pOmegaEdit;
   PMFloatEdit*   m_pLambdaEdit;

   QLabel*        m_pDepthLabel;
   PMFloatEdit*   m_pDepthEdit;
};


#endif