From 636f509299122d02087c6fd62e1e4a46dbd22026 Mon Sep 17 00:00:00 2001 From: Darrell Anderson Date: Wed, 8 Jan 2014 20:06:00 +0100 Subject: Rename many classes to avoid conflicts with KDE --- kdejava/koala/test/khelpers/KHelpers.java | 103 ------------------------------ kdejava/koala/test/khelpers/Main.java | 52 --------------- 2 files changed, 155 deletions(-) delete mode 100644 kdejava/koala/test/khelpers/KHelpers.java delete mode 100644 kdejava/koala/test/khelpers/Main.java (limited to 'kdejava/koala/test/khelpers') diff --git a/kdejava/koala/test/khelpers/KHelpers.java b/kdejava/koala/test/khelpers/KHelpers.java deleted file mode 100644 index 47803457..00000000 --- a/kdejava/koala/test/khelpers/KHelpers.java +++ /dev/null @@ -1,103 +0,0 @@ -import org.kde.qt.*; -import org.kde.koala.*; - -/** - * Class KHelpers is the main application window. - * - * Taken from KDE 2.0 Development book - * - * ToolTips, What's This?, and More - * - * - * - * @see TDEMainWindow - * @see TDEApplication - * - * @author java translation Kenneth J. Pouncey, kjpou@hotmail.com - * @version 0.1 - */ - -public class KHelpers extends TDEMainWindow { - - // File menu item id's - protected int idfilenew; - protected int idfileopen; - protected int idfilesave; - protected int idfilequit; - - // reference to the application - TDEApplication kapp; - - // time to display the message in the status bar - int HelpMessageTime = 200; - - public KHelpers () { - - // get a reference to the application - kapp = TDEApplication.kApplication(); - - TQPopupMenu file = new TQPopupMenu(this); - - idfilenew = file.insertItem("&New"); - idfileopen = file.insertItem("&Open..."); - idfilesave = file.insertItem("&Save"); - idfilequit = file.insertItem("&Quit", kapp, SLOT("closeAllWindows()")); - - connect ( file, SIGNAL( "highlighted(int)"), this, SLOT( "slotMenuEntryHelp (int)")); - - menuBar().insertItem("&File",file); - - TQPopupMenu help = helpMenu("KHelpers\n" + - "Copyright (C) 2000 By Joe Developer\n\n" + - "KHelpers demonstates a few of the ways " + - "that your application can provide help to a user"); - - help.insertSeparator(); - help.insertItem("Help on a special topic", this, SLOT("slotSpecialHelp()")); - - menuBar().insertItem("&Help",help); - - // Create the statusbar - statusBar(); - - TQLabel clientarea = new TQLabel(this); - clientarea.setBackgroundColor(Qt.white()); - - TQToolTip.add(clientarea, "Functionless client area"); - TQWhatsThis.add(clientarea,"This client area doesn't do anything."); - - setCentralWidget(clientarea); - - clientarea.setFocus(); - } - - public void slotMenuEntryHelp (int id) { - - if (id == idfilenew) { - statusBar().message("Create a new document.",HelpMessageTime); - } - else if (id == idfileopen) { - - statusBar().message("Open a file.",HelpMessageTime); - - } - else if (id == idfilesave) { - - statusBar().message("Save the current document.",HelpMessageTime); - - } - else if (id == idfilequit) { - - statusBar().message("Quit the application.",HelpMessageTime); - - } - } - - public void slotSpecialHelp() { - - String helpfilename = kapp.name(); - helpfilename += "/specialhelp.html"; - kapp.invokeHelp(helpfilename,""); - } - -} diff --git a/kdejava/koala/test/khelpers/Main.java b/kdejava/koala/test/khelpers/Main.java deleted file mode 100644 index ee04d747..00000000 --- a/kdejava/koala/test/khelpers/Main.java +++ /dev/null @@ -1,52 +0,0 @@ -import org.kde.qt.*; -import org.kde.koala.*; - -/** - * Main class. - * - * Taken from KDE 2.0 Development book - * - * Helping the User Use Your Application - * - * ToolTips, What's This?, and More - * - * @see TDEApplication - * @see TDECmdLineArgs - * - * @author java translation Kenneth J. Pouncey, kjpou@hotmail.com - * @version 0.1 - */ - -public class Main { - - static String description = "KDE 2 Development example"; - - - static String[][] options = { }; - - -static String VERSION = "0.1"; - - public static void main(String[] cmdLineArgs) { - - TDEAboutData aboutData = new TDEAboutData( "KHelpers", "KHelpers", - VERSION, description, TDEAboutData.License_GPL, - "KDE 2 Development"); - TDECmdLineArgs.init( cmdLineArgs, aboutData ); - TDECmdLineArgs.addCmdLineOptions( options ); // Add our own options. - - TDEApplication app = new TDEApplication(); - KHelpers khelpers = new KHelpers(); - - khelpers.show(); - - app.exec(); - return; - } - - static { - qtjava.initialize(); - kdejava.initialize(); - } - -} -- cgit v1.2.1