mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 23:20:52 +01:00
Implemented the common and custom title block templates collections.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1433 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -56,6 +56,9 @@ QETArguments::QETArguments(const QETArguments &qet_arguments) :
|
||||
#ifdef QET_ALLOW_OVERRIDE_CED_OPTION
|
||||
common_elements_dir_(qet_arguments.common_elements_dir_),
|
||||
#endif
|
||||
#ifdef QET_ALLOW_OVERRIDE_CTBTD_OPTION
|
||||
common_tbt_dir_(qet_arguments.common_tbt_dir_),
|
||||
#endif
|
||||
#ifdef QET_ALLOW_OVERRIDE_CD_OPTION
|
||||
config_dir_(qet_arguments.config_dir_),
|
||||
#endif
|
||||
@@ -78,6 +81,9 @@ QETArguments &QETArguments::operator=(const QETArguments &qet_arguments) {
|
||||
#ifdef QET_ALLOW_OVERRIDE_CED_OPTION
|
||||
common_elements_dir_ = qet_arguments.common_elements_dir_;
|
||||
#endif
|
||||
#ifdef QET_ALLOW_OVERRIDE_CTBTD_OPTION
|
||||
common_tbt_dir_ = qet_arguments.common_tbt_dir_;
|
||||
#endif
|
||||
#ifdef QET_ALLOW_OVERRIDE_CD_OPTION
|
||||
config_dir_ = qet_arguments.config_dir_;
|
||||
#endif
|
||||
@@ -159,6 +165,9 @@ void QETArguments::clear() {
|
||||
#ifdef QET_ALLOW_OVERRIDE_CED_OPTION
|
||||
common_elements_dir_.clear();
|
||||
#endif
|
||||
#ifdef QET_ALLOW_OVERRIDE_CTBTD_OPTION
|
||||
common_tbt_dir_.clear();
|
||||
#endif
|
||||
#ifdef QET_ALLOW_OVERRIDE_CD_OPTION
|
||||
config_dir_.clear();
|
||||
#endif
|
||||
@@ -205,6 +214,7 @@ void QETArguments::handleFileArgument(const QString &file) {
|
||||
Gere les arguments correspondant potentiellement a une option.
|
||||
Les options reconnues sont :
|
||||
* --common-elements-dir=
|
||||
* --common-tbt-dir
|
||||
* --config-dir=
|
||||
* --lang-dir=
|
||||
* --help
|
||||
@@ -235,6 +245,13 @@ void QETArguments::handleOptionArgument(const QString &option) {
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifdef QET_ALLOW_OVERRIDE_CTBTD_OPTION
|
||||
QString ctbtd_arg("--common-tbt-dir=");
|
||||
if (option.startsWith(ctbtd_arg)) {
|
||||
common_tbt_dir_ = option.mid(ctbtd_arg.length());
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#ifdef QET_ALLOW_OVERRIDE_CD_OPTION
|
||||
QString cd_arg("--config-dir=");
|
||||
if (option.startsWith(cd_arg)) {
|
||||
@@ -270,8 +287,26 @@ bool QETArguments::commonElementsDirSpecified() const {
|
||||
QString QETArguments::commonElementsDir() const {
|
||||
return(common_elements_dir_);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef QET_ALLOW_OVERRIDE_CTBTD_OPTION
|
||||
/**
|
||||
@return true if the user has specified a directory for the common title
|
||||
block templates collection
|
||||
*/
|
||||
bool QETArguments::commonTitleBlockTemplatesDirSpecified() const {
|
||||
return(!common_tbt_dir_.isEmpty());
|
||||
}
|
||||
|
||||
/**
|
||||
@return the directory of the common title block templates collection
|
||||
specified by the user. If none were specified, return an empty string.
|
||||
*/
|
||||
QString QETArguments::commonTitleBlockTemplatesDir() const {
|
||||
return(common_tbt_dir_);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QET_ALLOW_OVERRIDE_CD_OPTION
|
||||
/**
|
||||
@return true si l'utilisateur a specifie un dossier pour la configuration.
|
||||
|
||||
Reference in New Issue
Block a user