summaryrefslogtreecommitdiffstats
path: root/kipi-plugins/wallpaper
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-18 06:46:40 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-18 06:46:40 +0000
commit7c19562ad065b6729bac8eb9b40dfe0452a72272 (patch)
tree33325d1e02ecc9ca614c7209296f8f796a1c3478 /kipi-plugins/wallpaper
parenta65baa328fac0a1ce12971fef8d998ce7bfbe237 (diff)
downloadkipi-plugins-7c19562ad065b6729bac8eb9b40dfe0452a72272.tar.gz
kipi-plugins-7c19562ad065b6729bac8eb9b40dfe0452a72272.zip
TQt4 port kipi-plugins
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/libraries/kipi-plugins@1232561 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kipi-plugins/wallpaper')
-rw-r--r--kipi-plugins/wallpaper/plugin_wallpaper.cpp46
-rw-r--r--kipi-plugins/wallpaper/plugin_wallpaper.h9
2 files changed, 28 insertions, 27 deletions
diff --git a/kipi-plugins/wallpaper/plugin_wallpaper.cpp b/kipi-plugins/wallpaper/plugin_wallpaper.cpp
index e4e5074..1a4da77 100644
--- a/kipi-plugins/wallpaper/plugin_wallpaper.cpp
+++ b/kipi-plugins/wallpaper/plugin_wallpaper.cpp
@@ -56,13 +56,13 @@ K_EXPORT_COMPONENT_FACTORY( kipiplugin_wallpaper,
/////////////////////////////////////////////////////////////////////////////////////////////////////
- Plugin_WallPaper::Plugin_WallPaper(QObject *parent, const char*, const QStringList&)
- : KIPI::Plugin( Factory::instance(), parent, "WallPaper")
+ Plugin_WallPaper::Plugin_WallPaper(TQObject *tqparent, const char*, const TQStringList&)
+ : KIPI::Plugin( Factory::instance(), tqparent, "WallPaper")
{
kdDebug( 51001 ) << "Plugin_WallPaper plugin loaded" << endl;
}
-void Plugin_WallPaper::setup( QWidget* widget )
+void Plugin_WallPaper::setup( TQWidget* widget )
{
KIPI::Plugin::setup( widget );
@@ -73,49 +73,49 @@ void Plugin_WallPaper::setup( QWidget* widget )
m_action_Background->insert(new KAction (i18n("Centered"),
0,
this,
- SLOT(slotSetCenter()),
+ TQT_SLOT(slotSetCenter()),
actionCollection(),
"images2desktop_center"));
m_action_Background->insert(new KAction (i18n("Tiled"),
0,
this,
- SLOT(slotSetTiled()),
+ TQT_SLOT(slotSetTiled()),
actionCollection(),
"images2desktop_tiled"));
m_action_Background->insert(new KAction (i18n("Centered Tiled"),
0,
this,
- SLOT(slotSetCenterTiled()),
+ TQT_SLOT(slotSetCenterTiled()),
actionCollection(),
"images2desktop_center_tiled"));
m_action_Background->insert(new KAction (i18n("Centered Max-Aspect"),
0,
this,
- SLOT(slotSetCenteredMaxpect()),
+ TQT_SLOT(slotSetCenteredMaxpect()),
actionCollection(),
"images2desktop_center_maxpect"));
m_action_Background->insert(new KAction (i18n("Tiled Max-Aspect"),
0,
this,
- SLOT(slotSetTiledMaxpect()),
+ TQT_SLOT(slotSetTiledMaxpect()),
actionCollection(),
"images2desktop_tiled_maxpect"));
m_action_Background->insert(new KAction (i18n("Scaled"),
0,
this,
- SLOT(slotSetScaled()),
+ TQT_SLOT(slotSetScaled()),
actionCollection(),
"images2desktop_scaled"));
m_action_Background->insert(new KAction (i18n("Centered Auto Fit"),
0,
this,
- SLOT(slotSetCenteredAutoFit()),
+ TQT_SLOT(slotSetCenteredAutoFit()),
actionCollection(),
"images2desktop_centered_auto_fit"));
@@ -124,7 +124,7 @@ void Plugin_WallPaper::setup( QWidget* widget )
m_action_Background->insert(new KAction (i18n("Scale && Crop"),
0,
this,
- SLOT(slotSetScaleAndCrop()),
+ TQT_SLOT(slotSetScaleAndCrop()),
actionCollection(),
"images2desktop_scale_and_crop"));
@@ -132,7 +132,7 @@ void Plugin_WallPaper::setup( QWidget* widget )
addAction( m_action_Background );
- KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() );
+ KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( tqparent() );
if ( !interface )
{
@@ -143,8 +143,8 @@ void Plugin_WallPaper::setup( QWidget* widget )
KIPI::ImageCollection selection = interface->currentSelection();
m_action_Background->setEnabled( selection.isValid() );
- connect( interface, SIGNAL(selectionChanged(bool)),
- m_action_Background, SLOT(setEnabled(bool)));
+ connect( interface, TQT_SIGNAL(selectionChanged(bool)),
+ m_action_Background, TQT_SLOT(setEnabled(bool)));
}
@@ -212,12 +212,12 @@ void Plugin_WallPaper::slotSetScaleAndCrop()
/////////////////////////////////////////////////////////////////////////////////////////////////////
-void Plugin_WallPaper::setWallpaper(int layout)
+void Plugin_WallPaper::setWallpaper(int tqlayout)
{
- if (layout>SCALE_AND_CROP || layout < CENTER)
+ if (tqlayout>SCALE_AND_CROP || tqlayout < CENTER)
return;
- KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() );
+ KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( tqparent() );
if ( !interface )
{
@@ -230,20 +230,20 @@ void Plugin_WallPaper::setWallpaper(int layout)
if (!images.isValid() ) return;
KURL url=images.images()[0];
- QString path;
+ TQString path;
if (url.isLocalFile())
{
path=url.path();
}
else
{
- // PENDING We need a way to get a parent widget
+ // PENDING We need a way to get a tqparent widget
// Sun, 06 Jun 2004 - Aur�ien
- KMessageBox::information( kapp->activeWindow(), i18n(
+ KMessageBox::information( TQT_TQWIDGET(kapp->activeWindow()), i18n(
"<qt><p>You selected a remote image. It needs to be saved to your local disk to be used as a wallpaper."
"</p><p>You will now be asked where to save the image.</p></qt>"));
- path = KFileDialog::getSaveFileName(url.fileName(), QString::null, kapp->activeWindow());
+ path = KFileDialog::getSaveFileName(url.fileName(), TQString(), TQT_TQWIDGET(kapp->activeWindow()));
if (path.isNull()) return;
#if KDE_VERSION > 0x30200
@@ -253,8 +253,8 @@ void Plugin_WallPaper::setWallpaper(int layout)
#endif
}
- QString cmd = QString("dcop kdesktop KBackgroundIface setWallpaper '%1' %2")
- .arg(path).arg(layout);
+ TQString cmd = TQString("dcop kdesktop KBackgroundIface setWallpaper '%1' %2")
+ .tqarg(path).tqarg(tqlayout);
KRun::runCommand(cmd);
}
diff --git a/kipi-plugins/wallpaper/plugin_wallpaper.h b/kipi-plugins/wallpaper/plugin_wallpaper.h
index 9953ad7..6be59b3 100644
--- a/kipi-plugins/wallpaper/plugin_wallpaper.h
+++ b/kipi-plugins/wallpaper/plugin_wallpaper.h
@@ -41,14 +41,15 @@
class Plugin_WallPaper : public KIPI::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- Plugin_WallPaper(QObject *parent,
+ Plugin_WallPaper(TQObject *tqparent,
const char* name,
- const QStringList &args);
+ const TQStringList &args);
virtual KIPI::Category category( KAction* action ) const;
- virtual void setup( QWidget* );
+ virtual void setup( TQWidget* );
private slots:
@@ -75,7 +76,7 @@
};
KActionMenu *m_action_Background;
- void setWallpaper( int layout );
+ void setWallpaper( int tqlayout );
};
#endif // PLUGIN_IMAGES2DESKTOP_H