summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.h.cmake1
-rw-r--r--kpovmodeler/CMakeLists.txt4
-rw-r--r--kpovmodeler/ConfigureChecks.cmake9
-rw-r--r--kpovmodeler/pmrendermode.cpp8
-rw-r--r--kpovmodeler/pmrendermode.h4
-rw-r--r--kpovmodeler/pmrendermodesdialog.cpp19
-rw-r--r--kpovmodeler/pmrendermodesdialog.h1
-rw-r--r--tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake2
-rw-r--r--tdefile-plugins/dependencies/poppler-tqt/poppler-document.cpp9
9 files changed, 22 insertions, 35 deletions
diff --git a/config.h.cmake b/config.h.cmake
index 5b88585c..b3b6d1ec 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -1,6 +1,7 @@
#cmakedefine VERSION "@VERSION@"
// poppler-tqt
+#cmakedefine HAVE_POPPLER_2108
#cmakedefine HAVE_POPPLER_086
#cmakedefine HAVE_POPPLER_083
#cmakedefine HAVE_POPPLER_082
diff --git a/kpovmodeler/CMakeLists.txt b/kpovmodeler/CMakeLists.txt
index 6ec98ae4..b589117f 100644
--- a/kpovmodeler/CMakeLists.txt
+++ b/kpovmodeler/CMakeLists.txt
@@ -19,7 +19,7 @@ include_directories(
${CMAKE_BINARY_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
- ${GLU_INCLUDE_DIRS}
+ ${OPENGL_INCLUDE_DIRS}
${FREETYPE_INCLUDE_DIRS}
)
@@ -112,7 +112,7 @@ tde_add_library( kpovmodeler SHARED AUTOMOC
pmlibraryiconview.cpp pmlibraryobjectsearch.cpp pmpluginmanager.cpp
pmpartiface.skel
VERSION 0.0.0
- LINK tdeparts-shared ${GLU_LIBRARIES} ${XMU_LIBRARIES} ${FREETYPE_LIBRARIES}
+ LINK tdeparts-shared ${OPENGL_LIBRARIES} ${XMU_LIBRARIES} ${FREETYPE_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR}
)
diff --git a/kpovmodeler/ConfigureChecks.cmake b/kpovmodeler/ConfigureChecks.cmake
index f4fdd1c0..a55045d4 100644
--- a/kpovmodeler/ConfigureChecks.cmake
+++ b/kpovmodeler/ConfigureChecks.cmake
@@ -10,13 +10,14 @@
#################################################
# glu
-pkg_search_module( GLU glu )
-if( NOT GLU_FOUND )
+set( OpenGL_GL_PREFERENCE LEGACY )
+find_package( OpenGL )
+if( NOT OPENGL_FOUND )
check_include_file ( GL/glu.h HAVE_GLU )
if( NOT HAVE_GLU )
- tde_message_fatal( "glu is required, but was not found on your system" )
+ tde_message_fatal( "OpenGL (glu) is required, but was not found on your system" )
endif ( )
- set( GLU_LIBRARIES "-lGL -lGLU" )
+ set( OPENGL_LIBRARIES "-lGL -lGLU" )
endif( )
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;
diff --git a/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake b/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake
index 1bc139b7..9c15e64f 100644
--- a/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake
+++ b/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake
@@ -24,7 +24,7 @@ check_cxx_source_compiles("
HAVE_POPPLER_030 )
tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
-foreach( _poppler_ver 0.58 0.64 0.70 0.71 0.72 0.76 0.82 0.83 0.86 )
+foreach( _poppler_ver 0.58 0.64 0.70 0.71 0.72 0.76 0.82 0.83 0.86 21.08 )
string( REPLACE "." "" _poppler_str "${_poppler_ver}" )
if( NOT DEFINED HAVE_POPPLER_${_poppler_str} )
message( STATUS "Performing Test HAVE_POPPLER_${_poppler_str}" )
diff --git a/tdefile-plugins/dependencies/poppler-tqt/poppler-document.cpp b/tdefile-plugins/dependencies/poppler-tqt/poppler-document.cpp
index fac02a4b..78e8befe 100644
--- a/tdefile-plugins/dependencies/poppler-tqt/poppler-document.cpp
+++ b/tdefile-plugins/dependencies/poppler-tqt/poppler-document.cpp
@@ -278,9 +278,14 @@ TQDateTime Document::getDate( const TQString & type ) const
#endif
if (!obj.isNull() && obj.isString())
{
- TQString s = UnicodeParsedString(obj.getString());
+# if defined(HAVE_POPPLER_2108)
+ const GooString *s = obj.getString();
+# else
+ TQString tqs = UnicodeParsedString(obj.getString());
+ const char *s = tqs.latin1();
+# endif
// TODO do something with the timezone information
- if ( parseDateString( s.latin1(), &year, &mon, &day, &hour, &min, &sec, &tz, &tz_hour, &tz_minute ) )
+ if (parseDateString(s, &year, &mon, &day, &hour, &min, &sec, &tz, &tz_hour, &tz_minute))
{
TQDate d( year, mon, day ); //CHECK: it was mon-1, Jan->0 (??)
TQTime t( hour, min, sec );