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.
31 lines
719 B
31 lines
719 B
15 years ago
|
//import org.kde.qt.QApplication;
|
||
|
//import org.kde.qt.QDir;
|
||
|
import org.kde.qt.*;
|
||
|
|
||
|
public class DirTest {
|
||
|
public static void main(String[] args)
|
||
|
{
|
||
|
QApplication myapp = new QApplication(args);
|
||
|
|
||
|
QDir mydir = new QDir("/tmp");
|
||
|
if ( mydir.match(new String [] {"*.bmp", "*.h"}, "foobar.bmp") ) {
|
||
|
System.out.println("foobar matches");
|
||
|
}
|
||
|
|
||
|
if ( ! mydir.match(new String[] {"*.bmp", "*.h"}, "baz.cpp") ) {
|
||
|
System.out.println("baz doesn't match");
|
||
|
}
|
||
|
|
||
|
QFile myobj = new QFile();
|
||
|
Object mytest;
|
||
|
System.out.println("myobj: " + myobj.toString());
|
||
|
mytest = (QDir) Qt.dynamicCast("QDir", myobj);
|
||
|
System.out.println("mytest: " + mytest.toString());
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
static {
|
||
|
qtjava.initialize();
|
||
|
}
|
||
|
}
|