|
|
|
@ -51,7 +51,7 @@ static KCmdLineOptions options[] =
|
|
|
|
|
* @param args The command line arguments given.
|
|
|
|
|
* @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,
|
|
|
|
@ -73,7 +73,7 @@ KStartupLogo* showStartupLogo(KConfig* cfg, bool showGUI);
|
|
|
|
|
* @param args The command line arguments given.
|
|
|
|
|
* @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.
|
|
|
|
@ -82,7 +82,7 @@ void initDocument(KCmdLineArgs *args, KConfig* cfg);
|
|
|
|
|
* @param args The command line 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() {
|
|
|
|
|
kapp->processEvents();
|
|
|
|
@ -96,14 +96,14 @@ int main(int argc, char *argv[]) {
|
|
|
|
|
"http://uml.sf.net/");
|
|
|
|
|
aboutData.addAuthor("Paul Hensgen",0, "phensgen@users.sourceforge.net");
|
|
|
|
|
aboutData.addAuthor(I18N_NOOP("Umbrello UML Modeller Authors"), 0, "uml-devel@lists.sourceforge.net");
|
|
|
|
|
KCmdLineArgs::init( argc, argv, &aboutData );
|
|
|
|
|
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
|
|
|
|
|
TDECmdLineArgs::init( argc, argv, &aboutData );
|
|
|
|
|
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
|
|
|
|
|
|
|
|
|
|
KApplication app;
|
|
|
|
|
if( app.isRestored() ) {
|
|
|
|
|
RESTORE( UMLApp );
|
|
|
|
|
} else {
|
|
|
|
|
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
|
|
|
|
|
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
|
|
|
|
|
bool showGUI = getShowGUI(args);
|
|
|
|
|
|
|
|
|
|
UMLApp *uml = new UMLApp();
|
|
|
|
@ -137,7 +137,7 @@ int main(int argc, char *argv[]) {
|
|
|
|
|
return app.exec();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool getShowGUI(KCmdLineArgs *args) {
|
|
|
|
|
bool getShowGUI(TDECmdLineArgs *args) {
|
|
|
|
|
if (args->getOptionList("export").size() > 0) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
@ -167,7 +167,7 @@ KStartupLogo* showStartupLogo(KConfig* cfg, bool showGUI) {
|
|
|
|
|
return startLogo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void initDocument(KCmdLineArgs *args, KConfig* cfg) {
|
|
|
|
|
void initDocument(TDECmdLineArgs *args, KConfig* cfg) {
|
|
|
|
|
if ( args -> count() ) {
|
|
|
|
|
UMLApp::app()->openDocumentFile( args->url( 0 ) );
|
|
|
|
|
} 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());
|
|
|
|
|
kDebug() << "extension: " << extension << endl;
|
|
|
|
|
|
|
|
|
@ -191,7 +191,7 @@ void exportAllViews(KCmdLineArgs *args, const QCStringList &exportOpt) {
|
|
|
|
|
KURL directory;
|
|
|
|
|
QCStringList directoryOpt = args->getOptionList("directory");
|
|
|
|
|
if (directoryOpt.size() > 0) {
|
|
|
|
|
directory = KCmdLineArgs::makeURL(directoryOpt.last());
|
|
|
|
|
directory = TDECmdLineArgs::makeURL(directoryOpt.last());
|
|
|
|
|
} else {
|
|
|
|
|
directory = KURL(UMLApp::app()->getDocument()->URL().directory());
|
|
|
|
|
}
|
|
|
|
|