summaryrefslogtreecommitdiffstats
path: root/kpovmodeler
diff options
context:
space:
mode:
authorEmanoil Kotsev <deloptes@gmail.com>2018-10-08 22:54:16 +0200
committerEmanoil Kotsev <deloptes@gmail.com>2021-10-21 15:59:10 +0200
commit72d4668eea11f5fdee15f54598130479ac332b09 (patch)
tree8fc9bf28aa7ff1f06e2d541e9465a0f345facc8b /kpovmodeler
parentd9a5befb4fdba51b1dfb82d60e0727575ec2e1d0 (diff)
downloadtdegraphics-72d4668eea11f5fdee15f54598130479ac332b09.tar.gz
tdegraphics-72d4668eea11f5fdee15f54598130479ac332b09.zip
radiosity was removed in povray-3.7 (option -/+QR)
- Remove radiosity from render mode dialog - Update Quality options - Update c_qualityToIndex array accordingly
Diffstat (limited to 'kpovmodeler')
-rw-r--r--kpovmodeler/pmrendermode.cpp8
-rw-r--r--kpovmodeler/pmrendermode.h4
-rw-r--r--kpovmodeler/pmrendermodesdialog.cpp19
-rw-r--r--kpovmodeler/pmrendermodesdialog.h1
4 files changed, 6 insertions, 26 deletions
diff --git a/kpovmodeler/pmrendermode.cpp b/kpovmodeler/pmrendermode.cpp
index b2a752f8..9da4f2ac 100644
--- a/kpovmodeler/pmrendermode.cpp
+++ b/kpovmodeler/pmrendermode.cpp
@@ -39,8 +39,6 @@ void PMRenderMode::init( )
m_quality = 9;
- m_radiosity = false;
-
m_antialiasing = false;
m_samplingMethod = AntialiasingNonRecursive;
m_antialiasThreshold = 0.3;
@@ -67,7 +65,6 @@ PMRenderMode::PMRenderMode( const TQDomElement& e )
m_startRow = hlp.doubleAttribute( "start_row", m_startRow );
m_endRow = hlp.doubleAttribute( "end_row", m_endRow );
m_quality = hlp.intAttribute( "quality", m_quality );
- m_radiosity = hlp.boolAttribute( "radiosity", m_radiosity );
m_antialiasing = hlp.boolAttribute( "antialiasing", m_antialiasing );
m_samplingMethod = hlp.intAttribute( "sampling_method", m_samplingMethod );
m_antialiasThreshold = hlp.doubleAttribute( "aa_threshold", m_antialiasThreshold );
@@ -88,7 +85,6 @@ void PMRenderMode::serialize( TQDomElement& e ) const
e.setAttribute( "start_column", m_startColumn );
e.setAttribute( "end_column", m_endColumn );
e.setAttribute( "quality", m_quality );
- e.setAttribute( "radiosity", m_radiosity );
e.setAttribute( "antialiasing", m_antialiasing );
e.setAttribute( "sampling_method", m_samplingMethod );
e.setAttribute( "aa_threshold", m_antialiasThreshold );
@@ -187,10 +183,6 @@ TQStringList PMRenderMode::commandLineSwitches( ) const
cl.append( tmp );
}
cl.append( TQString( "+Q%1" ).arg( m_quality ) );
- if( m_radiosity )
- cl.append( TQString( "+QR" ) );
- else
- cl.append( TQString( "-QR" ) );
if( m_antialiasing )
{
diff --git a/kpovmodeler/pmrendermode.h b/kpovmodeler/pmrendermode.h
index ffd233aa..aa819a7f 100644
--- a/kpovmodeler/pmrendermode.h
+++ b/kpovmodeler/pmrendermode.h
@@ -71,9 +71,6 @@ public:
void setQuality( int quality );
int quality( ) const { return m_quality; }
-
- void setRadiosity( bool on ) { m_radiosity = on; }
- bool radiosity( ) const { return m_radiosity; }
void setAntialiasing( bool on ) { m_antialiasing = on; }
bool antialiasing( ) const { return m_antialiasing; }
@@ -110,7 +107,6 @@ private:
double m_startRow, m_endRow, m_startColumn, m_endColumn;
int m_quality;
- bool m_radiosity;
bool m_antialiasing;
int m_samplingMethod;
double m_antialiasThreshold;
diff --git a/kpovmodeler/pmrendermodesdialog.cpp b/kpovmodeler/pmrendermodesdialog.cpp
index 1452e606..f81cb7ee 100644
--- a/kpovmodeler/pmrendermodesdialog.cpp
+++ b/kpovmodeler/pmrendermodesdialog.cpp
@@ -222,22 +222,21 @@ void PMRenderModesDialog::slotOk( )
TQSize PMRenderModeDialog::s_size = TQSize( 300, 200 );
-const int numQuality = 9;
+const int numQuality = 7;
const char* qualityString[numQuality] =
{
I18N_NOOP( "0, 1: Quick colors, full ambient lighting only" ),
I18N_NOOP( "2, 3: Show specified diffuse and ambient light" ),
I18N_NOOP( "4: Render shadows, but no extended lights" ),
I18N_NOOP( "5: Render shadows, including extended lights" ),
- I18N_NOOP( "6, 7: Compute texture patterns" ),
+ I18N_NOOP( "6, 7: Compute texture patterns, compute photons" ),
I18N_NOOP( "8: Compute reflected, refracted, and transmitted rays" ),
- I18N_NOOP( "9: Compute media" ),
- I18N_NOOP( "10: Compute radiosity but no media" ),
- I18N_NOOP( "11: Compute radiosity and media" )
+ I18N_NOOP( "9, 10, 11: Compute media, radiosity and subsurface light transport" )
+
};
-const int c_qualityToIndex[12] = { 0, 0, 1, 1, 2, 3, 4, 4, 5, 6, 7, 8 };
-const int c_indexToQuality[numQuality] = { 0, 2, 4, 5, 6, 8, 9, 10, 11 };
+const int c_qualityToIndex[12] = { 0, 0, 1, 1, 2, 3, 4, 4, 5, 6, 6, 6 };
+const int c_indexToQuality[numQuality] = { 0, 2, 4, 5, 6, 8, 9};
PMRenderModeDialog::PMRenderModeDialog( PMRenderMode* mode, TQWidget* parent, const char* name )
: KDialogBase( parent, name, true, i18n( "Render Modes" ),
@@ -347,9 +346,6 @@ PMRenderModeDialog::PMRenderModeDialog( PMRenderMode* mode, TQWidget* parent, co
aaHelpLayout->addStretch( 1 );
- m_pRadiosityBox = new TQCheckBox( i18n( "Radiosity" ), tab );
- tabLayout->addWidget( m_pRadiosityBox );
-
tabLayout->addStretch( 1 );
// output options tab
@@ -380,7 +376,6 @@ PMRenderModeDialog::PMRenderModeDialog( PMRenderMode* mode, TQWidget* parent, co
connect( m_pStartColumnEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) );
connect( m_pEndColumnEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) );
connect( m_pQualityCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotActivated( int ) ) );
- connect( m_pRadiosityBox, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotChanged( ) ) );
connect( m_pAntialiasingBox, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotAntialiasingToggled( bool ) ) );
connect( m_pSamplingCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotActivated( int ) ) );
connect( m_pThresholdEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) );
@@ -425,7 +420,6 @@ bool PMRenderModeDialog::saveChanges( )
m_pMode->setEndColumn( m_pEndColumnEdit->value( ) );
}
m_pMode->setQuality( indexToQuality( m_pQualityCombo->currentItem( ) ) );
- m_pMode->setRadiosity( m_pRadiosityBox->isChecked( ) );
m_pMode->setAntialiasing( m_pAntialiasingBox->isChecked( ) );
if( m_pAntialiasingBox->isChecked( ) )
{
@@ -509,7 +503,6 @@ void PMRenderModeDialog::displayMode( )
m_pStartColumnEdit->setValue( m_pMode->startColumn( ) );
m_pEndColumnEdit->setValue( m_pMode->endColumn( ) );
m_pQualityCombo->setCurrentItem( qualityToIndex( m_pMode->quality( ) ) );
- m_pRadiosityBox->setChecked( m_pMode->radiosity( ) );
m_pAntialiasingBox->setChecked( m_pMode->antialiasing( ) );
enableAntialiasing( m_pMode->antialiasing( ) );
m_pSamplingCombo->setCurrentItem( m_pMode->samplingMethod( ) );
diff --git a/kpovmodeler/pmrendermodesdialog.h b/kpovmodeler/pmrendermodesdialog.h
index b2ce7abe..5adbefaf 100644
--- a/kpovmodeler/pmrendermodesdialog.h
+++ b/kpovmodeler/pmrendermodesdialog.h
@@ -164,7 +164,6 @@ private:
PMFloatEdit* m_pEndColumnEdit;
// quality
TQComboBox* m_pQualityCombo;
- TQCheckBox* m_pRadiosityBox;
TQCheckBox* m_pAntialiasingBox;
TQComboBox* m_pSamplingCombo;
PMFloatEdit* m_pThresholdEdit;