umbrello: umbrello/main.cpp File Reference

umbrello 25.04.0 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

Macros | Functions
main.cpp File Reference
`#include "debug_utils.h"`
`#include "uml.h"`
`#include "version.h"`
`#include "umldoc.h"`
`#include "cmdlineexportallviewsevent.h"`
`#include "umlviewimageexportermodel.h"`
`#include "umbrellosettings.h"`
`#include <KAboutData>`
`#include <QApplication>`
`#include <QCommandLineParser>`
`#include <KConfig>`
`#include <KLocalizedString>`
`#include <kcrash.h>`
`#include <QUrl>`
`#include <stdio.h>`

## Macros
#define | DBG_SRC QStringLiteral("main")

## Functions
void | getFiles (QStringList &files, const QString &path, QStringList &filters)
| getFiles
bool | showGUI (const QCommandLineParser *args)
static QUrl | makeURL (const QString &input)
void | initDocument (const QStringList &args, Uml::ProgrammingLanguage::Enum progLang)
void | exportAllViews (const QString &extension, QUrl directory, bool useFolders)
int | main (int argc, char *argv[])

## Macro Definition Documentation

## ◆ DBG_SRC

#define DBG_SRC QStringLiteral("main")

## Function Documentation

## ◆ exportAllViews()

void exportAllViews | ( | const QString & | extension,
|  | QUrl | directory,
|  | bool | useFolders )

Export all the views in the document using the command line args set by the user. Errors that occurred while exporting, if any, are shown using uError().

Parameters

  args | The command line arguments given.
  exportOpt | A list containing all the "export" arguments given.

## ◆ getFiles()

void getFiles | ( | QStringList & | files,
|  | const QString & | path,
|  | QStringList & | filters )

getFiles

Parameters

  files |
  path |
  filters |

## ◆ initDocument()

void initDocument | ( | const QStringList & | args,
|  | Uml::ProgrammingLanguage::Enum | progLang )

Initializes the document used by the application. If a file was specified in command line arguments, opens that file. Else, it opens the last opened file, or a new file if there isn't any "last file used" in the configuration.

Parameters

  args | The command line arguments given.
  progLang | The programming language to set if no existing file was opened.

## ◆ main()

int main | ( | int | argc,
|  | char * | argv[] )

## ◆ makeURL()

static QUrl makeURL | ( | const QString & | input | ) |
| static

Creates a QUrl from a string.

Returns
  QUrl::fromLocalFile(input) if input does not contain a URI prefix.

## ◆ showGUI()

bool showGUI | ( | const QCommandLineParser * | args | ) |

Determines if the application GUI should be shown based on command line arguments.

Todo
  Add options to use the documentation generators from command line.

Parameters

  args | The command line arguments given.

Returns
  True if the GUI should be shown, false otherwise.