You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
950 B
35 lines
950 B
15 years ago
|
#include "kfdtest.h"
|
||
|
|
||
14 years ago
|
#include <tqstringlist.h>
|
||
12 years ago
|
#include <tdefiledialog.h>
|
||
15 years ago
|
#include <kapplication.h>
|
||
|
#include <kmessagebox.h>
|
||
14 years ago
|
#include <tqtimer.h>
|
||
15 years ago
|
|
||
14 years ago
|
KFDTest::KFDTest( const TQString& startDir, TQObject *parent, const char *name )
|
||
|
: TQObject( parent, name ),
|
||
15 years ago
|
m_startDir( startDir )
|
||
|
{
|
||
14 years ago
|
TQTimer::singleShot( 1000, this, TQT_SLOT( doit() ));
|
||
15 years ago
|
}
|
||
|
|
||
|
void KFDTest::doit()
|
||
|
{
|
||
14 years ago
|
KFileDialog *dlg = new KFileDialog( m_startDir, TQString::null, 0L,
|
||
15 years ago
|
"file dialog", true );
|
||
|
dlg->setMode( KFile::File);
|
||
|
dlg->setOperationMode( KFileDialog::Saving );
|
||
14 years ago
|
TQStringList filter;
|
||
15 years ago
|
filter << "all/allfiles" << "text/plain";
|
||
|
dlg->setMimeFilter( filter, "all/allfiles" );
|
||
|
|
||
|
if ( dlg->exec() == KDialog::Accepted )
|
||
|
{
|
||
13 years ago
|
KMessageBox::information(0, TQString::fromLatin1("You selected the file: %1").arg( dlg->selectedURL().prettyURL() ));
|
||
15 years ago
|
}
|
||
|
|
||
14 years ago
|
// tqApp->quit();
|
||
15 years ago
|
}
|
||
|
|
||
|
#include "kfdtest.moc"
|