summaryrefslogtreecommitdiffstats
path: root/src/gvcore/imagesavedialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gvcore/imagesavedialog.cpp')
-rw-r--r--src/gvcore/imagesavedialog.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/gvcore/imagesavedialog.cpp b/src/gvcore/imagesavedialog.cpp
index edb4f5b..81e4a44 100644
--- a/src/gvcore/imagesavedialog.cpp
+++ b/src/gvcore/imagesavedialog.cpp
@@ -18,8 +18,8 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-// Qt includes
-#include <qtimer.h>
+// TQt includes
+#include <tqtimer.h>
// KDE includes
#include <kdebug.h>
@@ -34,18 +34,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace Gwenview {
-static int findFormatInFilterList(const QStringList& filters, const QString& format) {
+static int findFormatInFilterList(const TQStringList& filters, const TQString& format) {
int pos=0;
- for(QStringList::const_iterator it=filters.begin(); it!=filters.end(); ++it,++pos) {
- QStringList list=QStringList::split("|",*it);
+ for(TQStringList::const_iterator it=filters.begin(); it!=filters.end(); ++it,++pos) {
+ TQStringList list=TQStringList::split("|",*it);
if ( list[1].startsWith(format) ) return pos;
}
return -1;
}
-ImageSaveDialog::ImageSaveDialog(KURL& url, const QCString& imageFormat, QWidget* parent)
-: KFileDialog(":ImageSaveDialog",QString::null,parent,"imagesavedialog",true)
+ImageSaveDialog::ImageSaveDialog(KURL& url, const TQCString& imageFormat, TQWidget* tqparent)
+: KFileDialog(":ImageSaveDialog",TQString(),tqparent,"imagesavedialog",true)
, mURL(url)
, mImageFormat(imageFormat)
{
@@ -55,27 +55,27 @@ ImageSaveDialog::ImageSaveDialog(KURL& url, const QCString& imageFormat, QWidget
KMimeType::List types;
setFilterMimeType(i18n("Format:"),types,KMimeType::mimeType(""));
- QStringList filters;
+ TQStringList filters;
// Create our filter list
- QStringList mimeTypes=KImageIO::mimeTypes();
- for(QStringList::const_iterator it=mimeTypes.begin(); it!=mimeTypes.end(); ++it) {
- QString format=KImageIO::typeForMime(*it);
+ TQStringList mimeTypes=KImageIO::mimeTypes();
+ for(TQStringList::const_iterator it=mimeTypes.begin(); it!=mimeTypes.end(); ++it) {
+ TQString format=KImageIO::typeForMime(*it);
// Create the pattern part of the filter string
KMimeType::Ptr mt=KMimeType::mimeType(*it);
- QStringList patterns;
- for (QStringList::const_iterator patIt=mt->patterns().begin();patIt!=mt->patterns().end();++patIt) {
- QString pattern=(*patIt).lower();
- if (!patterns.contains(pattern)) patterns.append(pattern);
+ TQStringList patterns;
+ for (TQStringList::const_iterator patIt=mt->patterns().begin();patIt!=mt->patterns().end();++patIt) {
+ TQString pattern=(*patIt).lower();
+ if (!patterns.tqcontains(pattern)) patterns.append(pattern);
}
if (patterns.isEmpty()) {
- patterns.append( QString("*.%1").arg(format.lower()) );
+ patterns.append( TQString("*.%1").tqarg(format.lower()) );
}
- QString patternString=patterns.join(" ");
+ TQString patternString=patterns.join(" ");
// Create the filter string
- QString filter=patternString + "|"
+ TQString filter=patternString + "|"
+ format + " - " + mt->comment()
+ " (" + patternString + ")";
@@ -98,12 +98,12 @@ ImageSaveDialog::ImageSaveDialog(KURL& url, const QCString& imageFormat, QWidget
// Tweak the filter widget
filterWidget->setEditable(false);
- connect(filterWidget,SIGNAL(activated(const QString&)),
- this,SLOT(updateImageFormat(const QString&)) );
+ connect(filterWidget,TQT_SIGNAL(activated(const TQString&)),
+ this,TQT_SLOT(updateImageFormat(const TQString&)) );
// Call slotFilterChanged() to get the list filtered by the filter we
// selected. If we don't use a single shot, it leads to a crash :-/
- QTimer::singleShot(0,this,SLOT(slotFilterChanged()));
+ TQTimer::singleShot(0,this,TQT_SLOT(slotFilterChanged()));
}
@@ -113,13 +113,13 @@ void ImageSaveDialog::accept() {
}
-void ImageSaveDialog::updateImageFormat(const QString& text) {
- QStringList list=QStringList::split(" ",text);
+void ImageSaveDialog::updateImageFormat(const TQString& text) {
+ TQStringList list=TQStringList::split(" ",text);
mImageFormat=list[0].local8Bit();
- QString name=locationEdit->currentText();
- QString suffix=KImageIO::suffix(mImageFormat);
- int dotPos=name.findRev('.');
+ TQString name=locationEdit->currentText();
+ TQString suffix=KImageIO::suffix(mImageFormat);
+ int dotPos=name.tqfindRev('.');
if (dotPos>-1) {
name=name.left(dotPos);
}