mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Merge pull request #272 from plc-user/master
added "company-collection" as second user-collection
This commit is contained in:
BIN
ico/16x16/go-company.png
Normal file
BIN
ico/16x16/go-company.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 695 B |
BIN
ico/22x22/go-company.png
Normal file
BIN
ico/22x22/go-company.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 568 B |
BIN
lang/qet_de.qm
BIN
lang/qet_de.qm
Binary file not shown.
423
lang/qet_de.ts
423
lang/qet_de.ts
File diff suppressed because it is too large
Load Diff
@@ -51,6 +51,7 @@
|
|||||||
<file>ico/16x16/endline-triangle.png</file>
|
<file>ico/16x16/endline-triangle.png</file>
|
||||||
<file>ico/16x16/folder-new.png</file>
|
<file>ico/16x16/folder-new.png</file>
|
||||||
<file>ico/16x16/folder.png</file>
|
<file>ico/16x16/folder.png</file>
|
||||||
|
<file>ico/16x16/go-company.png</file>
|
||||||
<file>ico/16x16/go-down.png</file>
|
<file>ico/16x16/go-down.png</file>
|
||||||
<file>ico/16x16/go-home.png</file>
|
<file>ico/16x16/go-home.png</file>
|
||||||
<file>ico/16x16/go-up.png</file>
|
<file>ico/16x16/go-up.png</file>
|
||||||
@@ -131,6 +132,7 @@
|
|||||||
<file>ico/22x22/folder-delete.png</file>
|
<file>ico/22x22/folder-delete.png</file>
|
||||||
<file>ico/22x22/folder-edit.png</file>
|
<file>ico/22x22/folder-edit.png</file>
|
||||||
<file>ico/22x22/folder-new.png</file>
|
<file>ico/22x22/folder-new.png</file>
|
||||||
|
<file>ico/22x22/go-company.png</file>
|
||||||
<file>ico/22x22/go-down.png</file>
|
<file>ico/22x22/go-down.png</file>
|
||||||
<file>ico/22x22/go-home.png</file>
|
<file>ico/22x22/go-home.png</file>
|
||||||
<file>ico/22x22/go-up.png</file>
|
<file>ico/22x22/go-up.png</file>
|
||||||
|
|||||||
@@ -258,6 +258,7 @@ bool ElementsCollectionModel::dropMimeData(const QMimeData *data,
|
|||||||
@param projects : list of projects to load
|
@param projects : list of projects to load
|
||||||
*/
|
*/
|
||||||
void ElementsCollectionModel::loadCollections(bool common_collection,
|
void ElementsCollectionModel::loadCollections(bool common_collection,
|
||||||
|
bool company_collection,
|
||||||
bool custom_collection,
|
bool custom_collection,
|
||||||
QList<QETProject *> projects)
|
QList<QETProject *> projects)
|
||||||
{
|
{
|
||||||
@@ -265,10 +266,12 @@ void ElementsCollectionModel::loadCollections(bool common_collection,
|
|||||||
|
|
||||||
if (common_collection)
|
if (common_collection)
|
||||||
addCommonCollection(false);
|
addCommonCollection(false);
|
||||||
|
if (company_collection)
|
||||||
|
addCompanyCollection(false);
|
||||||
if (custom_collection)
|
if (custom_collection)
|
||||||
addCustomCollection(false);
|
addCustomCollection(false);
|
||||||
|
|
||||||
if (common_collection || custom_collection)
|
if (common_collection || company_collection || custom_collection)
|
||||||
m_items_list_to_setUp.append(items());
|
m_items_list_to_setUp.append(items());
|
||||||
|
|
||||||
|
|
||||||
@@ -321,22 +324,41 @@ void ElementsCollectionModel::addCommonCollection(bool set_data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief ElementsCollectionModel::addCustomCollection
|
@brief ElementsCollectionModel::addCompanyCollection
|
||||||
Add the custom elements collection to this model
|
Add the company elements collection to this model
|
||||||
@param set_data
|
@param set_data
|
||||||
|
*/
|
||||||
|
void ElementsCollectionModel::addCompanyCollection(bool set_data)
|
||||||
|
{
|
||||||
|
FileElementCollectionItem *feci = new FileElementCollectionItem();
|
||||||
|
if (feci->setRootPath(QETApp::companyElementsDirN(),
|
||||||
|
set_data,
|
||||||
|
m_hide_element)) {
|
||||||
|
invisibleRootItem()->appendRow(feci);
|
||||||
|
if (set_data)
|
||||||
|
feci->setUpData();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
delete feci;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief ElementsCollectionModel::addCustomCollection
|
||||||
|
Add the custom elements collection to this model
|
||||||
|
@param set_data
|
||||||
*/
|
*/
|
||||||
void ElementsCollectionModel::addCustomCollection(bool set_data)
|
void ElementsCollectionModel::addCustomCollection(bool set_data)
|
||||||
{
|
{
|
||||||
FileElementCollectionItem *feci = new FileElementCollectionItem();
|
FileElementCollectionItem *feci = new FileElementCollectionItem();
|
||||||
if (feci->setRootPath(QETApp::customElementsDirN(),
|
if (feci->setRootPath(QETApp::customElementsDirN(),
|
||||||
set_data,
|
set_data,
|
||||||
m_hide_element)) {
|
m_hide_element)) {
|
||||||
invisibleRootItem()->appendRow(feci);
|
invisibleRootItem()->appendRow(feci);
|
||||||
if (set_data)
|
if (set_data)
|
||||||
feci->setUpData();
|
feci->setUpData();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
delete feci;
|
delete feci;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -557,8 +579,9 @@ QModelIndex ElementsCollectionModel::indexFromLocation(
|
|||||||
{
|
{
|
||||||
QList <ElementCollectionItem *> child_list;
|
QList <ElementCollectionItem *> child_list;
|
||||||
|
|
||||||
for (int i=0 ; i<rowCount() ; i++)
|
for (int i=0 ; i<rowCount() ; i++){
|
||||||
child_list.append(static_cast<ElementCollectionItem *>(item(i)));
|
child_list.append(static_cast<ElementCollectionItem *>(item(i)));
|
||||||
|
}
|
||||||
|
|
||||||
foreach(ElementCollectionItem *eci, child_list) {
|
foreach(ElementCollectionItem *eci, child_list) {
|
||||||
|
|
||||||
@@ -567,7 +590,8 @@ QModelIndex ElementsCollectionModel::indexFromLocation(
|
|||||||
if (eci->type() == FileElementCollectionItem::Type) {
|
if (eci->type() == FileElementCollectionItem::Type) {
|
||||||
if (FileElementCollectionItem *feci = static_cast<FileElementCollectionItem *>(eci)) {
|
if (FileElementCollectionItem *feci = static_cast<FileElementCollectionItem *>(eci)) {
|
||||||
if ( (location.isCommonCollection() && feci->isCommonCollection()) ||
|
if ( (location.isCommonCollection() && feci->isCommonCollection()) ||
|
||||||
(location.isCustomCollection() && !feci->isCommonCollection()) ) {
|
(location.isCompanyCollection() && feci->isCompanyCollection()) ||
|
||||||
|
(location.isCustomCollection() && !feci->isCommonCollection()) ) {
|
||||||
match_eci = feci->itemAtPath(location.collectionPath(false));
|
match_eci = feci->itemAtPath(location.collectionPath(false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,10 +42,11 @@ class ElementsCollectionModel : public QStandardItemModel
|
|||||||
bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const override;
|
bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const override;
|
||||||
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
|
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
|
||||||
|
|
||||||
void loadCollections(bool common_collection, bool custom_collection, QList<QETProject *> projects);
|
void loadCollections(bool common_collection, bool company_collection, bool custom_collection, QList<QETProject *> projects);
|
||||||
|
|
||||||
void addCommonCollection(bool set_data = true);
|
void addCommonCollection(bool set_data = true);
|
||||||
void addCustomCollection(bool set_data = true);
|
void addCompanyCollection(bool set_data = true);
|
||||||
|
void addCustomCollection(bool set_data = true);
|
||||||
void addLocation(const ElementsLocation& location);
|
void addLocation(const ElementsLocation& location);
|
||||||
|
|
||||||
void addProject(QETProject *project, bool set_data = true);
|
void addProject(QETProject *project, bool set_data = true);
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ void ElementsCollectionWidget::addProject(QETProject *project)
|
|||||||
m_progress_bar->show();
|
m_progress_bar->show();
|
||||||
m_tree_view->setDisabled(true);
|
m_tree_view->setDisabled(true);
|
||||||
QList <QETProject *> prj; prj.append(project);
|
QList <QETProject *> prj; prj.append(project);
|
||||||
m_model->loadCollections(false,false, prj);
|
m_model->loadCollections(false, false, false, prj);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_waiting_project.append(project);
|
m_waiting_project.append(project);
|
||||||
@@ -387,7 +387,8 @@ void ElementsCollectionWidget::deleteElement()
|
|||||||
if (! (loc.isElement()
|
if (! (loc.isElement()
|
||||||
&& loc.exist()
|
&& loc.exist()
|
||||||
&& loc.isFileSystem()
|
&& loc.isFileSystem()
|
||||||
&& loc.collectionPath().startsWith("custom://")) ) return;
|
&& (loc.collectionPath().startsWith("company://")
|
||||||
|
|| loc.collectionPath().startsWith("custom://"))) ) return;
|
||||||
|
|
||||||
if (QET::QetMessageBox::question(
|
if (QET::QetMessageBox::question(
|
||||||
this,
|
this,
|
||||||
@@ -430,7 +431,8 @@ void ElementsCollectionWidget::deleteDirectory()
|
|||||||
if (! (loc.isDirectory()
|
if (! (loc.isDirectory()
|
||||||
&& loc.exist()
|
&& loc.exist()
|
||||||
&& loc.isFileSystem()
|
&& loc.isFileSystem()
|
||||||
&& loc.collectionPath().startsWith("custom://")) ) return;
|
&& (loc.collectionPath().startsWith("company://")
|
||||||
|
|| loc.collectionPath().startsWith("custom://"))) ) return;
|
||||||
|
|
||||||
if (QET::QetMessageBox::question(
|
if (QET::QetMessageBox::question(
|
||||||
this,
|
this,
|
||||||
@@ -655,7 +657,7 @@ void ElementsCollectionWidget::reload()
|
|||||||
this,
|
this,
|
||||||
&ElementsCollectionWidget::loadingFinished);
|
&ElementsCollectionWidget::loadingFinished);
|
||||||
|
|
||||||
m_new_model->loadCollections(true, true, project_list);
|
m_new_model->loadCollections(true, true, true, project_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ QString ElementsLocation::baseName() const
|
|||||||
@brief ElementsLocation::collectionPath
|
@brief ElementsLocation::collectionPath
|
||||||
Return the path of the represented element relative to collection
|
Return the path of the represented element relative to collection
|
||||||
if protocol is true the path is prepended by
|
if protocol is true the path is prepended by
|
||||||
the collection type (common://, custom:// or embed://)
|
the collection type (common://, company://, custom:// or embed://)
|
||||||
else if false,
|
else if false,
|
||||||
only the collection path is returned without the collection type.
|
only the collection path is returned without the collection type.
|
||||||
@param protocol
|
@param protocol
|
||||||
@@ -181,7 +181,7 @@ QString ElementsLocation::collectionPath(bool protocol) const
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
QString path = m_collection_path;
|
QString path = m_collection_path;
|
||||||
return path.remove(QRegularExpression("common://|custom://|embed://"));
|
return path.remove(QRegularExpression("common://|company://|custom://|embed://"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -229,7 +229,7 @@ QString ElementsLocation::path() const
|
|||||||
@brief ElementsLocation::setPath
|
@brief ElementsLocation::setPath
|
||||||
Set the path of this item.
|
Set the path of this item.
|
||||||
The path can be relative to a collection
|
The path can be relative to a collection
|
||||||
(start by common:// , custom:// or embed://) or not.
|
(start by common://, company://, custom:// or embed://) or not.
|
||||||
@param path
|
@param path
|
||||||
*/
|
*/
|
||||||
void ElementsLocation::setPath(const QString &path)
|
void ElementsLocation::setPath(const QString &path)
|
||||||
@@ -290,15 +290,20 @@ void ElementsLocation::setPath(const QString &path)
|
|||||||
|
|
||||||
// The path is in file system,
|
// The path is in file system,
|
||||||
// the given path is relative to common or custom collection
|
// the given path is relative to common or custom collection
|
||||||
else if (path.startsWith("common://") || path.startsWith("custom://"))
|
else if (path.startsWith("common://") || path.startsWith("company://") || path.startsWith("custom://"))
|
||||||
{
|
{
|
||||||
QString p;
|
QString p;
|
||||||
if (path.startsWith("common://"))
|
if (path.startsWith("common://"))
|
||||||
{
|
{
|
||||||
tmp_path.remove("common://");
|
tmp_path.remove("common://");
|
||||||
p = QETApp::commonElementsDirN() + "/" + tmp_path;
|
p = QETApp::commonElementsDirN() + "/" + tmp_path;
|
||||||
}
|
}
|
||||||
else
|
else if (path.startsWith("company://"))
|
||||||
|
{
|
||||||
|
tmp_path.remove("company://");
|
||||||
|
p = QETApp::companyElementsDirN() + "/" + tmp_path;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
tmp_path.remove("custom://");
|
tmp_path.remove("custom://");
|
||||||
p = QETApp::customElementsDirN() + "/" + tmp_path;
|
p = QETApp::customElementsDirN() + "/" + tmp_path;
|
||||||
@@ -314,13 +319,19 @@ void ElementsLocation::setPath(const QString &path)
|
|||||||
if(path_.endsWith(".elmt"))
|
if(path_.endsWith(".elmt"))
|
||||||
{
|
{
|
||||||
m_file_system_path = path_;
|
m_file_system_path = path_;
|
||||||
if (path_.startsWith(QETApp::commonElementsDirN()))
|
if (path_.startsWith(QETApp::commonElementsDirN()))
|
||||||
{
|
{
|
||||||
path_.remove(QETApp::commonElementsDirN()+="/");
|
path_.remove(QETApp::commonElementsDirN()+="/");
|
||||||
path_.prepend("common://");
|
path_.prepend("common://");
|
||||||
m_collection_path = path_;
|
m_collection_path = path_;
|
||||||
}
|
}
|
||||||
else if (path_.startsWith(QETApp::customElementsDirN()))
|
else if (path_.startsWith(QETApp::companyElementsDirN()))
|
||||||
|
{
|
||||||
|
path_.remove(QETApp::companyElementsDirN()+="/");
|
||||||
|
path_.prepend("company://");
|
||||||
|
m_collection_path = path_;
|
||||||
|
}
|
||||||
|
else if (path_.startsWith(QETApp::customElementsDirN()))
|
||||||
{
|
{
|
||||||
path_.remove(QETApp::customElementsDirN()+="/");
|
path_.remove(QETApp::customElementsDirN()+="/");
|
||||||
path_.prepend("custom://");
|
path_.prepend("custom://");
|
||||||
@@ -330,13 +341,19 @@ void ElementsLocation::setPath(const QString &path)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_file_system_path = path_;
|
m_file_system_path = path_;
|
||||||
if (path_.startsWith(QETApp::commonElementsDirN()))
|
if (path_.startsWith(QETApp::commonElementsDirN()))
|
||||||
{
|
{
|
||||||
path_.remove(QETApp::commonElementsDirN()+="/");
|
path_.remove(QETApp::commonElementsDirN()+="/");
|
||||||
path_.prepend("common://");
|
path_.prepend("common://");
|
||||||
m_collection_path = path_;
|
m_collection_path = path_;
|
||||||
}
|
}
|
||||||
else if (path_.startsWith(QETApp::customElementsDirN()))
|
else if (path_.startsWith(QETApp::companyElementsDirN()))
|
||||||
|
{
|
||||||
|
path_.remove(QETApp::companyElementsDirN()+="/");
|
||||||
|
path_.prepend("company://");
|
||||||
|
m_collection_path = path_;
|
||||||
|
}
|
||||||
|
else if (path_.startsWith(QETApp::customElementsDirN()))
|
||||||
{
|
{
|
||||||
path_.remove(QETApp::customElementsDirN()+="/");
|
path_.remove(QETApp::customElementsDirN()+="/");
|
||||||
path_.prepend("custom://");
|
path_.prepend("custom://");
|
||||||
@@ -484,13 +501,23 @@ bool ElementsLocation::isFileSystem() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief ElementsLocation::isCommonCollection
|
@brief ElementsLocation::isCommonCollection
|
||||||
@return
|
@return
|
||||||
True if this location represent an item from the common collection
|
True if this location represent an item from the common collection
|
||||||
*/
|
*/
|
||||||
bool ElementsLocation::isCommonCollection() const
|
bool ElementsLocation::isCommonCollection() const
|
||||||
{
|
{
|
||||||
return fileSystemPath().startsWith(QETApp::commonElementsDirN());
|
return fileSystemPath().startsWith(QETApp::commonElementsDirN());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief ElementsLocation::isCompanyCollection
|
||||||
|
@return
|
||||||
|
True if this location represent an item from the company collection
|
||||||
|
*/
|
||||||
|
bool ElementsLocation::isCompanyCollection() const
|
||||||
|
{
|
||||||
|
return fileSystemPath().startsWith(QETApp::companyElementsDirN());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -75,8 +75,9 @@ class ElementsLocation
|
|||||||
bool isElement() const;
|
bool isElement() const;
|
||||||
bool isDirectory() const;
|
bool isDirectory() const;
|
||||||
bool isFileSystem() const;
|
bool isFileSystem() const;
|
||||||
bool isCommonCollection() const;
|
bool isCommonCollection() const;
|
||||||
bool isCustomCollection() const;
|
bool isCompanyCollection() const;
|
||||||
|
bool isCustomCollection() const;
|
||||||
bool isProject() const;
|
bool isProject() const;
|
||||||
bool exist() const;
|
bool exist() const;
|
||||||
bool isWritable() const;
|
bool isWritable() const;
|
||||||
|
|||||||
@@ -120,9 +120,11 @@ QString FileElementCollectionItem::localName()
|
|||||||
|
|
||||||
else if (isDir()) {
|
else if (isDir()) {
|
||||||
if (isCollectionRoot()) {
|
if (isCollectionRoot()) {
|
||||||
if (m_path == QETApp::commonElementsDirN())
|
if (m_path == QETApp::commonElementsDirN())
|
||||||
setText(QObject::tr("Collection QET"));
|
setText(QObject::tr("Collection QET"));
|
||||||
else if (m_path == QETApp::customElementsDirN())
|
else if (m_path == QETApp::companyElementsDirN())
|
||||||
|
setText(QObject::tr("Collection Company"));
|
||||||
|
else if (m_path == QETApp::customElementsDirN())
|
||||||
setText(QObject::tr("Collection utilisateur"));
|
setText(QObject::tr("Collection utilisateur"));
|
||||||
else
|
else
|
||||||
setText(QObject::tr("Collection inconnue"));
|
setText(QObject::tr("Collection inconnue"));
|
||||||
@@ -194,6 +196,8 @@ QString FileElementCollectionItem::collectionPath() const
|
|||||||
if (isCollectionRoot()) {
|
if (isCollectionRoot()) {
|
||||||
if (m_path == QETApp::commonElementsDirN())
|
if (m_path == QETApp::commonElementsDirN())
|
||||||
return "common://";
|
return "common://";
|
||||||
|
else if (m_path == QETApp::companyElementsDirN())
|
||||||
|
return "company://";
|
||||||
else
|
else
|
||||||
return "custom://";
|
return "custom://";
|
||||||
}
|
}
|
||||||
@@ -217,19 +221,29 @@ QString FileElementCollectionItem::collectionPath() const
|
|||||||
bool FileElementCollectionItem::isCollectionRoot() const
|
bool FileElementCollectionItem::isCollectionRoot() const
|
||||||
{
|
{
|
||||||
if (m_path == QETApp::commonElementsDirN()
|
if (m_path == QETApp::commonElementsDirN()
|
||||||
|| m_path == QETApp::customElementsDirN())
|
|| m_path == QETApp::companyElementsDirN()
|
||||||
return true;
|
|| m_path == QETApp::customElementsDirN())
|
||||||
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief FileElementCollectionItem::isCommonCollection
|
@brief FileElementCollectionItem::isCommonCollection
|
||||||
@return True if this item represent the common collection
|
@return True if this item represent the common collection
|
||||||
*/
|
*/
|
||||||
bool FileElementCollectionItem::isCommonCollection() const
|
bool FileElementCollectionItem::isCommonCollection() const
|
||||||
{
|
{
|
||||||
return fileSystemPath().startsWith(QETApp::commonElementsDirN());
|
return fileSystemPath().startsWith(QETApp::commonElementsDirN());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief FileElementCollectionItem::isCompanyCollection
|
||||||
|
@return True if this item represent the company collection
|
||||||
|
*/
|
||||||
|
bool FileElementCollectionItem::isCompanyCollection() const
|
||||||
|
{
|
||||||
|
return fileSystemPath().startsWith(QETApp::companyElementsDirN());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -306,6 +320,8 @@ void FileElementCollectionItem::setUpIcon()
|
|||||||
if (isCollectionRoot()) {
|
if (isCollectionRoot()) {
|
||||||
if (m_path == QETApp::commonElementsDirN())
|
if (m_path == QETApp::commonElementsDirN())
|
||||||
setIcon(QIcon(":/ico/16x16/qet.png"));
|
setIcon(QIcon(":/ico/16x16/qet.png"));
|
||||||
|
else if (m_path == QETApp::companyElementsDirN())
|
||||||
|
setIcon(QIcon(":/ico/16x16/go-company.png"));
|
||||||
else
|
else
|
||||||
setIcon(QIcon(":/ico/16x16/go-home.png"));
|
setIcon(QIcon(":/ico/16x16/go-home.png"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,8 +47,9 @@ class FileElementCollectionItem : public ElementCollectionItem
|
|||||||
QString name() const override;
|
QString name() const override;
|
||||||
QString collectionPath() const override;
|
QString collectionPath() const override;
|
||||||
bool isCollectionRoot() const override;
|
bool isCollectionRoot() const override;
|
||||||
bool isCommonCollection() const;
|
bool isCommonCollection() const;
|
||||||
bool isCustomCollection() const;
|
bool isCompanyCollection() const;
|
||||||
|
bool isCustomCollection() const;
|
||||||
void addChildAtPath(const QString &collection_name) override;
|
void addChildAtPath(const QString &collection_name) override;
|
||||||
|
|
||||||
void setUpData() override;
|
void setUpData() override;
|
||||||
|
|||||||
@@ -93,9 +93,9 @@ void ElementDialog::setUpWidget()
|
|||||||
prjs.append(prj);
|
prjs.append(prj);
|
||||||
|
|
||||||
if (m_mode == OpenElement)
|
if (m_mode == OpenElement)
|
||||||
m_model->loadCollections(true, true, prjs);
|
m_model->loadCollections(true, true, true, prjs);
|
||||||
else
|
else
|
||||||
m_model->loadCollections(false, true, prjs);
|
m_model->loadCollections(false, true, true, prjs);
|
||||||
|
|
||||||
m_tree_view->setModel(m_model);
|
m_tree_view->setModel(m_model);
|
||||||
m_tree_view->setHeaderHidden(true);
|
m_tree_view->setHeaderHidden(true);
|
||||||
|
|||||||
@@ -221,8 +221,9 @@ bool ElementsPanel::matchesFilter(const QTreeWidgetItem *item,
|
|||||||
void ElementsPanel::reload()
|
void ElementsPanel::reload()
|
||||||
{
|
{
|
||||||
QIcon system_icon(":/ico/16x16/qet.png");
|
QIcon system_icon(":/ico/16x16/qet.png");
|
||||||
|
QIcon company_icon(":/ico/16x16/go-company.png");
|
||||||
QIcon user_icon(":/ico/16x16/go-home.png");
|
QIcon user_icon(":/ico/16x16/go-home.png");
|
||||||
|
|
||||||
// load the common title block templates collection
|
// load the common title block templates collection
|
||||||
TitleBlockTemplatesCollection *common_tbt_collection = QETApp::commonTitleBlockTemplatesCollection();
|
TitleBlockTemplatesCollection *common_tbt_collection = QETApp::commonTitleBlockTemplatesCollection();
|
||||||
common_tbt_collection_item_ = addTemplatesCollection(common_tbt_collection, invisibleRootItem());
|
common_tbt_collection_item_ = addTemplatesCollection(common_tbt_collection, invisibleRootItem());
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ class ElementsPanel : public GenericPanel {
|
|||||||
private:
|
private:
|
||||||
QSet<QETProject *> projects_to_display_; ///< list of projects that have been added to this panel
|
QSet<QETProject *> projects_to_display_; ///< list of projects that have been added to this panel
|
||||||
QTreeWidgetItem *common_tbt_collection_item_; ///< pointer to the item representing the common templates collection
|
QTreeWidgetItem *common_tbt_collection_item_; ///< pointer to the item representing the common templates collection
|
||||||
|
QTreeWidgetItem *company_tbt_collection_item_; ///< pointer to the item representing the company's templates collection
|
||||||
QTreeWidgetItem *custom_tbt_collection_item_; ///< pointer to the item representing the user templates collection
|
QTreeWidgetItem *custom_tbt_collection_item_; ///< pointer to the item representing the user templates collection
|
||||||
bool first_reload_; ///< used to distinguish the first time this panel is reloaded
|
bool first_reload_; ///< used to distinguish the first time this panel is reloaded
|
||||||
QString filter_; ///< Currently applied filter
|
QString filter_; ///< Currently applied filter
|
||||||
|
|||||||
@@ -687,6 +687,8 @@ QString QET::qetCollectionToString(const QET::QetCollection &c)
|
|||||||
{
|
{
|
||||||
case Common :
|
case Common :
|
||||||
return "common";
|
return "common";
|
||||||
|
case Company :
|
||||||
|
return "company";
|
||||||
case Custom :
|
case Custom :
|
||||||
return "custom";
|
return "custom";
|
||||||
case Embedded :
|
case Embedded :
|
||||||
@@ -706,6 +708,8 @@ QET::QetCollection QET::qetCollectionFromString(const QString &str)
|
|||||||
{
|
{
|
||||||
if (str == "common")
|
if (str == "common")
|
||||||
return QetCollection::Common;
|
return QetCollection::Common;
|
||||||
|
else if (str == "company")
|
||||||
|
return QetCollection::Company;
|
||||||
else if (str == "custom")
|
else if (str == "custom")
|
||||||
return QetCollection::Custom;
|
return QetCollection::Custom;
|
||||||
else if (str == "embedded")
|
else if (str == "embedded")
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ namespace QET {
|
|||||||
///Enum used to specify the origin of a collection of thing (title block, element etc...)
|
///Enum used to specify the origin of a collection of thing (title block, element etc...)
|
||||||
enum QetCollection {
|
enum QetCollection {
|
||||||
Common, ///< From common collection
|
Common, ///< From common collection
|
||||||
|
Company, ///< From company collection
|
||||||
Custom, ///< From user collection
|
Custom, ///< From user collection
|
||||||
Embedded ///< From an embedded collection (a project for example)
|
Embedded ///< From an embedded collection (a project for example)
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -75,6 +75,9 @@ TitleBlockTemplate *QETApp::default_titleblock_template_ = nullptr;
|
|||||||
QString QETApp::m_common_element_dir = QString();
|
QString QETApp::m_common_element_dir = QString();
|
||||||
bool QETApp::m_common_element_dir_is_set = false;
|
bool QETApp::m_common_element_dir_is_set = false;
|
||||||
|
|
||||||
|
QString QETApp::m_company_element_dir = QString();
|
||||||
|
bool QETApp::m_company_element_dir_is_set = false;
|
||||||
|
|
||||||
QString QETApp::m_custom_element_dir = QString();
|
QString QETApp::m_custom_element_dir = QString();
|
||||||
bool QETApp::m_custom_element_dir_is_set = false;
|
bool QETApp::m_custom_element_dir_is_set = false;
|
||||||
|
|
||||||
@@ -556,52 +559,101 @@ QString QETApp::commonElementsDir()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief QETApp::customElementsDir
|
@brief QETApp::customElementsDir
|
||||||
@return the dir path of user elements collection appended with a
|
@return the dir path of user elements collection appended with a
|
||||||
"/" separator
|
"/" separator
|
||||||
*/
|
*/
|
||||||
QString QETApp::customElementsDir()
|
QString QETApp::customElementsDir()
|
||||||
{
|
{
|
||||||
if (m_custom_element_dir_is_set)
|
if (m_custom_element_dir_is_set)
|
||||||
{
|
{
|
||||||
return m_custom_element_dir;
|
return m_custom_element_dir;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_custom_element_dir_is_set = true;
|
m_custom_element_dir_is_set = true;
|
||||||
|
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
QString path = settings.value(
|
QString path = settings.value(
|
||||||
"elements-collections/custom-collection-path",
|
"elements-collections/custom-collection-path",
|
||||||
"default").toString();
|
"default").toString();
|
||||||
if (path != "default" && !path.isEmpty())
|
if (path != "default" && !path.isEmpty())
|
||||||
{
|
{
|
||||||
QDir dir(path);
|
QDir dir(path);
|
||||||
if (dir.exists())
|
if (dir.exists())
|
||||||
{
|
{
|
||||||
m_custom_element_dir = path;
|
m_custom_element_dir = path;
|
||||||
if(!m_custom_element_dir.endsWith("/")) {
|
if(!m_custom_element_dir.endsWith("/")) {
|
||||||
m_custom_element_dir.append("/");
|
m_custom_element_dir.append("/");
|
||||||
}
|
}
|
||||||
return m_custom_element_dir;
|
return m_custom_element_dir;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_custom_element_dir = configDir() + "elements/";
|
m_custom_element_dir = configDir() + "elements/";
|
||||||
return m_custom_element_dir;
|
return m_custom_element_dir;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief QETApp::commonElementsDirN
|
@brief QETApp::companyElementsDir
|
||||||
like QString QETApp::commonElementsDir but without "/" at the end
|
@return the dir path of company elements collection appended with a
|
||||||
@return QString path
|
"/" separator
|
||||||
|
*/
|
||||||
|
QString QETApp::companyElementsDir()
|
||||||
|
{
|
||||||
|
if (m_company_element_dir_is_set)
|
||||||
|
{
|
||||||
|
return m_company_element_dir;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_company_element_dir_is_set = true;
|
||||||
|
|
||||||
|
QSettings settings;
|
||||||
|
QString path = settings.value(
|
||||||
|
"elements-collections/company-collection-path",
|
||||||
|
"default").toString();
|
||||||
|
if (path != "default" && !path.isEmpty())
|
||||||
|
{
|
||||||
|
QDir dir(path);
|
||||||
|
if (dir.exists())
|
||||||
|
{
|
||||||
|
m_company_element_dir = path;
|
||||||
|
if(!m_company_element_dir.endsWith("/")) {
|
||||||
|
m_company_element_dir.append("/");
|
||||||
|
}
|
||||||
|
return m_company_element_dir;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
m_company_element_dir = configDir() + "elements/";
|
||||||
|
return m_company_element_dir;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief QETApp::commonElementsDirN
|
||||||
|
like QString QETApp::commonElementsDir but without "/" at the end
|
||||||
|
@return QString path
|
||||||
*/
|
*/
|
||||||
QString QETApp::commonElementsDirN()
|
QString QETApp::commonElementsDirN()
|
||||||
{
|
{
|
||||||
QString path = commonElementsDir();
|
QString path = commonElementsDir();
|
||||||
if (path.endsWith("/")) path.remove(path.length()-1, 1);
|
if (path.endsWith("/")) path.remove(path.length()-1, 1);
|
||||||
return path;
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief QETApp::companyElementsDirN
|
||||||
|
like QString QETApp::companyElementsDir but without "/" at the end
|
||||||
|
@return QString path
|
||||||
|
*/
|
||||||
|
QString QETApp::companyElementsDirN()
|
||||||
|
{
|
||||||
|
QString path = companyElementsDir();
|
||||||
|
if (path.endsWith("/")) path.remove(path.length()-1, 1);
|
||||||
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -627,6 +679,9 @@ void QETApp::resetCollectionsPath()
|
|||||||
m_common_element_dir.clear();
|
m_common_element_dir.clear();
|
||||||
m_common_element_dir_is_set = false;
|
m_common_element_dir_is_set = false;
|
||||||
|
|
||||||
|
m_company_element_dir.clear();
|
||||||
|
m_company_element_dir_is_set = false;
|
||||||
|
|
||||||
m_custom_element_dir.clear();
|
m_custom_element_dir.clear();
|
||||||
m_custom_element_dir_is_set = false;
|
m_custom_element_dir_is_set = false;
|
||||||
|
|
||||||
@@ -758,9 +813,13 @@ QString QETApp::realPath(const QString &sym_path) {
|
|||||||
QString directory;
|
QString directory;
|
||||||
if (sym_path.startsWith("common://")) {
|
if (sym_path.startsWith("common://")) {
|
||||||
directory = commonElementsDir();
|
directory = commonElementsDir();
|
||||||
} else if (sym_path.startsWith("custom://")) {
|
} else if (sym_path.startsWith("company://")) {
|
||||||
directory = customElementsDir();
|
directory = companyElementsDir();
|
||||||
} else if (sym_path.startsWith(QETAPP_COMMON_TBT_PROTOCOL "://")) {
|
} else if (sym_path.startsWith("company://")) {
|
||||||
|
directory = companyElementsDir();
|
||||||
|
} else if (sym_path.startsWith("custom://")) {
|
||||||
|
directory = customElementsDir();
|
||||||
|
} else if (sym_path.startsWith(QETAPP_COMMON_TBT_PROTOCOL "://")) {
|
||||||
directory = commonTitleBlockTemplatesDir();
|
directory = commonTitleBlockTemplatesDir();
|
||||||
} else if (sym_path.startsWith(QETAPP_CUSTOM_TBT_PROTOCOL "://")) {
|
} else if (sym_path.startsWith(QETAPP_CUSTOM_TBT_PROTOCOL "://")) {
|
||||||
directory = customTitleBlockTemplatesDir();
|
directory = customTitleBlockTemplatesDir();
|
||||||
@@ -790,6 +849,7 @@ QString QETApp::symbolicPath(const QString &real_path) {
|
|||||||
// get the common and custom folders
|
// get the common and custom folders
|
||||||
// recupere les dossier common et custom
|
// recupere les dossier common et custom
|
||||||
QString commond = commonElementsDir();
|
QString commond = commonElementsDir();
|
||||||
|
QString companyd = companyElementsDir();
|
||||||
QString customd = customElementsDir();
|
QString customd = customElementsDir();
|
||||||
QString chemin;
|
QString chemin;
|
||||||
// analyzes the file path passed in parameter
|
// analyzes the file path passed in parameter
|
||||||
@@ -798,6 +858,10 @@ QString QETApp::symbolicPath(const QString &real_path) {
|
|||||||
chemin = "common://"
|
chemin = "common://"
|
||||||
+ real_path.right(
|
+ real_path.right(
|
||||||
real_path.length() - commond.length());
|
real_path.length() - commond.length());
|
||||||
|
} else if (real_path.startsWith(companyd)) {
|
||||||
|
chemin = "company://"
|
||||||
|
+ real_path.right(
|
||||||
|
real_path.length() - companyd.length());
|
||||||
} else if (real_path.startsWith(customd)) {
|
} else if (real_path.startsWith(customd)) {
|
||||||
chemin = "custom://"
|
chemin = "custom://"
|
||||||
+ real_path.right(
|
+ real_path.right(
|
||||||
@@ -1913,11 +1977,15 @@ void QETApp::initConfiguration()
|
|||||||
QDir config_dir(QETApp::configDir());
|
QDir config_dir(QETApp::configDir());
|
||||||
if (!config_dir.exists()) config_dir.mkpath(QETApp::configDir());
|
if (!config_dir.exists()) config_dir.mkpath(QETApp::configDir());
|
||||||
|
|
||||||
QDir custom_elements_dir(QETApp::customElementsDir());
|
QDir custom_elements_dir(QETApp::customElementsDir());
|
||||||
if (!custom_elements_dir.exists())
|
if (!custom_elements_dir.exists())
|
||||||
custom_elements_dir.mkpath(QETApp::customElementsDir());
|
custom_elements_dir.mkpath(QETApp::customElementsDir());
|
||||||
|
|
||||||
QDir custom_tbt_dir(QETApp::customTitleBlockTemplatesDir());
|
QDir company_elements_dir(QETApp::companyElementsDir());
|
||||||
|
if (!company_elements_dir.exists())
|
||||||
|
company_elements_dir.mkpath(QETApp::companyElementsDir());
|
||||||
|
|
||||||
|
QDir custom_tbt_dir(QETApp::customTitleBlockTemplatesDir());
|
||||||
if (!custom_tbt_dir.exists())
|
if (!custom_tbt_dir.exists())
|
||||||
custom_tbt_dir.mkpath(QETApp::customTitleBlockTemplatesDir());
|
custom_tbt_dir.mkpath(QETApp::customTitleBlockTemplatesDir());
|
||||||
|
|
||||||
|
|||||||
@@ -79,10 +79,12 @@ class QETApp : public QObject
|
|||||||
static QList<TitleBlockTemplatesCollection *> availableTitleBlockTemplatesCollections();
|
static QList<TitleBlockTemplatesCollection *> availableTitleBlockTemplatesCollections();
|
||||||
static TitleBlockTemplatesCollection *titleBlockTemplatesCollection(const QString &);
|
static TitleBlockTemplatesCollection *titleBlockTemplatesCollection(const QString &);
|
||||||
|
|
||||||
static QString commonElementsDir();
|
static QString commonElementsDir();
|
||||||
static QString customElementsDir();
|
static QString companyElementsDir();
|
||||||
|
static QString customElementsDir();
|
||||||
static QString commonElementsDirN();
|
static QString commonElementsDirN();
|
||||||
static QString customElementsDirN();
|
static QString companyElementsDirN();
|
||||||
|
static QString customElementsDirN();
|
||||||
static void resetCollectionsPath();
|
static void resetCollectionsPath();
|
||||||
static QString commonTitleBlockTemplatesDir();
|
static QString commonTitleBlockTemplatesDir();
|
||||||
static QString customTitleBlockTemplatesDir();
|
static QString customTitleBlockTemplatesDir();
|
||||||
@@ -213,6 +215,9 @@ class QETApp : public QObject
|
|||||||
static QString m_common_element_dir;
|
static QString m_common_element_dir;
|
||||||
static bool m_common_element_dir_is_set;
|
static bool m_common_element_dir_is_set;
|
||||||
|
|
||||||
|
static QString m_company_element_dir;
|
||||||
|
static bool m_company_element_dir_is_set;
|
||||||
|
|
||||||
static QString m_custom_element_dir;
|
static QString m_custom_element_dir;
|
||||||
static bool m_custom_element_dir_is_set;
|
static bool m_custom_element_dir_is_set;
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ namespace QET {
|
|||||||
QIcon Autoconnect;
|
QIcon Autoconnect;
|
||||||
QIcon BringForward;
|
QIcon BringForward;
|
||||||
QIcon Cancel;
|
QIcon Cancel;
|
||||||
|
QIcon Company;
|
||||||
QIcon Conductor;
|
QIcon Conductor;
|
||||||
QIcon ConductorEdit;
|
QIcon ConductorEdit;
|
||||||
QIcon ConductorSettings;
|
QIcon ConductorSettings;
|
||||||
@@ -395,6 +396,8 @@ void QET::Icons::initIcons()
|
|||||||
Autoconnect .addFile(":/ico/22x22/autoconnect.png");
|
Autoconnect .addFile(":/ico/22x22/autoconnect.png");
|
||||||
BringForward .addFile(":/ico/22x22/bring_forward.png");
|
BringForward .addFile(":/ico/22x22/bring_forward.png");
|
||||||
Cancel .addFile(":/ico/16x16/item-cancel.png");
|
Cancel .addFile(":/ico/16x16/item-cancel.png");
|
||||||
|
Company .addFile(":/ico/16x16/go-company.png");
|
||||||
|
Company .addFile(":/ico/22x22/go-company.png");
|
||||||
Conductor .addFile(":/ico/16x16/conductor.png");
|
Conductor .addFile(":/ico/16x16/conductor.png");
|
||||||
ConductorEdit .addFile(":/ico/16x16/conductor-edit.png");
|
ConductorEdit .addFile(":/ico/16x16/conductor-edit.png");
|
||||||
ConductorSettings .addFile(":/ico/16x16/conductor-reset.png");
|
ConductorSettings .addFile(":/ico/16x16/conductor-reset.png");
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ namespace QET {
|
|||||||
extern QIcon Autoconnect;
|
extern QIcon Autoconnect;
|
||||||
extern QIcon BringForward;
|
extern QIcon BringForward;
|
||||||
extern QIcon Cancel;
|
extern QIcon Cancel;
|
||||||
|
extern QIcon Company;
|
||||||
extern QIcon Conductor;
|
extern QIcon Conductor;
|
||||||
extern QIcon ConductorEdit;
|
extern QIcon ConductorEdit;
|
||||||
extern QIcon ConductorSettings;
|
extern QIcon ConductorSettings;
|
||||||
|
|||||||
@@ -509,7 +509,10 @@ void QETProject::setDefaultTitleBlockProperties(const TitleBlockProperties &titl
|
|||||||
case QET::Common :
|
case QET::Common :
|
||||||
collection = QETApp::commonTitleBlockTemplatesCollection();
|
collection = QETApp::commonTitleBlockTemplatesCollection();
|
||||||
break;
|
break;
|
||||||
case QET::Custom :
|
case QET::Company :
|
||||||
|
// collection = QETApp::companyTitleBlockTemplatesCollection();
|
||||||
|
break;
|
||||||
|
case QET::Custom :
|
||||||
collection = QETApp::customTitleBlockTemplatesCollection();
|
collection = QETApp::customTitleBlockTemplatesCollection();
|
||||||
break;
|
break;
|
||||||
case QET::Embedded :
|
case QET::Embedded :
|
||||||
|
|||||||
@@ -138,6 +138,15 @@ GeneralConfigurationPage::GeneralConfigurationPage(QWidget *parent) :
|
|||||||
ui->m_common_elmt_path_cb->blockSignals(false);
|
ui->m_common_elmt_path_cb->blockSignals(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
path = settings.value("elements-collections/company-collection-path", "default").toString();
|
||||||
|
if (path != "default")
|
||||||
|
{
|
||||||
|
ui->m_company_elmt_path_cb->blockSignals(true);
|
||||||
|
ui->m_company_elmt_path_cb->setCurrentIndex(1);
|
||||||
|
ui->m_company_elmt_path_cb->setItemData(1, path, Qt::DisplayRole);
|
||||||
|
ui->m_company_elmt_path_cb->blockSignals(false);
|
||||||
|
}
|
||||||
|
|
||||||
path = settings.value("elements-collections/custom-collection-path", "default").toString();
|
path = settings.value("elements-collections/custom-collection-path", "default").toString();
|
||||||
if (path != "default")
|
if (path != "default")
|
||||||
{
|
{
|
||||||
@@ -241,6 +250,21 @@ void GeneralConfigurationPage::applyConf()
|
|||||||
QETApp::resetCollectionsPath();
|
QETApp::resetCollectionsPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
path = settings.value("elements-collections/company-collection-path").toString();
|
||||||
|
if (ui->m_company_elmt_path_cb->currentIndex() == 1)
|
||||||
|
{
|
||||||
|
QString path = ui->m_company_elmt_path_cb->currentText();
|
||||||
|
QDir dir(path);
|
||||||
|
settings.setValue("elements-collections/company-collection-path",
|
||||||
|
dir.exists() ? path : "default");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
settings.setValue("elements-collections/company-collection-path", "default");
|
||||||
|
}
|
||||||
|
if (path != settings.value("elements-collections/company-collection-path").toString()) {
|
||||||
|
QETApp::resetCollectionsPath();
|
||||||
|
}
|
||||||
|
|
||||||
path = settings.value("elements-collections/custom-collection-path").toString();
|
path = settings.value("elements-collections/custom-collection-path").toString();
|
||||||
if (ui->m_custom_elmt_path_cb->currentIndex() == 1)
|
if (ui->m_custom_elmt_path_cb->currentIndex() == 1)
|
||||||
{
|
{
|
||||||
@@ -398,6 +422,20 @@ void GeneralConfigurationPage::on_m_common_elmt_path_cb_currentIndexChanged(int
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GeneralConfigurationPage::on_m_company_elmt_path_cb_currentIndexChanged(int index)
|
||||||
|
{
|
||||||
|
if (index == 1)
|
||||||
|
{
|
||||||
|
QString path = QFileDialog::getExistingDirectory(this, tr("Chemin de la collection company"), QDir::homePath());
|
||||||
|
if (!path.isEmpty()) {
|
||||||
|
ui->m_company_elmt_path_cb->setItemData(1, path, Qt::DisplayRole);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ui->m_company_elmt_path_cb->setCurrentIndex(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void GeneralConfigurationPage::on_m_custom_elmt_path_cb_currentIndexChanged(int index)
|
void GeneralConfigurationPage::on_m_custom_elmt_path_cb_currentIndexChanged(int index)
|
||||||
{
|
{
|
||||||
if (index == 1)
|
if (index == 1)
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ class GeneralConfigurationPage : public ConfigPage
|
|||||||
void on_m_font_pb_clicked();
|
void on_m_font_pb_clicked();
|
||||||
void on_m_dyn_text_font_pb_clicked();
|
void on_m_dyn_text_font_pb_clicked();
|
||||||
void on_m_common_elmt_path_cb_currentIndexChanged(int index);
|
void on_m_common_elmt_path_cb_currentIndexChanged(int index);
|
||||||
|
void on_m_company_elmt_path_cb_currentIndexChanged(int index);
|
||||||
void on_m_custom_elmt_path_cb_currentIndexChanged(int index);
|
void on_m_custom_elmt_path_cb_currentIndexChanged(int index);
|
||||||
void on_m_custom_tbt_path_cb_currentIndexChanged(int index);
|
void on_m_custom_tbt_path_cb_currentIndexChanged(int index);
|
||||||
void on_m_indi_text_font_pb_clicked();
|
void on_m_indi_text_font_pb_clicked();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>822</width>
|
<width>872</width>
|
||||||
<height>411</height>
|
<height>411</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab_3">
|
<widget class="QWidget" name="tab_3">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@@ -243,13 +243,34 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_16">
|
||||||
|
<property name="text">
|
||||||
|
<string>Répertoire de la collection company</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="m_company_elmt_path_cb">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Par defaut</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Parcourir...</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_8">
|
<widget class="QLabel" name="label_8">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Répertoire de la collection utilisateur</string>
|
<string>Répertoire de la collection utilisateur</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QComboBox" name="m_custom_elmt_path_cb">
|
<widget class="QComboBox" name="m_custom_elmt_path_cb">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -263,7 +284,14 @@
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_10">
|
||||||
|
<property name="text">
|
||||||
|
<string>Répertoire des cartouches utilisateur</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
<widget class="QComboBox" name="m_custom_tbt_path_cb">
|
<widget class="QComboBox" name="m_custom_tbt_path_cb">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -277,20 +305,13 @@
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="5" column="1">
|
||||||
<widget class="QLabel" name="label_9">
|
<widget class="QLabel" name="label_9">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>(Recharger les collections d'éléments pour appliquer les changements)</string>
|
<string>(Recharger les collections d'éléments pour appliquer les changements)</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="label_10">
|
|
||||||
<property name="text">
|
|
||||||
<string>Répertoire des cartouches utilisateur</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -847,9 +868,9 @@ Vous pouvez spécifier ici la valeur par défaut de ce champ pour les éléments
|
|||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout_1">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_1">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Max. parts in Element Editor List</string>
|
<string>Max. parts in Element Editor List</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -419,6 +419,8 @@ void TitleBlockPropertiesWidget::updateTemplateList()
|
|||||||
QET::QetCollection qc = tbt_c -> collection();
|
QET::QetCollection qc = tbt_c -> collection();
|
||||||
if (qc == QET::QetCollection::Common)
|
if (qc == QET::QetCollection::Common)
|
||||||
icon = QET::Icons::QETLogo;
|
icon = QET::Icons::QETLogo;
|
||||||
|
else if (qc == QET::QetCollection::Company)
|
||||||
|
icon = QET::Icons::Company;
|
||||||
else if (qc == QET::QetCollection::Custom)
|
else if (qc == QET::QetCollection::Custom)
|
||||||
icon = QET::Icons::Home;
|
icon = QET::Icons::Home;
|
||||||
else if (qc == QET::QetCollection::Embedded)
|
else if (qc == QET::QetCollection::Embedded)
|
||||||
|
|||||||
Reference in New Issue
Block a user