kexi

kexicmdlineargs.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2002, 2003 Lucijan Busch <lucijan@gmx.at>
00003    Copyright (C) 2002, 2003 Joseph Wenninger <jowenn@kde.org>
00004    Copyright (C) 2003-2006 Jaroslaw Staniek <js@iidea.pl>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #include <kcmdlineargs.h>
00023 #include <klocale.h>
00024 
00025 static KCmdLineOptions options[] =
00026 {
00027   { ":", I18N_NOOP("Options related to entire projects:"), 0 },
00028   { "createdb", I18N_NOOP(
00029     "Create a new, blank project using specified\n"
00030     "database driver and database name\n"
00031     "and exit immediately.\n"
00032     "You will be asked for confirmation\n"
00033     "if overwriting is needed."), 0 },
00034   { "create-opendb", I18N_NOOP(
00035     "Like --createdb, but also open newly\n"
00036     "created database.\n"), 0 },
00037   { "dropdb", I18N_NOOP(
00038     "Drop (remove) a project using specified\n"
00039     "database driver and database name.\n"
00040     "You will be asked for confirmation."), 0 },
00041   { "drv", 0, 0 },
00042   { "dbdriver <name>", I18N_NOOP(
00043     "Database driver to be used\n"
00044     "for connecting to a database project\n"
00045     "(SQLite by default).\n"
00046     "Ignored if a shortcut filename\n"
00047     "is provided."), 0 },
00048   { "t", 0, 0 },
00049   { "type <name>", I18N_NOOP(
00050     "Specify the type of file provided as an argument.\n"
00051     "This option is only useful if the filename does\n"
00052     "not have a valid extension set and its type\n"
00053     "cannot be determined unambiguously by examining\n"
00054     "its contents.\n"
00055     "This option is ignored if no file is specified as\n"
00056     "an argument.\n"
00057     "Available file types are:\n"
00058     "- \"project\" for a project file (the default)\n"
00059     "- \"shortcut\" for a shortcut file pointing to a\n"
00060     "  project.\n"
00061     "- \"connection\" for database connection data.\n"
00062     ), 0 },
00063   { "conn", 0, 0 },
00064   { "connection <shortcut_filename>", I18N_NOOP(
00065     "\nSpecify a database connection shortcut .kexic\n"
00066     "file containing connection data.\n"
00067     "Can be used with --createdb or --create-opendb\n"
00068     "for convenience instead of using options like \n"
00069     "--user, --host or --port.\n"
00070     "Note: Options like --user, --host have\n"
00071     "precedence over settings defined in the shortcut\n"
00072     "file." ), 0 },
00073 
00074   { ":", I18N_NOOP("Options related to opening objects within a project:"), 0 },
00075   { "open [<object_type>:]<object_name>", I18N_NOOP(
00076     "\nOpen object of type <object_type>\n"
00077     "and name <object_name> from specified project\n"
00078     "on application start.\n"
00079     "<object_type>: is optional, if omitted - table\n"
00080     "type is assumed.\n"
00081     "Other object types can be query, report, form,\n"
00082     "script (may be more or less, depending on your\n"
00083     "plugins installed).\n"
00084     "Use \"\" chars to specify names containing spaces.\n"
00085     "Examples: --open MyTable,\n"
00086     " --open query:\"My very big query\""), 0 },
00087   { "design [<object_type>:]<object_name>", I18N_NOOP(
00088     "\nLike --open, but the object will\n"
00089     "be opened in Design Mode, if one is available."), 0 },
00090   { "edittext [<object_type>:]<object_name>", I18N_NOOP(
00091     "\nLike --open, but the object will\n"
00092     "be opened in Text Mode, if one is available."), 0 },
00093   { "new <object_type>", I18N_NOOP(
00094     "Start new object design of type <object_type>."), 0 },
00095   { "print [<object_type>:]<object_name>", I18N_NOOP(
00096     "\nOpen the Print dialog window for an object of type\n"
00097     "<object_type> and name <object_name> in the specified\n"
00098     "project when the application starts, for quick printing\n"
00099     "of the object's data.\n"
00100     "<object_type>: is optional; if omitted, table\n"
00101     "type is assumed. Object type can also be query."), 0 },
00102   { "print-preview [<object_type>:]<object_name>", I18N_NOOP(
00103     "\nOpen Print Preview window for object\n"
00104     "of type <object_type> and name <object_name>\n"
00105     "from specified project on application start.\n"
00106     "See --print for more details."), 0 },
00107 #ifdef KEXI_SHOW_UNIMPLEMENTED
00108   { "final-mode", I18N_NOOP(
00109     "Start project in Final Mode, regardless \n"
00110     "of the project settings".), 0 },
00111   { "design-mode", I18N_NOOP(
00112     "Start project in Design Mode, regardless \n"
00113     "of the project settings."), 0 },
00114 #endif
00115 
00116 #ifdef KEXI_SERVER_SUPPORT
00117   { ":", I18N_NOOP("Options related to database servers:"), 0 },
00118   { "u", 0, 0 },
00119   { "user <name>", I18N_NOOP(
00120     "User name to be used\n"
00121     "for connecting to a database project.\n"
00122     "Ignored if a shortcut filename\n"
00123     "is provided."), 0 },
00124 /*  { "password <password>", I18N_NOOP(
00125     "User password to be used\n"
00126     "for connecting to a database project.\n"
00127     "Ignored if a shortcut filename\n"
00128     "is provided."), 0 },*/
00129   { "h", 0, 0 },
00130   { "host <name>", I18N_NOOP(
00131     "Server (host) name to be used\n"
00132     "for connecting to a database project.\n"
00133     "Ignored if a shortcut filename\n"
00134     "is provided."), 0 },
00135   { "port <number>", I18N_NOOP(
00136     "Server's port number to be used\n"
00137     "for connecting to a database project.\n"
00138     "Ignored if a shortcut filename\n"
00139     "is provided."), 0 },
00140   { "local-socket <filename>", I18N_NOOP(
00141     "Server's local socket filename\n"
00142     "to be used for connecting to a database\n"
00143     "project. Ignored if a shortcut filename\n"
00144     "is provided."), 0 },
00145   { "skip-dialog", I18N_NOOP(
00146     "Skip displaying connection dialog window\n"
00147     "and connect directly. Available when\n"
00148     "opening .kexic or .kexis shortcut files."), 0 },
00149 #endif //KEXI_SERVER_SUPPORT
00150 
00151   { "+[project-name]", I18N_NOOP(
00152     "Kexi database project filename,\n"
00153     "Kexi shortcut filename,\n"
00154     "or name of a Kexi database\n"
00155     "project on a server to open."), 0 },
00156   // INSERT YOUR COMMANDLINE OPTIONS HERE
00157   KCmdLineLastOption
00158 };
KDE Home | KDE Accessibility Home | Description of Access Keys