diff options
Diffstat (limited to 'keduca/libkeduca/kgallerydialog.cpp')
-rw-r--r-- | keduca/libkeduca/kgallerydialog.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/keduca/libkeduca/kgallerydialog.cpp b/keduca/libkeduca/kgallerydialog.cpp index 0ab2d126..b1ec43e2 100644 --- a/keduca/libkeduca/kgallerydialog.cpp +++ b/keduca/libkeduca/kgallerydialog.cpp @@ -24,13 +24,13 @@ #include <kmessagebox.h> #include <kio/netaccess.h> -#include <qlineedit.h> -#include <qlistview.h> -#include <qsplitter.h> -#include <qdom.h> -#include <qfileinfo.h> +#include <tqlineedit.h> +#include <tqlistview.h> +#include <tqsplitter.h> +#include <tqdom.h> +#include <tqfileinfo.h> -KGalleryDialog::KGalleryDialog(QWidget *parent, const char *name ) +KGalleryDialog::KGalleryDialog(TQWidget *parent, const char *name ) :KGalleryDialogBase(parent,name) { configRead(); @@ -42,7 +42,7 @@ KGalleryDialog::~KGalleryDialog() /** Open keduca file. This function can open a remote or local url. */ bool KGalleryDialog::openFile(const KURL &url) { - QString tmpFile; + TQString tmpFile; bool returnval=false; if( KIO::NetAccess::download( url, tmpFile, this ) ) { @@ -59,11 +59,11 @@ bool KGalleryDialog::openFile(const KURL &url) { return returnval; } -bool KGalleryDialog::loadFile( const QString &filename ) +bool KGalleryDialog::loadFile( const TQString &filename ) { - QDomDocument doc("document.xml"); + TQDomDocument doc("document.xml"); - QFile file(filename); + TQFile file(filename); if(!file.open(IO_ReadOnly)) { @@ -74,16 +74,16 @@ bool KGalleryDialog::loadFile( const QString &filename ) if( doc.doctype().name() != "educagallery" ) { return false; } - QDomElement docElem = doc.documentElement(); - QDomNode n = docElem.firstChild(); + TQDomElement docElem = doc.documentElement(); + TQDomNode n = docElem.firstChild(); kdDebug()<<"... load attributes: "<< docElem.tagName() <<endl; - QDomNodeList dnList = n.childNodes(); + TQDomNodeList dnList = n.childNodes(); for( unsigned int i = 0; i < dnList.count(); ++i) { - QListViewItem *newItem = new QListViewItem(listDocuments); - QDomElement serversNode = dnList.item(i).toElement(); + TQListViewItem *newItem = new TQListViewItem(listDocuments); + TQDomElement serversNode = dnList.item(i).toElement(); kdDebug()<<"... load attributes: "<< serversNode.text() <<endl; @@ -105,13 +105,13 @@ bool KGalleryDialog::loadFile( const QString &filename ) void KGalleryDialog::configRead() { KConfig *appconfig = KGlobal::config(); - QStringList servers; - QStringList ipservers; - QStringList::Iterator it_ipservers; + TQStringList servers; + TQStringList ipservers; + TQStringList::Iterator it_ipservers; appconfig->setGroup( "kgallerydialog" ); _split->setSizes( appconfig->readIntListEntry("Splitter_size") ); - QSize defaultSize(500,400); + TQSize defaultSize(500,400); resize( appconfig->readSizeEntry("Geometry", &defaultSize ) ); appconfig->setGroup("Galleries Servers"); @@ -125,9 +125,9 @@ void KGalleryDialog::configRead() } it_ipservers=ipservers.begin(); - for ( QStringList::Iterator it_servers = servers.begin(); it_servers != servers.end(); ++it_servers ) + for ( TQStringList::Iterator it_servers = servers.begin(); it_servers != servers.end(); ++it_servers ) { - QListViewItem *newItem = new QListViewItem(listServers); + TQListViewItem *newItem = new TQListViewItem(listServers); newItem->setText(0,*it_servers); newItem->setText(1,*it_ipservers); newItem->setSelected(false); @@ -138,8 +138,8 @@ void KGalleryDialog::configRead() /** Write servers lists */ void KGalleryDialog::configWrite() { - QStringList servers; - QStringList ipservers; + TQStringList servers; + TQStringList ipservers; KConfig *config = KGlobal::config(); config->setGroup( "kgallerydialog" ); @@ -148,7 +148,7 @@ void KGalleryDialog::configWrite() config->sync(); config->setGroup("Galleries Servers"); - QListViewItem *item = listServers->firstChild(); + TQListViewItem *item = listServers->firstChild(); while (item) { servers.append( item->text(0) ); ipservers.append( item->text(1) ); @@ -169,7 +169,7 @@ void KGalleryDialog::slotButtonAdd() return; } - QListViewItem *newItem = new QListViewItem(listServers); + TQListViewItem *newItem = new TQListViewItem(listServers); newItem->setText(0,lineName->text()); newItem->setText(1,lineAddress->text()); newItem->setSelected(false); @@ -185,11 +185,11 @@ void KGalleryDialog::accept() configWrite(); KGalleryDialogBase::accept(); } -// done( QDialog::Accepted ); +// done( TQDialog::Accepted ); } /** Select Server */ -void KGalleryDialog::slotServerSelected( QListViewItem *item ) +void KGalleryDialog::slotServerSelected( TQListViewItem *item ) { if (!item) return; @@ -203,16 +203,16 @@ void KGalleryDialog::slotServerSelected( QListViewItem *item ) /** Get keduca test url */ KURL KGalleryDialog::getURL() { - QListViewItem *item = listDocuments->currentItem(); + TQListViewItem *item = listDocuments->currentItem(); if (!item) return KURL(); - QString urlAddress = item->text(5); + TQString urlAddress = item->text(5); if( _currentURL.isLocalFile() && !KURL(urlAddress).isValid() ) { - if( !QFileInfo(urlAddress).exists() ) + if( !TQFileInfo(urlAddress).exists() ) urlAddress = _currentURL.directory(false,true) + urlAddress; kdDebug()<< "Imagen en local" <<endl; } else if( !_currentURL.isLocalFile() && !KURL(urlAddress).isValid() ) @@ -225,7 +225,7 @@ KURL KGalleryDialog::getURL() /** Add url */ void KGalleryDialog::putURL(const KURL &urlFile) { - QListViewItem *newItem = new QListViewItem(listServers); + TQListViewItem *newItem = new TQListViewItem(listServers); newItem->setText( 1, urlFile.url() ); newItem->setSelected(false); } |