10#include "starprofileviewer.h"
11#include <KLocalizedString>
13using namespace QtDataVisualization;
15StarProfileViewer::StarProfileViewer(
QWidget *parent) :
QDialog(parent)
22 m_graph =
new Q3DBars();
23 m_pixelValueAxis = m_graph->valueAxis();
24 m_xPixelAxis = m_graph->columnAxis();
25 m_yPixelAxis = m_graph->rowAxis();
27 m_pixelValueAxis->setTitle(
i18n(
"Pixel Values"));
28 m_pixelValueAxis->setLabelAutoRotation(30.0f);
29 m_pixelValueAxis->setTitleVisible(
true);
31 m_xPixelAxis->setTitle(
i18n(
"Horizontal"));
32 m_xPixelAxis->setLabelAutoRotation(30.0f);
33 m_xPixelAxis->setTitleVisible(
true);
34 m_yPixelAxis->setTitle(
i18n(
"Vertical"));
35 m_yPixelAxis->setLabelAutoRotation(30.0f);
36 m_yPixelAxis->setTitleVisible(
true);
38 m_3DPixelSeries =
new QBar3DSeries;
40 m_3DPixelSeries->setMesh(QAbstract3DSeries::MeshBevelBar);
41 m_graph->addSeries(m_3DPixelSeries);
43 m_graph->activeTheme()->setLabelBackgroundEnabled(
false);
47 if (!m_graph->hasContext()) {
49 msgBox.
setText(
i18n(
"Couldn't initialize the OpenGL context."));
54 QSize screenSize = m_graph->screen()->size();
60 this->setWindowTitle(
i18nc(
"@title:window",
"View Star Profile"));
77 maxValue->setToolTip(
i18n(
"Maximum Value on the graph"));
78 cutoffValue=
new QLabel(
this);
79 cutoffValue->setToolTip(
i18n(
"Cuttoff Maximum for eliminating hot pixels and bright stars."));
82 toggleEnableCutoff->
setToolTip(
i18n(
"Enable or Disable the Max Value Cutoff"));
87 blackPointSlider->setToolTip(
i18n(
"Sets the Minimum Value on the graph"));
88 sliderLayout->
addWidget(blackPointSlider,0,0);
92 whitePointSlider->setToolTip(
i18n(
"Sets the Maximum Value on the graph"));
93 sliderLayout->
addWidget(whitePointSlider,0,1);
97 cutoffSlider->setToolTip(
i18n(
"Sets the Cuttoff Maximum for eliminating hot pixels and bright stars."));
98 sliderLayout->
addWidget(cutoffSlider,0,2);
100 cutoffSlider->setEnabled(
false);
102 minValue =
new QLabel(
this);
103 minValue->setToolTip(
i18n(
"Minimum Value on the graph"));
106 autoScale->setText(
i18n(
"AutoScale"));
107 autoScale->setToolTip(
i18n(
"Automatically scales the sliders for the subFrame.\nUncheck to leave them unchanged when you pan around."));
108 autoScale->setChecked(
true);
112 showScaling->setCheckable(
true);
113 showScaling->setMaximumSize(22, 22);
115 showScaling->setToolTip(
i18n(
"Hides and shows the scaling side panel"));
116 showScaling->setChecked(
false);
118 rightLayout->
addWidget(toggleEnableCutoff);
126 selectionType->setToolTip(
i18n(
"Changes the type of selection"));
127 selectionType->addItem(
i18n(
"Item"));
128 selectionType->addItem(
i18n(
"Horizontal"));
129 selectionType->addItem(
i18n(
"Vertical"));
130 selectionType->setCurrentIndex(0);
134 sliceB->setCheckable(
true);
135 sliceB->setMaximumSize(22, 22);
137 sliceB->setToolTip(
i18n(
"Toggles the slice view when horizontal or vertical items are selected"));
138 sliceB->setCheckable(
true);
139 sliceB->setChecked(
false);
140 sliceB->setEnabled(
false);
141 sliceB->setDefault(
false);
145 showCoordinates->setCheckable(
true);
146 showCoordinates->setMaximumSize(22, 22);
148 showCoordinates->setToolTip(
i18n(
"Shows the x, y coordinates of star centers in the frame"));
149 showCoordinates->setChecked(
false);
152 HFRReport->setToolTip(
i18n(
"Shows the HFR of stars in the frame"));
154 HFRReport->setCheckable(
true);
155 HFRReport->setMaximumSize(22, 22);
157 HFRReport->setChecked(
true);
159 reportBox =
new QLabel(
this);
163 showPeakValues->setCheckable(
true);
164 showPeakValues->setMaximumSize(22, 22);
166 showPeakValues->setToolTip(
i18n(
"Shows the peak values of star centers in the frame"));
167 showPeakValues->setChecked(
true);
170 sampleSize->setToolTip(
i18n(
"Changes the sample size shown in the graph"));
177 sampleSize->setCurrentIndex(3);
178 sampleSize->setVisible(
false);
181 zoomView->setToolTip(
i18n(
"Zooms the view to preset locations."));
182 zoomView->addItem(
i18n(
"ZoomTo"));
183 zoomView->addItem(
i18n(
"Front"));
184 zoomView->addItem(
i18n(
"Front High"));
185 zoomView->addItem(
i18n(
"Overhead"));
186 zoomView->addItem(
i18n(
"Iso. L"));
187 zoomView->addItem(
i18n(
"Iso. R"));
188 zoomView->addItem(
i18n(
"Selected"));
189 zoomView->setCurrentIndex(0);
196 selectorsVisible->
setToolTip(
i18n(
"Hides and shows the Vertical and Horizontal Selection Sliders"));
200 controlsLayout->
addWidget(selectionType);
201 controlsLayout->
addWidget(selectorsVisible);
207 controlsLayout->
addWidget(showCoordinates);
209 controlsLayout->
addWidget(showPeakValues);
214 bottomSliderWidget->
setLayout(bottomSliders);
215 mainLayout->
addWidget(bottomSliderWidget);
219 verticalSelector->setToolTip(
i18n(
"Selects the Vertical Value"));
221 horizontalSelector->setToolTip(
i18n(
"Selects the Horizontal Value"));
224 bottomSliders->
addWidget(verticalSelector, 0, 1);
226 bottomSliders->
addWidget(horizontalSelector, 1, 1);
230 mainLayout->
addWidget(bottomControlsWidget);\
235 exploreMode->setCheckable(
true);
236 exploreMode->setMaximumSize(22, 22);
238 exploreMode->setToolTip(
i18n(
"Zooms automatically as the sliders change"));
239 exploreMode->setChecked(
true);
247 m_graph->setBarSpacing(
QSizeF(0.5,0.5));
255 grGtoR.setColorAt(0.2,
Qt::red);
260 pmp.setBrush(
QBrush(grGtoR));
261 pmp.drawRect(0, 0, 50, 10);
268 grBtoY.setColorAt(0.33,
Qt::red);
270 pmp.setBrush(
QBrush(grBtoY));
271 pmp.drawRect(0, 0, 50, 10);
279 pixelReport =
new QLabel(
"", bottomControlsWidget);
281 bottomControlLayout->
addWidget(exploreMode);
282 bottomControlLayout->
addWidget(barSpacing);
284 bottomControlLayout->
addWidget(pixelReport);
287 this, SLOT(changeSelectionType(
int)));
289 this, SLOT(zoomViewTo(
int)));
291 this, &StarProfileViewer::toggleSlice);
293 this, &StarProfileViewer::updateHFRandPeakSelection);
295 this, &StarProfileViewer::updateHFRandPeakSelection);
297 this, &StarProfileViewer::updateHFRandPeakSelection);
299 this, &StarProfileViewer::updateVerticalAxis);
301 this, &StarProfileViewer::updateVerticalAxis);
303 this, &StarProfileViewer::updateDisplayData);
305 this, &StarProfileViewer::updateScale);
309 this, SLOT(updateSampleSize(
QString)));
311 this, SLOT(updateColor(
int)));
313 this, &StarProfileViewer::changeSelection);
315 this, &StarProfileViewer::changeSelection);
321 this, &StarProfileViewer::toggleCutoffEnabled);
323 this, &StarProfileViewer::updateSelectorBars);
325 this, &StarProfileViewer::updateBarSpacing);
327 m_graph->activeTheme()->setType(Q3DTheme::Theme(3));
329 setGreenToRedGradient();
331 m_graph->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetFront);
332 m_graph->scene()->activeCamera()->setTarget(
QVector3D(0.0f, 0.0f, 0.0f));
333 m_graph->scene()->activeCamera()->setZoomLevel(110);
339 for (
auto &button : qButtons)
340 button->setAutoDefault(
false);
346StarProfileViewer::~StarProfileViewer()
359 switch (data->getStatistics().dataType)
362 loadDataPrivate<uint8_t>();
366 loadDataPrivate<int16_t>();
370 loadDataPrivate<uint16_t>();
374 loadDataPrivate<int32_t>();
378 loadDataPrivate<uint32_t>();
382 loadDataPrivate<float>();
386 loadDataPrivate<int64_t>();
390 loadDataPrivate<double>();
400 updateHFRandPeakSelection();
408void StarProfileViewer::loadDataPrivate()
411 dataSet =
new QBarDataArray;
412 QBarDataRow *dataRow;
413 dataSet->reserve(subFrame.
height());
417 auto *buffer =
reinterpret_cast<T
const *
>(imageData->getImageBuffer());
418 int width = imageData->width();
420 for (
int j = subFrame.
y(); j < subFrame.
y() + subFrame.
height(); j++)
426 dataRow =
new QBarDataRow(subFrame.
width());
428 for (
int i = subFrame.
x(); i < subFrame.
x() + subFrame.
width(); i++)
434 if( i > 0 && i < imageData->
width() && j > 0 && j < imageData->
height())
435 (*dataRow)[
x].setValue(*(buffer + i + j *
width));
438 dataSet->insert(0, dataRow);
441 std::reverse(rowLabels.
begin(), rowLabels.
end());
443 m_3DPixelSeries->dataProxy()->setRowLabels(rowLabels);
444 m_3DPixelSeries->dataProxy()->setColumnLabels(columnLabels);
447void StarProfileViewer::toggleCutoffEnabled(
bool enable)
450 cutOffEnabled = enable;
454void StarProfileViewer::updateScale()
459 this, &StarProfileViewer::updateVerticalAxis);
461 this, &StarProfileViewer::updateVerticalAxis);
463 this, &StarProfileViewer::updateDisplayData);
465 float subFrameMin, subFrameMax;
466 double dataMin, dataMax;
468 getSubFrameMinMax(&subFrameMin, &subFrameMax, &dataMin, &dataMax);
470 int sliderDataMin = convertToSliderValue(dataMin) - 1;
471 int sliderDataMax = convertToSliderValue(dataMax) + 1;
477 int sliderMin = convertToSliderValue(min) - 1;
478 int sliderMax = convertToSliderValue(max) + 1;
479 blackPointSlider->
setRange(sliderMin, sliderMax);
481 whitePointSlider->
setRange(sliderMin, sliderMax);
483 cutoffSlider->
setRange(sliderMin, sliderDataMax);
485 blackPointSlider->
setValue(sliderMin);
486 whitePointSlider->
setValue(sliderMax);
487 cutoffSlider->
setValue(sliderDataMax);
491 min = convertFromSliderValue(blackPointSlider->
value());
492 max = convertFromSliderValue(whitePointSlider->
value());
493 blackPointSlider->
setRange(sliderDataMin, sliderDataMax);
494 blackPointSlider->
setTickInterval((sliderDataMax - sliderDataMin) / 100);
495 whitePointSlider->
setRange(sliderDataMin, sliderDataMax);
496 whitePointSlider->
setTickInterval((sliderDataMax - sliderDataMin) / 100);
497 cutoffSlider->
setRange(sliderDataMin, sliderDataMax);
501 m_pixelValueAxis->setRange(min, max);
504 cutoffValue->
setText(
i18n(
"Cut: %1", roundf(convertFromSliderValue(cutoffSlider->
value()) * 100) / 100));
506 cutoffValue->
setText(
"Cut Disabled");
510 m_pixelValueAxis->setLabelFormat(
QString(QStringLiteral(
"%.3f ")));
511 m_3DPixelSeries->setItemLabelFormat(
QString(QStringLiteral(
"%.3f ")));
512 maxValue->
setText(
i18n(
"Max: %1", roundf(max * 100) / 100));
513 minValue->
setText(
i18n(
"Min: %1", roundf(min * 100) / 100));
517 m_pixelValueAxis->setLabelFormat(
QString(QStringLiteral(
"%.0f ")));
518 m_3DPixelSeries->setItemLabelFormat(
QString(QStringLiteral(
"%.0f ")));
524 this, &StarProfileViewer::updateVerticalAxis);
526 this, &StarProfileViewer::updateVerticalAxis);
528 this, &StarProfileViewer::updateDisplayData);
531void StarProfileViewer::updateBarSpacing(
int value)
533 float spacing = (float)value/100.0;
534 m_graph->setBarSpacing(
QSizeF(spacing, spacing));
537void StarProfileViewer::zoomViewTo(
int where)
541 int star = where - 7;
542 int x = starCenters[star]->x - subFrame.
x();
543 int y = subFrame.
height() - (starCenters[star]->y - subFrame.
y());
544 m_graph->primarySeries()->setSelectedBar(
QPoint(
y ,
x ));
553 m_graph->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetFront);
554 m_graph->scene()->activeCamera()->setTarget(
QVector3D(0.0f, 0.0f, 0.0f));
555 m_graph->scene()->activeCamera()->setZoomLevel(110);
560 m_graph->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetFrontHigh);
561 m_graph->scene()->activeCamera()->setTarget(
QVector3D(0.0f, 0.0f, 0.0f));
562 m_graph->scene()->activeCamera()->setZoomLevel(110);
567 m_graph->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetDirectlyAbove);
568 m_graph->scene()->activeCamera()->setTarget(
QVector3D(0.0f, 0.0f, 0.0f));
569 m_graph->scene()->activeCamera()->setZoomLevel(110);
574 m_graph->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetIsometricLeftHigh);
575 m_graph->scene()->activeCamera()->setTarget(
QVector3D(0.0f, 0.0f, 0.0f));
576 m_graph->scene()->activeCamera()->setZoomLevel(110);
581 m_graph->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetIsometricRightHigh);
582 m_graph->scene()->activeCamera()->setTarget(
QVector3D(0.0f, 0.0f, 0.0f));
583 m_graph->scene()->activeCamera()->setZoomLevel(110);
589 QPoint selectedBar = m_graph->selectedSeries()
590 ? m_graph->selectedSeries()->selectedBar()
591 : QBar3DSeries::invalidSelectionPosition();
592 if (selectedBar != QBar3DSeries::invalidSelectionPosition())
595 float xMin = m_graph->columnAxis()->min();
596 float xRange = m_graph->columnAxis()->max() - xMin;
597 float zMin = m_graph->rowAxis()->min();
598 float zRange = m_graph->rowAxis()->max() - zMin;
599 target.
setX((selectedBar.
y() - xMin) / xRange * 2.0f - 1.0f);
600 target.
setZ((selectedBar.
x() - zMin) / zRange * 2.0f - 1.0f);
602 qreal endAngleX = qAtan(qreal(target.
z() / target.
x())) / M_PI * -180.0 + 90.0;
603 if (target.
x() > 0.0f)
605 float barValue = m_graph->selectedSeries()->dataProxy()->itemAt(selectedBar.
x(),
606 selectedBar.
y())->value();
607 float endAngleY = 60.0f;
608 float zoom = 150 * 1/qSqrt(barValue / convertFromSliderValue(whitePointSlider->
value()));
609 m_graph->scene()->activeCamera()->setCameraPosition(endAngleX, endAngleY, zoom);
610 m_graph->scene()->activeCamera()->setTarget(target);
625void StarProfileViewer::changeSelectionType(
int type)
629 m_graph->setSelectionMode(QAbstract3DGraph::SelectionItem);
630 m_graph->scene()->setSlicingActive(
false);
635 m_graph->setSelectionMode(QAbstract3DGraph::SelectionItemAndRow);
640 m_graph->setSelectionMode(QAbstract3DGraph::SelectionItemAndColumn);
649void StarProfileViewer::changeSelection()
651 int x = horizontalSelector->
value();
652 int y = verticalSelector->
value();
653 m_graph->primarySeries()->setSelectedBar(
QPoint(
y ,
x ));
659void StarProfileViewer::updatePixelReport()
661 int x = horizontalSelector->
value();
662 int y = verticalSelector->
value();
665 y = (subFrame.
height() - 1 -
y) + subFrame.
y();
666 float barValue = getImageDataValue(
x,
y);
667 pixelReport->
setText(
i18n(
"Selected Pixel: (%1, %2): %3",
x + 1,
y + 1, roundf(barValue * 100) / 100));
672void StarProfileViewer::updateSelectorBars(
QPoint position)
676 this, &StarProfileViewer::changeSelection);
678 this, &StarProfileViewer::changeSelection);
681 verticalSelector->
setValue(position.
x());
682 horizontalSelector->
setValue(position.
y());
686 this, &StarProfileViewer::changeSelection);
688 this, &StarProfileViewer::changeSelection);
691void StarProfileViewer::updateSampleSize(
const QString &text)
693 emit sampleSizeUpdated(text.
toInt());
696void StarProfileViewer::enableTrackingBox(
bool enable)
701void StarProfileViewer::updateDisplayData()
704 cutoffValue->
setText(
i18n(
"Cut: %1", roundf(convertFromSliderValue(cutoffSlider->
value()) * 100) / 100));
707 if(dataSet !=
nullptr)
709 QBarDataArray *displayDataSet =
new QBarDataArray;
710 displayDataSet->reserve(dataSet->size());
712 for (
int row = 0; row < dataSet->size(); row++)
714 QBarDataRow *dataRow = dataSet->at(row);
715 QBarDataRow *newDataRow;
716 newDataRow =
new QBarDataRow(dataRow->size());
717 for (
int column = 0; column < dataRow->size(); column++)
719 if(cutOffEnabled && dataRow->value(column).value() > convertFromSliderValue(cutoffSlider->
value()))
720 (*newDataRow)[column].setValue(0.0f);
722 (*newDataRow)[column].setValue(dataRow->value(column).value());
724 displayDataSet->append(newDataRow);
727 m_3DPixelSeries->dataProxy()->resetArray(displayDataSet);
731void StarProfileViewer::getSubFrameMinMax(
float *subFrameMin,
float *subFrameMax,
double *dataMin,
double *dataMax)
733 imageData->getMinMax(dataMin,dataMax);
736 *subFrameMin = *dataMax;
737 *subFrameMax = *dataMin;
739 switch (imageData->getStatistics().dataType)
742 getSubFrameMinMax<uint8_t>(subFrameMin, subFrameMax);
746 getSubFrameMinMax<int16_t>(subFrameMin, subFrameMax);
750 getSubFrameMinMax<uint16_t>(subFrameMin, subFrameMax);
754 getSubFrameMinMax<int32_t>(subFrameMin, subFrameMax);
758 getSubFrameMinMax<uint32_t>(subFrameMin, subFrameMax);
762 getSubFrameMinMax<float>(subFrameMin, subFrameMax);
766 getSubFrameMinMax<int64_t>(subFrameMin, subFrameMax);
770 getSubFrameMinMax<double>(subFrameMin, subFrameMax);
776void StarProfileViewer::getSubFrameMinMax(
float *subFrameMin,
float *subFrameMax)
778 auto *buffer =
reinterpret_cast<T
const *
>(imageData->getImageBuffer());
779 T min = std::numeric_limits<T>::max();
780 T max = std::numeric_limits<T>::min();
781 int width = imageData->width();
782 for (
int y = subFrame.
y();
y < subFrame.
y() + subFrame.
height();
y++)
784 for (
int x = subFrame.
x();
x < subFrame.
x() + subFrame.
width();
x++)
788 min = qMin(min, *(buffer +
x +
y *
width));
789 max = qMax(max, *(buffer +
x +
y *
width));
799float StarProfileViewer::getImageDataValue(
int x,
int y)
803 auto *buffer =
reinterpret_cast<T
const *
>(imageData->getImageBuffer());
804 return (
float) buffer[
y * imageData->width() +
x];
809float StarProfileViewer::getImageDataValue(
int x,
int y)
811 switch (imageData->getStatistics().dataType)
814 return getImageDataValue<uint8_t>(
x,
y);
818 return getImageDataValue<int16_t>(
x,
y);
822 return getImageDataValue<uint16_t>(
x,
y);
826 return getImageDataValue<int32_t>(
x,
y);
830 return getImageDataValue<uint32_t>(
x,
y);
834 return getImageDataValue<float>(
x,
y);
838 return getImageDataValue<int64_t>(
x,
y);
842 return getImageDataValue<double>(
x,
y);
851void StarProfileViewer::toggleSlice()
853 if(m_graph->selectionMode() == QAbstract3DGraph::SelectionItemAndRow || m_graph->selectionMode() == QAbstract3DGraph::SelectionItemAndColumn)
856 if(m_graph->scene()->isSlicingActive())
858 m_graph->scene()->setSlicingActive(
false);
862 QPoint selectedBar = m_graph->selectedSeries()
863 ? m_graph->selectedSeries()->selectedBar()
864 : QBar3DSeries::invalidSelectionPosition();
865 if (selectedBar != QBar3DSeries::invalidSelectionPosition())
866 m_graph->scene()->setSlicingActive(
true);
871void StarProfileViewer::updateVerticalAxis()
873 float blackPoint = convertFromSliderValue(blackPointSlider->
value());
874 float whitePoint = convertFromSliderValue(whitePointSlider->
value());
875 m_pixelValueAxis->setRange(blackPoint, whitePoint);
876 maxValue->
setText(
i18n(
"Max: %1", roundf(whitePoint * 100) / 100));
877 minValue->
setText(
i18n(
"Min: %1", roundf(blackPoint * 100) / 100));
880void StarProfileViewer::updateHFRandPeakSelection()
882 m_graph->removeCustomItems();
888 while(zoomView->
count() > 7)
891 for (
int i = 0; i < starCenters.
count(); i++)
893 int x = starCenters[i]->x;
894 int row =
x - subFrame.
x();
895 int y = starCenters[i]->y;
896 int col = subFrame.
height() - (
y - subFrame.
y());
898 double newHFR = imageData->getHFR(
x,
y);
899 int value = getImageDataValue(
x,
y);
900 QCustom3DLabel *
label =
new QCustom3DLabel();
901 label->setFacingCamera(
true);
905 labelString = labelString +
i18n(
"(%1, %2) ",
x + 1,
y + 1);
909 labelString = labelString +
i18n(
"HFR: %1 ", roundf(newHFR * 100) / 100);
913 labelString = labelString +
i18n(
"Peak: %1", value);
919 reportString +=
'\n';
921 reportString += labelString;
922 label->setText(labelString);
925 m_graph->addCustomItem(label);
933 reportBox->
setText(reportString);
937void StarProfileViewer::updateColor(
int selection)
941 setGreenToRedGradient();
945 setBlackToYellowGradient();
953void StarProfileViewer::setBlackToYellowGradient()
969 m_3DPixelSeries->setColorStyle(Q3DTheme::ColorStyleRangeGradient);
970 m_3DPixelSeries->setBaseGradient(gr);
971 m_3DPixelSeries->setSingleHighlightGradient(sinHighGr);
972 m_3DPixelSeries->setMultiHighlightGradient(highGr);
975void StarProfileViewer::setGreenToRedGradient()
991 m_3DPixelSeries->setBaseGradient(gr);
992 m_3DPixelSeries->setColorStyle(Q3DTheme::ColorStyleRangeGradient);
993 m_3DPixelSeries->setSingleHighlightGradient(sinHighGr);
994 m_3DPixelSeries->setMultiHighlightGradient(highGr);
1001int StarProfileViewer::convertToSliderValue(
float value)
1003 return (
int) qSqrt((value * 1000000.0));
1006float StarProfileViewer::convertFromSliderValue(
int value)
1008 return qPow((
float)value,2) / 1000000.0;
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
QAction * zoom(const QObject *recvr, const char *slot, QObject *parent)
QString label(StandardShortcut id)
void setText(const QString &text)
void setRange(int min, int max)
void valueChanged(int value)
void addLayout(QLayout *layout, int stretch)
void addItem(const QIcon &icon, const QString &text, const QVariant &userData)
void setCurrentIndex(int index)
void setIconSize(const QSize &size)
void removeItem(int index)
void setItemIcon(int index, const QIcon &icon)
void setWrapping(bool on)
void setColorAt(qreal position, const QColor &color)
QIcon fromTheme(const QString &name)
void setText(const QString &)
bool setAlignment(QLayout *l, Qt::Alignment alignment)
qsizetype count() const const
virtual int exec() override
void setText(const QString &text)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
bool contains(const QPoint &point, bool proper) const const
void setTickInterval(int ti)
bool isEmpty() const const
QString number(double n, char format, int precision)
int toInt(bool *ok, int base) const const