diff options
Diffstat (limited to 'kipi-plugins/gpssync/kmlexportconfig.cpp')
-rw-r--r-- | kipi-plugins/gpssync/kmlexportconfig.cpp | 148 |
1 files changed, 74 insertions, 74 deletions
diff --git a/kipi-plugins/gpssync/kmlexportconfig.cpp b/kipi-plugins/gpssync/kmlexportconfig.cpp index 7e991ef..f885f77 100644 --- a/kipi-plugins/gpssync/kmlexportconfig.cpp +++ b/kipi-plugins/gpssync/kmlexportconfig.cpp @@ -20,19 +20,19 @@ * * ============================================================ */ -// Qt includes. - -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +// TQt includes. + +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> // KDE includes. @@ -59,53 +59,53 @@ namespace KIPIGPSSyncPlugin { /* - * Constructs a KIPIKMLExport::KMLExportConfig which is a child of 'parent', with the + * Constructs a KIPIKMLExport::KMLExportConfig which is a child of 'tqparent', with the * name 'name'.' */ -KMLExportConfig::KMLExportConfig( QWidget* parent, const char* name) +KMLExportConfig::KMLExportConfig( TQWidget* tqparent, const char* name) : KDialogBase(Plain, i18n("KML Export"), Help|Ok|Cancel, Ok, - parent, 0, true, false) + tqparent, 0, true, false) { if ( !name ) setName( "KMLExportConfig" ); - setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, - (QSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth() ) ); - KMLExportConfigLayout = new QGridLayout ( plainPage(), 1, 3, 0, spacingHint()); + tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, + (TQSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth() ) ); + KMLExportConfigLayout = new TQGridLayout ( plainPage(), 1, 3, 0, spacingHint()); // -------------------------------------------------------------- // Target preferences - TargetPreferenceGroupBox = new QGroupBox(0, Qt::Vertical, i18n( "Target Preferences" ), plainPage()); - TargetPreferenceGroupBoxLayout = new QGridLayout( TargetPreferenceGroupBox->layout(), 6, 5, KDialog::spacingHint()); - TargetPreferenceGroupBoxLayout->setAlignment( Qt::AlignTop ); + TargetPreferenceGroupBox = new TQGroupBox(0, Qt::Vertical, i18n( "Target Preferences" ), plainPage()); + TargetPreferenceGroupBoxLayout = new TQGridLayout( TargetPreferenceGroupBox->tqlayout(), 6, 5, KDialog::spacingHint()); + TargetPreferenceGroupBoxLayout->tqsetAlignment( TQt::AlignTop ); // target type - buttonGroupTargetType = new QButtonGroup(0, Qt::Vertical, i18n( "Target Type" ), TargetPreferenceGroupBox, "buttonGroupTargetType" ); - buttonGroupTargetTypeLayout = new QGridLayout( buttonGroupTargetType->layout(), 2, 1, KDialog::spacingHint() ); - buttonGroupTargetTypeLayout->setAlignment( Qt::AlignTop ); + buttonGroupTargetType = new TQButtonGroup(0, Qt::Vertical, i18n( "Target Type" ), TargetPreferenceGroupBox, "buttonGroupTargetType" ); + buttonGroupTargetTypeLayout = new TQGridLayout( buttonGroupTargetType->tqlayout(), 2, 1, KDialog::spacingHint() ); + buttonGroupTargetTypeLayout->tqsetAlignment( TQt::AlignTop ); - LocalTargetRadioButton_ = new QRadioButton( i18n( "&Local or web target used by GoogleEarth" ), + LocalTargetRadioButton_ = new TQRadioButton( i18n( "&Local or web target used by GoogleEarth" ), buttonGroupTargetType, "LocalTargetRadioButton_" ); LocalTargetRadioButton_->setChecked( true ); buttonGroupTargetTypeLayout->addWidget( LocalTargetRadioButton_, 0, 0 ); - GoogleMapTargetRadioButton_ = new QRadioButton( i18n( "Web target used by GoogleMap" ), + GoogleMapTargetRadioButton_ = new TQRadioButton( i18n( "Web target used by GoogleMap" ), buttonGroupTargetType, "GoogleMapTargetRadioButton_" ); buttonGroupTargetTypeLayout->addWidget( GoogleMapTargetRadioButton_, 1, 0 ); - QToolTip::add( GoogleMapTargetRadioButton_, i18n( + TQToolTip::add( GoogleMapTargetRadioButton_, i18n( "When using GoogleMap, all image must have complete URL, icons are squared and when drawing a track, only linetrack is exported" ) ); // -------------------------------------------------------------- // target preference, suite TargetPreferenceGroupBoxLayout->addMultiCellWidget( buttonGroupTargetType, 0, 1, 0, 4 ); - QLabel *AltitudeLabel_ = new QLabel(i18n("Picture altitude" ), + TQLabel *AltitudeLabel_ = new TQLabel(i18n("Picture altitude" ), TargetPreferenceGroupBox, "AltitudeLabel_"); TargetPreferenceGroupBoxLayout->addMultiCellWidget( AltitudeLabel_, 2, 2, 0, 4 ); - AltitudeCB_ = new QComboBox( false, TargetPreferenceGroupBox ); + AltitudeCB_ = new TQComboBox( false, TargetPreferenceGroupBox ); AltitudeCB_->insertItem(i18n("clamp to ground")); AltitudeCB_->insertItem(i18n("relative to ground")); AltitudeCB_->insertItem(i18n("absolute")); - QWhatsThis::add(AltitudeCB_, i18n("<p>Specifies how pictures are displayed" + TQWhatsThis::add(AltitudeCB_, i18n("<p>Specifies how pictures are displayed" "<dl><dt>clamp to ground (default)</dt>" "<dd>Indicates to ignore an altitude specification</dd>" "<dt>relative to ground</dt>" @@ -116,40 +116,40 @@ KMLExportConfig::KMLExportConfig( QWidget* parent, const char* name) "of the actual elevation of the terrain beneath the element.</dd></dl>")); TargetPreferenceGroupBoxLayout->addMultiCellWidget( AltitudeCB_, 2, 2, 2, 4 ); - destinationDirectoryLabel_ = new QLabel( i18n( "Destination directory" ), + destinationDirectoryLabel_ = new TQLabel( i18n( "Destination directory" ), TargetPreferenceGroupBox, "destinationDirectoryLabel_" ); TargetPreferenceGroupBoxLayout->addMultiCellWidget( destinationDirectoryLabel_, 3, 3, 0, 2 ); - // DestinationDirectory_ = new QLineEdit( TargetPreferenceGroupBox, "DestinationDirectory_" ); + // DestinationDirectory_ = new TQLineEdit( TargetPreferenceGroupBox, "DestinationDirectory_" ); DestinationDirectory_= new KURLRequester( TargetPreferenceGroupBox, "DestinationDirectory_"); DestinationDirectory_->setCaption(i18n("Select a directory to save the kml file and pictures")); DestinationDirectory_->setMode(KFile::Directory | KFile::LocalOnly ); TargetPreferenceGroupBoxLayout->addMultiCellWidget( DestinationDirectory_, 3, 3, 3, 4 ); - DestinationUrlLabel_ = new QLabel( i18n( "Destination URL" ), + DestinationUrlLabel_ = new TQLabel( i18n( "Destination URL" ), TargetPreferenceGroupBox, "DestinationUrlLabel_" ); TargetPreferenceGroupBoxLayout->addMultiCellWidget( DestinationUrlLabel_, 4, 4, 0, 1 ); - DestinationURL_ = new QLineEdit( TargetPreferenceGroupBox, "DestinationURL_" ); + DestinationURL_ = new TQLineEdit( TargetPreferenceGroupBox, "DestinationURL_" ); TargetPreferenceGroupBoxLayout->addMultiCellWidget( DestinationURL_, 4, 4, 2, 4 ); - FileNameLabel_ = new QLabel( i18n( "File name" ), + FileNameLabel_ = new TQLabel( i18n( "File name" ), TargetPreferenceGroupBox, "FileNameLabel_" ); TargetPreferenceGroupBoxLayout->addWidget( FileNameLabel_, 5, 0 ); - FileName_ = new QLineEdit( TargetPreferenceGroupBox, "FileName_" ); + FileName_ = new TQLineEdit( TargetPreferenceGroupBox, "FileName_" ); TargetPreferenceGroupBoxLayout->addMultiCellWidget( FileName_, 5, 5, 1, 4 ); KMLExportConfigLayout->addWidget( TargetPreferenceGroupBox, 0, 0 ); // -------------------------------------------------------------- // Sizes - QGroupBox *SizeGroupBox = new QGroupBox(0, Qt::Vertical, i18n( "Sizes" ), plainPage() ); + TQGroupBox *SizeGroupBox = new TQGroupBox(0, Qt::Vertical, i18n( "Sizes" ), plainPage() ); SizeGroupBox->setColumnLayout(0, Qt::Vertical ); - SizeGroupBoxLayout = new QGridLayout( SizeGroupBox->layout(), 2, 3, KDialog::spacingHint() ); - SizeGroupBoxLayout->setAlignment( Qt::AlignTop ); + SizeGroupBoxLayout = new TQGridLayout( SizeGroupBox->tqlayout(), 2, 3, KDialog::spacingHint() ); + SizeGroupBoxLayout->tqsetAlignment( TQt::AlignTop ); - IconSizeLabel = new QLabel( i18n( "Icon size" ), + IconSizeLabel = new TQLabel( i18n( "Icon size" ), SizeGroupBox, "IconSizeLabel" ); SizeGroupBoxLayout->addWidget( IconSizeLabel, 0, 0 ); @@ -157,10 +157,10 @@ KMLExportConfig::KMLExportConfig( QWidget* parent, const char* name) IconSizeInput_->setValue( 33 ); SizeGroupBoxLayout->addWidget( IconSizeInput_, 0, 1 ); - spacer3 = new QSpacerItem( 191, 21, QSizePolicy::Expanding, QSizePolicy::Minimum ); + spacer3 = new TQSpacerItem( 191, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); SizeGroupBoxLayout->addItem( spacer3, 0, 2 ); - ImageSizeLabel = new QLabel( i18n( "Image size" ), + ImageSizeLabel = new TQLabel( i18n( "Image size" ), SizeGroupBox, "ImageSizeLabel" ); SizeGroupBoxLayout->addWidget( ImageSizeLabel, 1, 0 ); @@ -168,35 +168,35 @@ KMLExportConfig::KMLExportConfig( QWidget* parent, const char* name) ImageSizeInput_->setValue( 320 ); SizeGroupBoxLayout->addWidget( ImageSizeInput_, 1, 1 ); - spacer4 = new QSpacerItem( 191, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); + spacer4 = new TQSpacerItem( 191, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); SizeGroupBoxLayout->addItem( spacer4, 1, 2 ); KMLExportConfigLayout->addWidget( SizeGroupBox, 1, 0 ); // -------------------------------------------------------------- // GPX Tracks - QGroupBox *GPXTracksGroupBox = new QGroupBox(0, Qt::Vertical, i18n( "GPX Tracks" ), plainPage()); - QGridLayout *GPXTracksGroupBoxLayout = new QGridLayout(GPXTracksGroupBox->layout(), 5, 4, + TQGroupBox *GPXTracksGroupBox = new TQGroupBox(0, Qt::Vertical, i18n( "GPX Tracks" ), plainPage()); + TQGridLayout *GPXTracksGroupBoxLayout = new TQGridLayout(GPXTracksGroupBox->tqlayout(), 5, 4, KDialog::spacingHint()); - GPXTracksGroupBoxLayout->setAlignment( Qt::AlignTop ); + GPXTracksGroupBoxLayout->tqsetAlignment( TQt::AlignTop ); // add a gpx track checkbox - GPXTracksCheckBox_ = new QCheckBox( i18n( "Draw GPX track" ), GPXTracksGroupBox, "GPXTracksCheckBox"); + GPXTracksCheckBox_ = new TQCheckBox( i18n( "Draw GPX track" ), GPXTracksGroupBox, "GPXTracksCheckBox"); GPXTracksGroupBoxLayout->addMultiCellWidget( GPXTracksCheckBox_, 0, 0, 0, 3); // file selector - GPXFileLabel_ = new QLabel( i18n( "GPX file" ), + GPXFileLabel_ = new TQLabel( i18n( "GPX file" ), GPXTracksGroupBox, "GPXFileLabel_" ); GPXTracksGroupBoxLayout->addMultiCellWidget( GPXFileLabel_, 1, 1, 0, 0); GPXFileKURLRequester_ = new KURLRequester( GPXTracksGroupBox, "GPXFileKURLRequester" ); - GPXFileKURLRequester_->setFilter(i18n("%1|GPS Exchange Format").arg("*.gpx")); + GPXFileKURLRequester_->setFilter(i18n("%1|GPS Exchange Format").tqarg("*.gpx")); GPXFileKURLRequester_->setCaption(i18n("Select GPX File to Load")); GPXTracksGroupBoxLayout->addMultiCellWidget( GPXFileKURLRequester_, 1, 1, 1, 3); - timeZoneLabel_ = new QLabel(i18n("Time zone"), GPXTracksGroupBox); + timeZoneLabel_ = new TQLabel(i18n("Time zone"), GPXTracksGroupBox); GPXTracksGroupBoxLayout->addMultiCellWidget( timeZoneLabel_, 2, 2, 0, 0); - timeZoneCB = new QComboBox( false, GPXTracksGroupBox ); + timeZoneCB = new TQComboBox( false, GPXTracksGroupBox ); timeZoneCB->insertItem(i18n("GMT-12:00"), 0); timeZoneCB->insertItem(i18n("GMT-11:00"), 1); timeZoneCB->insertItem(i18n("GMT-10:00"), 2); @@ -224,39 +224,39 @@ KMLExportConfig::KMLExportConfig( QWidget* parent, const char* name) timeZoneCB->insertItem(i18n("GMT+12:00"), 24); timeZoneCB->insertItem(i18n("GMT+13:00"), 25); timeZoneCB->insertItem(i18n("GMT+14:00"), 26); - QWhatsThis::add(timeZoneCB, i18n("<p>Sets the time zone of the camera during " + TQWhatsThis::add(timeZoneCB, i18n("<p>Sets the time zone of the camera during " "picture shooting, so that the time stamps of the GPS " "can be converted to match the local time")); GPXTracksGroupBoxLayout->addMultiCellWidget( timeZoneCB, 2, 2, 1, 3); - GPXLineWidthLabel_ = new QLabel( i18n( "Track width" ), + GPXLineWidthLabel_ = new TQLabel( i18n( "Track width" ), GPXTracksGroupBox, "GPXLineWidthLabel_" ); GPXTracksGroupBoxLayout->addMultiCellWidget( GPXLineWidthLabel_, 3, 3, 0, 0); GPXLineWidthInput_ = new KIntNumInput( GPXTracksGroupBox, "GPXLineWidthInput_" ); GPXLineWidthInput_->setValue( 4 ); GPXTracksGroupBoxLayout->addMultiCellWidget( GPXLineWidthInput_, 3, 3, 1, 3); - GPXColorLabel_ = new QLabel( i18n( "Track color" ), + GPXColorLabel_ = new TQLabel( i18n( "Track color" ), GPXTracksGroupBox, "GPXColorLabel_" ); GPXTracksGroupBoxLayout->addWidget( GPXColorLabel_, 4, 0 ); - GPXTrackColor_ = new KColorButton(QColor("#ffffff"), GPXTracksGroupBox); + GPXTrackColor_ = new KColorButton(TQColor("#ffffff"), GPXTracksGroupBox); GPXTracksGroupBoxLayout->addWidget( GPXTrackColor_, 4, 1 ); GPXTracksOpacityInput_ = new KIntNumInput( GPXTracksGroupBox , "GPXTracksOpacityInput_" ); GPXTracksOpacityInput_->setRange( 0, 100, 1, false ); GPXTracksOpacityInput_->setValue( 100 ); GPXTracksOpacityInput_->setLabel( i18n( "Opacity:" ), AlignVCenter); - GPXTracksOpacityInput_->setSuffix( QString::fromAscii( "%" ) ); + GPXTracksOpacityInput_->setSuffix( TQString::fromAscii( "%" ) ); GPXTracksGroupBoxLayout->addMultiCellWidget( GPXTracksOpacityInput_, 4, 4, 2, 3); - GPXAltitudeLabel_ = new QLabel( i18n( "Track altitude" ), + GPXAltitudeLabel_ = new TQLabel( i18n( "Track altitude" ), GPXTracksGroupBox, "GPXAltitudeLabel_" ); GPXTracksGroupBoxLayout->addMultiCellWidget( GPXAltitudeLabel_, 5, 5, 0, 0); - GPXAltitudeCB_ = new QComboBox( false, GPXTracksGroupBox ); + GPXAltitudeCB_ = new TQComboBox( false, GPXTracksGroupBox ); GPXAltitudeCB_->insertItem(i18n("clamp to ground")); GPXAltitudeCB_->insertItem(i18n("relative to ground")); GPXAltitudeCB_->insertItem(i18n("absolute")); - QWhatsThis::add(GPXAltitudeCB_, i18n("<p>Specifies how the points are displayed" + TQWhatsThis::add(GPXAltitudeCB_, i18n("<p>Specifies how the points are displayed" "<dl><dt>clamp to ground (default)</dt>" "<dd>Indicates to ignore an altitude specification</dd>" "<dt>relative to ground</dt>" @@ -270,11 +270,11 @@ KMLExportConfig::KMLExportConfig( QWidget* parent, const char* name) KMLExportConfigLayout->addWidget( GPXTracksGroupBox, 2, 0 ); - connect( GoogleMapTargetRadioButton_, SIGNAL( toggled(bool) ), - this, SLOT( GoogleMapTargetRadioButton__toggled(bool) ) ); + connect( GoogleMapTargetRadioButton_, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( GoogleMapTargetRadioButton__toggled(bool) ) ); - connect( GPXTracksCheckBox_, SIGNAL( toggled(bool) ), - this, SLOT( KMLTracksCheckButton__toggled(bool) ) ); + connect( GPXTracksCheckBox_, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( KMLTracksCheckButton__toggled(bool) ) ); // -------------------------------------------------------------- // About data and help button. @@ -289,7 +289,7 @@ KMLExportConfig::KMLExportConfig( QWidget* parent, const char* name) KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); actionButton(Help)->setPopup( helpMenu->menu() ); // -------------------------------------------------------------- @@ -311,7 +311,7 @@ KMLExportConfig::KMLExportConfig( QWidget* parent, const char* name) */ KMLExportConfig::~KMLExportConfig() { - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us if(config_) delete config_; delete m_about; @@ -389,13 +389,13 @@ void KMLExportConfig::saveSettings() config_->writeEntry("optimize_googlemap", GoogleMapTargetRadioButton_->isChecked()); config_->writeEntry("iconSize", IconSizeInput_->value()); config_->writeEntry("size", ImageSizeInput_->value()); - QString destination = DestinationDirectory_->url(); + TQString destination = DestinationDirectory_->url(); if (!destination.endsWith("/")) { destination.append("/"); } config_->writeEntry("baseDestDir",destination); - QString url = DestinationURL_->text(); + TQString url = DestinationURL_->text(); if (!url.endsWith("/")) { url.append("/"); @@ -409,7 +409,7 @@ void KMLExportConfig::saveSettings() config_->writeEntry("GPXFile", GPXFileKURLRequester_->lineEdit()->originalText()); config_->writeEntry("Time Zone", timeZoneCB->currentItem() ); config_->writeEntry("Line Width", GPXLineWidthInput_->value()); - config_->writeEntry("Track Color", GPXTrackColor_->color().name () ); + config_->writeEntry("Track Color", TQString(GPXTrackColor_->color().name()) ); config_->writeEntry("Track Opacity", GPXTracksOpacityInput_->value() ); config_->writeEntry("GPX Altitude Mode", GPXAltitudeCB_->currentItem() ); @@ -423,16 +423,16 @@ void KMLExportConfig::readSettings() int iconSize; // int googlemapSize; int size; - QString UrlDestDir; - QString baseDestDir; - QString KMLFileName; + TQString UrlDestDir; + TQString baseDestDir; + TQString KMLFileName; int AltitudeMode; bool GPXtracks; - QString GPXFile; + TQString GPXFile; int TimeZone; int LineWidth; - QString GPXColor; + TQString GPXColor; int GPXOpacity; int GPXAltitudeMode; |