summaryrefslogtreecommitdiffstats
path: root/kpresenter/KPrImportStyleDia.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kpresenter/KPrImportStyleDia.cpp')
-rw-r--r--kpresenter/KPrImportStyleDia.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/kpresenter/KPrImportStyleDia.cpp b/kpresenter/KPrImportStyleDia.cpp
index d271445ec..72d3b9ab3 100644
--- a/kpresenter/KPrImportStyleDia.cpp
+++ b/kpresenter/KPrImportStyleDia.cpp
@@ -20,23 +20,23 @@
#include <klocale.h>
#include "KPrDocument.h"
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
#include <kmessagebox.h>
#include "KPrImportStyleDia.h"
#include <KoStore.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kfiledialog.h>
#include <kdebug.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include "KPrTextObject.h"
KPrImportStyleDia::KPrImportStyleDia( KPrDocument *_doc, KoStyleCollection* currentCollection,
- QWidget *parent, const char *name )
- :KoImportStyleDia( currentCollection, parent, name ),
+ TQWidget *tqparent, const char *name )
+ :KoImportStyleDia( currentCollection, tqparent, name ),
m_doc(_doc)
{
}
@@ -47,15 +47,15 @@ KPrImportStyleDia::~KPrImportStyleDia()
void KPrImportStyleDia::loadFile()
{
- KFileDialog fd( QString::null, QString::null, 0, 0, TRUE );
- QStringList lst = "application/x-kpresenter";
+ KFileDialog fd( TQString(), TQString(), 0, 0, TRUE );
+ TQStringList lst = "application/x-kpresenter";
#if 0 //For the future
lst << "application/vnd.oasis.opendocument.presentation";
#endif
fd.setMimeFilter( lst );
fd.setCaption(i18n("Import Style"));
KURL url;
- if ( fd.exec() != QDialog::Accepted )
+ if ( fd.exec() != TQDialog::Accepted )
return;
url = fd.selectedURL();
if( url.isEmpty() )
@@ -65,7 +65,7 @@ void KPrImportStyleDia::loadFile()
i18n("Import Style"));
return;
}
- QMap<QString, QString>insertStyle;
+ TQMap<TQString, TQString>insertStyle;
KoStore* store=KoStore::createStore( this, url.path(), KoStore::Read );
if (store )
{
@@ -74,35 +74,35 @@ void KPrImportStyleDia::loadFile()
clear();
m_listStyleName->clear();
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( store->device() );
- QDomElement word = doc.documentElement();
+ TQDomElement word = doc.documentElement();
- QDomElement stylesElem = word.namedItem( "STYLES" ).toElement();
+ TQDomElement stylesElem = word.namedItem( "STYLES" ).toElement();
if ( !stylesElem.isNull() )
{
//todo
//duplicate code try to remove it !
- QValueList<QString> followingStyles;
- QDomNodeList listStyles = stylesElem.elementsByTagName( "STYLE" );
+ TQValueList<TQString> followingStyles;
+ TQDomNodeList listStyles = stylesElem.elementsByTagName( "STYLE" );
for (unsigned int item = 0; item < listStyles.count(); item++)
{
- QDomElement styleElem = listStyles.item( item ).toElement();
+ TQDomElement styleElem = listStyles.item( item ).toElement();
- KoParagStyle *sty = new KoParagStyle( QString::null );
+ KoParagStyle *sty = new KoParagStyle( TQString() );
// Load the style from the <STYLE> element
sty->loadStyle( styleElem );
if ( currentCollection()->findStyle( sty->name() ) )
sty->setName(generateStyleName(sty->name() + "-%1"));
- QString name = sty->displayName();
+ TQString name = sty->displayName();
// ### TODO: we should offer the option of updating the
// existing style instead of creating a foo-1 style. Any ideas for a GUI?
if ( currentCollection()->findStyleByDisplayName( name ) )
sty->setDisplayName(generateStyleDisplayName(sty->displayName() + "-%1"));
insertStyle.insert( name, sty->name() );
- QDomElement formatElem = styleElem.namedItem( "FORMAT" ).toElement();
+ TQDomElement formatElem = styleElem.namedItem( "FORMAT" ).toElement();
if ( !formatElem.isNull() )
sty->format() = KPrTextObject::loadFormat( formatElem, 0L, m_doc->defaultFont(),
m_doc->globalLanguage(), m_doc->globalHyphenation() );
@@ -115,7 +115,7 @@ void KPrImportStyleDia::loadFile()
if( m_styleList.count() >= 0 && uint( m_styleList.count() ) > followingStyles.count() )
{
- QString following = styleElem.namedItem("FOLLOWING").toElement().attribute("name");
+ TQString following = styleElem.namedItem("FOLLOWING").toElement().attribute("name");
followingStyles.append( following );
}
else
@@ -125,9 +125,9 @@ void KPrImportStyleDia::loadFile()
Q_ASSERT( m_styleList.count() >= 0 && followingStyles.count() == uint( m_styleList.count() ) );
unsigned int i=0;
- for( QValueList<QString>::Iterator it = followingStyles.begin(); it != followingStyles.end(); ++it ) {
- QString newName =*it;
- if ( insertStyle.contains( *it ) )
+ for( TQValueList<TQString>::Iterator it = followingStyles.begin(); it != followingStyles.end(); ++it ) {
+ TQString newName =*it;
+ if ( insertStyle.tqcontains( *it ) )
newName = (insertStyle)[ *it ];
KoParagStyle * style = m_styleList.findStyle(newName);