Conversion Qt3→TQt

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/1/head
Mavridis Philippe 3 years ago
parent 9ef5a045dd
commit 2bc11f9dc7
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -54,7 +54,7 @@ include( ConfigureChecks.cmake )
add_definitions( -DHAVE_CONFIG_H ) add_definitions( -DHAVE_CONFIG_H )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" ) set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" ) set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )

@ -819,6 +819,6 @@ configdialog.cc: $(srcdir)/configdialog.ui configdialog.h configdialog.moc
configdialog.h: $(srcdir)/configdialog.ui configdialog.h: $(srcdir)/configdialog.ui
rm -rf configdialog.h; rm -rf configdialog.h;
$(UIC) $(srcdir)/configdialog.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <qwizard.h>,#include <kwizard.h>,g" >> configdialog.h ; $(UIC) $(srcdir)/configdialog.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <tqwizard.h>,#include <kwizard.h>,g" >> configdialog.h ;
configdialog.moc: configdialog.h configdialog.moc: configdialog.h
$(MOC) configdialog.h -o configdialog.moc $(MOC) configdialog.h -o configdialog.moc

File diff suppressed because it is too large Load Diff

@ -34,14 +34,14 @@
#include <kconfig.h> #include <kconfig.h>
#include <klocale.h> #include <klocale.h>
#include <kglobal.h> #include <kglobal.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <qwhatsthis.h> #include <tqwhatsthis.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <kcolorbutton.h> #include <kcolorbutton.h>
#include <klistview.h> #include <klistview.h>
@ -56,8 +56,8 @@
// ------------- // -------------
// Constructor // Constructor
DeKoratorConfig::DeKoratorConfig( KConfig* config, QWidget* parent ) DeKoratorConfig::DeKoratorConfig( KConfig* config, TQWidget* parent )
: QObject( parent ), config_( 0 ), dialog_( 0 ) : TQObject( parent ), config_( 0 ), dialog_( 0 )
{ {
// create the configuration object // create the configuration object
config_ = new KConfig( "kwindeKoratorrc" ); config_ = new KConfig( "kwindeKoratorrc" );
@ -102,19 +102,19 @@ DeKoratorConfig::DeKoratorConfig( KConfig* config, QWidget* parent )
connect( dialog_->colorizeInActFramesChkBox, SIGNAL( clicked() ), SIGNAL( changed() ) ); connect( dialog_->colorizeInActFramesChkBox, SIGNAL( clicked() ), SIGNAL( changed() ) );
connect( dialog_->colorizeInActButtonsChkBox, SIGNAL( clicked() ), SIGNAL( changed() ) ); connect( dialog_->colorizeInActButtonsChkBox, SIGNAL( clicked() ), SIGNAL( changed() ) );
connect( dialog_->useAnimChkBox, SIGNAL( clicked() ), SIGNAL( changed() ) ); connect( dialog_->useAnimChkBox, SIGNAL( clicked() ), SIGNAL( changed() ) );
connect( dialog_->animateEfeectsCombo, SIGNAL( activated( const QString& ) ), SIGNAL( changed() ) ); connect( dialog_->animateEfeectsCombo, SIGNAL( activated( const TQString& ) ), SIGNAL( changed() ) );
connect( dialog_->stepsSpinBox, SIGNAL( valueChanged( int ) ), SIGNAL( changed() ) ); connect( dialog_->stepsSpinBox, SIGNAL( valueChanged( int ) ), SIGNAL( changed() ) );
connect( dialog_->intervalSpinBox, SIGNAL( valueChanged( int ) ), SIGNAL( changed() ) ); connect( dialog_->intervalSpinBox, SIGNAL( valueChanged( int ) ), SIGNAL( changed() ) );
connect( dialog_->KeepAnimateChkBox, SIGNAL( clicked() ), SIGNAL( changed() ) ); connect( dialog_->KeepAnimateChkBox, SIGNAL( clicked() ), SIGNAL( changed() ) );
connect( dialog_->hoverTypeCombo, SIGNAL( activated( const QString& ) ), SIGNAL( changed() ) ); connect( dialog_->hoverTypeCombo, SIGNAL( activated( const TQString& ) ), SIGNAL( changed() ) );
connect( dialog_->effectsAmount_SpinBox, SIGNAL( valueChanged( int ) ), SIGNAL( changed() ) ); connect( dialog_->effectsAmount_SpinBox, SIGNAL( valueChanged( int ) ), SIGNAL( changed() ) );
connect( dialog_->activeHighlightClrBtn, SIGNAL( clicked( ) ), SIGNAL( changed() ) ); connect( dialog_->activeHighlightClrBtn, SIGNAL( clicked( ) ), SIGNAL( changed() ) );
connect( dialog_->inActiveHighlightClrBtn, SIGNAL( clicked( ) ), SIGNAL( changed() ) ); connect( dialog_->inActiveHighlightClrBtn, SIGNAL( clicked( ) ), SIGNAL( changed() ) );
connect( dialog_->decoColorizeComboBox, SIGNAL( activated( const QString& ) ), SIGNAL( changed() ) ); connect( dialog_->decoColorizeComboBox, SIGNAL( activated( const TQString& ) ), SIGNAL( changed() ) );
connect( dialog_->buttonsColorizeComboBox, SIGNAL( activated( const QString& ) ), SIGNAL( changed() ) ); connect( dialog_->buttonsColorizeComboBox, SIGNAL( activated( const TQString& ) ), SIGNAL( changed() ) );
// connect( dialog_->buttonsHoverColorizeComboBox, SIGNAL( activated( const QString& ) ), SIGNAL( changed() ) ); // connect( dialog_->buttonsHoverColorizeComboBox, SIGNAL( activated( const TQString& ) ), SIGNAL( changed() ) );
// buttons // buttons
connect( dialog_->useCusBtnClrChkBox, SIGNAL( clicked() ), SIGNAL( changed() ) ); connect( dialog_->useCusBtnClrChkBox, SIGNAL( clicked() ), SIGNAL( changed() ) );
@ -137,17 +137,17 @@ DeKoratorConfig::DeKoratorConfig( KConfig* config, QWidget* parent )
connect( dialog_->shadeDownClrBtn, SIGNAL( clicked( ) ), SIGNAL( changed() ) ); connect( dialog_->shadeDownClrBtn, SIGNAL( clicked( ) ), SIGNAL( changed() ) );
// path's // path's
connect( dialog_->framesPathKurl, SIGNAL( textChanged( const QString& ) ), SIGNAL( changed() ) ); connect( dialog_->framesPathKurl, SIGNAL( textChanged( const TQString& ) ), SIGNAL( changed() ) );
dialog_->framesPathKurl->setMode( 2 ); dialog_->framesPathKurl->setMode( 2 );
connect( dialog_->buttonsPathKurl, SIGNAL( textChanged( const QString& ) ), SIGNAL( changed() ) ); connect( dialog_->buttonsPathKurl, SIGNAL( textChanged( const TQString& ) ), SIGNAL( changed() ) );
dialog_->buttonsPathKurl->setMode( 2 ); dialog_->buttonsPathKurl->setMode( 2 );
connect( dialog_->useMasks_Chkbox, SIGNAL( clicked() ), SIGNAL( changed() ) ); connect( dialog_->useMasks_Chkbox, SIGNAL( clicked() ), SIGNAL( changed() ) );
connect( dialog_->masksPathKurl, SIGNAL( textChanged( const QString& ) ), SIGNAL( changed() ) ); connect( dialog_->masksPathKurl, SIGNAL( textChanged( const TQString& ) ), SIGNAL( changed() ) );
dialog_->masksPathKurl->setMode( 2 ); dialog_->masksPathKurl->setMode( 2 );
// themes // themes
connect( dialog_->themesKlstView, SIGNAL( selectionChanged( QListViewItem * ) ), connect( dialog_->themesKlstView, SIGNAL( selectionChanged( TQListViewItem * ) ),
SLOT( themeSelected( QListViewItem * ) ) ); SLOT( themeSelected( TQListViewItem * ) ) );
connect( dialog_->installthemeBtn, SIGNAL( clicked( ) ), SLOT( installNewTheme() ) ); connect( dialog_->installthemeBtn, SIGNAL( clicked( ) ), SLOT( installNewTheme() ) );
connect( dialog_->removeThemBtn, SIGNAL( clicked( ) ), SLOT( removeSelectedTheme() ) ); connect( dialog_->removeThemBtn, SIGNAL( clicked( ) ), SLOT( removeSelectedTheme() ) );
connect( dialog_->applyThemeBtn, SIGNAL( clicked( ) ), SLOT( setTheme() ) ); connect( dialog_->applyThemeBtn, SIGNAL( clicked( ) ), SLOT( setTheme() ) );
@ -186,14 +186,14 @@ void DeKoratorConfig::load( KConfig* )
// misc // misc
config_->setGroup( "MISC" ); config_->setGroup( "MISC" );
QString value = config_->readEntry( "TitleAlignment", "AlignHCenter" ); TQString value = config_->readEntry( "TitleAlignment", "AlignHCenter" );
QRadioButton *button = ( QRadioButton* ) dialog_->titlealign->child( value ); TQRadioButton *button = ( TQRadioButton* ) dialog_->titlealign->child( value );
if ( button ) button->setChecked( TRUE ); if ( button ) button->setChecked( TRUE );
dialog_->useMenuImageChkBox->setChecked( config_->readBoolEntry( "UseMenuImage", FALSE ) ); dialog_->useMenuImageChkBox->setChecked( config_->readBoolEntry( "UseMenuImage", FALSE ) );
dialog_->ignoreAppIcnCol->setChecked( config_->readBoolEntry( "IgnoreAppIconCol", FALSE ) ); dialog_->ignoreAppIcnCol->setChecked( config_->readBoolEntry( "IgnoreAppIconCol", FALSE ) );
dialog_->dblClkCloseChkBox->setChecked( config_->readBoolEntry( "DblClkClose", FALSE ) ); dialog_->dblClkCloseChkBox->setChecked( config_->readBoolEntry( "DblClkClose", FALSE ) );
dialog_->showBtmBorderChkBox->setChecked( config_->readBoolEntry( "ShowBtmBorder", FALSE ) ); dialog_->showBtmBorderChkBox->setChecked( config_->readBoolEntry( "ShowBtmBorder", FALSE ) );
QColor color = QColor( 150, 150, 150 ); TQColor color = TQColor( 150, 150, 150 );
dialog_->useShdtextChkBox->setChecked( config_->readBoolEntry( "UseShdtext", FALSE ) ); dialog_->useShdtextChkBox->setChecked( config_->readBoolEntry( "UseShdtext", FALSE ) );
dialog_->activeShdtextXSpinBox->setValue( config_->readNumEntry( "ActiveShdtextX", 0 ) ); dialog_->activeShdtextXSpinBox->setValue( config_->readNumEntry( "ActiveShdtextX", 0 ) );
dialog_->activeShdtextYSpinBox->setValue( config_->readNumEntry( "ActiveShdtextY", 0 ) ); dialog_->activeShdtextYSpinBox->setValue( config_->readNumEntry( "ActiveShdtextY", 0 ) );
@ -267,8 +267,8 @@ void DeKoratorConfig::save( KConfig* )
// misc // misc
config_->setGroup( "MISC" ); config_->setGroup( "MISC" );
QRadioButton *button = ( QRadioButton* ) dialog_->titlealign->selected(); TQRadioButton *button = ( TQRadioButton* ) dialog_->titlealign->selected();
if ( button ) config_->writeEntry( "TitleAlignment", QString( button->name() ) ); if ( button ) config_->writeEntry( "TitleAlignment", TQString( button->name() ) );
config_->writeEntry( "UseMenuImage", dialog_->useMenuImageChkBox->isChecked() ); config_->writeEntry( "UseMenuImage", dialog_->useMenuImageChkBox->isChecked() );
config_->writeEntry( "IgnoreAppIconCol", dialog_->ignoreAppIcnCol->isChecked() ); config_->writeEntry( "IgnoreAppIconCol", dialog_->ignoreAppIcnCol->isChecked() );
config_->writeEntry( "DblClkClose", dialog_->dblClkCloseChkBox->isChecked() ); config_->writeEntry( "DblClkClose", dialog_->dblClkCloseChkBox->isChecked() );
@ -346,8 +346,8 @@ void DeKoratorConfig::defaults()
{ {
// misc // misc
QRadioButton * button = TQRadioButton * button =
( QRadioButton* ) dialog_->titlealign->child( "AlignHCenter" ); ( TQRadioButton* ) dialog_->titlealign->child( "AlignHCenter" );
if ( button ) button->setChecked( TRUE ); if ( button ) button->setChecked( TRUE );
dialog_->useMenuImageChkBox->setChecked( FALSE ); dialog_->useMenuImageChkBox->setChecked( FALSE );
dialog_->ignoreAppIcnCol->setChecked( FALSE ); dialog_->ignoreAppIcnCol->setChecked( FALSE );
@ -356,10 +356,10 @@ void DeKoratorConfig::defaults()
dialog_->useShdtextChkBox->setChecked( FALSE ); dialog_->useShdtextChkBox->setChecked( FALSE );
dialog_->activeShdtextXSpinBox->setValue( 0 ); dialog_->activeShdtextXSpinBox->setValue( 0 );
dialog_->activeShdtextYSpinBox->setValue( 0 ); dialog_->activeShdtextYSpinBox->setValue( 0 );
dialog_->activeShdColBtn->setColor( QColor( 150, 150, 150 ) ); dialog_->activeShdColBtn->setColor( TQColor( 150, 150, 150 ) );
dialog_->inActiveShdtextXSpinBox->setValue( 0 ); dialog_->inActiveShdtextXSpinBox->setValue( 0 );
dialog_->inActiveShdtextYSpinBox->setValue( 0 ); dialog_->inActiveShdtextYSpinBox->setValue( 0 );
dialog_->inActiveShdColBtn->setColor( QColor( 150, 150, 150 ) ); dialog_->inActiveShdColBtn->setColor( TQColor( 150, 150, 150 ) );
dialog_->btnShiftXSpinBox->setValue( 0 ); dialog_->btnShiftXSpinBox->setValue( 0 );
dialog_->btnShiftYSpinBox->setValue( 0 ); dialog_->btnShiftYSpinBox->setValue( 0 );
@ -377,8 +377,8 @@ void DeKoratorConfig::defaults()
dialog_->hoverTypeCombo->setCurrentText( "To Gray" ); dialog_->hoverTypeCombo->setCurrentText( "To Gray" );
dialog_->effectsAmount_SpinBox->setValue( 5 ); dialog_->effectsAmount_SpinBox->setValue( 5 );
dialog_->activeHighlightClrBtn->setColor( QColor( 150, 150, 150 ) ); dialog_->activeHighlightClrBtn->setColor( TQColor( 150, 150, 150 ) );
dialog_->inActiveHighlightClrBtn->setColor( QColor( 150, 150, 150 ) ); dialog_->inActiveHighlightClrBtn->setColor( TQColor( 150, 150, 150 ) );
dialog_->decoColorizeComboBox->setCurrentText( "Liquid Method" ); dialog_->decoColorizeComboBox->setCurrentText( "Liquid Method" );
dialog_->buttonsColorizeComboBox->setCurrentText( "Liquid Method" ); dialog_->buttonsColorizeComboBox->setCurrentText( "Liquid Method" );
// dialog_->buttonsHoverColorizeComboBox->setCurrentText( "Liquid Method" ); // dialog_->buttonsHoverColorizeComboBox->setCurrentText( "Liquid Method" );
@ -387,20 +387,20 @@ void DeKoratorConfig::defaults()
dialog_->useCusBtnClrChkBox->setChecked( FALSE ); dialog_->useCusBtnClrChkBox->setChecked( FALSE );
dialog_->cusColActBtnChkBox->setChecked( FALSE ); dialog_->cusColActBtnChkBox->setChecked( FALSE );
dialog_->cusColInActBtnChkBox->setChecked( FALSE ); dialog_->cusColInActBtnChkBox->setChecked( FALSE );
dialog_->closeClrBtn->setColor( QColor( 150, 150, 150 ) ); dialog_->closeClrBtn->setColor( TQColor( 150, 150, 150 ) );
dialog_->minClrBtn->setColor( QColor( 150, 150, 150 ) ); dialog_->minClrBtn->setColor( TQColor( 150, 150, 150 ) );
dialog_->maxClrBtn->setColor( QColor( 150, 150, 150 ) ); dialog_->maxClrBtn->setColor( TQColor( 150, 150, 150 ) );
dialog_->restoreClrBtn->setColor( QColor( 150, 150, 150 ) ); dialog_->restoreClrBtn->setColor( TQColor( 150, 150, 150 ) );
dialog_->helpClrBtn->setColor( QColor( 150, 150, 150 ) ); dialog_->helpClrBtn->setColor( TQColor( 150, 150, 150 ) );
dialog_->menuClrBtn->setColor( QColor( 150, 150, 150 ) ); dialog_->menuClrBtn->setColor( TQColor( 150, 150, 150 ) );
dialog_->stickyClrBtn->setColor( QColor( 150, 150, 150 ) ); dialog_->stickyClrBtn->setColor( TQColor( 150, 150, 150 ) );
dialog_->stickyDownClrBtn->setColor( QColor( 150, 150, 150 ) ); dialog_->stickyDownClrBtn->setColor( TQColor( 150, 150, 150 ) );
dialog_->aboveClrBtn->setColor( QColor( 150, 150, 150 ) ); dialog_->aboveClrBtn->setColor( TQColor( 150, 150, 150 ) );
dialog_->aboveDownClrBtn->setColor( QColor( 150, 150, 150 ) ); dialog_->aboveDownClrBtn->setColor( TQColor( 150, 150, 150 ) );
dialog_->belowClrBtn->setColor( QColor( 150, 150, 150 ) ); dialog_->belowClrBtn->setColor( TQColor( 150, 150, 150 ) );
dialog_->belowDownClrBtn->setColor( QColor( 150, 150, 150 ) ); dialog_->belowDownClrBtn->setColor( TQColor( 150, 150, 150 ) );
dialog_->shadeClrBtn->setColor( QColor( 150, 150, 150 ) ); dialog_->shadeClrBtn->setColor( TQColor( 150, 150, 150 ) );
dialog_->shadeDownClrBtn->setColor( QColor( 150, 150, 150 ) ); dialog_->shadeDownClrBtn->setColor( TQColor( 150, 150, 150 ) );
// path's // path's
dialog_->framesPathKurl->setURL( "" ); dialog_->framesPathKurl->setURL( "" );
@ -414,7 +414,7 @@ void DeKoratorConfig::defaults()
// ---------- // ----------
// //
void DeKoratorConfig::themeSelected( QListViewItem *item ) void DeKoratorConfig::themeSelected( TQListViewItem *item )
{ {
themes_->themeSelected( item, dialog_->previewLabael, dialog_->removeThemBtn ); themes_->themeSelected( item, dialog_->previewLabael, dialog_->removeThemBtn );
} }
@ -455,7 +455,7 @@ void DeKoratorConfig::setTheme()
extern "C" extern "C"
{ {
QObject * allocate_config( KConfig * config, QWidget * parent ) TQObject * allocate_config( KConfig * config, TQWidget * parent )
{ {
return ( new DeKoratorConfig( config, parent ) ); return ( new DeKoratorConfig( config, parent ) );
} }

@ -34,18 +34,18 @@
#ifndef EXAMPLECONFIG_H #ifndef EXAMPLECONFIG_H
#define EXAMPLECONFIG_H #define EXAMPLECONFIG_H
#include <qobject.h> #include <tqobject.h>
class KConfig; class KConfig;
class ConfigDialog; class ConfigDialog;
class IconThemesConfig; class IconThemesConfig;
class DeKoratorConfig : public QObject class DeKoratorConfig : public TQObject
{ {
Q_OBJECT Q_OBJECT
public: public:
DeKoratorConfig( KConfig* config, QWidget* parent ); DeKoratorConfig( KConfig* config, TQWidget* parent );
~DeKoratorConfig(); ~DeKoratorConfig();
signals: signals:
@ -58,7 +58,7 @@ public slots:
protected slots: protected slots:
void themeSelected( QListViewItem *item ); void themeSelected( TQListViewItem *item );
void selectionChanged( int ); void selectionChanged( int );
void installNewTheme(); void installNewTheme();
void removeSelectedTheme(); void removeSelectedTheme();

@ -36,10 +36,10 @@
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <qfileinfo.h> #include <tqfileinfo.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <kdebug.h> #include <kdebug.h>
#include <kapplication.h> #include <kapplication.h>
@ -64,9 +64,9 @@
#include <ksvgiconengine.h> #include <ksvgiconengine.h>
#endif #endif
#include <qdir.h> #include <tqdir.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qregexp.h> #include <tqregexp.h>
#include "themes.h" #include "themes.h"
#include <kurlrequester.h> #include <kurlrequester.h>
@ -77,7 +77,7 @@
// ---------- // ----------
// //
IconThemesConfig::IconThemesConfig( QWidget *parent, KListView *themesView /*, QPushButton *removethemeBtn*/ ) IconThemesConfig::IconThemesConfig( TQWidget *parent, KListView *themesView /*, TQPushButton *removethemeBtn*/ )
{ {
parent_ = parent; parent_ = parent;
themesView_ = themesView; themesView_ = themesView;
@ -99,9 +99,9 @@ IconThemesConfig::~IconThemesConfig()
// ---------- // ----------
// //
QListViewItem *IconThemesConfig::iconThemeItem( const QString &name ) TQListViewItem *IconThemesConfig::iconThemeItem( const TQString &name )
{ {
QListViewItem * item; TQListViewItem * item;
for ( item = themesView_->firstChild(); item ; item = item->nextSibling() ) for ( item = themesView_->firstChild(); item ; item = item->nextSibling() )
if ( item->text( 0 ) == name ) return item; if ( item->text( 0 ) == name ) return item;
@ -118,38 +118,38 @@ void IconThemesConfig::loadThemes()
{ {
themesView_->clear(); themesView_->clear();
m_themeNames.clear(); m_themeNames.clear();
QStringList themelist; TQStringList themelist;
QString name; TQString name;
QString place; TQString place;
QStringList::Iterator it, itj; TQStringList::Iterator it, itj;
QStringList themesDirs; TQStringList themesDirs;
// if no local deKorator folders // if no local deKorator folders
if ( ! QDir( QDir::homeDirPath() + "/.kde/share/apps/" ).exists( "deKorator" ) ) if ( ! TQDir( TQDir::homeDirPath() + "/.kde/share/apps/" ).exists( "deKorator" ) )
{ {
qWarning( "no dirs, will make them..." ); tqWarning( "no dirs, will make them..." );
KIO::mkdir( QDir::homeDirPath() + "/.kde/share/apps/deKorator/" ); KIO::mkdir( TQDir::homeDirPath() + "/.kde/share/apps/deKorator/" );
KIO::mkdir( QDir::homeDirPath() + "/.kde/share/apps/deKorator/themes/" ); KIO::mkdir( TQDir::homeDirPath() + "/.kde/share/apps/deKorator/themes/" );
} }
else else
{ {
qWarning( "exist" ); tqWarning( "exist" );
} }
themesDirs = KGlobal::dirs() ->findDirs( "data", "deKorator/themes" ) ; themesDirs = KGlobal::dirs() ->findDirs( "data", "deKorator/themes" ) ;
for ( it = themesDirs.begin(); it != themesDirs.end(); ++it ) for ( it = themesDirs.begin(); it != themesDirs.end(); ++it )
{ {
QDir dir = QDir( *it ); TQDir dir = TQDir( *it );
themelist = dir.entryList( "*-theme" ); themelist = dir.entryList( "*-theme" );
for ( itj = themelist.begin(); itj != themelist.end(); ++itj ) for ( itj = themelist.begin(); itj != themelist.end(); ++itj )
{ {
place = *it; place = *it;
name = ( QString ) * itj; name = ( TQString ) * itj;
themesView_->insertItem( new QListViewItem( themesView_, name ) ); themesView_->insertItem( new TQListViewItem( themesView_, name ) );
m_themeNames.insert( name, place ); m_themeNames.insert( name, place );
} }
@ -164,7 +164,7 @@ void IconThemesConfig::loadThemes()
void IconThemesConfig::installNewTheme() void IconThemesConfig::installNewTheme()
{ {
KURL themeURL = KURLRequesterDlg::getURL( QString::null, parent_, KURL themeURL = KURLRequesterDlg::getURL( TQString::null, parent_,
i18n( "Drag or Type Theme URL" ) ); i18n( "Drag or Type Theme URL" ) );
kdDebug() << themeURL.prettyURL() << endl; kdDebug() << themeURL.prettyURL() << endl;
@ -172,11 +172,11 @@ void IconThemesConfig::installNewTheme()
return ; return ;
// themeTmpFile contains the name of the downloaded file // themeTmpFile contains the name of the downloaded file
QString themeTmpFile; TQString themeTmpFile;
if ( !KIO::NetAccess::download( themeURL, themeTmpFile, parent_ ) ) if ( !KIO::NetAccess::download( themeURL, themeTmpFile, parent_ ) )
{ {
QString sorryText; TQString sorryText;
if ( themeURL.isLocalFile() ) if ( themeURL.isLocalFile() )
sorryText = i18n( "Unable to find the deKorator theme archive %1." ); sorryText = i18n( "Unable to find the deKorator theme archive %1." );
else else
@ -187,10 +187,10 @@ void IconThemesConfig::installNewTheme()
} }
// //
QStringList themesNames = findThemeDirs( themeTmpFile ); TQStringList themesNames = findThemeDirs( themeTmpFile );
if ( themesNames.isEmpty() ) if ( themesNames.isEmpty() )
{ {
QString invalidArch( i18n( "The file is not a valid deKorator theme archive." ) ); TQString invalidArch( i18n( "The file is not a valid deKorator theme archive." ) );
KMessageBox::error( parent_, invalidArch ); KMessageBox::error( parent_, invalidArch );
KIO::NetAccess::removeTempFile( themeTmpFile ); KIO::NetAccess::removeTempFile( themeTmpFile );
@ -200,8 +200,8 @@ void IconThemesConfig::installNewTheme()
if ( !installThemes( themesNames, themeTmpFile ) ) if ( !installThemes( themesNames, themeTmpFile ) )
{ {
//FIXME: make me able to know what is wrong.... //FIXME: make me able to know what is wrong....
// QStringList instead of bool? // TQStringList instead of bool?
QString somethingWrong = TQString somethingWrong =
i18n( "A problem occurred during the installation process; " i18n( "A problem occurred during the installation process; "
"however, most of the themes in the archive have been installed" ); "however, most of the themes in the archive have been installed" );
KMessageBox::error( parent_, somethingWrong ); KMessageBox::error( parent_, somethingWrong );
@ -211,9 +211,9 @@ void IconThemesConfig::installNewTheme()
loadThemes(); loadThemes();
QStringList::Iterator cur = themesNames.at( 0 ); TQStringList::Iterator cur = themesNames.at( 0 );
QListViewItem *item = iconThemeItem( *cur ); TQListViewItem *item = iconThemeItem( *cur );
themesView_->setSelected( item, true ); themesView_->setSelected( item, true );
} }
@ -222,14 +222,14 @@ void IconThemesConfig::installNewTheme()
// ---------- // ----------
// //
bool IconThemesConfig::installThemes( const QStringList &themes, const QString &archiveName ) bool IconThemesConfig::installThemes( const TQStringList &themes, const TQString &archiveName )
{ {
bool everythingOk = true; bool everythingOk = true;
QString localThemesDir = QDir::homeDirPath() + "/.kde/share/apps/deKorator/themes/"; TQString localThemesDir = TQDir::homeDirPath() + "/.kde/share/apps/deKorator/themes/";
// //
KProgressDialog progressDiag( parent_, "themeinstallprogress", KProgressDialog progressDiag( parent_, "themeinstallprogress",
i18n( "Installing icon themes" ), i18n( "Installing icon themes" ),
QString::null, TQString::null,
true ); true );
progressDiag.setAutoClose( true ); progressDiag.setAutoClose( true );
progressDiag.progressBar() ->setTotalSteps( themes.count() ); progressDiag.progressBar() ->setTotalSteps( themes.count() );
@ -242,7 +242,7 @@ bool IconThemesConfig::installThemes( const QStringList &themes, const QString &
const KArchiveDirectory* rootDir = archive.directory(); const KArchiveDirectory* rootDir = archive.directory();
KArchiveDirectory* currentTheme; KArchiveDirectory* currentTheme;
for ( QStringList::ConstIterator it = themes.begin(); it != themes.end(); ++it ) for ( TQStringList::ConstIterator it = themes.begin(); it != themes.end(); ++it )
{ {
progressDiag.setLabel( progressDiag.setLabel(
i18n( "<qt>Installing <strong>%1</strong> theme</qt>" ) i18n( "<qt>Installing <strong>%1</strong> theme</qt>" )
@ -276,9 +276,9 @@ bool IconThemesConfig::installThemes( const QStringList &themes, const QString &
// ---------- // ----------
// //
QStringList IconThemesConfig::findThemeDirs( const QString &archiveName ) TQStringList IconThemesConfig::findThemeDirs( const TQString &archiveName )
{ {
QStringList foundThemes; TQStringList foundThemes;
KTar archive( archiveName ); KTar archive( archiveName );
archive.open( IO_ReadOnly ); archive.open( IO_ReadOnly );
@ -288,11 +288,11 @@ QStringList IconThemesConfig::findThemeDirs( const QString &archiveName )
KArchiveDirectory* subDir = 0L; KArchiveDirectory* subDir = 0L;
// iterate all the dirs looking for an index.theme or index.desktop file // iterate all the dirs looking for an index.theme or index.desktop file
QStringList entries = themeDir->entries(); TQStringList entries = themeDir->entries();
for ( QStringList::Iterator it = entries.begin(); it != entries.end(); ++it ) for ( TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it )
{ {
QString name = ( QString ) * it; TQString name = ( TQString ) * it;
QRegExp rxp = QRegExp( "*-theme", TRUE, TRUE ); TQRegExp rxp = TQRegExp( "*-theme", TRUE, TRUE );
int i = name.contains( rxp ); int i = name.contains( rxp );
if ( !i ) if ( !i )
{ {
@ -306,7 +306,7 @@ QStringList IconThemesConfig::findThemeDirs( const QString &archiveName )
if ( subDir && ( subDir->entry( "deco" ) != NULL && subDir->entry( "buttons" ) != NULL && subDir->entry( "masks" ) != NULL ) ) if ( subDir && ( subDir->entry( "deco" ) != NULL && subDir->entry( "buttons" ) != NULL && subDir->entry( "masks" ) != NULL ) )
{ {
foundThemes.append( subDir->name() ); foundThemes.append( subDir->name() );
//qWarning( "found" ); //tqWarning( "found" );
} }
} }
} }
@ -323,11 +323,11 @@ QStringList IconThemesConfig::findThemeDirs( const QString &archiveName )
void IconThemesConfig::removeSelectedTheme() void IconThemesConfig::removeSelectedTheme()
{ {
QListViewItem * selected = themesView_->selectedItem(); TQListViewItem * selected = themesView_->selectedItem();
if ( !selected ) if ( !selected )
return ; return ;
QString question = i18n( "<qt>Are you sure you want to remove the " TQString question = i18n( "<qt>Are you sure you want to remove the "
"<strong>%1</strong> theme?<br>" "<strong>%1</strong> theme?<br>"
"<br>" "<br>"
"This will delete the files installed by this theme.</qt>" ). "This will delete the files installed by this theme.</qt>" ).
@ -336,9 +336,9 @@ void IconThemesConfig::removeSelectedTheme()
int r = KMessageBox::warningContinueCancel( parent_, question, i18n( "Confirmation" ), KStdGuiItem::del() ); int r = KMessageBox::warningContinueCancel( parent_, question, i18n( "Confirmation" ), KStdGuiItem::del() );
if ( r != KMessageBox::Continue ) return ; if ( r != KMessageBox::Continue ) return ;
QString delTheme = selected->text( 0 ); TQString delTheme = selected->text( 0 );
QString deldirStr = QDir::homeDirPath() + "/.kde/share/apps/deKorator/themes/" + delTheme; TQString deldirStr = TQDir::homeDirPath() + "/.kde/share/apps/deKorator/themes/" + delTheme;
QDir dir = QDir( deldirStr ); TQDir dir = TQDir( deldirStr );
dir.rename( deldirStr, deldirStr + "del" ); dir.rename( deldirStr, deldirStr + "del" );
KIO::del( KURL( deldirStr + "del" ) ); KIO::del( KURL( deldirStr + "del" ) );
@ -351,25 +351,25 @@ void IconThemesConfig::removeSelectedTheme()
// ---------- // ----------
// //
void IconThemesConfig::themeSelected( QListViewItem *item, QLabel *previewLabel, QPushButton *btn ) void IconThemesConfig::themeSelected( TQListViewItem *item, TQLabel *previewLabel, TQPushButton *btn )
{ {
QPixmap previewPix, topLeftCornerBg, leftButtonsBg, leftTitleBg, midTitleBg, rightTitleBg, rightButtonsBg, topRightCornerBg; TQPixmap previewPix, topLeftCornerBg, leftButtonsBg, leftTitleBg, midTitleBg, rightTitleBg, rightButtonsBg, topRightCornerBg;
QPainter painter; TQPainter painter;
int w, h, x; int w, h, x;
QString dirName( m_themeNames[ item->text( 0 ) ] ); TQString dirName( m_themeNames[ item->text( 0 ) ] );
if ( dirName.contains( "home" ) ) if ( dirName.contains( "home" ) )
{ {
//qWarning("true"); //tqWarning("true");
btn->setEnabled( true ); btn->setEnabled( true );
} }
else else
{ {
btn->setEnabled( false ); btn->setEnabled( false );
//qWarning("false"); //tqWarning("false");
} }
QString dirNameStr = dirName + item->text( 0 ) + "/deco/" ; TQString dirNameStr = dirName + item->text( 0 ) + "/deco/" ;
topLeftCornerBg.load( dirNameStr + "topLeftCornerBg.png" ); topLeftCornerBg.load( dirNameStr + "topLeftCornerBg.png" );
leftButtonsBg.load( dirNameStr + "leftButtonsBg" ); leftButtonsBg.load( dirNameStr + "leftButtonsBg" );
leftTitleBg.load( dirNameStr + "leftTitleBg.png" ); leftTitleBg.load( dirNameStr + "leftTitleBg.png" );
@ -381,23 +381,23 @@ void IconThemesConfig::themeSelected( QListViewItem *item, QLabel *previewLabel,
w = topLeftCornerBg.width() + leftButtonsBg.width() + leftTitleBg.width() + midTitleBg.width() + rightTitleBg.width() + rightButtonsBg.width() + topRightCornerBg.width() + 8; w = topLeftCornerBg.width() + leftButtonsBg.width() + leftTitleBg.width() + midTitleBg.width() + rightTitleBg.width() + rightButtonsBg.width() + topRightCornerBg.width() + 8;
h = midTitleBg.height() + 8; h = midTitleBg.height() + 8;
previewPix.resize( w, h ); previewPix.resize( w, h );
//qWarning("%d",w); //tqWarning("%d",w);
painter.begin( &previewPix ); painter.begin( &previewPix );
// paint outer rect // paint outer rect
painter.fillRect( 0, 0, w, h, QColor( 20, 20, 20 ) ); painter.fillRect( 0, 0, w, h, TQColor( 20, 20, 20 ) );
painter.setPen( QColor( 60, 60, 60 ) ); painter.setPen( TQColor( 60, 60, 60 ) );
painter.drawRect( 0, 0, w , h ); painter.drawRect( 0, 0, w , h );
painter.setPen( QColor( 80, 80, 80 ) ); painter.setPen( TQColor( 80, 80, 80 ) );
painter.drawRect( 1, 1, w - 2 , h - 2 ); painter.drawRect( 1, 1, w - 2 , h - 2 );
painter.setPen( QColor( 180, 180, 180 ) ); painter.setPen( TQColor( 180, 180, 180 ) );
painter.drawLine( w - 1, 1, w - 1, h - 1 ); painter.drawLine( w - 1, 1, w - 1, h - 1 );
painter.drawLine( 1, h - 1, w - 2, h - 1 ); painter.drawLine( 1, h - 1, w - 2, h - 1 );
painter.setPen( QColor( 150, 150, 150 ) ); painter.setPen( TQColor( 150, 150, 150 ) );
painter.drawLine( w - 2, 2, w - 2, h - 2 ); painter.drawLine( w - 2, 2, w - 2, h - 2 );
painter.drawLine( 2, h - 2, w - 3, h - 2 ); painter.drawLine( 2, h - 2, w - 3, h - 2 );
@ -424,7 +424,7 @@ void IconThemesConfig::themeSelected( QListViewItem *item, QLabel *previewLabel,
x += rightButtonsBg.width(); x += rightButtonsBg.width();
painter.drawPixmap( x, 4, topRightCornerBg ); painter.drawPixmap( x, 4, topRightCornerBg );
painter.setPen( QColor( 0, 0, 0 ) ); painter.setPen( TQColor( 0, 0, 0 ) );
painter.drawLine( 4, h - 5, w - 4 , h - 5 ); painter.drawLine( 4, h - 5, w - 4 , h - 5 );
painter.end(); painter.end();
@ -440,14 +440,14 @@ void IconThemesConfig::themeSelected( QListViewItem *item, QLabel *previewLabel,
void IconThemesConfig::setTheme( KURLRequester *framesPath, KURLRequester *buttonsPath, KURLRequester *masksPath ) void IconThemesConfig::setTheme( KURLRequester *framesPath, KURLRequester *buttonsPath, KURLRequester *masksPath )
{ {
QListViewItem * selected = themesView_->selectedItem(); TQListViewItem * selected = themesView_->selectedItem();
if ( !selected ) if ( !selected )
return ; return ;
QString dirName( m_themeNames[ selected->text( 0 ) ] ); TQString dirName( m_themeNames[ selected->text( 0 ) ] );
QString setTheme = selected->text( 0 ); TQString setTheme = selected->text( 0 );
QString setThemeStr = dirName + setTheme; TQString setThemeStr = dirName + setTheme;
framesPath->setURL( setThemeStr + "/deco" ); framesPath->setURL( setThemeStr + "/deco" );
buttonsPath->setURL( setThemeStr + "/buttons" ); buttonsPath->setURL( setThemeStr + "/buttons" );

@ -35,39 +35,39 @@
#define ICONTHEMES_H #define ICONTHEMES_H
#include <kcmodule.h> #include <kcmodule.h>
#include <qmap.h> #include <tqmap.h>
#include <klistview.h> #include <klistview.h>
class QPushButton; class TQPushButton;
class DeviceManager; class DeviceManager;
class QCheckBox; class TQCheckBox;
class QStringList; class TQStringList;
class IconThemesConfig : public QObject class IconThemesConfig : public TQObject
{ {
Q_OBJECT Q_OBJECT
public: public:
IconThemesConfig( QWidget *parent, KListView *themesView/*, QPushButton *removethemeBtn*/ ); IconThemesConfig( TQWidget *parent, KListView *themesView/*, TQPushButton *removethemeBtn*/ );
virtual ~IconThemesConfig(); virtual ~IconThemesConfig();
void loadThemes(); void loadThemes();
bool installThemes( const QStringList &themes, const QString &archiveName ); bool installThemes( const TQStringList &themes, const TQString &archiveName );
QStringList findThemeDirs( const QString &archiveName ); TQStringList findThemeDirs( const TQString &archiveName );
void themeSelected( QListViewItem *item, QLabel *preview, QPushButton *btn ); void themeSelected( TQListViewItem *item, TQLabel *preview, TQPushButton *btn );
void installNewTheme(); void installNewTheme();
void removeSelectedTheme(); void removeSelectedTheme();
void setTheme( KURLRequester *framesPath, KURLRequester *buttonsPath, KURLRequester *masksPath ); void setTheme( KURLRequester *framesPath, KURLRequester *buttonsPath, KURLRequester *masksPath );
private: private:
QListViewItem *iconThemeItem( const QString &name ); TQListViewItem *iconThemeItem( const TQString &name );
KListView *themesView_; KListView *themesView_;
QWidget *parent_; TQWidget *parent_;
//QPushButton *removeThemeBtn_; //TQPushButton *removeThemeBtn_;
QListViewItem *m_defaultTheme; TQListViewItem *m_defaultTheme;
QMap <QString, QString>m_themeNames; TQMap <TQString, TQString>m_themeNames;
}; };
#endif // ICONTHEMES_H #endif // ICONTHEMES_H

@ -2,20 +2,20 @@
** IconThemesConfig meta object code from reading C++ file 'themes.h' ** IconThemesConfig meta object code from reading C++ file 'themes.h'
** **
** Created: Wed Dec 7 20:20:14 2005 ** Created: Wed Dec 7 20:20:14 2005
** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.5 edited Sep 2 14:41 $) ** by: The TQt MOC ($Id: qt/moc_yacc.cpp 3.3.5 edited Sep 2 14:41 $)
** **
** WARNING! All changes made in this file will be lost! ** WARNING! All changes made in this file will be lost!
*****************************************************************************/ *****************************************************************************/
#undef QT_NO_COMPAT #undef QT_NO_COMPAT
#include "themes.h" #include "themes.h"
#include <qmetaobject.h> #include <tqmetaobject.h>
#include <qapplication.h> #include <tqapplication.h>
#include <private/qucomextra_p.h> #include <private/qucomextra_p.h>
#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) #if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
#error "This file was generated using the moc from 3.3.5. It" #error "This file was generated using the moc from 3.3.5. It"
#error "cannot be used with the include files from this version of Qt." #error "cannot be used with the include files from this version of TQt."
#error "(The moc has changed too much.)" #error "(The moc has changed too much.)"
#endif #endif
@ -24,46 +24,46 @@ const char *IconThemesConfig::className() const
return "IconThemesConfig"; return "IconThemesConfig";
} }
QMetaObject *IconThemesConfig::metaObj = 0; TQMetaObject *IconThemesConfig::metaObj = 0;
static QMetaObjectCleanUp cleanUp_IconThemesConfig( "IconThemesConfig", &IconThemesConfig::staticMetaObject ); static TQMetaObjectCleanUp cleanUp_IconThemesConfig( "IconThemesConfig", &IconThemesConfig::staticMetaObject );
#ifndef QT_NO_TRANSLATION #ifndef QT_NO_TRANSLATION
QString IconThemesConfig::tr( const char *s, const char *c ) TQString IconThemesConfig::tr( const char *s, const char *c )
{ {
if ( qApp ) if ( tqApp )
return qApp->translate( "IconThemesConfig", s, c, QApplication::DefaultCodec ); return tqApp->translate( "IconThemesConfig", s, c, TQApplication::DefaultCodec );
else else
return QString::fromLatin1( s ); return TQString::fromLatin1( s );
} }
#ifndef QT_NO_TRANSLATION_UTF8 #ifndef QT_NO_TRANSLATION_UTF8
QString IconThemesConfig::trUtf8( const char *s, const char *c ) TQString IconThemesConfig::trUtf8( const char *s, const char *c )
{ {
if ( qApp ) if ( tqApp )
return qApp->translate( "IconThemesConfig", s, c, QApplication::UnicodeUTF8 ); return tqApp->translate( "IconThemesConfig", s, c, TQApplication::UnicodeUTF8 );
else else
return QString::fromUtf8( s ); return TQString::fromUtf8( s );
} }
#endif // QT_NO_TRANSLATION_UTF8 #endif // QT_NO_TRANSLATION_UTF8
#endif // QT_NO_TRANSLATION #endif // QT_NO_TRANSLATION
QMetaObject* IconThemesConfig::staticMetaObject() TQMetaObject* IconThemesConfig::staticMetaObject()
{ {
if ( metaObj ) if ( metaObj )
return metaObj; return metaObj;
QMetaObject* parentObject = KCModule::staticMetaObject(); TQMetaObject* parentObject = KCModule::staticMetaObject();
static const QUParameter param_slot_0[] = { static const TQUParameter param_slot_0[] = {
{ "item", &static_QUType_ptr, "QListViewItem", QUParameter::In } { "item", &static_QUType_ptr, "TQListViewItem", TQUParameter::In }
}; };
static const QUMethod slot_0 = {"themeSelected", 1, param_slot_0 }; static const TQUMethod slot_0 = {"themeSelected", 1, param_slot_0 };
static const QUMethod slot_1 = {"installNewTheme", 0, 0 }; static const TQUMethod slot_1 = {"installNewTheme", 0, 0 };
static const QUMethod slot_2 = {"removeSelectedTheme", 0, 0 }; static const TQUMethod slot_2 = {"removeSelectedTheme", 0, 0 };
static const QMetaData slot_tbl[] = { static const TQMetaData slot_tbl[] = {
{ "themeSelected(QListViewItem*)", &slot_0, QMetaData::Protected }, { "themeSelected(TQListViewItem*)", &slot_0, TQMetaData::Protected },
{ "installNewTheme()", &slot_1, QMetaData::Protected }, { "installNewTheme()", &slot_1, TQMetaData::Protected },
{ "removeSelectedTheme()", &slot_2, QMetaData::Protected } { "removeSelectedTheme()", &slot_2, TQMetaData::Protected }
}; };
metaObj = QMetaObject::new_metaobject( metaObj = TQMetaObject::new_metaobject(
"IconThemesConfig", parentObject, "IconThemesConfig", parentObject,
slot_tbl, 3, slot_tbl, 3,
0, 0, 0, 0,
@ -76,35 +76,35 @@ QMetaObject* IconThemesConfig::staticMetaObject()
return metaObj; return metaObj;
} }
void* IconThemesConfig::qt_cast( const char* clname ) void* IconThemesConfig::tqt_cast( const char* clname )
{ {
if ( !qstrcmp( clname, "IconThemesConfig" ) ) if ( !qstrcmp( clname, "IconThemesConfig" ) )
return this; return this;
return KCModule::qt_cast( clname ); return KCModule::tqt_cast( clname );
} }
bool IconThemesConfig::qt_invoke( int _id, QUObject* _o ) bool IconThemesConfig::tqt_invoke( int _id, TQUObject* _o )
{ {
switch ( _id - staticMetaObject()->slotOffset() ) { switch ( _id - staticMetaObject()->slotOffset() ) {
case 0: themeSelected((QListViewItem*)static_QUType_ptr.get(_o+1)); break; case 0: themeSelected((TQListViewItem*)static_QUType_ptr.get(_o+1)); break;
case 1: installNewTheme(); break; case 1: installNewTheme(); break;
case 2: removeSelectedTheme(); break; case 2: removeSelectedTheme(); break;
default: default:
return KCModule::qt_invoke( _id, _o ); return KCModule::tqt_invoke( _id, _o );
} }
return TRUE; return TRUE;
} }
bool IconThemesConfig::qt_emit( int _id, QUObject* _o ) bool IconThemesConfig::tqt_emit( int _id, TQUObject* _o )
{ {
return KCModule::qt_emit(_id,_o); return KCModule::tqt_emit(_id,_o);
} }
#ifndef QT_NO_PROPERTIES #ifndef QT_NO_PROPERTIES
bool IconThemesConfig::qt_property( int id, int f, QVariant* v) bool IconThemesConfig::tqt_property( int id, int f, TQVariant* v)
{ {
return KCModule::qt_property( id, f, v); return KCModule::tqt_property( id, f, v);
} }
bool IconThemesConfig::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } bool IconThemesConfig::tqt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; }
#endif // QT_NO_PROPERTIES #endif // QT_NO_PROPERTIES

File diff suppressed because it is too large Load Diff

@ -35,16 +35,16 @@
#ifndef DEKORATORCLIENT_H #ifndef DEKORATORCLIENT_H
#define DEKORATORCLIENT_H #define DEKORATORCLIENT_H
#include <qbutton.h> #include <tqbutton.h>
#include <qbitmap.h> #include <tqbitmap.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qapplication.h> #include <tqapplication.h>
#include <qtimer.h> #include <tqtimer.h>
#include <qcursor.h> #include <tqcursor.h>
#include <kdecoration.h> #include <kdecoration.h>
#include <kdecorationfactory.h> #include <kdecorationfactory.h>
@ -58,8 +58,8 @@
#include "shadow.h" #include "shadow.h"
class QSpacerItem; class TQSpacerItem;
class QPoint; class TQPoint;
namespace DeKorator namespace DeKorator
{ {
@ -141,9 +141,9 @@ public:
virtual ~DeKoratorFactory(); virtual ~DeKoratorFactory();
virtual KDecoration *createDecoration( KDecorationBridge *b ); virtual KDecoration *createDecoration( KDecorationBridge *b );
virtual bool reset( unsigned long changed ); virtual bool reset( unsigned long changed );
static void colorizePixmap( QPixmap *pix, QColor col, QString colorizeMethod ); static void colorizePixmap( TQPixmap *pix, TQColor col, TQString colorizeMethod );
static bool initialized(); static bool initialized();
QBitmap topLeftCornerBitmap_, topMidBitmap_, topRightCornerBitmap_, buttomLeftCornerBitmap_, buttomMidBitmap_, buttomRightCornerBitmap_; TQBitmap topLeftCornerBitmap_, topMidBitmap_, topRightCornerBitmap_, buttomLeftCornerBitmap_, buttomMidBitmap_, buttomRightCornerBitmap_;
private: private:
bool readConfig(); bool readConfig();
@ -161,9 +161,9 @@ private:
static bool colorizeInActFrames_; static bool colorizeInActFrames_;
static bool needInit_; static bool needInit_;
static bool needReload_; static bool needReload_;
static QString framesPath_; static TQString framesPath_;
static QString buttonsPath_; static TQString buttonsPath_;
static QString masksPath_; static TQString masksPath_;
public: public:
static bool initialized_; static bool initialized_;
static bool useCustomButtonsColors_; static bool useCustomButtonsColors_;
@ -171,7 +171,7 @@ public:
static bool customColorsInActiveButtons_; static bool customColorsInActiveButtons_;
static bool colorizeActButtons_; static bool colorizeActButtons_;
static bool colorizeInActButtons_; static bool colorizeInActButtons_;
static QColor cusBtnCol_[ buttonTypeAllCount ]; static TQColor cusBtnCol_[ buttonTypeAllCount ];
}; };
inline bool DeKoratorFactory::initialized() inline bool DeKoratorFactory::initialized()
@ -192,16 +192,16 @@ inline bool DeKoratorFactory::initialized()
// DeKoratorButton ////////////////////////////////////////////////////////////// // DeKoratorButton //////////////////////////////////////////////////////////////
class DeKoratorButton : public QButton class DeKoratorButton : public TQButton
{ {
Q_OBJECT Q_OBJECT
public: public:
DeKoratorButton( bool isLeft, int buttonWidth, int buttonHeight, DeKoratorClient *parent = 0, const char *name = 0, DeKoratorButton( bool isLeft, int buttonWidth, int buttonHeight, DeKoratorClient *parent = 0, const char *name = 0,
const QString &tip = NULL, ButtonType type = ButtonHelp, buttonTypeAll btnType = restore ); const TQString &tip = NULL, ButtonType type = ButtonHelp, buttonTypeAll btnType = restore );
~DeKoratorButton(); ~DeKoratorButton();
void setPixmap( buttonTypeAll btnType ); void setPixmap( buttonTypeAll btnType );
QSize sizeHint() const; TQSize sizeHint() const;
ButtonState lastMousePress() const; ButtonState lastMousePress() const;
void reset(); void reset();
@ -209,30 +209,30 @@ protected slots:
void animate(); void animate();
private: private:
void enterEvent( QEvent *e ); void enterEvent( TQEvent *e );
void leaveEvent( QEvent *e ); void leaveEvent( TQEvent *e );
void mousePressEvent( QMouseEvent *e ); void mousePressEvent( TQMouseEvent *e );
void mouseReleaseEvent( QMouseEvent *e ); void mouseReleaseEvent( TQMouseEvent *e );
void drawButton( QPainter *painter ); void drawButton( TQPainter *painter );
QImage* chooseRightHoverEffect( QImage *img, QString res ); TQImage* chooseRightHoverEffect( TQImage *img, TQString res );
private: private:
bool isLeft_; bool isLeft_;
int buttonWidth_; int buttonWidth_;
DeKoratorClient *client_; DeKoratorClient *client_;
ButtonType type_; ButtonType type_;
//QPixmap *decoPix_, *decoPixPress_, *decoPixHover_, *decoPixInAct_; //TQPixmap *decoPix_, *decoPixPress_, *decoPixHover_, *decoPixInAct_;
ButtonState lastmouse_; ButtonState lastmouse_;
int decoPixHeight_; int decoPixHeight_;
bool hover_; bool hover_;
QTimer *animTmr; TQTimer *animTmr;
uint animProgress; uint animProgress;
QPixmap *btnPixAct_, *btnPixInAct_; TQPixmap *btnPixAct_, *btnPixInAct_;
buttonTypeAll btnType_; buttonTypeAll btnType_;
int s; int s;
}; };
inline Qt::ButtonState DeKoratorButton::lastMousePress() const inline TQt::ButtonState DeKoratorButton::lastMousePress() const
{ {
return lastmouse_; return lastmouse_;
} }
@ -272,19 +272,19 @@ public:
virtual void shadeChange(); virtual void shadeChange();
virtual void borders( int &l, int &r, int &t, int &b ) const; virtual void borders( int &l, int &r, int &t, int &b ) const;
virtual void resize( const QSize &size ); virtual void resize( const TQSize &size );
virtual QSize minimumSize() const; virtual TQSize minimumSize() const;
virtual Position mousePosition( const QPoint &point ) const; virtual Position mousePosition( const TQPoint &point ) const;
private: private:
void addButtons( QBoxLayout* layout, const QString& buttons, bool isLeft ); void addButtons( TQBoxLayout* layout, const TQString& buttons, bool isLeft );
bool eventFilter( QObject *obj, QEvent *e ); bool eventFilter( TQObject *obj, TQEvent *e );
void mouseDoubleClickEvent( QMouseEvent *e ); void mouseDoubleClickEvent( TQMouseEvent *e );
void wheelEvent( QWheelEvent *e ); void wheelEvent( TQWheelEvent *e );
void paintEvent( QPaintEvent *e ); void paintEvent( TQPaintEvent *e );
void resizeEvent( QResizeEvent * ); void resizeEvent( TQResizeEvent * );
void showEvent( QShowEvent * ); void showEvent( TQShowEvent * );
void doShape(); void doShape();
void updateCaptionBuffer(); void updateCaptionBuffer();
@ -301,17 +301,17 @@ private slots:
private: private:
DeKoratorButton *button[ ButtonTypeCount ]; DeKoratorButton *button[ ButtonTypeCount ];
QVBoxLayout *mainLayout_; TQVBoxLayout *mainLayout_;
QHBoxLayout *titleLayout_ ; TQHBoxLayout *titleLayout_ ;
QHBoxLayout *midLayout_; TQHBoxLayout *midLayout_;
QSpacerItem *leftTitleBarSpacer_, *titleBarSpacer_, *rightTitleBarSpacer_, *leftSpacer_, *rightSpacer_, *bottomSpacer_; TQSpacerItem *leftTitleBarSpacer_, *titleBarSpacer_, *rightTitleBarSpacer_, *leftSpacer_, *rightSpacer_, *bottomSpacer_;
bool closing_; bool closing_;
QPixmap *captionBufferPix_; TQPixmap *captionBufferPix_;
bool captionBufferDirty_; bool captionBufferDirty_;
QImage activeShadowImg_, inActiveShadowImg_; TQImage activeShadowImg_, inActiveShadowImg_;
QRegion mask_; TQRegion mask_;
bool sizeChanged; bool sizeChanged;
QSize oldSize_; TQSize oldSize_;
public: public:
DeKoratorFactory *decoFactory_; DeKoratorFactory *decoFactory_;
}; };

@ -32,7 +32,7 @@
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
#include "shadow.h" #include "shadow.h"
#include <qcolor.h> #include <tqcolor.h>
ShadowEngine::ShadowEngine() ShadowEngine::ShadowEngine()
{ {
@ -44,9 +44,9 @@ ShadowEngine::~ShadowEngine()
{ {
} }
QImage ShadowEngine::makeShadow(const QPixmap& textPixmap, const QColor &bgColor) TQImage ShadowEngine::makeShadow(const TQPixmap& textPixmap, const TQColor &bgColor)
{ {
QImage result; TQImage result;
// create a new image for for the shaddow // create a new image for for the shaddow
int w = textPixmap.width(); int w = textPixmap.width();
@ -62,7 +62,7 @@ QImage ShadowEngine::makeShadow(const QPixmap& textPixmap, const QColor &bgColor
/* /*
* This is the source pixmap * This is the source pixmap
*/ */
QImage img = textPixmap.convertToImage().convertDepth(32); TQImage img = textPixmap.convertToImage().convertDepth(32);
/* /*
* Resize the image if necessary * Resize the image if necessary
@ -82,13 +82,13 @@ QImage ShadowEngine::makeShadow(const QPixmap& textPixmap, const QColor &bgColor
alphaShadow = decay(img, i, j); alphaShadow = decay(img, i, j);
alphaShadow = (alphaShadow > 180.0) ? 180.0 : alphaShadow; alphaShadow = (alphaShadow > 180.0) ? 180.0 : alphaShadow;
// update the shadow's i,j pixel. // update the shadow's i,j pixel.
result.setPixel(i,j, qRgba(bgRed, bgGreen , bgBlue, (int) alphaShadow)); result.setPixel(i,j, tqRgba(bgRed, bgGreen , bgBlue, (int) alphaShadow));
} }
} }
return result; return result;
} }
double ShadowEngine::decay(QImage& source, int i, int j) double ShadowEngine::decay(TQImage& source, int i, int j)
{ {
// create a new image for the shadow // create a new image for the shadow
int w = source.width(); int w = source.width();
@ -120,7 +120,7 @@ double ShadowEngine::decay(QImage& source, int i, int j)
else else
sy = j + m; sy = j + m;
opacity += qGray(source.pixel(sx, sy)); opacity += tqGray(source.pixel(sx, sy));
} }
} }
alphaShadow += opacity / multiplicationFactor_; alphaShadow += opacity / multiplicationFactor_;

@ -34,9 +34,9 @@
#ifndef __FX_SHADOW #ifndef __FX_SHADOW
#define __FX_SHADOW #define __FX_SHADOW
#include <qpixmap.h> #include <tqpixmap.h>
#include <qimage.h> #include <tqimage.h>
#include <qcolor.h> #include <tqcolor.h>
class ShadowEngine class ShadowEngine
{ {
@ -45,9 +45,9 @@ class ShadowEngine
~ShadowEngine(); ~ShadowEngine();
void setThickness(int thickness) { thickness_ = thickness; } void setThickness(int thickness) { thickness_ = thickness; }
void setMultiplicationFactor(double factor) { multiplicationFactor_ = factor; } void setMultiplicationFactor(double factor) { multiplicationFactor_ = factor; }
QImage makeShadow(const QPixmap& textPixmap, const QColor &bgColor); TQImage makeShadow(const TQPixmap& textPixmap, const TQColor &bgColor);
private: private:
double decay(QImage& source, int x, int y); double decay(TQImage& source, int x, int y);
int thickness_; int thickness_;
double multiplicationFactor_; double multiplicationFactor_;

@ -2,20 +2,20 @@
** IconThemesConfig meta object code from reading C++ file 'themes.h' ** IconThemesConfig meta object code from reading C++ file 'themes.h'
** **
** Created: Wed Dec 7 21:43:34 2005 ** Created: Wed Dec 7 21:43:34 2005
** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.5 edited Sep 2 14:41 $) ** by: The TQt MOC ($Id: qt/moc_yacc.cpp 3.3.5 edited Sep 2 14:41 $)
** **
** WARNING! All changes made in this file will be lost! ** WARNING! All changes made in this file will be lost!
*****************************************************************************/ *****************************************************************************/
#undef QT_NO_COMPAT #undef QT_NO_COMPAT
#include "themes.h" #include "themes.h"
#include <qmetaobject.h> #include <tqmetaobject.h>
#include <qapplication.h> #include <tqapplication.h>
#include <private/qucomextra_p.h> #include <private/qucomextra_p.h>
#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) #if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
#error "This file was generated using the moc from 3.3.5. It" #error "This file was generated using the moc from 3.3.5. It"
#error "cannot be used with the include files from this version of Qt." #error "cannot be used with the include files from this version of TQt."
#error "(The moc has changed too much.)" #error "(The moc has changed too much.)"
#endif #endif
@ -24,46 +24,46 @@ const char *IconThemesConfig::className() const
return "IconThemesConfig"; return "IconThemesConfig";
} }
QMetaObject *IconThemesConfig::metaObj = 0; TQMetaObject *IconThemesConfig::metaObj = 0;
static QMetaObjectCleanUp cleanUp_IconThemesConfig( "IconThemesConfig", &IconThemesConfig::staticMetaObject ); static TQMetaObjectCleanUp cleanUp_IconThemesConfig( "IconThemesConfig", &IconThemesConfig::staticMetaObject );
#ifndef QT_NO_TRANSLATION #ifndef QT_NO_TRANSLATION
QString IconThemesConfig::tr( const char *s, const char *c ) TQString IconThemesConfig::tr( const char *s, const char *c )
{ {
if ( qApp ) if ( tqApp )
return qApp->translate( "IconThemesConfig", s, c, QApplication::DefaultCodec ); return tqApp->translate( "IconThemesConfig", s, c, TQApplication::DefaultCodec );
else else
return QString::fromLatin1( s ); return TQString::fromLatin1( s );
} }
#ifndef QT_NO_TRANSLATION_UTF8 #ifndef QT_NO_TRANSLATION_UTF8
QString IconThemesConfig::trUtf8( const char *s, const char *c ) TQString IconThemesConfig::trUtf8( const char *s, const char *c )
{ {
if ( qApp ) if ( tqApp )
return qApp->translate( "IconThemesConfig", s, c, QApplication::UnicodeUTF8 ); return tqApp->translate( "IconThemesConfig", s, c, TQApplication::UnicodeUTF8 );
else else
return QString::fromUtf8( s ); return TQString::fromUtf8( s );
} }
#endif // QT_NO_TRANSLATION_UTF8 #endif // QT_NO_TRANSLATION_UTF8
#endif // QT_NO_TRANSLATION #endif // QT_NO_TRANSLATION
QMetaObject* IconThemesConfig::staticMetaObject() TQMetaObject* IconThemesConfig::staticMetaObject()
{ {
if ( metaObj ) if ( metaObj )
return metaObj; return metaObj;
QMetaObject* parentObject = KCModule::staticMetaObject(); TQMetaObject* parentObject = KCModule::staticMetaObject();
static const QUParameter param_slot_0[] = { static const TQUParameter param_slot_0[] = {
{ "item", &static_QUType_ptr, "QListViewItem", QUParameter::In } { "item", &static_QUType_ptr, "TQListViewItem", TQUParameter::In }
}; };
static const QUMethod slot_0 = {"themeSelected", 1, param_slot_0 }; static const TQUMethod slot_0 = {"themeSelected", 1, param_slot_0 };
static const QUMethod slot_1 = {"installNewTheme", 0, 0 }; static const TQUMethod slot_1 = {"installNewTheme", 0, 0 };
static const QUMethod slot_2 = {"removeSelectedTheme", 0, 0 }; static const TQUMethod slot_2 = {"removeSelectedTheme", 0, 0 };
static const QMetaData slot_tbl[] = { static const TQMetaData slot_tbl[] = {
{ "themeSelected(QListViewItem*)", &slot_0, QMetaData::Protected }, { "themeSelected(TQListViewItem*)", &slot_0, TQMetaData::Protected },
{ "installNewTheme()", &slot_1, QMetaData::Protected }, { "installNewTheme()", &slot_1, TQMetaData::Protected },
{ "removeSelectedTheme()", &slot_2, QMetaData::Protected } { "removeSelectedTheme()", &slot_2, TQMetaData::Protected }
}; };
metaObj = QMetaObject::new_metaobject( metaObj = TQMetaObject::new_metaobject(
"IconThemesConfig", parentObject, "IconThemesConfig", parentObject,
slot_tbl, 3, slot_tbl, 3,
0, 0, 0, 0,
@ -76,35 +76,35 @@ QMetaObject* IconThemesConfig::staticMetaObject()
return metaObj; return metaObj;
} }
void* IconThemesConfig::qt_cast( const char* clname ) void* IconThemesConfig::tqt_cast( const char* clname )
{ {
if ( !qstrcmp( clname, "IconThemesConfig" ) ) if ( !qstrcmp( clname, "IconThemesConfig" ) )
return this; return this;
return KCModule::qt_cast( clname ); return KCModule::tqt_cast( clname );
} }
bool IconThemesConfig::qt_invoke( int _id, QUObject* _o ) bool IconThemesConfig::tqt_invoke( int _id, TQUObject* _o )
{ {
switch ( _id - staticMetaObject()->slotOffset() ) { switch ( _id - staticMetaObject()->slotOffset() ) {
case 0: themeSelected((QListViewItem*)static_QUType_ptr.get(_o+1)); break; case 0: themeSelected((TQListViewItem*)static_QUType_ptr.get(_o+1)); break;
case 1: installNewTheme(); break; case 1: installNewTheme(); break;
case 2: removeSelectedTheme(); break; case 2: removeSelectedTheme(); break;
default: default:
return KCModule::qt_invoke( _id, _o ); return KCModule::tqt_invoke( _id, _o );
} }
return TRUE; return TRUE;
} }
bool IconThemesConfig::qt_emit( int _id, QUObject* _o ) bool IconThemesConfig::tqt_emit( int _id, TQUObject* _o )
{ {
return KCModule::qt_emit(_id,_o); return KCModule::tqt_emit(_id,_o);
} }
#ifndef QT_NO_PROPERTIES #ifndef QT_NO_PROPERTIES
bool IconThemesConfig::qt_property( int id, int f, QVariant* v) bool IconThemesConfig::tqt_property( int id, int f, TQVariant* v)
{ {
return KCModule::qt_property( id, f, v); return KCModule::tqt_property( id, f, v);
} }
bool IconThemesConfig::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } bool IconThemesConfig::tqt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; }
#endif // QT_NO_PROPERTIES #endif // QT_NO_PROPERTIES

Loading…
Cancel
Save