aboutsummaryrefslogtreecommitdiff
path: root/symedit.cpp
diff options
context:
space:
mode:
authorMikko Syrjä <mikko@3d-system.fi>2019-03-06 22:37:58 +0200
committerMikko Syrjä <mikko@3d-system.fi>2019-03-06 22:37:58 +0200
commit152ca5fa1b949b822a6548181ba3ecf769926522 (patch)
tree7dc46b49e06186b89e6e14f558c32db479c97489 /symedit.cpp
parent9a29b59c86d1a511b3ab34dc2bfee393f9e4fdf9 (diff)
downloadsymedit-152ca5fa1b949b822a6548181ba3ecf769926522.tar.gz
symedit-152ca5fa1b949b822a6548181ba3ecf769926522.zip
Added command line argument support.
Diffstat (limited to 'symedit.cpp')
-rw-r--r--symedit.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/symedit.cpp b/symedit.cpp
index 72bd776..7e636f4 100644
--- a/symedit.cpp
+++ b/symedit.cpp
@@ -80,8 +80,15 @@ SymEditManager::SymEditManager(QObject* parent) : QObject(parent)
QGuiApplication::installTranslator(&BackupTranslator);
if ( LocaleTranslator.load(locale, ":/locale/symedit.") )
QGuiApplication::installTranslator(&LocaleTranslator);
+}
- Symbol.Load("U00,00;R50;U-35,-35;D35,35;U-35,35;D35,-35;"); //##
+//! Constructor.
+/*!
+ \param symbol Symbol string from command line.
+*/
+SymEditManager::SymEditManager(const QString& symbol) : SymEditManager(nullptr)
+{
+ Symbol.Load(symbol);
}
//! Set window initialized.