Add dialog to create terminal strip + display existing terminal strip

This commit is contained in:
joshua
2021-04-03 15:48:07 +02:00
parent 0a2ec297bf
commit 91db58bb64
11 changed files with 482 additions and 16 deletions

View File

@@ -31,6 +31,7 @@
#include "titleblocktemplate.h"
#include "ui/dialogwaiting.h"
#include "ui/importelementdialog.h"
#include "TerminalStrip/terminalstrip.h"
#include <QHash>
#include <QStandardPaths>
@@ -1816,6 +1817,34 @@ void QETProject::setProjectProperties(const DiagramContext &context) {
updateDiagramsFolioData();
}
/**
* @brief QETProject::terminalStrip
* @return a QVector who contain all terminal strip owned by this project
*/
QVector<TerminalStrip *> QETProject::terminalStrip() const {
return m_terminal_strip_vector;
}
/**
* @brief QETProject::newTerminalStrip
* @param installation : installation of the terminal strip
* @param location : location of the terminal strip
* @param name : name of the terminal strip
* @return Create a new terminal strip with this project as parent.
* You can retrieve this terminal strip at any time by calling the function
* QETProject::terminalStrip()
*/
TerminalStrip *QETProject::newTerminalStrip(QString installation, QString location, QString name)
{
auto ts = new TerminalStrip(installation,
location,
name,
this);
m_terminal_strip_vector.append(ts);
return ts;
}
/**
Cette methode sert a reperer un projet vide, c-a-d un projet identique a ce
que l'on obtient en faisant Fichier > Nouveau.