summaryrefslogtreecommitdiffstats
path: root/kview/modules/presenter
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
commite69e8b1d09fb579316595b4e6a850e717358a8b1 (patch)
treea24fc20865f65772f530d16177520190594ffdd2 /kview/modules/presenter
parenteecec9afb81fdebb0f22e9da22635874c403f854 (diff)
downloadtdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz
tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kview/modules/presenter')
-rw-r--r--kview/modules/presenter/config/kviewpresenterconfig.cpp8
-rw-r--r--kview/modules/presenter/config/kviewpresenterconfig.h3
-rw-r--r--kview/modules/presenter/imagelistdialog.ui22
-rw-r--r--kview/modules/presenter/imagelistdialog.ui.h2
-rw-r--r--kview/modules/presenter/imagelistitem.cpp12
-rw-r--r--kview/modules/presenter/imagelistitem.h2
-rw-r--r--kview/modules/presenter/kviewpresenter.cpp42
-rw-r--r--kview/modules/presenter/kviewpresenter.h3
-rw-r--r--kview/modules/presenter/kviewpresenterconfmodule.cpp8
-rw-r--r--kview/modules/presenter/kviewpresenterconfmodule.h3
10 files changed, 54 insertions, 51 deletions
diff --git a/kview/modules/presenter/config/kviewpresenterconfig.cpp b/kview/modules/presenter/config/kviewpresenterconfig.cpp
index e44889ed..edcf157d 100644
--- a/kview/modules/presenter/config/kviewpresenterconfig.cpp
+++ b/kview/modules/presenter/config/kviewpresenterconfig.cpp
@@ -31,11 +31,11 @@
typedef KGenericFactory<KViewPresenterConfig, TQWidget> KViewPresenterConfigFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kviewpresenterconfig, KViewPresenterConfigFactory( "kcm_kviewpresenterconfig" ) )
-KViewPresenterConfig::KViewPresenterConfig( TQWidget * parent, const char *, const TQStringList & args )
- : KCModule( KViewPresenterConfigFactory::instance(), parent, args )
+KViewPresenterConfig::KViewPresenterConfig( TQWidget * tqparent, const char *, const TQStringList & args )
+ : KCModule( KViewPresenterConfigFactory::instance(), tqparent, args )
{
- TQBoxLayout * layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
- layout->setAutoAdd( true );
+ TQBoxLayout * tqlayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ tqlayout->setAutoAdd( true );
m_pCheckBox = new TQCheckBox( "This is only for testing...", this );
connect( m_pCheckBox, TQT_SIGNAL( clicked() ), this, TQT_SLOT( checkChanged() ) );
diff --git a/kview/modules/presenter/config/kviewpresenterconfig.h b/kview/modules/presenter/config/kviewpresenterconfig.h
index ae257cea..d07c1506 100644
--- a/kview/modules/presenter/config/kviewpresenterconfig.h
+++ b/kview/modules/presenter/config/kviewpresenterconfig.h
@@ -26,8 +26,9 @@ class TQCheckBox;
class KViewPresenterConfig : public KCModule
{
Q_OBJECT
+ TQ_OBJECT
public:
- KViewPresenterConfig( TQWidget * parent, const char * name = 0, const TQStringList & args = TQStringList() );
+ KViewPresenterConfig( TQWidget * tqparent, const char * name = 0, const TQStringList & args = TQStringList() );
~KViewPresenterConfig();
virtual void load();
diff --git a/kview/modules/presenter/imagelistdialog.ui b/kview/modules/presenter/imagelistdialog.ui
index 66d9e9b5..2bc7206a 100644
--- a/kview/modules/presenter/imagelistdialog.ui
+++ b/kview/modules/presenter/imagelistdialog.ui
@@ -60,7 +60,7 @@
<property name="name">
<cstring>m_pListView</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>400</width>
<height>0</height>
@@ -79,7 +79,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout4</cstring>
</property>
@@ -87,7 +87,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout2</cstring>
</property>
@@ -140,7 +140,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
@@ -188,7 +188,7 @@
<property name="sizeType">
<enum>MinimumExpanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>80</height>
@@ -206,7 +206,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout4</cstring>
</property>
@@ -259,7 +259,7 @@
<include location="global" impldecl="in implementation">kio/netaccess.h</include>
<include location="global" impldecl="in implementation">kurl.h</include>
<include location="global" impldecl="in implementation">kfiledialog.h</include>
- <include location="global" impldecl="in implementation">qstring.h</include>
+ <include location="global" impldecl="in implementation">tqstring.h</include>
<include location="global" impldecl="in implementation">kmessagebox.h</include>
<include location="local" impldecl="in implementation">imagelistitem.h</include>
<include location="local" impldecl="in implementation">imagelistdialog.ui.h</include>
@@ -267,12 +267,12 @@
<forwards>
<forward>class KURL</forward>
</forwards>
-<slots>
+<Q_SLOTS>
<slot access="private" specifier="non virtual">init()</slot>
<slot specifier="non virtual">noSort()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
-<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
+<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includehints>
<includehint>kdialog.h</includehint>
<includehint>klistview.h</includehint>
diff --git a/kview/modules/presenter/imagelistdialog.ui.h b/kview/modules/presenter/imagelistdialog.ui.h
index ce97754e..5c391549 100644
--- a/kview/modules/presenter/imagelistdialog.ui.h
+++ b/kview/modules/presenter/imagelistdialog.ui.h
@@ -1,7 +1,7 @@
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
-** If you wish to add, delete or rename slots use Qt Designer which will
+** If you wish to add, delete or rename slots use TQt Designer which will
** update this file, preserving your code. Create an init() slot in place of
** a constructor, and a destroy() slot in place of a destructor.
*****************************************************************************/
diff --git a/kview/modules/presenter/imagelistitem.cpp b/kview/modules/presenter/imagelistitem.cpp
index 547de656..b31c65b2 100644
--- a/kview/modules/presenter/imagelistitem.cpp
+++ b/kview/modules/presenter/imagelistitem.cpp
@@ -24,10 +24,10 @@
#include <klistview.h>
-ImageListItem::ImageListItem( KListView * parent, const KURL & url )
- : KListViewItem( parent, parent->lastItem(), url.prettyURL() )
+ImageListItem::ImageListItem( KListView * tqparent, const KURL & url )
+ : KListViewItem( tqparent, tqparent->lastItem(), url.prettyURL() )
, m_pImage( 0 )
- , m_filename( TQString::null )
+ , m_filename( TQString() )
, m_url( url )
{
setDragEnabled( true );
@@ -41,11 +41,11 @@ ImageListItem::ImageListItem( KListView * parent, const KURL & url )
/*
TQString extension;
TQString fileName = m_url.fileName();
- int extensionPos = fileName.findRev( '.' );
+ int extensionPos = fileName.tqfindRev( '.' );
if ( extensionPos != -1 )
extension = fileName.mid( extensionPos ); // keep the '.'
delete m_pTempFile;
- m_pTempFile = new KTempFile( TQString::null, extension );
+ m_pTempFile = new KTempFile( TQString(), extension );
m_filename = m_pTempFile->name();
m_pJob = KIO::get( m_url, m_pExtension->urlArgs().reload, false );
@@ -70,7 +70,7 @@ const TQImage * ImageListItem::image() const
const TQString & ImageListItem::file() const
{
if( m_url.isLocalFile() )
- return TQString::null;
+ return TQString();
return m_filename;
}
diff --git a/kview/modules/presenter/imagelistitem.h b/kview/modules/presenter/imagelistitem.h
index ee143a90..e54f84a4 100644
--- a/kview/modules/presenter/imagelistitem.h
+++ b/kview/modules/presenter/imagelistitem.h
@@ -30,7 +30,7 @@ class TQImage;
class ImageListItem : public KListViewItem
{
public:
- ImageListItem( KListView * parent, const KURL & url );
+ ImageListItem( KListView * tqparent, const KURL & url );
~ImageListItem();
const TQImage * image() const;
diff --git a/kview/modules/presenter/kviewpresenter.cpp b/kview/modules/presenter/kviewpresenter.cpp
index 3cf54d15..d85748c1 100644
--- a/kview/modules/presenter/kviewpresenter.cpp
+++ b/kview/modules/presenter/kviewpresenter.cpp
@@ -51,8 +51,8 @@
typedef KGenericFactory<KViewPresenter> KViewPresenterFactory;
K_EXPORT_COMPONENT_FACTORY( kview_presenterplugin, KViewPresenterFactory( "kviewpresenterplugin" ) )
-KViewPresenter::KViewPresenter( TQObject* parent, const char* name, const TQStringList & )
- : Plugin( parent, name )
+KViewPresenter::KViewPresenter( TQObject* tqparent, const char* name, const TQStringList & )
+ : Plugin( tqparent, name )
, m_pImageList( new ImageListDialog() )
, m_paFileOpen( 0 )
, m_bDontAdd( false )
@@ -62,7 +62,7 @@ KViewPresenter::KViewPresenter( TQObject* parent, const char* name, const TQStri
kdDebug( 4630 ) << k_funcinfo << endl;
m_imagelist.setAutoDelete( true );
- TQObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false );
+ TQObjectList * viewerList = tqparent->queryList( 0, "KImageViewer Part", false, false );
m_pViewer = static_cast<KImageViewer::Viewer *>( viewerList->getFirst() );
delete viewerList;
if( m_pViewer )
@@ -82,17 +82,17 @@ KViewPresenter::KViewPresenter( TQObject* parent, const char* name, const TQStri
connect( m_pImageList->m_pSlideshow, TQT_SIGNAL( toggled( bool ) ), m_paSlideshow, TQT_SLOT( setChecked( bool ) ) );
// search for file_open action
- KXMLGUIClient * parentClient = static_cast<KXMLGUIClient*>( parent->qt_cast( "KXMLGUIClient" ) );
- if( parentClient )
+ KXMLGUIClient * tqparentClient = static_cast<KXMLGUIClient*>( tqparent->qt_cast( "KXMLGUIClient" ) );
+ if( tqparentClient )
{
- m_paFileOpen = parentClient->actionCollection()->action( "file_open" );
- m_paFileClose = parentClient->actionCollection()->action( "file_close" );
+ m_paFileOpen = tqparentClient->actionCollection()->action( "file_open" );
+ m_paFileClose = tqparentClient->actionCollection()->action( "file_close" );
}
if( m_paFileClose )
connect( m_paFileClose, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotClose() ) );
if( m_paFileOpen )
{
- disconnect( m_paFileOpen, TQT_SIGNAL( activated() ), parent, TQT_SLOT( slotOpenFile() ) );
+ disconnect( m_paFileOpen, TQT_SIGNAL( activated() ), tqparent, TQT_SLOT( slotOpenFile() ) );
connect( m_paFileOpen, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotOpenFiles() ) );
}
else
@@ -150,18 +150,18 @@ KViewPresenter::~KViewPresenter()
if( m_paFileOpen )
{
disconnect( m_paFileOpen, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotOpenFiles() ) );
- // If the parent() doesn't exist we either leave the "File Open" action
+ // If the tqparent() doesn't exist we either leave the "File Open" action
// in an unusable state or KView was just shutting down and therefor we
// can ignore this. I've only seen the second one happening and to get
- // rid of the TQObject::connect warning we do the parent() check.
- if( parent() )
- connect( m_paFileOpen, TQT_SIGNAL( activated() ), parent(), TQT_SLOT( slotOpenFile() ) );
+ // rid of the TQObject::connect warning we do the tqparent() check.
+ if( tqparent() )
+ connect( m_paFileOpen, TQT_SIGNAL( activated() ), tqparent(), TQT_SLOT( slotOpenFile() ) );
}
}
bool KViewPresenter::eventFilter( TQObject *obj, TQEvent *ev )
{
- if( obj == m_pImageList || obj == m_pImageList->m_pListView || obj == m_pImageList->m_pListView->viewport() || obj == m_pViewer->widget() )
+ if( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pImageList) || TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pImageList->m_pListView) || TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pImageList->m_pListView->viewport()) || TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pViewer->widget()) )
{
switch( ev->type() )
{
@@ -191,7 +191,7 @@ bool KViewPresenter::eventFilter( TQObject *obj, TQEvent *ev )
for( TQStringList::const_iterator it = l.begin(); it != l.end(); ++it )
{
ImageInfo * info = new ImageInfo( KURL( *it ) );
- if( ! m_imagelist.contains( info ) )
+ if( ! m_imagelist.tqcontains( info ) )
{
m_imagelist.inSort( info );
( void )new ImageListItem( m_pImageList->m_pListView, KURL( *it ) );
@@ -218,7 +218,7 @@ void KViewPresenter::slotImageOpened( const KURL & url )
{
kdDebug( 4630 ) << k_funcinfo << "imagelist:" << endl;
ImageInfo * info = new ImageInfo( url );
- if( ! m_imagelist.contains( info ) )
+ if( ! m_imagelist.tqcontains( info ) )
{
m_imagelist.inSort( info );
TQListViewItem * item = new ImageListItem( m_pImageList->m_pListView, url );
@@ -248,7 +248,7 @@ void KViewPresenter::slotOpenFiles()
for( ++it; it != urls.end(); ++it )
{
ImageInfo * info = new ImageInfo( *it );
- if( ! m_imagelist.contains( info ) )
+ if( ! m_imagelist.tqcontains( info ) )
{
m_imagelist.inSort( info );
( void )new ImageListItem( m_pImageList->m_pListView, *it );
@@ -405,14 +405,14 @@ void KViewPresenter::closeAll()
void KViewPresenter::loadList()
{
- KURL url = KFileDialog::getOpenURL( ":load_list", TQString::null, m_pImageList );
+ KURL url = KFileDialog::getOpenURL( ":load_list", TQString(), m_pImageList );
if( url.isEmpty() )
return;
TQString tempfile;
if( ! KIO::NetAccess::download( url, tempfile, m_pViewer->widget() ) )
{
- KMessageBox::error( m_pImageList, i18n( "Could not load\n%1" ).arg( url.prettyURL() ) );
+ KMessageBox::error( m_pImageList, i18n( "Could not load\n%1" ).tqarg( url.prettyURL() ) );
return;
}
TQFile file( tempfile );
@@ -431,7 +431,7 @@ void KViewPresenter::loadList()
{
KURL url ( t.readLine() );
ImageInfo * info = new ImageInfo( url );
- if( ! m_imagelist.contains( info ) )
+ if( ! m_imagelist.tqcontains( info ) )
{
m_imagelist.inSort( info );
( void )new ImageListItem( m_pImageList->m_pListView, url );
@@ -442,7 +442,7 @@ void KViewPresenter::loadList()
}
else
{
- KMessageBox::error( m_pImageList, i18n( "Wrong format\n%1" ).arg( url.prettyURL() ) );
+ KMessageBox::error( m_pImageList, i18n( "Wrong format\n%1" ).tqarg( url.prettyURL() ) );
}
file.close();
}
@@ -451,7 +451,7 @@ void KViewPresenter::loadList()
void KViewPresenter::saveList()
{
- KURL url = KFileDialog::getSaveURL( ":save_list", TQString::null, m_pImageList );
+ KURL url = KFileDialog::getSaveURL( ":save_list", TQString(), m_pImageList );
if( url.isEmpty() )
return;
diff --git a/kview/modules/presenter/kviewpresenter.h b/kview/modules/presenter/kviewpresenter.h
index e607f92b..ba3198b2 100644
--- a/kview/modules/presenter/kviewpresenter.h
+++ b/kview/modules/presenter/kviewpresenter.h
@@ -38,8 +38,9 @@ class KAction;
class KViewPresenter : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- KViewPresenter( TQObject* parent, const char* name, const TQStringList & );
+ KViewPresenter( TQObject* tqparent, const char* name, const TQStringList & );
virtual ~KViewPresenter();
protected:
diff --git a/kview/modules/presenter/kviewpresenterconfmodule.cpp b/kview/modules/presenter/kviewpresenterconfmodule.cpp
index 1c79ee15..ef051c28 100644
--- a/kview/modules/presenter/kviewpresenterconfmodule.cpp
+++ b/kview/modules/presenter/kviewpresenterconfmodule.cpp
@@ -29,8 +29,8 @@
#include <kglobal.h>
#include <kconfig.h>
-KViewPresenterConfModule::KViewPresenterConfModule( TQObject * parent )
- : KPreferencesModule( "kviewpresenter", parent, "KView Presenter Config Module" )
+KViewPresenterConfModule::KViewPresenterConfModule( TQObject * tqparent )
+ : KPreferencesModule( "kviewpresenter", tqparent, "KView Presenter Config Module" )
{
}
@@ -49,8 +49,8 @@ void KViewPresenterConfModule::reset()
void KViewPresenterConfModule::createPage( TQFrame * page )
{
- TQBoxLayout * layout = new TQVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() );
- layout->setAutoAdd( true );
+ TQBoxLayout * tqlayout = new TQVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() );
+ tqlayout->setAutoAdd( true );
m_pCheckBox = new TQCheckBox( "This is only for testing...", page );
}
diff --git a/kview/modules/presenter/kviewpresenterconfmodule.h b/kview/modules/presenter/kviewpresenterconfmodule.h
index 6e3dcb46..8ecaa345 100644
--- a/kview/modules/presenter/kviewpresenterconfmodule.h
+++ b/kview/modules/presenter/kviewpresenterconfmodule.h
@@ -28,8 +28,9 @@ class TQCheckBox;
class KViewPresenterConfModule : public KPreferencesModule
{
Q_OBJECT
+ TQ_OBJECT
public:
- KViewPresenterConfModule( TQObject * parent );
+ KViewPresenterConfModule( TQObject * tqparent );
~KViewPresenterConfModule();
signals: