summaryrefslogtreecommitdiffstats
path: root/kpovmodeler/pmpatternedit.h
blob: ec7f19284a52411fa8a8f480378197f392d3a861 (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
/*
**************************************************************************
                                 description
                             --------------------
    copyright            : (C) 2001 by Luis Carvalho
    email                : [email protected]
    copyright            : (C) 2001 by Andreas Zehender
    email                : [email protected]
**************************************************************************

**************************************************************************
*                                                                        *
*  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 TQComboBox;
class PMFloatEdit;
class PMIntEdit;
class TQLabel;
class TQCheckBox;
class TQWidget;
class TQLineEdit;
class TQPushButton;

/**
 * Dialog edit class for @ref PMPattern.
 */
class PMPatternEdit : public PMDialogEditBase
{
   TQ_OBJECT
  
   typedef PMDialogEditBase Base;
public:
   /**
    * Creates a PMPatternEdit with parent and name
    */
   PMPatternEdit( TQWidget* 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;
   TQComboBox*     m_pTypeCombo;

   TQLabel*        m_pAgateTurbulenceLabel;
   PMFloatEdit*   m_pAgateTurbulenceEdit;

   TQWidget*       m_pCrackleWidget;
   PMVectorEdit*  m_pCrackleForm;
   PMIntEdit*     m_pCrackleMetric;
   PMFloatEdit*   m_pCrackleOffset;
   TQCheckBox*     m_pCrackleSolid;

   TQWidget*       m_pDensityWidget;
   TQComboBox*     m_pDensityInterpolate;
   TQLineEdit*     m_pDensityFile;
   TQPushButton*   m_pDensityFileBrowse;

   TQLabel*        m_pGradientLabel;
   PMVectorEdit*  m_pGradientEdit;

   TQLabel*        m_pJuliaComplexLabel;
   PMVectorEdit*  m_pJuliaComplex;
   TQWidget*       m_pFractalWidget;
   TQCheckBox*     m_pFractalMagnet;
   TQComboBox*     m_pFractalMagnetType;
   PMIntEdit*     m_pMaxIterationsEdit;
   TQLabel*        m_pFractalExponentLabel;
   PMIntEdit*     m_pFractalExponent;
   TQComboBox*     m_pFractalExtType;
   PMFloatEdit*   m_pFractalExtFactor;
   TQComboBox*     m_pFractalIntType;
   PMFloatEdit*   m_pFractalIntFactor;

   TQLabel*        m_pQuiltControlsLabel;
   PMFloatEdit*   m_pQuiltControl0Edit;
   PMFloatEdit*   m_pQuiltControl1Edit;

   TQWidget*       m_pSlopeWidget;
   PMVectorEdit*  m_pSlopeDirection;
   PMFloatEdit*   m_pSlopeLoSlope;
   PMFloatEdit*   m_pSlopeHiSlope;
   TQCheckBox*     m_pSlopeAltFlag;
   PMVectorEdit*  m_pSlopeAltitude;
   TQLabel*        m_pSlopeLoAltLabel;
   PMFloatEdit*   m_pSlopeLoAlt;
   TQLabel*        m_pSlopeHiAltLabel;
   PMFloatEdit*   m_pSlopeHiAlt;

   TQLabel*        m_pSpiralNumberLabel;
   PMIntEdit*     m_pSpiralNumberEdit;

   TQLabel*        m_pNoiseGeneratorLabel;
   TQComboBox*     m_pNoiseGenerator;

   TQCheckBox*     m_pEnableTurbulenceEdit;
   TQWidget*       m_pTurbulenceWidget;
   PMVectorEdit*  m_pValueVectorEdit;
   PMIntEdit*     m_pOctavesEdit;
   PMFloatEdit*   m_pOmegaEdit;
   PMFloatEdit*   m_pLambdaEdit;

   TQLabel*        m_pDepthLabel;
   PMFloatEdit*   m_pDepthEdit;
};


#endif