|
|
@ -51,7 +51,7 @@ static KCmdLineOptions options[] =
|
|
|
|
* @param args The command line arguments given.
|
|
|
|
* @param args The command line arguments given.
|
|
|
|
* @return True if the GUI should be shown, false otherwise.
|
|
|
|
* @return True if the GUI should be shown, false otherwise.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
bool getShowGUI(KCmdLineArgs *args);
|
|
|
|
bool getShowGUI(TDECmdLineArgs *args);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Creates, shows and returns the startup logo for the application if it should be shown,
|
|
|
|
* Creates, shows and returns the startup logo for the application if it should be shown,
|
|
|
@ -73,7 +73,7 @@ KStartupLogo* showStartupLogo(KConfig* cfg, bool showGUI);
|
|
|
|
* @param args The command line arguments given.
|
|
|
|
* @param args The command line arguments given.
|
|
|
|
* @param cfg The application configuration.
|
|
|
|
* @param cfg The application configuration.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void initDocument(KCmdLineArgs *args, KConfig* cfg);
|
|
|
|
void initDocument(TDECmdLineArgs *args, KConfig* cfg);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Export all the views in the document using the command line args set by the user.
|
|
|
|
* Export all the views in the document using the command line args set by the user.
|
|
|
@ -82,7 +82,7 @@ void initDocument(KCmdLineArgs *args, KConfig* cfg);
|
|
|
|
* @param args The command line arguments given.
|
|
|
|
* @param args The command line arguments given.
|
|
|
|
* @param exportOpt A list containing all the "export" arguments given.
|
|
|
|
* @param exportOpt A list containing all the "export" arguments given.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void exportAllViews(KCmdLineArgs *args, const QCStringList &exportOpt);
|
|
|
|
void exportAllViews(TDECmdLineArgs *args, const QCStringList &exportOpt);
|
|
|
|
|
|
|
|
|
|
|
|
extern "C" int flushEvents() {
|
|
|
|
extern "C" int flushEvents() {
|
|
|
|
kapp->processEvents();
|
|
|
|
kapp->processEvents();
|
|
|
@ -96,14 +96,14 @@ int main(int argc, char *argv[]) {
|
|
|
|
"http://uml.sf.net/");
|
|
|
|
"http://uml.sf.net/");
|
|
|
|
aboutData.addAuthor("Paul Hensgen",0, "phensgen@users.sourceforge.net");
|
|
|
|
aboutData.addAuthor("Paul Hensgen",0, "phensgen@users.sourceforge.net");
|
|
|
|
aboutData.addAuthor(I18N_NOOP("Umbrello UML Modeller Authors"), 0, "uml-devel@lists.sourceforge.net");
|
|
|
|
aboutData.addAuthor(I18N_NOOP("Umbrello UML Modeller Authors"), 0, "uml-devel@lists.sourceforge.net");
|
|
|
|
KCmdLineArgs::init( argc, argv, &aboutData );
|
|
|
|
TDECmdLineArgs::init( argc, argv, &aboutData );
|
|
|
|
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
|
|
|
|
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
|
|
|
|
|
|
|
|
|
|
|
|
KApplication app;
|
|
|
|
KApplication app;
|
|
|
|
if( app.isRestored() ) {
|
|
|
|
if( app.isRestored() ) {
|
|
|
|
RESTORE( UMLApp );
|
|
|
|
RESTORE( UMLApp );
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
|
|
|
|
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
|
|
|
|
bool showGUI = getShowGUI(args);
|
|
|
|
bool showGUI = getShowGUI(args);
|
|
|
|
|
|
|
|
|
|
|
|
UMLApp *uml = new UMLApp();
|
|
|
|
UMLApp *uml = new UMLApp();
|
|
|
@ -137,7 +137,7 @@ int main(int argc, char *argv[]) {
|
|
|
|
return app.exec();
|
|
|
|
return app.exec();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool getShowGUI(KCmdLineArgs *args) {
|
|
|
|
bool getShowGUI(TDECmdLineArgs *args) {
|
|
|
|
if (args->getOptionList("export").size() > 0) {
|
|
|
|
if (args->getOptionList("export").size() > 0) {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -167,7 +167,7 @@ KStartupLogo* showStartupLogo(KConfig* cfg, bool showGUI) {
|
|
|
|
return startLogo;
|
|
|
|
return startLogo;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void initDocument(KCmdLineArgs *args, KConfig* cfg) {
|
|
|
|
void initDocument(TDECmdLineArgs *args, KConfig* cfg) {
|
|
|
|
if ( args -> count() ) {
|
|
|
|
if ( args -> count() ) {
|
|
|
|
UMLApp::app()->openDocumentFile( args->url( 0 ) );
|
|
|
|
UMLApp::app()->openDocumentFile( args->url( 0 ) );
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -182,7 +182,7 @@ void initDocument(KCmdLineArgs *args, KConfig* cfg) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void exportAllViews(KCmdLineArgs *args, const QCStringList &exportOpt) {
|
|
|
|
void exportAllViews(TDECmdLineArgs *args, const QCStringList &exportOpt) {
|
|
|
|
TQString extension(exportOpt.last());
|
|
|
|
TQString extension(exportOpt.last());
|
|
|
|
kDebug() << "extension: " << extension << endl;
|
|
|
|
kDebug() << "extension: " << extension << endl;
|
|
|
|
|
|
|
|
|
|
|
@ -191,7 +191,7 @@ void exportAllViews(KCmdLineArgs *args, const QCStringList &exportOpt) {
|
|
|
|
KURL directory;
|
|
|
|
KURL directory;
|
|
|
|
QCStringList directoryOpt = args->getOptionList("directory");
|
|
|
|
QCStringList directoryOpt = args->getOptionList("directory");
|
|
|
|
if (directoryOpt.size() > 0) {
|
|
|
|
if (directoryOpt.size() > 0) {
|
|
|
|
directory = KCmdLineArgs::makeURL(directoryOpt.last());
|
|
|
|
directory = TDECmdLineArgs::makeURL(directoryOpt.last());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
directory = KURL(UMLApp::app()->getDocument()->URL().directory());
|
|
|
|
directory = KURL(UMLApp::app()->getDocument()->URL().directory());
|
|
|
|
}
|
|
|
|
}
|
|
|
|