summaryrefslogtreecommitdiffstats
path: root/tdeio/tdefile/tests/kfdtest.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-27 01:04:16 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-27 01:04:16 -0600
commit5159cd2beb2e87806a5b54e9991b7895285c9d3e (patch)
tree9b70e8be47a390f8f4d56ead812ab0c9dad88709 /tdeio/tdefile/tests/kfdtest.cpp
parentc17cb900dcf52b8bd6dc300d4f103392900ec2b4 (diff)
downloadtdelibs-5159cd2beb2e87806a5b54e9991b7895285c9d3e.tar.gz
tdelibs-5159cd2beb2e87806a5b54e9991b7895285c9d3e.zip
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'tdeio/tdefile/tests/kfdtest.cpp')
-rw-r--r--tdeio/tdefile/tests/kfdtest.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/tdeio/tdefile/tests/kfdtest.cpp b/tdeio/tdefile/tests/kfdtest.cpp
new file mode 100644
index 000000000..60c8b6d70
--- /dev/null
+++ b/tdeio/tdefile/tests/kfdtest.cpp
@@ -0,0 +1,34 @@
+#include "kfdtest.h"
+
+#include <tqstringlist.h>
+#include <tdefiledialog.h>
+#include <kapplication.h>
+#include <kmessagebox.h>
+#include <tqtimer.h>
+
+KFDTest::KFDTest( const TQString& startDir, TQObject *parent, const char *name )
+ : TQObject( parent, name ),
+ m_startDir( startDir )
+{
+ TQTimer::singleShot( 1000, this, TQT_SLOT( doit() ));
+}
+
+void KFDTest::doit()
+{
+ KFileDialog *dlg = new KFileDialog( m_startDir, TQString::null, 0L,
+ "file dialog", true );
+ dlg->setMode( KFile::File);
+ dlg->setOperationMode( KFileDialog::Saving );
+ TQStringList filter;
+ filter << "all/allfiles" << "text/plain";
+ dlg->setMimeFilter( filter, "all/allfiles" );
+
+ if ( dlg->exec() == KDialog::Accepted )
+ {
+ KMessageBox::information(0, TQString::fromLatin1("You selected the file: %1").arg( dlg->selectedURL().prettyURL() ));
+ }
+
+// tqApp->quit();
+}
+
+#include "kfdtest.moc"