Seamly2D
Code documentation
vsettings.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * *
3  * Copyright (C) 2017 Seamly, LLC *
4  * *
5  * https://github.com/fashionfreedom/seamly2d *
6  * *
7  ***************************************************************************
8  **
9  ** Seamly2D is free software: you can redistribute it and/or modify
10  ** it under the terms of the GNU General Public License as published by
11  ** the Free Software Foundation, either version 3 of the License, or
12  ** (at your option) any later version.
13  **
14  ** Seamly2D is distributed in the hope that it will be useful,
15  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  ** GNU General Public License for more details.
18  **
19  ** You should have received a copy of the GNU General Public License
20  ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
21  **
22  **************************************************************************
23 
24  ************************************************************************
25  **
26  ** @file vsettings.cpp
27  ** @author Roman Telezhynskyi <dismine(at)gmail.com>
28  ** @date 22 11, 2014
29  **
30  ** @brief
31  ** @copyright
32  ** This source code is part of the Valentine project, a pattern making
33  ** program, whose allow create and modeling patterns of clothing.
34  ** Copyright (C) 2013-2015 Seamly2D project
35  ** <https://github.com/fashionfreedom/seamly2d> All Rights Reserved.
36  **
37  ** Seamly2D is free software: you can redistribute it and/or modify
38  ** it under the terms of the GNU General Public License as published by
39  ** the Free Software Foundation, either version 3 of the License, or
40  ** (at your option) any later version.
41  **
42  ** Seamly2D is distributed in the hope that it will be useful,
43  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
44  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45  ** GNU General Public License for more details.
46  **
47  ** You should have received a copy of the GNU General Public License
48  ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
49  **
50  *************************************************************************/
51 
52 #include "vsettings.h"
53 
54 #include <QDir>
55 #include <QLocale>
56 #include <QMetaType>
57 #include <QPrinter>
58 #include <QSharedPointer>
59 #include <QStaticStringData>
60 #include <QStringData>
61 #include <QStringDataPtr>
62 #include <QVariant>
63 #include <QPrinterInfo>
64 #include <QtDebug>
65 
66 #include "../vmisc/def.h"
67 #include "../vmisc/vmath.h"
68 
69 Q_DECLARE_METATYPE(QMarginsF)
70 
71 namespace
72 {
73 const QString settingConfigurationLabelLanguage = QStringLiteral("configuration/label_language");
74 
75 const QString settingPathsPattern = QStringLiteral("paths/pattern");
76 const QString settingPathsLayout = QStringLiteral("paths/layout");
77 
78 const QString settingPatternGraphicalOutput = QStringLiteral("pattern/graphicalOutput");
79 
80 const QString settingCommunityServer = QStringLiteral("community/server");
81 const QString settingCommunityServerSecure = QStringLiteral("community/serverSecure");
82 const QString settingCommunityUseProxy = QStringLiteral("community/useProxy");
83 const QString settingCommunityProxyAddress = QStringLiteral("community/proxyAddress");
84 const QString settingCommunityProxyPort = QStringLiteral("community/proxyPort");
85 const QString settingCommunityProxyUser = QStringLiteral("community/proxyUser");
86 const QString settingCommunityProxyPass = QStringLiteral("community/proxyPass");
87 const QString settingCommunityUsername = QStringLiteral("community/username");
88 const QString settingCommunitySavePassword = QStringLiteral("community/savePassword");
89 const QString settingCommunityUserPassword = QStringLiteral("community/userpassword");
90 
91 const QString settingLayoutWidth = QStringLiteral("layout/width");
92 const QString settingLayoutSorting = QStringLiteral("layout/sorting");
93 const QString settingLayoutPaperHeight = QStringLiteral("layout/paperHeight");
94 const QString settingLayoutPaperWidth = QStringLiteral("layout/paperWidth");
95 const QString settingLayoutShift = QStringLiteral("layout/shift");
96 const QString settingLayoutRotate = QStringLiteral("layout/Rotate");
97 const QString settingLayoutRotationIncrease = QStringLiteral("layout/rotationIncrease");
98 const QString settingLayoutAutoCrop = QStringLiteral("layout/autoCrop");
99 const QString settingLayoutSaveLength = QStringLiteral("layout/saveLength");
100 const QString settingLayoutUnitePages = QStringLiteral("layout/unitePages");
101 const QString settingFields = QStringLiteral("layout/fields");
102 const QString settingIgnoreFields = QStringLiteral("layout/ignoreFields");
103 const QString settingStripOptimization = QStringLiteral("layout/stripOptimization");
104 const QString settingMultiplier = QStringLiteral("layout/multiplier");
105 const QString settingTextAsPaths = QStringLiteral("layout/textAsPaths");
106 
107 const QString settingTiledPDFMargins = QStringLiteral("tiledPDF/margins");
108 const QString settingTiledPDFPaperHeight = QStringLiteral("tiledPDF/paperHeight");
109 const QString settingTiledPDFPaperWidth = QStringLiteral("tiledPDF/paperWidth");
110 const QString settingTiledPDFOrientation = QStringLiteral("tiledPDF/orientation");
111 }
112 
113 //---------------------------------------------------------------------------------------------------------------------
114 VSettings::VSettings(Format format, Scope scope, const QString &organization, const QString &application,
115  QObject *parent)
116  :VCommonSettings(format, scope, organization, application, parent)
117 {
118  qRegisterMetaTypeStreamOperators<QMarginsF>("QMarginsF");
119 }
120 
121 //---------------------------------------------------------------------------------------------------------------------
123 {
124  return value(settingConfigurationLabelLanguage, QLocale().bcp47Name()).toString();
125 }
126 
127 //---------------------------------------------------------------------------------------------------------------------
128 void VSettings::SetLabelLanguage(const QString &value)
129 {
130  setValue(settingConfigurationLabelLanguage, value);
131 }
132 
133 //---------------------------------------------------------------------------------------------------------------------
135 {
136  return QDir::homePath() + QLatin1String("/seamly2d/") + tr("patterns");
137 }
138 
139 //---------------------------------------------------------------------------------------------------------------------
141 {
142  QSettings settings(this->format(), this->scope(), this->organizationName(), this->applicationName());
143  return settings.value(settingPathsPattern, GetDefPathPattern()).toString();
144 }
145 
146 //---------------------------------------------------------------------------------------------------------------------
147 void VSettings::SetPathPattern(const QString &value)
148 {
149  QSettings settings(this->format(), this->scope(), this->organizationName(), this->applicationName());
150  settings.setValue(settingPathsPattern, value);
151  settings.sync();
152 }
153 
154 //---------------------------------------------------------------------------------------------------------------------
156 {
157  return QDir::homePath() + QLatin1String("/seamly2d/") + tr("layouts");
158 }
159 
160 //---------------------------------------------------------------------------------------------------------------------
162 {
163  QSettings settings(this->format(), this->scope(), this->organizationName(), this->applicationName());
164  return settings.value(settingPathsLayout, GetDefPathLayout()).toString();
165 }
166 
167 //---------------------------------------------------------------------------------------------------------------------
168 void VSettings::SetPathLayout(const QString &value)
169 {
170  QSettings settings(this->format(), this->scope(), this->organizationName(), this->applicationName());
171  settings.setValue(settingPathsLayout, value);
172  settings.sync();
173 }
174 
175 //---------------------------------------------------------------------------------------------------------------------
177 {
178  return value(settingPatternGraphicalOutput, 1).toBool();
179 }
180 
181 //---------------------------------------------------------------------------------------------------------------------
182 void VSettings::SetGraphicalOutput(const bool &value)
183 {
184  setValue(settingPatternGraphicalOutput, value);
185 }
186 
187 //---------------------------------------------------------------------------------------------------------------------
188 QString VSettings::GetServer() const
189 {
190  return value(settingCommunityServer, "community.seamly2d-project.org").toString();
191 }
192 
193 //---------------------------------------------------------------------------------------------------------------------
194 void VSettings::SetServer(const QString &value)
195 {
196  setValue(settingCommunityServer, value);
197 }
198 
199 //---------------------------------------------------------------------------------------------------------------------
201 {
202  return value(settingCommunityServerSecure, 0).toBool();
203 }
204 
205 //---------------------------------------------------------------------------------------------------------------------
206 void VSettings::SetServerSecure(const bool &value)
207 {
208  setValue(settingCommunityServerSecure, value);
209 }
210 
211 //---------------------------------------------------------------------------------------------------------------------
213 {
214  return value(settingCommunityUseProxy, 0).toBool();
215 }
216 
217 //---------------------------------------------------------------------------------------------------------------------
218 void VSettings::SetProxy(const bool &value)
219 {
220  setValue(settingCommunityUseProxy, value);
221 }
222 
223 //---------------------------------------------------------------------------------------------------------------------
225 {
226  return value(settingCommunityProxyAddress).toString();
227 }
228 
229 //---------------------------------------------------------------------------------------------------------------------
230 void VSettings::SetProxyAddress(const QString &value)
231 {
232  setValue(settingCommunityProxyAddress, value);
233 }
234 
235 //---------------------------------------------------------------------------------------------------------------------
236 QString VSettings::GetProxyPort() const
237 {
238  return value(settingCommunityProxyPort).toString();
239 }
240 
241 //---------------------------------------------------------------------------------------------------------------------
242 void VSettings::SetProxyPort(const QString &value)
243 {
244  setValue(settingCommunityProxyPort, value);
245 }
246 
247 //---------------------------------------------------------------------------------------------------------------------
248 QString VSettings::GetProxyUser() const
249 {
250  return value(settingCommunityProxyUser).toString();
251 }
252 
253 //---------------------------------------------------------------------------------------------------------------------
254 void VSettings::SetProxyUser(const QString &value)
255 {
256  setValue(settingCommunityProxyUser, value);
257 }
258 
259 //---------------------------------------------------------------------------------------------------------------------
260 QString VSettings::GetProxyPass() const
261 {
262  return value(settingCommunityProxyPass).toString();
263 }
264 
265 //---------------------------------------------------------------------------------------------------------------------
266 void VSettings::SetProxyPass(const QString &value)
267 {
268  setValue(settingCommunityProxyPass, value);
269 }
270 
271 //---------------------------------------------------------------------------------------------------------------------
272 QString VSettings::GetUsername() const
273 {
274  return value(settingCommunityUsername).toString();
275 }
276 
277 //---------------------------------------------------------------------------------------------------------------------
278 void VSettings::SetUsername(const QString &value)
279 {
280  setValue(settingCommunityUsername, value);
281 }
282 
283 //---------------------------------------------------------------------------------------------------------------------
285 {
286  return value(settingCommunitySavePassword, 0).toBool();
287 }
288 
289 //---------------------------------------------------------------------------------------------------------------------
290 void VSettings::SetSavePassword(const bool &value)
291 {
292  setValue(settingCommunitySavePassword, value);
293 }
294 
295 //---------------------------------------------------------------------------------------------------------------------
297 {
298  return value(settingCommunityUserPassword).toString();
299 }
300 
301 //---------------------------------------------------------------------------------------------------------------------
302 void VSettings::SetUserPassword(const QString &value)
303 {
304  setValue(settingCommunityUserPassword, value);
305 }
306 
307 //---------------------------------------------------------------------------------------------------------------------
309 {
310  const qreal def = UnitConvertor(1189/*A0*/, Unit::Mm, Unit::Px);
311  bool ok = false;
312  const qreal height = value(settingLayoutPaperHeight, def).toDouble(&ok);
313  if (ok)
314  {
315  return height;
316  }
317  else
318  {
319  return def;
320  }
321 }
322 
323 //---------------------------------------------------------------------------------------------------------------------
325 {
326  setValue(settingLayoutPaperHeight, value);
327 }
328 
329 //---------------------------------------------------------------------------------------------------------------------
331 {
332  const qreal def = UnitConvertor(841/*A0*/, Unit::Mm, Unit::Px);
333  bool ok = false;
334  const qreal width = value(settingLayoutPaperWidth, def).toDouble(&ok);
335  if (ok)
336  {
337  return width;
338  }
339  else
340  {
341  return def;
342  }
343 }
344 
345 //---------------------------------------------------------------------------------------------------------------------
347 {
348  setValue(settingLayoutPaperWidth, value);
349 }
350 
351 //---------------------------------------------------------------------------------------------------------------------
353 {
354  const qreal def = GetDefLayoutShift();
355  bool ok = false;
356  const qreal shift = value(settingLayoutShift, def).toDouble(&ok);
357  if (ok)
358  {
359  return shift;
360  }
361  else
362  {
363  return def;
364  }
365 }
366 
367 //---------------------------------------------------------------------------------------------------------------------
369 {
370  return 0;
371 }
372 
373 //---------------------------------------------------------------------------------------------------------------------
374 void VSettings::SetLayoutShift(qreal value)
375 {
376  setValue(settingLayoutShift, value);
377 }
378 
379 //---------------------------------------------------------------------------------------------------------------------
381 {
382  const qreal def = GetDefLayoutWidth();
383  bool ok = false;
384  const qreal lWidth = value(settingLayoutWidth, def).toDouble(&ok);
385  if (ok)
386  {
387  return lWidth;
388  }
389  else
390  {
391  return def;
392  }
393 }
394 
395 //---------------------------------------------------------------------------------------------------------------------
397 {
398  return UnitConvertor(2.5, Unit::Mm, Unit::Px);
399 }
400 
401 //---------------------------------------------------------------------------------------------------------------------
402 void VSettings::SetLayoutWidth(qreal value)
403 {
404  setValue(settingLayoutWidth, value);
405 }
406 
407 //---------------------------------------------------------------------------------------------------------------------
408 QMarginsF VSettings::GetFields(const QMarginsF &def) const
409 {
410  const QVariant val = value(settingFields, QVariant::fromValue(def));
411  if (val.canConvert<QMarginsF>())
412  {
413  return val.value<QMarginsF>();
414  }
415  return def;
416 }
417 
418 //---------------------------------------------------------------------------------------------------------------------
419 void VSettings::SetFields(const QMarginsF &value)
420 {
421  setValue(settingFields, QVariant::fromValue(value));
422 }
423 
424 //---------------------------------------------------------------------------------------------------------------------
426 {
427  const Cases def = GetDefLayoutGroup();
428  bool ok = false;
429  const int g = value(settingLayoutSorting, static_cast<int>(def)).toInt(&ok);
430  if (ok)
431  {
432  if (g >= static_cast<int>(Cases::UnknownCase))
433  {
434  return def;
435  }
436  else
437  {
438  return static_cast<Cases>(g);
439  }
440  }
441  else
442  {
443  return def;
444  }
445 }
446 
447 //---------------------------------------------------------------------------------------------------------------------
449 {
450  return Cases::CaseDesc;
451 }
452 
453 //---------------------------------------------------------------------------------------------------------------------
455 {
456  setValue(settingLayoutSorting, static_cast<int>(value));
457 }
458 
459 //---------------------------------------------------------------------------------------------------------------------
461 {
462  return value(settingLayoutRotate, GetDefLayoutRotate()).toBool();
463 }
464 
465 //---------------------------------------------------------------------------------------------------------------------
467 {
468  return false;
469 }
470 
471 //---------------------------------------------------------------------------------------------------------------------
473 {
474  setValue(settingLayoutRotate, value);
475 }
476 
477 //---------------------------------------------------------------------------------------------------------------------
479 {
480  const int def = GetDefLayoutRotationIncrease();
481  bool ok = false;
482  const int r = value(settingLayoutRotationIncrease, def).toInt(&ok);
483  if (ok)
484  {
485  if (not (r >= 1 && r <= 180 && 360 % r == 0))
486  {
487  return def;
488  }
489  else
490  {
491  return r;
492  }
493  }
494  else
495  {
496  return def;
497  }
498 }
499 
500 //---------------------------------------------------------------------------------------------------------------------
502 {
503  return 180;/*degree*/
504 }
505 
506 //---------------------------------------------------------------------------------------------------------------------
508 {
509  setValue(settingLayoutRotationIncrease, value);
510 }
511 
512 //---------------------------------------------------------------------------------------------------------------------
514 {
515  return value(settingLayoutAutoCrop, GetDefLayoutAutoCrop()).toBool();
516 }
517 
518 //---------------------------------------------------------------------------------------------------------------------
520 {
521  return false;
522 }
523 
524 //---------------------------------------------------------------------------------------------------------------------
526 {
527  setValue(settingLayoutAutoCrop, value);
528 }
529 
530 //---------------------------------------------------------------------------------------------------------------------
532 {
533  return value(settingLayoutSaveLength, GetDefLayoutSaveLength()).toBool();
534 }
535 
536 //---------------------------------------------------------------------------------------------------------------------
538 {
539  return false;
540 }
541 
542 //---------------------------------------------------------------------------------------------------------------------
544 {
545  setValue(settingLayoutSaveLength, value);
546 }
547 
548 //---------------------------------------------------------------------------------------------------------------------
550 {
551  return value(settingLayoutUnitePages, GetDefLayoutUnitePages()).toBool();
552 }
553 
554 //---------------------------------------------------------------------------------------------------------------------
556 {
557  return false;
558 }
559 
560 //---------------------------------------------------------------------------------------------------------------------
562 {
563  setValue(settingLayoutUnitePages, value);
564 }
565 
566 //---------------------------------------------------------------------------------------------------------------------
568 {
569  return value(settingIgnoreFields, GetDefIgnoreAllFields()).toBool();
570 }
571 
572 //---------------------------------------------------------------------------------------------------------------------
574 {
575  return false;
576 }
577 
578 //---------------------------------------------------------------------------------------------------------------------
580 {
581  setValue(settingIgnoreFields, value);
582 }
583 
584 //---------------------------------------------------------------------------------------------------------------------
586 {
587  return value(settingStripOptimization, GetDefStripOptimization()).toBool();
588 }
589 
590 //---------------------------------------------------------------------------------------------------------------------
592 {
593  return false;
594 }
595 
596 //---------------------------------------------------------------------------------------------------------------------
598 {
599  setValue(settingStripOptimization, value);
600 }
601 
602 //---------------------------------------------------------------------------------------------------------------------
604 {
605  return static_cast<quint8>(value(settingMultiplier, GetDefMultiplier()).toUInt());
606 }
607 
608 //---------------------------------------------------------------------------------------------------------------------
610 {
611  return 1;
612 }
613 
614 //---------------------------------------------------------------------------------------------------------------------
615 void VSettings::SetMultiplier(quint8 value)
616 {
617  setValue(settingMultiplier, value);
618 }
619 
620 //---------------------------------------------------------------------------------------------------------------------
622 {
623  return value(settingTextAsPaths, GetDefTextAsPaths()).toBool();
624 }
625 
626 //---------------------------------------------------------------------------------------------------------------------
628 {
629  return false;
630 }
631 
632 //---------------------------------------------------------------------------------------------------------------------
634 {
635  setValue(settingTextAsPaths, value);
636 }
637 
638 // settings for the tiled PDFs
639 //---------------------------------------------------------------------------------------------------------------------
640 /**
641  * @brief VSettings::GetTiledPDFMargins returns the tiled pdf margins in the given unit. When the setting is
642  * called for the first time, the 4 default margins are 10mm.
643  * @param unit
644  * @return
645  */
646 QMarginsF VSettings::GetTiledPDFMargins(const Unit &unit) const
647 {
648  // default value is 10mm. We save the margins in mm in the setting.
649  const QMarginsF def = QMarginsF(10,10,10,10);
650 
651  const QVariant val = value(settingTiledPDFMargins, QVariant::fromValue(def));
652 
653  if (val.canConvert<QMarginsF>())
654  {
655  return UnitConvertor(val.value<QMarginsF>(), Unit::Mm, unit);
656  }
657  return UnitConvertor(def, Unit::Mm, unit);
658 }
659 
660 //---------------------------------------------------------------------------------------------------------------------
661 /**
662  * @brief VSettings::setTiledPDFMargins sets the setting tiled pdf margins to the given value.
663  * @param value the margins to save
664  * @param unit the unit in which are the value. Necessary because we save the values
665  * internaly as mm so there is conversion beeing made.
666  */
667 void VSettings::setTiledPDFMargins(const QMarginsF &value, const Unit &unit)
668 {
669  QMarginsF margins = UnitConvertor(value, unit, Unit::Mm);
670 
671  setValue(settingTiledPDFMargins, QVariant::fromValue(margins));
672 }
673 
674 
675 //---------------------------------------------------------------------------------------------------------------------
676 /**
677  * @brief VSettings::getTiledPDFPaperHeight returns the paper height of tiled pdf in the desired unit.
678  * @param unit the unit to return the value to (internally it's saved as mm)
679  * @return
680  */
681 qreal VSettings::getTiledPDFPaperHeight(const Unit &unit) const
682 {
683  const qreal def = 297 /*A4*/;
684  bool ok = false;
685  const qreal height = value(settingTiledPDFPaperHeight, def).toDouble(&ok);
686  if (ok)
687  {
688  return UnitConvertor(height, Unit::Mm, unit);
689  }
690  else
691  {
692  return UnitConvertor(def, Unit::Mm, unit);
693  }
694 }
695 
696 //---------------------------------------------------------------------------------------------------------------------
697 /**
698  * @brief VSettings::setTiledPDFPaperHeight sets the tiled pdf paper height
699  * @param value in Mm
700  * @param unit unit of the given value
701  */
702 void VSettings::setTiledPDFPaperHeight(qreal value, const Unit &unit)
703 {
704  setValue(settingTiledPDFPaperHeight, UnitConvertor(value, unit, Unit::Mm));
705 }
706 
707 //---------------------------------------------------------------------------------------------------------------------
708 /**
709  * @brief VSettings::getTiledPDFPaperWidth returns the paper height of tiled pdf in the desired unit.
710  * @param unit the unit to return the value to (internally it's saved as mm)
711  * @return
712  */
713 qreal VSettings::getTiledPDFPaperWidth(const Unit &unit) const
714 {
715 
716  const qreal def = 210 /*A4*/;
717  bool ok = false;
718  const qreal width = value(settingTiledPDFPaperWidth, def).toDouble(&ok);
719 
720  if (ok)
721  {
722  return UnitConvertor(width, Unit::Mm, unit);
723  }
724  else
725  {
726  return UnitConvertor(def, Unit::Mm, unit);
727  }
728 }
729 
730 //---------------------------------------------------------------------------------------------------------------------
731 /**
732  * @brief VSettings::setTiledPDFPaperWidth sets the tiled pdf paper width
733  * @param unit unit of the given value
734  * @param value in Mm
735  */
736 void VSettings::setTiledPDFPaperWidth(qreal value, const Unit &unit)
737 {
738  setValue(settingTiledPDFPaperWidth, UnitConvertor(value,unit, Unit::Mm));
739 }
740 
741 //---------------------------------------------------------------------------------------------------------------------
743 {
744  bool defaultValue = static_cast<bool>(PageOrientation::Portrait);
745 
746  bool result = value(settingTiledPDFOrientation, defaultValue).toBool();
747 
748  return static_cast<PageOrientation>(result);
749 }
750 
751 //---------------------------------------------------------------------------------------------------------------------
753 {
754  bool orientation = static_cast<bool> (value);
755 
756  setValue(settingTiledPDFOrientation, orientation);
757 }
bool GetLayoutSaveLength() const
Definition: vsettings.cpp:531
void setTiledPDFOrientation(PageOrientation value)
Definition: vsettings.cpp:752
QString GetUsername() const
Definition: vsettings.cpp:272
void SetLabelLanguage(const QString &value)
Definition: vsettings.cpp:128
void SetProxyPort(const QString &value)
Definition: vsettings.cpp:242
void SetProxy(const bool &value)
Definition: vsettings.cpp:218
void SetGraphicalOutput(const bool &value)
Definition: vsettings.cpp:182
void SetLayoutGroup(const Cases &value)
Definition: vsettings.cpp:454
static bool GetDefLayoutSaveLength()
Definition: vsettings.cpp:537
QString GetUserPassword() const
Definition: vsettings.cpp:296
bool GetGraphicalOutput() const
Definition: vsettings.cpp:176
void SetUsername(const QString &value)
Definition: vsettings.cpp:278
static qreal GetDefLayoutWidth()
Definition: vsettings.cpp:396
QString GetProxyPort() const
Definition: vsettings.cpp:236
void SetProxyAddress(const QString &value)
Definition: vsettings.cpp:230
quint8 GetMultiplier() const
Definition: vsettings.cpp:603
static bool GetDefLayoutRotate()
Definition: vsettings.cpp:466
static QString GetDefPathLayout()
Definition: vsettings.cpp:155
bool GetStripOptimization() const
Definition: vsettings.cpp:585
QString GetLabelLanguage() const
Definition: vsettings.cpp:122
static Cases GetDefLayoutGroup()
Definition: vsettings.cpp:448
bool GetSavePassword() const
Definition: vsettings.cpp:284
QString GetProxyUser() const
Definition: vsettings.cpp:248
void SetSavePassword(const bool &value)
Definition: vsettings.cpp:290
static QString GetDefPathPattern()
Definition: vsettings.cpp:134
VSettings(Format format, Scope scope, const QString &organization, const QString &application=QString(), QObject *parent=nullptr)
Definition: vsettings.cpp:114
qreal GetLayoutPaperHeight() const
Definition: vsettings.cpp:308
static bool GetDefTextAsPaths()
Definition: vsettings.cpp:627
void setTiledPDFMargins(const QMarginsF &value, const Unit &unit)
VSettings::setTiledPDFMargins sets the setting tiled pdf margins to the given value.
Definition: vsettings.cpp:667
qreal GetLayoutWidth() const
Definition: vsettings.cpp:380
void setTextAsPaths(bool value)
Definition: vsettings.cpp:633
void SetLayoutPaperHeight(qreal value)
Definition: vsettings.cpp:324
QString GetServer() const
Definition: vsettings.cpp:188
void SetFields(const QMarginsF &value)
Definition: vsettings.cpp:419
Cases GetLayoutGroup() const
Definition: vsettings.cpp:425
void SetPathPattern(const QString &value)
Definition: vsettings.cpp:147
void SetLayoutAutoCrop(bool value)
Definition: vsettings.cpp:525
qreal GetLayoutShift() const
Definition: vsettings.cpp:352
void setTiledPDFPaperHeight(qreal value, const Unit &unit)
VSettings::setTiledPDFPaperHeight sets the tiled pdf paper height.
Definition: vsettings.cpp:702
static quint8 GetDefMultiplier()
Definition: vsettings.cpp:609
void SetLayoutSaveLength(bool value)
Definition: vsettings.cpp:543
bool GetIgnoreAllFields() const
Definition: vsettings.cpp:567
bool GetProxy() const
Definition: vsettings.cpp:212
void SetServer(const QString &value)
Definition: vsettings.cpp:194
void SetPathLayout(const QString &value)
Definition: vsettings.cpp:168
static bool GetDefLayoutAutoCrop()
Definition: vsettings.cpp:519
void SetLayoutRotate(bool value)
Definition: vsettings.cpp:472
void SetMultiplier(quint8 value)
Definition: vsettings.cpp:615
QString GetPathPattern() const
Definition: vsettings.cpp:140
QMarginsF GetFields(const QMarginsF &def=QMarginsF()) const
Definition: vsettings.cpp:408
void SetLayoutRotationIncrease(int value)
Definition: vsettings.cpp:507
void SetLayoutWidth(qreal value)
Definition: vsettings.cpp:402
void SetLayoutPaperWidth(qreal value)
Definition: vsettings.cpp:346
qreal getTiledPDFPaperWidth(const Unit &unit) const
VSettings::getTiledPDFPaperWidth returns the paper height of tiled pdf in the desired unit.
Definition: vsettings.cpp:713
QMarginsF GetTiledPDFMargins(const Unit &unit) const
VSettings::GetTiledPDFMargins returns the tiled pdf margins in the given unit. When the setting is ca...
Definition: vsettings.cpp:646
QString getLayoutPath() const
Definition: vsettings.cpp:161
bool GetLayoutAutoCrop() const
Definition: vsettings.cpp:513
QString GetProxyPass() const
Definition: vsettings.cpp:260
QString GetProxyAddress() const
Definition: vsettings.cpp:224
static bool GetDefIgnoreAllFields()
Definition: vsettings.cpp:573
void SetUserPassword(const QString &value)
Definition: vsettings.cpp:302
static int GetDefLayoutRotationIncrease()
Definition: vsettings.cpp:501
void SetServerSecure(const bool &value)
Definition: vsettings.cpp:206
void SetLayoutShift(qreal value)
Definition: vsettings.cpp:374
qreal getTiledPDFPaperHeight(const Unit &unit) const
VSettings::getTiledPDFPaperHeight returns the paper height of tiled pdf in the desired unit.
Definition: vsettings.cpp:681
void SetStripOptimization(bool value)
Definition: vsettings.cpp:597
bool GetServerSecure() const
Definition: vsettings.cpp:200
bool GetLayoutUnitePages() const
Definition: vsettings.cpp:549
bool GetLayoutRotate() const
Definition: vsettings.cpp:460
void SetLayoutUnitePages(bool value)
Definition: vsettings.cpp:561
void SetProxyUser(const QString &value)
Definition: vsettings.cpp:254
void SetIgnoreAllFields(bool value)
Definition: vsettings.cpp:579
PageOrientation getTiledPDFOrientation() const
Definition: vsettings.cpp:742
void SetProxyPass(const QString &value)
Definition: vsettings.cpp:266
qreal GetLayoutPaperWidth() const
Definition: vsettings.cpp:330
bool GetTextAsPaths() const
Definition: vsettings.cpp:621
int GetLayoutRotationIncrease() const
Definition: vsettings.cpp:478
void setTiledPDFPaperWidth(qreal value, const Unit &unit)
VSettings::setTiledPDFPaperWidth sets the tiled pdf paper width.
Definition: vsettings.cpp:736
static qreal GetDefLayoutShift()
Definition: vsettings.cpp:368
static bool GetDefLayoutUnitePages()
Definition: vsettings.cpp:555
static bool GetDefStripOptimization()
Definition: vsettings.cpp:591
qreal UnitConvertor(qreal value, const Unit &from, const Unit &to)
Definition: def.cpp:269
PageOrientation
Definition: def.h:110
Unit
Definition: def.h:105
const QString settingLayoutRotationIncrease
Definition: vsettings.cpp:97
const QString settingCommunityUserPassword
Definition: vsettings.cpp:89
const QString settingCommunityServerSecure
Definition: vsettings.cpp:81
const QString settingCommunitySavePassword
Definition: vsettings.cpp:88
const QString settingPatternGraphicalOutput
Definition: vsettings.cpp:78
const QString settingConfigurationLabelLanguage
Definition: vsettings.cpp:73
const QString settingCommunityProxyAddress
Definition: vsettings.cpp:83
Cases
Definition: vbank.h:71
@ CaseDesc
@ UnknownCase