21 #include <QGridLayout>
24 #include <QSpacerItem>
38 : QWidget( _pqParent )
49 QGridLayout* __pqGridLayout =
new QGridLayout();
56 __pqGridLayout->addWidget(
new QLabel( tr(
"Screen Resolution")+
":" ), __iRow, 0 );
57 QSpinBox* __pqSpinBoxScreenDpi =
new QSpinBox();
58 __pqSpinBoxScreenDpi->setToolTip( tr(
"Manually set the screen resolution for optimal rendering/sizing, in DPI") );
59 __pqSpinBoxScreenDpi->setRange( 1, 1200 );
60 __pqSpinBoxScreenDpi->setValue( __poSettings->
getScreenDpi() );
61 __pqGridLayout->addWidget( __pqSpinBoxScreenDpi, __iRow, 1 );
62 connect( __pqSpinBoxScreenDpi, SIGNAL( valueChanged(
int) ), __poSettings, SLOT( slotScreenDpi(
int) ) );
66 __pqGridLayout->addWidget(
new QLabel( tr(
"Screen Gestures")+
":" ), __iRow, 0 );
67 QCheckBox* __pqCheckBoxScreenGestures =
new QCheckBox();
68 __pqCheckBoxScreenGestures->setCheckState( __poSettings->
isScreenGestures() ? Qt::Checked : Qt::Unchecked );
69 __pqCheckBoxScreenGestures->setToolTip( tr(
"Whether to enable screen gestures, like pinch-to-zoom\nWARNING: this may lead to unresponsive interface on incompatible devices!") );
70 __pqGridLayout->addWidget( __pqCheckBoxScreenGestures, __iRow, 1 );
71 connect( __pqCheckBoxScreenGestures, SIGNAL( stateChanged(
int) ), __poSettings, SLOT( slotScreenGestures(
int) ) );
75 __pqGridLayout->addWidget(
new QLabel( tr(
"Refresh Rate (detail)")+
":" ), __iRow, 0 );
76 QSpinBox* __pqSpinBoxRateRefresh =
new QSpinBox();
77 __pqSpinBoxRateRefresh->setToolTip( tr(
"How often to refresh the interface content (chart, overlays, textual data, etc.), in milli-seconds [ms]\nWARNING: the lower this setting, the higher the CPU usage!") );
78 __pqSpinBoxRateRefresh->setRange( 100, 5000 );
79 __pqSpinBoxRateRefresh->setValue( __poSettings->
getRateRefresh() );
80 __pqGridLayout->addWidget( __pqSpinBoxRateRefresh, __iRow, 1 );
81 connect( __pqSpinBoxRateRefresh, SIGNAL( valueChanged(
int) ), __poSettings, SLOT( slotRateRefresh(
int) ) );
85 __pqGridLayout->addWidget(
new QLabel( tr(
"Redraw Rate (chart)")+
":" ), __iRow, 0 );
86 QSpinBox* __pqSpinBoxRateRedraw =
new QSpinBox();
87 __pqSpinBoxRateRedraw->setToolTip( tr(
"How often to inconditionally redraw the charted content (chart and overlays), in seconds [s]\nWARNING: the lower this setting, the higher the CPU usage!") );
88 __pqSpinBoxRateRedraw->setRange( 1, 300 );
89 __pqSpinBoxRateRedraw->setValue( __poSettings->
getRateRedraw() );
90 __pqGridLayout->addWidget( __pqSpinBoxRateRedraw, __iRow, 1 );
91 connect( __pqSpinBoxRateRedraw, SIGNAL( valueChanged(
int) ), __poSettings, SLOT( slotRateRedraw(
int) ) );
95 __pqGridLayout->addWidget(
new QLabel( tr(
"Chart Opacity")+
":" ), __iRow, 0 );
96 QSpinBox* __pqSpinBoxChartOpacity =
new QSpinBox();
97 __pqSpinBoxChartOpacity->setToolTip( tr(
"Chart opacity/dimming (to improve overlays contrast), in percent [%]") );
98 __pqSpinBoxChartOpacity->setRange( 0, 100 );
100 __pqGridLayout->addWidget( __pqSpinBoxChartOpacity, __iRow, 1 );
101 connect( __pqSpinBoxChartOpacity, SIGNAL( valueChanged(
int) ), __poSettings, SLOT( slotChartOpacity(
int) ) );
106 __pqGridLayout->addWidget(
new QLabel( tr(
"Symbols Path")+
":" ), __iRow, 0 );
107 QLineEdit* __pqLineEditPathSymbolsDirectory =
new QLineEdit();
108 __pqLineEditPathSymbolsDirectory->setToolTip( tr(
"Directory path to symbols (PNG files) library\nNOTE: Symbol names (used in landmark, waypoint or vessel definition)\nwill be lower-cased and space-stripped before a library match is looked for") );
110 __pqGridLayout->addWidget( __pqLineEditPathSymbolsDirectory, __iRow, 1 );
111 connect( __pqLineEditPathSymbolsDirectory, SIGNAL( textChanged(
const QString&) ), __poSettings, SLOT( slotPathSymbolsDirectory(
const QString&) ) );
115 __pqGridLayout->addWidget(
new QLabel( tr(
"Symbols Visibility")+
":" ), __iRow, 0 );
116 QCheckBox* __pqCheckBoxVisibleSymbols =
new QCheckBox();
117 __pqCheckBoxVisibleSymbols->setToolTip( tr(
"Whether to draw the symbols associated with landmarks, waypoints or vessels") );
118 __pqCheckBoxVisibleSymbols->setCheckState( __poSettings->
isVisibleSymbols() ? Qt::Checked : Qt::Unchecked );
119 __pqGridLayout->addWidget( __pqCheckBoxVisibleSymbols, __iRow, 1 );
120 connect( __pqCheckBoxVisibleSymbols, SIGNAL( stateChanged(
int) ), __poSettings, SLOT( slotVisibleSymbols(
int) ) );
124 __pqGridLayout->addWidget(
new QLabel( tr(
"High-Resolution Printing")+
":" ), __iRow, 0 );
125 QCheckBox* __pqCheckBoxPrintHighRes =
new QCheckBox();
126 __pqCheckBoxPrintHighRes->setToolTip( tr(
"Whether to print charted content in high-resolution (1200 DPI) or screen resolution (see above Screen Resolution)\nWARNING: high-resolution prints may take very long to reach your printer!") );
127 __pqCheckBoxPrintHighRes->setCheckState( __poSettings->
isPrintHighRes() ? Qt::Checked : Qt::Unchecked );
128 __pqGridLayout->addWidget( __pqCheckBoxPrintHighRes, __iRow, 1 );
129 connect( __pqCheckBoxPrintHighRes, SIGNAL( stateChanged(
int) ), __poSettings, SLOT( slotPrintHighRes(
int) ) );
133 __pqGridLayout->addItem(
new QSpacerItem( 0, this->height() ), __iRow, 0, 3 );
134 QWidget::setLayout( __pqGridLayout );
void constructLayout()
Constructs the layout of the user interface.
CSettingsMiscEditView(QWidget *_pqParent=0)
[UI] Container for the application's settings
int getChartOpacity()
[Misc] Returns the chart opacity [0,100]
bool isPrintHighRes()
[Misc] Returns the high-resolution printing status
int getScreenDpi()
[Misc] Returns the screen Dots-per-Inch (DPI)
bool isVisibleSymbols()
[Misc] Returns the symbols visibility (on chart)
bool isScreenGestures()
[Misc] Returns the screen (multitouch) gestures activation status
QString getPathSymbolsDirectory()
[Path] Returns the symbols directory
int getRateRefresh()
[Misc] Returns the content refresh rate, in milliseconds
int getRateRedraw()
[Misc] Returns the content redraw rate, in seconds
static CSettings * useSettings()