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.
79 lines
2.4 KiB
79 lines
2.4 KiB
15 years ago
|
/***************************************************************************
|
||
|
KScribble.java - KScribble using java bindings
|
||
|
-------------------
|
||
|
begin : Mon Jan 31 11:05:05 CET 2000
|
||
|
copyright : (C) 2000 by Ralf Nolden
|
||
|
email : Ralf.Nolden@post.rwth-aachen.de
|
||
|
java translation : Kenneth J. Pouncey
|
||
|
email : kjpou@hotmail.com
|
||
|
***************************************************************************/
|
||
|
|
||
|
|
||
|
import java.util.*;
|
||
11 years ago
|
import org.trinitydesktop.qt.*;
|
||
|
import org.trinitydesktop.koala.*;
|
||
15 years ago
|
|
||
|
/**
|
||
|
* The base class for JavaApiTest application windows. It sets up the main
|
||
|
* window and reads the config file as well as providing a menubar, toolbar
|
||
|
* and statusbar. An instance of KBaseView creates your center view, which is connected
|
||
|
* to the window's Doc object.
|
||
12 years ago
|
* KBase reimplements the methods that TDEMainWindow provides for main window handling and supports
|
||
|
* full session management as well as using TDEActions.
|
||
|
* @see TDEMainWindow
|
||
12 years ago
|
* @see TDEApplication
|
||
12 years ago
|
* @see TDEConfig
|
||
15 years ago
|
*
|
||
|
* @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team.
|
||
|
* @version KDevelop version 1.2 code generation
|
||
|
*/
|
||
|
public class Main {
|
||
|
|
||
|
static String description = "java KDE 3 example application";
|
||
|
|
||
|
|
||
|
static String[][] options = {
|
||
|
{ "+[File]", "image file to open", null }
|
||
|
};
|
||
|
|
||
|
static String VERSION = "0.1";
|
||
|
|
||
|
public static void main(String[] cmdLineArgs) {
|
||
|
|
||
12 years ago
|
TDEAboutData aboutData = new TDEAboutData( "kscribble", "KScribble",
|
||
|
VERSION, description, TDEAboutData.License_GPL,
|
||
15 years ago
|
"(C) 2000 by Ralf Nolden");
|
||
12 years ago
|
TDECmdLineArgs.init( cmdLineArgs, aboutData );
|
||
|
TDECmdLineArgs.addCmdLineOptions( options ); // Add our own options.
|
||
15 years ago
|
|
||
12 years ago
|
TDEApplication app = new TDEApplication();
|
||
15 years ago
|
KImageIO.registerFormats();
|
||
|
KScribbleApp kscribbleapp = new KScribbleApp();
|
||
|
|
||
|
if (app.isRestored()) {
|
||
|
kscribbleapp.RESTORE("kscribbleapp");
|
||
|
}
|
||
|
else {
|
||
|
kscribbleapp.show();
|
||
12 years ago
|
TDECmdLineArgs args = TDECmdLineArgs.parsedArgs();
|
||
15 years ago
|
|
||
|
if (args.count() > 0) {
|
||
|
kscribbleapp.openDocumentFile(new KURL(args.arg(0)));
|
||
|
}
|
||
|
else {
|
||
|
kscribbleapp.openDocumentFile();
|
||
|
}
|
||
|
args.clear();
|
||
|
}
|
||
|
|
||
|
app.exec();
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
static {
|
||
|
qtjava.initialize();
|
||
11 years ago
|
tdejava.initialize();
|
||
15 years ago
|
}
|
||
|
|
||
|
}
|