Rename KCmdLineArgs to TDECmdLineArgs to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 3b8c3eec42
commit 427847240b

@ -302,10 +302,10 @@ BEGIN
'Java_org_kde_qt_QUriDrag_decodeLocalFiles__Lorg_kde_qt_QMimeSourceInterface_2_3Ljava_lang_String_2' => 1,
'Java_org_kde_koala_TDEApplication_setJavaSlotFactory' => 1,
'Java_org_kde_koala_KMainWindow_memberList' => 1,
'Java_org_kde_koala_KCmdLineArgs_init__I_3Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2' => 1,
'Java_org_kde_koala_KCmdLineArgs_init__I_3Ljava_lang_String_2Lorg_kde_koala_KAboutData_2' => 1,
'Java_org_kde_koala_KCmdLineArgs_init__I_3Ljava_lang_String_2Lorg_kde_koala_KAboutData_2Z' => 1,
'Java_org_kde_koala_KCmdLineArgs_init__I_3Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Z' => 1,
'Java_org_kde_koala_TDECmdLineArgs_init__I_3Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2' => 1,
'Java_org_kde_koala_TDECmdLineArgs_init__I_3Ljava_lang_String_2Lorg_kde_koala_KAboutData_2' => 1,
'Java_org_kde_koala_TDECmdLineArgs_init__I_3Ljava_lang_String_2Lorg_kde_koala_KAboutData_2Z' => 1,
'Java_org_kde_koala_TDECmdLineArgs_init__I_3Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Z' => 1,
'Java_org_kde_koala_Scheduler_connect__Ljava_lang_String_2Lorg_kde_qt_QObject_2Ljava_lang_String_2' => 1,
'Java_org_kde_koala_Scheduler_connect__Lorg_kde_qt_QObject_2Ljava_lang_String_2Ljava_lang_String_2' => 1,
'Java_org_kde_koala_Scheduler_disconnect__Lorg_kde_qt_QObject_2Ljava_lang_String_2Lorg_kde_qt_QObject_2Ljava_lang_String_2' => 1,
@ -1685,7 +1685,7 @@ EOF
$kcmdlineargsjniExtras = <<EOF;
JNIEXPORT void JNICALL
Java_org_kde_koala_KCmdLineArgs_init___3Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jclass cls, jobjectArray args, jstring _appname, jstring programName, jstring _description, jstring _version)
Java_org_kde_koala_TDECmdLineArgs_init___3Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jclass cls, jobjectArray args, jstring _appname, jstring programName, jstring _description, jstring _version)
{
(void) cls;
static TQCString* _qstring__appname = 0;
@ -1693,12 +1693,12 @@ static TQCString* _qstring_programName = 0;
static TQCString* _qstring__description = 0;
static TQCString* _qstring__version = 0;
int argc = (int) env->GetArrayLength(args);
KCmdLineArgsJBridge::init((int) argc+1, (char**) QtSupport::toArgv(env, args), (const char*) QtSupport::toCharString(env, _appname, &_qstring__appname), (const char*) QtSupport::toCharString(env, programName, &_qstring_programName), (const char*) QtSupport::toCharString(env, _description, &_qstring__description), (const char*) QtSupport::toCharString(env, _version, &_qstring__version));
TDECmdLineArgsJBridge::init((int) argc+1, (char**) QtSupport::toArgv(env, args), (const char*) QtSupport::toCharString(env, _appname, &_qstring__appname), (const char*) QtSupport::toCharString(env, programName, &_qstring_programName), (const char*) QtSupport::toCharString(env, _description, &_qstring__description), (const char*) QtSupport::toCharString(env, _version, &_qstring__version));
return;
}
JNIEXPORT void JNICALL
Java_org_kde_koala_KCmdLineArgs_init___3Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Z(JNIEnv* env, jclass cls, jobjectArray args, jstring _appname, jstring programName, jstring _description, jstring _version, jboolean noKApp)
Java_org_kde_koala_TDECmdLineArgs_init___3Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Z(JNIEnv* env, jclass cls, jobjectArray args, jstring _appname, jstring programName, jstring _description, jstring _version, jboolean noKApp)
{
(void) cls;
static TQCString* _qstring__appname = 0;
@ -1706,25 +1706,25 @@ static TQCString* _qstring_programName = 0;
static TQCString* _qstring__description = 0;
static TQCString* _qstring__version = 0;
int argc = (int) env->GetArrayLength(args);
KCmdLineArgsJBridge::init(argc+1, (char**) QtSupport::toArgv(env, args), (const char*) QtSupport::toCharString(env, _appname, &_qstring__appname), (const char*) QtSupport::toCharString(env, programName, &_qstring_programName), (const char*) QtSupport::toCharString(env, _description, &_qstring__description), (const char*) QtSupport::toCharString(env, _version, &_qstring__version), (bool) noKApp);
TDECmdLineArgsJBridge::init(argc+1, (char**) QtSupport::toArgv(env, args), (const char*) QtSupport::toCharString(env, _appname, &_qstring__appname), (const char*) QtSupport::toCharString(env, programName, &_qstring_programName), (const char*) QtSupport::toCharString(env, _description, &_qstring__description), (const char*) QtSupport::toCharString(env, _version, &_qstring__version), (bool) noKApp);
return;
}
JNIEXPORT void JNICALL
Java_org_kde_koala_KCmdLineArgs_init___3Ljava_lang_String_2Lorg_kde_koala_KAboutData_2(JNIEnv* env, jclass cls, jobjectArray args, jobject about)
Java_org_kde_koala_TDECmdLineArgs_init___3Ljava_lang_String_2Lorg_kde_koala_KAboutData_2(JNIEnv* env, jclass cls, jobjectArray args, jobject about)
{
(void) cls;
int argc = (int) env->GetArrayLength(args);
KCmdLineArgsJBridge::init(argc+1, (char**) QtSupport::toArgv(env, args), (const KAboutData*) QtSupport::getQt(env, about));
TDECmdLineArgsJBridge::init(argc+1, (char**) QtSupport::toArgv(env, args), (const KAboutData*) QtSupport::getQt(env, about));
return;
}
JNIEXPORT void JNICALL
Java_org_kde_koala_KCmdLineArgs_init___3Ljava_lang_String_2Lorg_kde_koala_KAboutData_2Z(JNIEnv* env, jclass cls, jobjectArray args, jobject about, jboolean noKApp)
Java_org_kde_koala_TDECmdLineArgs_init___3Ljava_lang_String_2Lorg_kde_koala_KAboutData_2Z(JNIEnv* env, jclass cls, jobjectArray args, jobject about, jboolean noKApp)
{
(void) cls;
int argc = (int) env->GetArrayLength(args);
KCmdLineArgsJBridge::init(argc+1, (char**) QtSupport::toArgv(env, args), (const KAboutData*) QtSupport::getQt(env, about), (bool) noKApp);
TDECmdLineArgsJBridge::init(argc+1, (char**) QtSupport::toArgv(env, args), (const KAboutData*) QtSupport::getQt(env, about), (bool) noKApp);
return;
}
@ -3077,7 +3077,7 @@ sub writeClassDoc
} elsif ( $className eq 'TQUriDrag' ) {
print CLASS $quridragExtras;
$jniCode .= $quridragjniExtras;
} elsif ( $className eq 'KCmdLineArgs' ) {
} elsif ( $className eq 'TDECmdLineArgs' ) {
$jniCode .= $kcmdlineargsjniExtras;
} elsif ( $className eq 'KIO::Scheduler' ) {
$jniCode .= $schedulerjniExtras;
@ -3721,7 +3721,7 @@ sub generateMethod($$$$$$$$$)
checkIncludesForObject( $argType, $addInclude );
}
if ( $name eq 'TQApplication' or ($javaClassName eq 'KCmdLineArgs' and $name eq 'init' and scalar(@javaArgList) > 1) ) {
if ( $name eq 'TQApplication' or ($javaClassName eq 'TDECmdLineArgs' and $name eq 'init' and scalar(@javaArgList) > 1) ) {
# Junk the 'int argc' parameter
shift @javaArgTypeList;
shift @javaArgList;

@ -1816,7 +1816,7 @@ sub generateMethod($$$$$$$)
checkImportsForObject( $argType, $addImport );
}
if ( $name eq 'TQApplication' or ($javaClassName eq 'KCmdLineArgs' and $name eq 'init' and scalar(@javaArgList) > 1) ) {
if ( $name eq 'TQApplication' or ($javaClassName eq 'TDECmdLineArgs' and $name eq 'init' and scalar(@javaArgList) > 1) ) {
# Junk the 'int argc' parameter
shift @javaArgTypeList;
shift @javaArgList;

@ -1865,7 +1865,7 @@ sub generateMethod($$$$$$$)
checkImportsForObject( $argType, $addImport );
}
if ( $name eq 'TQApplication' or ($csharpClassName eq 'KCmdLineArgs' and $name eq 'init' and scalar(@csharpArgList) > 1) ) {
if ( $name eq 'TQApplication' or ($csharpClassName eq 'TDECmdLineArgs' and $name eq 'init' and scalar(@csharpArgList) > 1) ) {
# Junk the 'int argc' parameter
shift @csharpArgTypeList;
shift @csharpArgList;

@ -757,7 +757,7 @@ BEGIN
'KCharSelect*' => 'kde_KCharSelect*',
'KCharSelectTable*' => 'kde_KCharSelectTable*',
'KCharsets*' => 'kde_KCharsets*' ,
'KCmdLineArgs*' => 'kde_KCmdLineArgs*' ,
'TDECmdLineArgs*' => 'kde_TDECmdLineArgs*' ,
'KCodecs*' => 'kde_KCodecs*',
'KColor&' => 'kde_KColor*' ,
'KColor*' => 'kde_KColor*',

File diff suppressed because one or more lines are too long

@ -43,8 +43,8 @@ static String VERSION = "0.1";
KAboutData aboutData = new KAboutData( "kscribble", "KScribble",
VERSION, description, KAboutData.License_GPL,
"(C) 2000 by Ralf Nolden");
KCmdLineArgs.init( cmdLineArgs, aboutData );
KCmdLineArgs.addCmdLineOptions( options ); // Add our own options.
TDECmdLineArgs.init( cmdLineArgs, aboutData );
TDECmdLineArgs.addCmdLineOptions( options ); // Add our own options.
TDEApplication app = new TDEApplication();
KImageIO.registerFormats();
@ -55,7 +55,7 @@ static String VERSION = "0.1";
}
else {
kscribbleapp.show();
KCmdLineArgs args = KCmdLineArgs.parsedArgs();
TDECmdLineArgs args = TDECmdLineArgs.parsedArgs();
if (args.count() > 0) {
kscribbleapp.openDocumentFile(new KURL(args.arg(0)));

@ -32,7 +32,7 @@ public class SimpleMailer extends TDEApplication{
* Entry point for the program
*/
public static void main(String [] argv) {
KCmdLineArgs.init(argv, "simplemailer", "SimpleMailer",
TDECmdLineArgs.init(argv, "simplemailer", "SimpleMailer",
"Simple Mailing Application", "0.1");
SimpleMailer mailClnt = new SimpleMailer();
}

File diff suppressed because one or more lines are too long

@ -13,7 +13,7 @@ import org.kde.qt.TQImage;
(using KAboutPerson), license and copyright information.
Currently, the values set here are shown by the "About" box
(see KAboutDialog), used by the bug report dialog (see KBugReport),
and by the help shown on command line (see KCmdLineArgs).
and by the help shown on command line (see TDECmdLineArgs).
@author Espen Sand (espen@kde.org), David Faure (faure@kde.org)
@short Holds information needed by the "About" box and other classes.

@ -20,7 +20,7 @@ import org.kde.qt.QtSupport;
about.addAuthor("Joe Developer", I18N_NOOP("developer"), "joe@host.com", 0);
about.addCredit("Joe User", I18N_NOOP("A lot of bug reports"),
"joe.user@host.org", 0);
KCmdLineArgs.init(args, &about);
TDECmdLineArgs.init(args, &about);
</pre>
@short This structure is used to store information about a person or developer.

@ -12,7 +12,7 @@ import org.kde.qt.TQWidget;
(program name, version, bug-report address, etc.)
comes from the KAboutData class.
Make sure you create an instance of KAboutData and pass it
to KCmdLineArgs.
to TDECmdLineArgs.
@author David Faure <faure@kde.org>
@short A dialog box for sending bug reports.

@ -36,7 +36,7 @@ public class KInstance implements QtSupport, KInstanceInterface {
You have to destroy both, since the instance doesn't own the about data.
Don't build a KAboutData on the stack in this case !
Building a KAboutData on the stack is only ok for usage with
KCmdLineArgs and TDEApplication (not destroyed until the app exits).
TDECmdLineArgs and TDEApplication (not destroyed until the app exits).
@param aboutData data about this instance (see KAboutData)
@short Constructor.
*/

@ -18,7 +18,7 @@ import java.util.ArrayList;
The .desktop file for the application should state X-DCOP-ServiceType=Unique,
see kapplication.h
If your application is used to open files, it should also support the --tempfile
option (see KCmdLineArgs.addTempFileOption()), to delete tempfiles after use.
option (see TDECmdLineArgs.addTempFileOption()), to delete tempfiles after use.
Add X-TDE-HasTempFileOption=true to the .desktop file to indicate this.
@author Preston Brown <pbrown@kde.org>
@ -32,7 +32,7 @@ public class KUniqueApplication extends TDEApplication implements DCOPObjectInte
public native TQMetaObject metaObject();
public native String className();
/**
Constructor. Takes command line arguments from KCmdLineArgs
Constructor. Takes command line arguments from TDECmdLineArgs
@param allowStyles Set to false to disable the loading on plugin based
styles. This is only useful to applications that do not display a GUI
normally. If you do create an application with <code>allowStyles</code> set to false
@ -84,7 +84,7 @@ public class KUniqueApplication extends TDEApplication implements DCOPObjectInte
Usually this will involve making some calls into the GUI portion of your
application asking for a new window to be created, possibly with
some data already loaded based on the arguments received.
Command line arguments have been passed to KCmdLineArgs before this
Command line arguments have been passed to TDECmdLineArgs before this
function is called and can be checked in the usual way.
The default implementation ensures the mainwindow of the already
running instance is shown and activated if necessary. You should
@ -118,8 +118,8 @@ public class KUniqueApplication extends TDEApplication implements DCOPObjectInte
<pre>
int main(String[] args) {
KAboutData about("myappname", "myAppName", .....);
KCmdLineArgs.init(args, &about);
KCmdLineArgs.addCmdLineOptions( myCmdOptions );
TDECmdLineArgs.init(args, &about);
TDECmdLineArgs.addCmdLineOptions( myCmdOptions );
KUniqueApplication.addCmdLineOptions();
if (!KUniqueApplication.start()) {
fprintf(stderr, "myAppName is already running!\n");

File diff suppressed because one or more lines are too long

@ -145,7 +145,7 @@ public class TDEApplication extends TQApplication implements KInstanceInterface
public native String className();
/**
This constructor takes aboutData and command line
arguments from KCmdLineArgs.
arguments from TDECmdLineArgs.
@param allowStyles Set to false to disable the loading on plugin based
styles. This is only useful to applications that do not display a GUI
normally. If you do create an application with <code>allowStyles</code> set to false
@ -153,7 +153,7 @@ public class TDEApplication extends TQApplication implements KInstanceInterface
displays widgets. Call enableStyles() before displaying any widgets.
@param GUIenabled Set to false to disable all GUI stuff. This implies
no styles either.
@short This constructor takes aboutData and command line arguments from KCmdLineArgs.
@short This constructor takes aboutData and command line arguments from TDECmdLineArgs.
*/
public TDEApplication(boolean allowStyles, boolean GUIenabled) {
super((Class) null);
@ -671,8 +671,8 @@ public class TDEApplication extends TQApplication implements KInstanceInterface
*/
public native void deref();
/**
Add Qt and KDE command line options to KCmdLineArgs.
@short Add Qt and KDE command line options to KCmdLineArgs.
Add Qt and KDE command line options to TDECmdLineArgs.
@short Add Qt and KDE command line options to TDECmdLineArgs.
*/
public static native void addCmdLineOptions();
/**

@ -8,19 +8,19 @@ import java.util.ArrayList;
/**
KCmdLineArgs provides simple access to the command-line arguments
TDECmdLineArgs provides simple access to the command-line arguments
for an application. It takes into account Qt-specific options,
KDE-specific options and application specific options.
This class is used in %main() via the static method
init().
A typical %KDE application using %KCmdLineArgs should look like this:
A typical %KDE application using %TDECmdLineArgs should look like this:
<pre>
int main(String[] args)
{
// Initialize command line args
KCmdLineArgs.init(args, appName, programName, description, version);
TDECmdLineArgs.init(args, appName, programName, description, version);
// Tell which options are supported
KCmdLineArgs.addCmdLineOptions( options );
TDECmdLineArgs.addCmdLineOptions( options );
// Add options from other components
KUniqueApplication.addCmdLineOptions();
....
@ -31,7 +31,7 @@ import java.util.ArrayList;
// A TDEApplication will usually do this in main but this is not
// necessary.
// A KUniqueApplication might want to handle it in newInstance().
KCmdLineArgs args = KCmdLineArgs.parsedArgs();
TDECmdLineArgs args = TDECmdLineArgs.parsedArgs();
// A binary option (on / off)
if (args.isSet("some-option"))
....
@ -77,7 +77,7 @@ import java.util.ArrayList;
}
</pre>
The I18N_NOOP macro is used to indicate that these strings should be
marked for translation. The actual translation is done by KCmdLineArgs.
marked for translation. The actual translation is done by TDECmdLineArgs.
You can't use i18n() here because we are setting up a static data
structure and can't do translations at compile time.
Note that a program should define the options before any arguments.
@ -138,10 +138,10 @@ import java.util.ArrayList;
@short A class for command-line argument handling.
*/
public class KCmdLineArgs implements QtSupport {
public class TDECmdLineArgs implements QtSupport {
private long _qt;
private boolean _allocatedInJavaWorld = true;
protected KCmdLineArgs(Class dummy){}
protected TDECmdLineArgs(Class dummy){}
/**
Read out a string option.
@ -321,8 +321,8 @@ public class KCmdLineArgs implements QtSupport {
true. If required, you must check yourself the number of arguments
specified by the user:
<pre>
KCmdLineArgs args = KCmdLineArgs.parsedArgs();
if (args.count() == 0) KCmdLineArgs.usage(i18n("No file specified!"));
TDECmdLineArgs args = TDECmdLineArgs.parsedArgs();
if (args.count() == 0) TDECmdLineArgs.usage(i18n("No file specified!"));
</pre>
</li>
In BNF:
@ -390,8 +390,8 @@ public class KCmdLineArgs implements QtSupport {
@param id The name of the options you are interested in, can be 0.
@short Access parsed arguments.
*/
public static native KCmdLineArgs parsedArgs(String id);
public static native KCmdLineArgs parsedArgs();
public static native TDECmdLineArgs parsedArgs(String id);
public static native TDECmdLineArgs parsedArgs();
/**
Get the CWD (Current Working Directory) associated with the
current command line arguments.
@ -428,7 +428,7 @@ public class KCmdLineArgs implements QtSupport {
public static native void enable_i18n();
/**
Used by url().
Made public for apps that don't use KCmdLineArgs
Made public for apps that don't use TDECmdLineArgs
@param urlArg the argument
@return the url.
@ -436,11 +436,11 @@ public class KCmdLineArgs implements QtSupport {
*/
public static native KURL makeURL(String urlArg);
/**
Made public for apps that don't use KCmdLineArgs
Made public for apps that don't use TDECmdLineArgs
To be done before makeURL, to set the current working
directory in case makeURL needs it.
@param cwd the new working directory
@short Made public for apps that don't use KCmdLineArgs To be done before makeURL, to set the current working directory in case makeURL needs it.
@short Made public for apps that don't use TDECmdLineArgs To be done before makeURL, to set the current working directory in case makeURL needs it.
*/
public static native void setCwd(String cwd);
/**
@ -471,8 +471,8 @@ public class KCmdLineArgs implements QtSupport {
Constructor.
@short
*/
public KCmdLineArgs(String[][] _options, String _name, String _id) {
newKCmdLineArgs(_options,_name,_id);
public TDECmdLineArgs(String[][] _options, String _name, String _id) {
newTDECmdLineArgs(_options,_name,_id);
}
private native void newKCmdLineArgs(String[][] _options, String _name, String _id);
private native void newTDECmdLineArgs(String[][] _options, String _name, String _id);
}

@ -15,7 +15,7 @@ public class Test{
KAboutData aboutData = new KAboutData( "test", "Test",
"0.1", description, KAboutData.License_GPL,
"(C) 2002 Gert-Jan van der Heiden");
KCmdLineArgs.init( argv, aboutData );
TDECmdLineArgs.init( argv, aboutData );
TDEApplication app = new TDEApplication();
app.dcopClient().registerAs("JavaTest", false);

@ -558,8 +558,8 @@ public static void main(String[] cmdLineArgs)
VERSION, description, KAboutData.License_GPL,
"(c) 2001, Richard Dale");
aboutData.addAuthor("Richard Dale",null, "Lost_Highway@tipitina.demon.co.uk");
KCmdLineArgs.init( cmdLineArgs, aboutData );
KCmdLineArgs.addCmdLineOptions( options ); // Add our own options.
TDECmdLineArgs.init( cmdLineArgs, aboutData );
TDECmdLineArgs.addCmdLineOptions( options ); // Add our own options.
TDEApplication app = new TDEApplication();
@ -571,7 +571,7 @@ public static void main(String[] cmdLineArgs)
{
KBase kbase = new KBase();
kbase.show();
KCmdLineArgs args = KCmdLineArgs.parsedArgs();
TDECmdLineArgs args = TDECmdLineArgs.parsedArgs();
if (args.count() > 0)
{

@ -23,7 +23,7 @@ import org.kde.koala.*;
public class KBlendTest {
public static void main(String[] args) {
KCmdLineArgs.init(args, "kblendtest", "KBlendTest", "It blends!", "0.1");
TDECmdLineArgs.init(args, "kblendtest", "KBlendTest", "It blends!", "0.1");
TDEApplication app = new TDEApplication();
KBlendWidget w = new KBlendWidget(null,"KBlendTest");
w.setCaption(app.name());

@ -10,7 +10,7 @@ public class KCharSelectTest {
public static void main (String[] args) {
KCmdLineArgs.init(args, "kcharselecttest", "KCharSelectTest",
TDECmdLineArgs.init(args, "kcharselecttest", "KCharSelectTest",
"A KCharSelect test app", "0.1");
TDEApplication app = new TDEApplication();
KCharSelect selector = new KCharSelect(null,"char selector");

@ -32,13 +32,13 @@ import java.util.*;
VERSION, description, KAboutData.License_GPL,
"(c) 2002, Kenneth J. Pouncey");
aboutData.addAuthor("Kenneth J. Pouncey",null, "kjpou@hotmail.com");
KCmdLineArgs.init( cmdLineArgs, aboutData );
KCmdLineArgs.addCmdLineOptions( options ); // Add our own options.
TDECmdLineArgs.init( cmdLineArgs, aboutData );
TDECmdLineArgs.addCmdLineOptions( options ); // Add our own options.
TDEApplication app = new TDEApplication();
// parse the args
KCmdLineArgs args = KCmdLineArgs.parsedArgs();
TDECmdLineArgs args = TDECmdLineArgs.parsedArgs();
// Make a central widget to contain the other widgets
TQWidget w = new TQWidget();

@ -7,7 +7,7 @@ public class KDatePickTest {
public static void main (String[] args) {
KLocale.setMainCatalogue("tdelibs");
KCmdLineArgs.init(args, "kdatepickertest", "KDatePickTest",
TDECmdLineArgs.init(args, "kdatepickertest", "KDatePickTest",
"A KDatePicker test..", "0.1");
TDEApplication app = new TDEApplication();
KDatePicker picker = new KDatePicker();

@ -52,13 +52,13 @@ public class KFontDialogTest {
VERSION, description, KAboutData.License_GPL,
"(c) 2002, Kenneth J. Pouncey");
aboutData.addAuthor("Kenneth J. Pouncey",null, "kjpou@hotmail.com");
KCmdLineArgs.init( cmdLineArgs, aboutData );
KCmdLineArgs.addCmdLineOptions( options ); // Add our own options.
TDECmdLineArgs.init( cmdLineArgs, aboutData );
TDECmdLineArgs.addCmdLineOptions( options ); // Add our own options.
TDEApplication app = new TDEApplication();
// parse the args
KCmdLineArgs args = KCmdLineArgs.parsedArgs();
TDECmdLineArgs args = TDECmdLineArgs.parsedArgs();
KConfig aConfig = new KConfig();
aConfig.setGroup( "KFontDialog-test" );

@ -11,7 +11,7 @@ import org.kde.koala.*;
* ToolTips, What's This?, and More
*
* @see TDEApplication
* @see KCmdLineArgs
* @see TDECmdLineArgs
*
* @author java translation Kenneth J. Pouncey, kjpou@hotmail.com
* @version 0.1
@ -32,8 +32,8 @@ static String VERSION = "0.1";
KAboutData aboutData = new KAboutData( "KHelpers", "KHelpers",
VERSION, description, KAboutData.License_GPL,
"KDE 2 Development");
KCmdLineArgs.init( cmdLineArgs, aboutData );
KCmdLineArgs.addCmdLineOptions( options ); // Add our own options.
TDECmdLineArgs.init( cmdLineArgs, aboutData );
TDECmdLineArgs.addCmdLineOptions( options ); // Add our own options.
TDEApplication app = new TDEApplication();
KHelpers khelpers = new KHelpers();

@ -524,11 +524,11 @@ static String[][] options =
};
public static void main(String[] argv) {
KCmdLineArgs.init( argv, "kioslavetest", "KIOSlaveTest", description, version );
KCmdLineArgs.addCmdLineOptions( options );
TDECmdLineArgs.init( argv, "kioslavetest", "KIOSlaveTest", description, version );
TDECmdLineArgs.addCmdLineOptions( options );
TDEApplication app = new TDEApplication();
KCmdLineArgs args = KCmdLineArgs.parsedArgs();
TDECmdLineArgs args = TDECmdLineArgs.parsedArgs();
String src = args.getOption("src");
String dest = args.getOption("dest");
@ -557,7 +557,7 @@ public static void main(String[] argv) {
op = KioslaveTest.Shred;
} else if ( tmps.equals("mkdir")) {
op = KioslaveTest.Mkdir;
} else KCmdLineArgs.usage("unknown operation");
} else TDECmdLineArgs.usage("unknown operation");
tmps = args.getOption("progress");
if ( tmps.equals("none")) {
@ -566,7 +566,7 @@ public static void main(String[] argv) {
pr = KioslaveTest.ProgressDefault;
} else if ( tmps.equals("status")) {
pr = KioslaveTest.ProgressStatus;
} else KCmdLineArgs.usage("unknown progress mode");
} else TDECmdLineArgs.usage("unknown progress mode");
args.clear(); // Free up memory

@ -11,7 +11,7 @@ import org.kde.koala.kdejava;
import org.kde.qt.qtjava;
import org.kde.koala.KMainWindow;
import org.kde.koala.KCmdLineArgs;
import org.kde.koala.TDECmdLineArgs;
import org.kde.qt.TQPopupMenu;
import org.kde.qt.TQTextView;
import org.kde.koala.KMenuBar;
@ -128,7 +128,7 @@ public class KdeMenuSample extends KMainWindow {
// main method
//----------------------------------------------------------------
public static void main(String [] argv) {
KCmdLineArgs.init(argv, "menuapp", "MenuApp",
TDECmdLineArgs.init(argv, "menuapp", "MenuApp",
"A simple menu example", "0.1");
TDEApplication menuApp = new TDEApplication();
KdeMenuSample mainWnd = new KdeMenuSample(menuApp);

@ -26,13 +26,13 @@ public class KProgressTest {
VERSION, description, KAboutData.License_GPL,
"(c) 2002, Kenneth J. Pouncey");
aboutData.addAuthor("Kenneth J. Pouncey",null, "kjpou@hotmail.com");
KCmdLineArgs.init( cmdLineArgs, aboutData );
KCmdLineArgs.addCmdLineOptions( options ); // Add our own options.
TDECmdLineArgs.init( cmdLineArgs, aboutData );
TDECmdLineArgs.addCmdLineOptions( options ); // Add our own options.
TDEApplication app = new TDEApplication();
// parse the args
KCmdLineArgs args = KCmdLineArgs.parsedArgs();
TDECmdLineArgs args = TDECmdLineArgs.parsedArgs();
MyWidget mine = new MyWidget();

@ -10,8 +10,8 @@ public class Test {
KAboutData aboutData = new KAboutData( "test", "Test",
"0.1", description, KAboutData.License_GPL,
"(C) 2002 Gert-Jan van der Heiden");
KCmdLineArgs.init( argv, aboutData );
KCmdLineArgs.addCmdLineOptions(options);
TDECmdLineArgs.init( argv, aboutData );
TDECmdLineArgs.addCmdLineOptions(options);
System.out.println("1");
TDEApplication app = new TDEApplication();
System.out.println("2");

@ -21,7 +21,7 @@ public class Main {
public static void main(String[] cmdLineArgs) {
KCmdLineArgs.init(cmdLineArgs, "ksimplebrowser", "KSimpleBrowser",
TDECmdLineArgs.init(cmdLineArgs, "ksimplebrowser", "KSimpleBrowser",
"A KDE 3 Development Example - KSimpleBrowser", "0.1");
TDEApplication app = new TDEApplication();
KSimpleBrowser kbrowser = new KSimpleBrowser("KSimpleBrowser");

@ -206,7 +206,7 @@ else
parts = RbPartsMW.new(nil, "rbParts")
if ARGV.length > 1
# read kcmdlineargs.h for the full unabridged instructions
# on using KCmdLineArgs, it's pretty confusing at first, but it works
# on using TDECmdLineArgs, it's pretty confusing at first, but it works
# This is pretty useless in this program - you might want to
# expand this in your app (to load a file, etc)
args = KDE::CmdLineArgs.parsedArgs()

@ -98,7 +98,7 @@
<xsl:choose>
<xsl:when test="$kde">
<class>TDEApplication</class>
<class>KCmdLineArgs</class>
<class>TDECmdLineArgs</class>
</xsl:when>
<xsl:otherwise>
<class>TQApplication</class>

@ -2933,7 +2933,7 @@
</class>
<class>
<package>org.kde.koala</package>
<name>KCmdLineArgs</name>
<name>TDECmdLineArgs</name>
</class>
<class>
<package>org.kde.koala</package>

@ -51,7 +51,7 @@
public static void main(String [] args) {
<xsl:choose>
<xsl:when test="$kde">
KCmdLineArgs.init( args , "<xsl:value-of select="$mainClass"/>", "<xsl:value-of select="$mainClass"/>", "<xsl:value-of select="java:toJavaString(/UI/widget/property[@name='caption']/string)"/>", "version");
TDECmdLineArgs.init( args , "<xsl:value-of select="$mainClass"/>", "<xsl:value-of select="$mainClass"/>", "<xsl:value-of select="java:toJavaString(/UI/widget/property[@name='caption']/string)"/>", "version");
TDEApplication app = new TDEApplication();
</xsl:when>
<xsl:otherwise>

@ -1395,7 +1395,7 @@
here is Hello World:
about = KDE::KAboutData.new("one", "two", "three")
KDE::KCmdLineArgs.init(1, ["four"], about)
KDE::TDECmdLineArgs.init(1, ["four"], about)
a = KDE::TDEApplication.new()
hello = KDE::KPushButton.new(nil) { setText "Hello World" }
a.setMainWidget(hello)

Loading…
Cancel
Save