summaryrefslogtreecommitdiffstats
path: root/noatun/modules/htmlexport
diff options
context:
space:
mode:
Diffstat (limited to 'noatun/modules/htmlexport')
-rw-r--r--noatun/modules/htmlexport/htmlexport.cpp80
-rw-r--r--noatun/modules/htmlexport/htmlexport.h46
2 files changed, 63 insertions, 63 deletions
diff --git a/noatun/modules/htmlexport/htmlexport.cpp b/noatun/modules/htmlexport/htmlexport.cpp
index dc48fd8f..29d00935 100644
--- a/noatun/modules/htmlexport/htmlexport.cpp
+++ b/noatun/modules/htmlexport/htmlexport.cpp
@@ -1,6 +1,6 @@
#include <klocale.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include <kaction.h>
#include <noatun/stdaction.h>
#include "htmlexport.h"
@@ -13,12 +13,12 @@ extern "C"
}
}
-HTMLExport::HTMLExport(): QObject(0, "HTMLExport"), Plugin()
+HTMLExport::HTMLExport(): TQObject(0, "HTMLExport"), Plugin()
{
NOATUNPLUGINC(HTMLExport);
mAction = new KAction(i18n("&Export Playlist..."), "filesaveas", 0,
- this, SLOT(slotExport()), this, "exportlist");
+ this, TQT_SLOT(slotExport()), this, "exportlist");
napp->pluginActionMenu()->insert(mAction);
new Prefs(this);
@@ -36,7 +36,7 @@ void HTMLExport::slotExport()
config->setGroup("HTMLExport");
// get output target
- KURL url = KFileDialog::getSaveURL(QString::null,
+ KURL url = KFileDialog::getSaveURL(TQString::null,
"text/html",
0,
i18n("Export Playlist"));
@@ -44,10 +44,10 @@ void HTMLExport::slotExport()
// write into tempfile
KTempFile temp;
temp.setAutoDelete(true);
- QFile file(temp.name());
+ TQFile file(temp.name());
file.open(IO_WriteOnly);
- QTextStream str(&file);
- str.setCodec(QTextCodec::codecForName("utf8"));
+ TQTextStream str(&file);
+ str.setCodec(TQTextCodec::codecForName("utf8"));
str << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
str << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">" << endl;
@@ -132,37 +132,37 @@ void HTMLExport::slotExport()
KIO::NetAccess::upload(temp.name(), url, 0);
}
-QString HTMLExport::htmlEscape(const QString &source) {
+TQString HTMLExport::htmlEscape(const TQString &source) {
// Escape characters that need to be escaped
- QString temp = source;
+ TQString temp = source;
- temp.replace( QRegExp("&"), "&amp;" );
- temp.replace( QRegExp("<"), "&lt;" );
- temp.replace( QRegExp(">"), "&gt;" );
+ temp.replace( TQRegExp("&"), "&amp;" );
+ temp.replace( TQRegExp("<"), "&lt;" );
+ temp.replace( TQRegExp(">"), "&gt;" );
return temp;
}
-QString HTMLExport::getColorByEntry(QString s)
+TQString HTMLExport::getColorByEntry(TQString s)
{
- QString res;
- QString tmp;
- QColor c;
+ TQString res;
+ TQString tmp;
+ TQColor c;
// init readConfig
config->setGroup("HTMLExport");
c = config->readColorEntry( s );
- tmp = QString::number( c.red(), 16);
+ tmp = TQString::number( c.red(), 16);
if (tmp.length()==1) tmp="0"+tmp;
res = tmp;
- tmp = QString::number( c.green(), 16);
+ tmp = TQString::number( c.green(), 16);
if (tmp.length()==1) tmp="0"+tmp;
res += tmp;
- tmp = QString::number( c.blue(), 16);
+ tmp = TQString::number( c.blue(), 16);
if (tmp.length()==1) tmp="0"+tmp;
res += tmp;
@@ -171,7 +171,7 @@ QString HTMLExport::getColorByEntry(QString s)
}
//////////////////////////////////// Settings ////////////////////////////////////
-Prefs::Prefs(QObject *parent)
+Prefs::Prefs(TQObject *parent)
: CModule(i18n("Playlist Export"), i18n("Colors & Settings for HTML Export"), "html", parent)
{
@@ -181,26 +181,26 @@ Prefs::Prefs(QObject *parent)
// Set default values
if ( !config->hasKey( "headColor" ) )
- config->writeEntry( "headColor", QColor( black ) ) ;
+ config->writeEntry( "headColor", TQColor( black ) ) ;
if ( !config->hasKey( "hoverColor" ) )
- config->writeEntry( "hoverColor", QColor( black ) );
+ config->writeEntry( "hoverColor", TQColor( black ) );
if ( !config->hasKey( "bgColor" ) )
- config->writeEntry( "bgColor", QColor( white ) ) ;
+ config->writeEntry( "bgColor", TQColor( white ) ) ;
if ( !config->hasKey( "txtColor" ) )
- config->writeEntry( "txtColor", QColor( black ) );
+ config->writeEntry( "txtColor", TQColor( black ) );
config->sync();
// Draw Stuff and insert Settings
- QVBoxLayout *top = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *top = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint() );
- colorBox = new QGroupBox( i18n( "HTML Color Settings" ), this, "colorBox" );
+ colorBox = new TQGroupBox( i18n( "HTML Color Settings" ), this, "colorBox" );
- bgcolorLabel = new QGridLayout( colorBox, 2, 5,
+ bgcolorLabel = new TQGridLayout( colorBox, 2, 5,
KDialog::marginHint(), KDialog::spacingHint() );
headColorSelect = new KColorButton( colorBox, "headColorSelect" );
@@ -211,21 +211,21 @@ Prefs::Prefs(QObject *parent)
txtColorSelect = new KColorButton( colorBox, "txtColorSelect" );
- txtColorLabel = new QLabel( colorBox, "txtColorLabel" );
+ txtColorLabel = new TQLabel( colorBox, "txtColorLabel" );
txtColorLabel->setText( i18n( "Text:" ) );
- txtColorLabel->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ txtColorLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
- bgColorLabel = new QLabel( colorBox, "bgColorLabel" );
+ bgColorLabel = new TQLabel( colorBox, "bgColorLabel" );
bgColorLabel->setText( i18n( "Background:" ) );
- bgColorLabel->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ bgColorLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
- headColorLabel = new QLabel( colorBox, "headColorLabel" );
+ headColorLabel = new TQLabel( colorBox, "headColorLabel" );
headColorLabel->setText( i18n( "Heading:" ) );
- headColorLabel->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ headColorLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
- hoverColorLabel = new QLabel( colorBox, "hoverColorLabel" );
+ hoverColorLabel = new TQLabel( colorBox, "hoverColorLabel" );
hoverColorLabel->setText( i18n( "Link hover:" ) );
- hoverColorLabel->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ hoverColorLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
bgcolorLabel->setRowStretch(0, 1);
@@ -245,7 +245,7 @@ Prefs::Prefs(QObject *parent)
// Set up the Background Image frame
- bgPicBox = new QHGroupBox( i18n( "Background Image"), this, "bgPicBox" );
+ bgPicBox = new TQHGroupBox( i18n( "Background Image"), this, "bgPicBox" );
// Set up the URL requestor
bgPicPath = new KURLRequester ( bgPicBox, "bgPicPath" );
@@ -255,11 +255,11 @@ Prefs::Prefs(QObject *parent)
bgPicPath->setMode(KFile::File | KFile::ExistingOnly);
bgPicPath->setFilter("image/gif image/jpeg image/gif image/png image/svg+xml image/tiff");
- linkEntries = new QCheckBox( this, "linkEntries" );
+ linkEntries = new TQCheckBox( this, "linkEntries" );
linkEntries->setText( i18n( "Hyper&link playlist entries to their URL" ) );
linkEntries->setTristate( false );
- numberEntries = new QCheckBox( this, "numberEntries" );
+ numberEntries = new TQCheckBox( this, "numberEntries" );
numberEntries->setText( i18n( "&Number playlist entries" ) );
numberEntries->setTristate( false );
@@ -277,7 +277,7 @@ void Prefs::save()
{
KConfig *config = KGlobal::config();
- QString bgRealURL = bgPicPath->url();
+ TQString bgRealURL = bgPicPath->url();
if (bgRealURL[0] == '/')
bgRealURL = "file:" + bgRealURL;
diff --git a/noatun/modules/htmlexport/htmlexport.h b/noatun/modules/htmlexport/htmlexport.h
index a909a5cb..81047d3d 100644
--- a/noatun/modules/htmlexport/htmlexport.h
+++ b/noatun/modules/htmlexport/htmlexport.h
@@ -2,16 +2,16 @@
#ifndef _HTMLEXPORT_H_
#define _HTMLEXPORT_H_
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qlabel.h>
-#include <qhgroupbox.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqlabel.h>
+#include <tqhgroupbox.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kpopupmenu.h>
@@ -31,7 +31,7 @@
class KAction;
-class HTMLExport : public QObject, public Plugin
+class HTMLExport : public TQObject, public Plugin
{
Q_OBJECT
NOATUNPLUGIND
@@ -41,8 +41,8 @@ public:
private:
- QString htmlEscape(const QString &source);
- QString getColorByEntry(QString s);
+ TQString htmlEscape(const TQString &source);
+ TQString getColorByEntry(TQString s);
KConfig *config;
KAction *mAction;
@@ -55,30 +55,30 @@ class Prefs : public CModule
{
Q_OBJECT
public:
- Prefs(QObject *parent);
+ Prefs(TQObject *parent);
virtual void save();
virtual void reopen();
- QGroupBox* colorBox;
+ TQGroupBox* colorBox;
KColorButton* headColorSelect;
KColorButton* hoverColorSelect;
KColorButton* bgColorSelect;
KColorButton* txtColorSelect;
- QLabel* bgColorLabel;
- QLabel* txtColorLabel;
- QLabel* headColorLabel;
- QLabel* hoverColorLabel;
+ TQLabel* bgColorLabel;
+ TQLabel* txtColorLabel;
+ TQLabel* headColorLabel;
+ TQLabel* hoverColorLabel;
- QCheckBox* linkEntries;
- QCheckBox* numberEntries;
+ TQCheckBox* linkEntries;
+ TQCheckBox* numberEntries;
- QGroupBox* bgPicBox;
+ TQGroupBox* bgPicBox;
KURLRequester* bgPicPath;
protected:
- QGridLayout* bgcolorLabel;
+ TQGridLayout* bgcolorLabel;
signals: