10#include "starprofileviewer.h"
11#include <KLocalizedString>
13#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
14using namespace QtDataVisualization;
17StarProfileViewer::StarProfileViewer(
QWidget *parent) :
QDialog(parent)
24 m_graph =
new Q3DBars();
25 m_pixelValueAxis = m_graph->valueAxis();
26 m_xPixelAxis = m_graph->columnAxis();
27 m_yPixelAxis = m_graph->rowAxis();
29 m_pixelValueAxis->setTitle(
i18n(
"Pixel Values"));
30 m_pixelValueAxis->setLabelAutoRotation(30.0f);
31 m_pixelValueAxis->setTitleVisible(
true);
33 m_xPixelAxis->setTitle(
i18n(
"Horizontal"));
34 m_xPixelAxis->setLabelAutoRotation(30.0f);
35 m_xPixelAxis->setTitleVisible(
true);
36 m_yPixelAxis->setTitle(
i18n(
"Vertical"));
37 m_yPixelAxis->setLabelAutoRotation(30.0f);
38 m_yPixelAxis->setTitleVisible(
true);
40 m_3DPixelSeries =
new QBar3DSeries;
42 m_3DPixelSeries->setMesh(QAbstract3DSeries::MeshBevelBar);
43 m_graph->addSeries(m_3DPixelSeries);
45 m_graph->activeTheme()->setLabelBackgroundEnabled(
false);
49 if (!m_graph->hasContext()) {
51 msgBox.
setText(
i18n(
"Couldn't initialize the OpenGL context."));
56 QSize screenSize = m_graph->screen()->size();
62 this->setWindowTitle(
i18nc(
"@title:window",
"View Star Profile"));
79 maxValue->setToolTip(
i18n(
"Maximum Value on the graph"));
80 cutoffValue=
new QLabel(
this);
81 cutoffValue->setToolTip(
i18n(
"Cuttoff Maximum for eliminating hot pixels and bright stars."));
84 toggleEnableCutoff->
setToolTip(
i18n(
"Enable or Disable the Max Value Cutoff"));
89 blackPointSlider->setToolTip(
i18n(
"Sets the Minimum Value on the graph"));
90 sliderLayout->
addWidget(blackPointSlider,0,0);
94 whitePointSlider->setToolTip(
i18n(
"Sets the Maximum Value on the graph"));
95 sliderLayout->
addWidget(whitePointSlider,0,1);
99 cutoffSlider->setToolTip(
i18n(
"Sets the Cuttoff Maximum for eliminating hot pixels and bright stars."));
100 sliderLayout->
addWidget(cutoffSlider,0,2);
102 cutoffSlider->setEnabled(
false);
104 minValue =
new QLabel(
this);
105 minValue->setToolTip(
i18n(
"Minimum Value on the graph"));
108 autoScale->setText(
i18n(
"AutoScale"));
109 autoScale->setToolTip(
i18n(
"Automatically scales the sliders for the subFrame.\nUncheck to leave them unchanged when you pan around."));
110 autoScale->setChecked(
true);
114 showScaling->setCheckable(
true);
115 showScaling->setMaximumSize(22, 22);
117 showScaling->setToolTip(
i18n(
"Hides and shows the scaling side panel"));
118 showScaling->setChecked(
false);
120 rightLayout->
addWidget(toggleEnableCutoff);
128 selectionType->setToolTip(
i18n(
"Changes the type of selection"));
129 selectionType->addItem(
i18n(
"Item"));
130 selectionType->addItem(
i18n(
"Horizontal"));
131 selectionType->addItem(
i18n(
"Vertical"));
132 selectionType->setCurrentIndex(0);
136 sliceB->setCheckable(
true);
137 sliceB->setMaximumSize(22, 22);
139 sliceB->setToolTip(
i18n(
"Toggles the slice view when horizontal or vertical items are selected"));
140 sliceB->setCheckable(
true);
141 sliceB->setChecked(
false);
142 sliceB->setEnabled(
false);
143 sliceB->setDefault(
false);
147 showCoordinates->setCheckable(
true);
148 showCoordinates->setMaximumSize(22, 22);
150 showCoordinates->setToolTip(
i18n(
"Shows the x, y coordinates of star centers in the frame"));
151 showCoordinates->setChecked(
false);
154 HFRReport->setToolTip(
i18n(
"Shows the HFR of stars in the frame"));
156 HFRReport->setCheckable(
true);
157 HFRReport->setMaximumSize(22, 22);
159 HFRReport->setChecked(
true);
161 reportBox =
new QLabel(
this);
165 showPeakValues->setCheckable(
true);
166 showPeakValues->setMaximumSize(22, 22);
168 showPeakValues->setToolTip(
i18n(
"Shows the peak values of star centers in the frame"));
169 showPeakValues->setChecked(
true);
172 sampleSize->setToolTip(
i18n(
"Changes the sample size shown in the graph"));
179 sampleSize->setCurrentIndex(3);
180 sampleSize->setVisible(
false);
183 zoomView->setToolTip(
i18n(
"Zooms the view to preset locations."));
184 zoomView->addItem(
i18n(
"ZoomTo"));
185 zoomView->addItem(
i18n(
"Front"));
186 zoomView->addItem(
i18n(
"Front High"));
187 zoomView->addItem(
i18n(
"Overhead"));
188 zoomView->addItem(
i18n(
"Iso. L"));
189 zoomView->addItem(
i18n(
"Iso. R"));
190 zoomView->addItem(
i18n(
"Selected"));
191 zoomView->setCurrentIndex(0);
198 selectorsVisible->
setToolTip(
i18n(
"Hides and shows the Vertical and Horizontal Selection Sliders"));
202 controlsLayout->
addWidget(selectionType);
203 controlsLayout->
addWidget(selectorsVisible);
209 controlsLayout->
addWidget(showCoordinates);
211 controlsLayout->
addWidget(showPeakValues);
216 bottomSliderWidget->
setLayout(bottomSliders);
217 mainLayout->
addWidget(bottomSliderWidget);
221 verticalSelector->setToolTip(
i18n(
"Selects the Vertical Value"));
223 horizontalSelector->setToolTip(
i18n(
"Selects the Horizontal Value"));
226 bottomSliders->
addWidget(verticalSelector, 0, 1);
228 bottomSliders->
addWidget(horizontalSelector, 1, 1);
232 mainLayout->
addWidget(bottomControlsWidget);\
237 exploreMode->setCheckable(
true);
238 exploreMode->setMaximumSize(22, 22);
240 exploreMode->setToolTip(
i18n(
"Zooms automatically as the sliders change"));
241 exploreMode->setChecked(
true);
249 m_graph->setBarSpacing(
QSizeF(0.5,0.5));
257 grGtoR.setColorAt(0.2,
Qt::red);
262 pmp.setBrush(
QBrush(grGtoR));
263 pmp.drawRect(0, 0, 50, 10);
270 grBtoY.setColorAt(0.33,
Qt::red);
272 pmp.setBrush(
QBrush(grBtoY));
273 pmp.drawRect(0, 0, 50, 10);
281 pixelReport =
new QLabel(
"", bottomControlsWidget);
283 bottomControlLayout->
addWidget(exploreMode);
284 bottomControlLayout->
addWidget(barSpacing);
286 bottomControlLayout->
addWidget(pixelReport);
289 this, SLOT(changeSelectionType(
int)));
291 this, SLOT(zoomViewTo(
int)));
293 this, &StarProfileViewer::toggleSlice);
295 this, &StarProfileViewer::updateHFRandPeakSelection);
297 this, &StarProfileViewer::updateHFRandPeakSelection);
299 this, &StarProfileViewer::updateHFRandPeakSelection);
301 this, &StarProfileViewer::updateVerticalAxis);
303 this, &StarProfileViewer::updateVerticalAxis);
305 this, &StarProfileViewer::updateDisplayData);
307 this, &StarProfileViewer::updateScale);
311 this, SLOT(updateSampleSize(
QString)));
313 this, SLOT(updateColor(
int)));
315 this, &StarProfileViewer::changeSelection);
317 this, &StarProfileViewer::changeSelection);
323 this, &StarProfileViewer::toggleCutoffEnabled);
325 this, &StarProfileViewer::updateSelectorBars);
327 this, &StarProfileViewer::updateBarSpacing);
329 m_graph->activeTheme()->setType(Q3DTheme::Theme(3));
331 setGreenToRedGradient();
333 m_graph->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetFront);
334 m_graph->scene()->activeCamera()->setTarget(
QVector3D(0.0f, 0.0f, 0.0f));
335 m_graph->scene()->activeCamera()->setZoomLevel(110);
341 for (
auto &button : qButtons)
342 button->setAutoDefault(
false);
348StarProfileViewer::~StarProfileViewer()
361 switch (data->getStatistics().dataType)
364 loadDataPrivate<uint8_t>();
368 loadDataPrivate<int16_t>();
372 loadDataPrivate<uint16_t>();
376 loadDataPrivate<int32_t>();
380 loadDataPrivate<uint32_t>();
384 loadDataPrivate<float>();
388 loadDataPrivate<int64_t>();
392 loadDataPrivate<double>();
402 updateHFRandPeakSelection();
410void StarProfileViewer::loadDataPrivate()
413 dataSet =
new QBarDataArray;
414 QBarDataRow *dataRow;
415 dataSet->reserve(subFrame.
height());
419 auto *buffer =
reinterpret_cast<T
const *
>(imageData->getImageBuffer());
420 int width = imageData->width();
422 for (
int j = subFrame.
y(); j < subFrame.
y() + subFrame.
height(); j++)
428 dataRow =
new QBarDataRow(subFrame.
width());
430 for (
int i = subFrame.
x(); i < subFrame.
x() + subFrame.
width(); i++)
436 if( i > 0 && i < imageData->
width() && j > 0 && j < imageData->
height())
437 (*dataRow)[
x].setValue(*(buffer + i + j *
width));
440 dataSet->insert(0, dataRow);
443 std::reverse(rowLabels.
begin(), rowLabels.
end());
445 m_3DPixelSeries->dataProxy()->setRowLabels(rowLabels);
446 m_3DPixelSeries->dataProxy()->setColumnLabels(columnLabels);
449void StarProfileViewer::toggleCutoffEnabled(
bool enable)
452 cutOffEnabled = enable;
456void StarProfileViewer::updateScale()
461 this, &StarProfileViewer::updateVerticalAxis);
463 this, &StarProfileViewer::updateVerticalAxis);
465 this, &StarProfileViewer::updateDisplayData);
467 float subFrameMin, subFrameMax;
468 double dataMin, dataMax;
470 getSubFrameMinMax(&subFrameMin, &subFrameMax, &dataMin, &dataMax);
472 int sliderDataMin = convertToSliderValue(dataMin) - 1;
473 int sliderDataMax = convertToSliderValue(dataMax) + 1;
479 int sliderMin = convertToSliderValue(min) - 1;
480 int sliderMax = convertToSliderValue(max) + 1;
481 blackPointSlider->
setRange(sliderMin, sliderMax);
483 whitePointSlider->
setRange(sliderMin, sliderMax);
485 cutoffSlider->
setRange(sliderMin, sliderDataMax);
487 blackPointSlider->
setValue(sliderMin);
488 whitePointSlider->
setValue(sliderMax);
489 cutoffSlider->
setValue(sliderDataMax);
493 min = convertFromSliderValue(blackPointSlider->
value());
494 max = convertFromSliderValue(whitePointSlider->
value());
495 blackPointSlider->
setRange(sliderDataMin, sliderDataMax);
496 blackPointSlider->
setTickInterval((sliderDataMax - sliderDataMin) / 100);
497 whitePointSlider->
setRange(sliderDataMin, sliderDataMax);
498 whitePointSlider->
setTickInterval((sliderDataMax - sliderDataMin) / 100);
499 cutoffSlider->
setRange(sliderDataMin, sliderDataMax);
503 m_pixelValueAxis->setRange(min, max);
506 cutoffValue->
setText(
i18n(
"Cut: %1", roundf(convertFromSliderValue(cutoffSlider->
value()) * 100) / 100));
508 cutoffValue->
setText(
"Cut Disabled");
512 m_pixelValueAxis->setLabelFormat(
QString(QStringLiteral(
"%.3f ")));
513 m_3DPixelSeries->setItemLabelFormat(
QString(QStringLiteral(
"%.3f ")));
514 maxValue->
setText(
i18n(
"Max: %1", roundf(max * 100) / 100));
515 minValue->
setText(
i18n(
"Min: %1", roundf(min * 100) / 100));
519 m_pixelValueAxis->setLabelFormat(
QString(QStringLiteral(
"%.0f ")));
520 m_3DPixelSeries->setItemLabelFormat(
QString(QStringLiteral(
"%.0f ")));
526 this, &StarProfileViewer::updateVerticalAxis);
528 this, &StarProfileViewer::updateVerticalAxis);
530 this, &StarProfileViewer::updateDisplayData);
533void StarProfileViewer::updateBarSpacing(
int value)
535 float spacing = (float)value/100.0;
536 m_graph->setBarSpacing(
QSizeF(spacing, spacing));
539void StarProfileViewer::zoomViewTo(
int where)
543 int star = where - 7;
544 int x = starCenters[star]->x - subFrame.
x();
545 int y = subFrame.
height() - (starCenters[star]->y - subFrame.
y());
546 m_graph->primarySeries()->setSelectedBar(
QPoint(
y ,
x ));
555 m_graph->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetFront);
556 m_graph->scene()->activeCamera()->setTarget(
QVector3D(0.0f, 0.0f, 0.0f));
557 m_graph->scene()->activeCamera()->setZoomLevel(110);
562 m_graph->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetFrontHigh);
563 m_graph->scene()->activeCamera()->setTarget(
QVector3D(0.0f, 0.0f, 0.0f));
564 m_graph->scene()->activeCamera()->setZoomLevel(110);
569 m_graph->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetDirectlyAbove);
570 m_graph->scene()->activeCamera()->setTarget(
QVector3D(0.0f, 0.0f, 0.0f));
571 m_graph->scene()->activeCamera()->setZoomLevel(110);
576 m_graph->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetIsometricLeftHigh);
577 m_graph->scene()->activeCamera()->setTarget(
QVector3D(0.0f, 0.0f, 0.0f));
578 m_graph->scene()->activeCamera()->setZoomLevel(110);
583 m_graph->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetIsometricRightHigh);
584 m_graph->scene()->activeCamera()->setTarget(
QVector3D(0.0f, 0.0f, 0.0f));
585 m_graph->scene()->activeCamera()->setZoomLevel(110);
591 QPoint selectedBar = m_graph->selectedSeries()
592 ? m_graph->selectedSeries()->selectedBar()
593 : QBar3DSeries::invalidSelectionPosition();
594 if (selectedBar != QBar3DSeries::invalidSelectionPosition())
597 float xMin = m_graph->columnAxis()->min();
598 float xRange = m_graph->columnAxis()->max() - xMin;
599 float zMin = m_graph->rowAxis()->min();
600 float zRange = m_graph->rowAxis()->max() - zMin;
601 target.
setX((selectedBar.
y() - xMin) / xRange * 2.0f - 1.0f);
602 target.
setZ((selectedBar.
x() - zMin) / zRange * 2.0f - 1.0f);
604 qreal endAngleX = qAtan(qreal(target.
z() / target.
x())) / M_PI * -180.0 + 90.0;
605 if (target.
x() > 0.0f)
607 float barValue = m_graph->selectedSeries()->dataProxy()->itemAt(selectedBar.
x(),
608 selectedBar.
y())->value();
609 float endAngleY = 60.0f;
610 float zoom = 150 * 1/qSqrt(barValue / convertFromSliderValue(whitePointSlider->
value()));
611 m_graph->scene()->activeCamera()->setCameraPosition(endAngleX, endAngleY, zoom);
612 m_graph->scene()->activeCamera()->setTarget(target);
627void StarProfileViewer::changeSelectionType(
int type)
631 m_graph->setSelectionMode(QAbstract3DGraph::SelectionItem);
632 m_graph->scene()->setSlicingActive(
false);
637 m_graph->setSelectionMode(QAbstract3DGraph::SelectionItemAndRow);
642 m_graph->setSelectionMode(QAbstract3DGraph::SelectionItemAndColumn);
651void StarProfileViewer::changeSelection()
653 int x = horizontalSelector->
value();
654 int y = verticalSelector->
value();
655 m_graph->primarySeries()->setSelectedBar(
QPoint(
y ,
x ));
661void StarProfileViewer::updatePixelReport()
663 int x = horizontalSelector->
value();
664 int y = verticalSelector->
value();
667 y = (subFrame.
height() - 1 -
y) + subFrame.
y();
668 float barValue = getImageDataValue(
x,
y);
669 pixelReport->
setText(
i18n(
"Selected Pixel: (%1, %2): %3",
x + 1,
y + 1, roundf(barValue * 100) / 100));
674void StarProfileViewer::updateSelectorBars(
QPoint position)
678 this, &StarProfileViewer::changeSelection);
680 this, &StarProfileViewer::changeSelection);
683 verticalSelector->
setValue(position.
x());
684 horizontalSelector->
setValue(position.
y());
688 this, &StarProfileViewer::changeSelection);
690 this, &StarProfileViewer::changeSelection);
693void StarProfileViewer::updateSampleSize(
const QString &text)
695 emit sampleSizeUpdated(text.
toInt());
698void StarProfileViewer::enableTrackingBox(
bool enable)
703void StarProfileViewer::updateDisplayData()
706 cutoffValue->
setText(
i18n(
"Cut: %1", roundf(convertFromSliderValue(cutoffSlider->
value()) * 100) / 100));
709 if(dataSet !=
nullptr)
711 QBarDataArray *displayDataSet =
new QBarDataArray;
712 displayDataSet->reserve(dataSet->size());
714 for (
int row = 0; row < dataSet->size(); row++)
716 QBarDataRow *dataRow = dataSet->at(row);
717 QBarDataRow *newDataRow;
718 newDataRow =
new QBarDataRow(dataRow->size());
719 for (
int column = 0; column < dataRow->size(); column++)
721 if(cutOffEnabled && dataRow->value(column).value() > convertFromSliderValue(cutoffSlider->
value()))
722 (*newDataRow)[column].setValue(0.0f);
724 (*newDataRow)[column].setValue(dataRow->value(column).value());
726 displayDataSet->append(newDataRow);
729 m_3DPixelSeries->dataProxy()->resetArray(displayDataSet);
733void StarProfileViewer::getSubFrameMinMax(
float *subFrameMin,
float *subFrameMax,
double *dataMin,
double *dataMax)
735 imageData->getMinMax(dataMin,dataMax);
738 *subFrameMin = *dataMax;
739 *subFrameMax = *dataMin;
741 switch (imageData->getStatistics().dataType)
744 getSubFrameMinMax<uint8_t>(subFrameMin, subFrameMax);
748 getSubFrameMinMax<int16_t>(subFrameMin, subFrameMax);
752 getSubFrameMinMax<uint16_t>(subFrameMin, subFrameMax);
756 getSubFrameMinMax<int32_t>(subFrameMin, subFrameMax);
760 getSubFrameMinMax<uint32_t>(subFrameMin, subFrameMax);
764 getSubFrameMinMax<float>(subFrameMin, subFrameMax);
768 getSubFrameMinMax<int64_t>(subFrameMin, subFrameMax);
772 getSubFrameMinMax<double>(subFrameMin, subFrameMax);
778void StarProfileViewer::getSubFrameMinMax(
float *subFrameMin,
float *subFrameMax)
780 auto *buffer =
reinterpret_cast<T
const *
>(imageData->getImageBuffer());
781 T min = std::numeric_limits<T>::max();
782 T max = std::numeric_limits<T>::min();
783 int width = imageData->width();
784 for (
int y = subFrame.
y();
y < subFrame.
y() + subFrame.
height();
y++)
786 for (
int x = subFrame.
x();
x < subFrame.
x() + subFrame.
width();
x++)
790 min = qMin(min, *(buffer +
x +
y *
width));
791 max = qMax(max, *(buffer +
x +
y *
width));
801float StarProfileViewer::getImageDataValue(
int x,
int y)
805 auto *buffer =
reinterpret_cast<T
const *
>(imageData->getImageBuffer());
806 return (
float) buffer[
y * imageData->width() +
x];
811float StarProfileViewer::getImageDataValue(
int x,
int y)
813 switch (imageData->getStatistics().dataType)
816 return getImageDataValue<uint8_t>(
x,
y);
820 return getImageDataValue<int16_t>(
x,
y);
824 return getImageDataValue<uint16_t>(
x,
y);
828 return getImageDataValue<int32_t>(
x,
y);
832 return getImageDataValue<uint32_t>(
x,
y);
836 return getImageDataValue<float>(
x,
y);
840 return getImageDataValue<int64_t>(
x,
y);
844 return getImageDataValue<double>(
x,
y);
853void StarProfileViewer::toggleSlice()
855 if(m_graph->selectionMode() == QAbstract3DGraph::SelectionItemAndRow || m_graph->selectionMode() == QAbstract3DGraph::SelectionItemAndColumn)
858 if(m_graph->scene()->isSlicingActive())
860 m_graph->scene()->setSlicingActive(
false);
864 QPoint selectedBar = m_graph->selectedSeries()
865 ? m_graph->selectedSeries()->selectedBar()
866 : QBar3DSeries::invalidSelectionPosition();
867 if (selectedBar != QBar3DSeries::invalidSelectionPosition())
868 m_graph->scene()->setSlicingActive(
true);
873void StarProfileViewer::updateVerticalAxis()
875 float blackPoint = convertFromSliderValue(blackPointSlider->
value());
876 float whitePoint = convertFromSliderValue(whitePointSlider->
value());
877 m_pixelValueAxis->setRange(blackPoint, whitePoint);
878 maxValue->
setText(
i18n(
"Max: %1", roundf(whitePoint * 100) / 100));
879 minValue->
setText(
i18n(
"Min: %1", roundf(blackPoint * 100) / 100));
882void StarProfileViewer::updateHFRandPeakSelection()
884 m_graph->removeCustomItems();
890 while(zoomView->
count() > 7)
893 for (
int i = 0; i < starCenters.
count(); i++)
895 int x = starCenters[i]->x;
896 int row =
x - subFrame.
x();
897 int y = starCenters[i]->y;
898 int col = subFrame.
height() - (
y - subFrame.
y());
900 double newHFR = imageData->getHFR(
x,
y);
901 int value = getImageDataValue(
x,
y);
902 QCustom3DLabel *
label =
new QCustom3DLabel();
903 label->setFacingCamera(
true);
907 labelString = labelString +
i18n(
"(%1, %2) ",
x + 1,
y + 1);
911 labelString = labelString +
i18n(
"HFR: %1 ", roundf(newHFR * 100) / 100);
915 labelString = labelString +
i18n(
"Peak: %1", value);
921 reportString +=
'\n';
923 reportString += labelString;
924 label->setText(labelString);
927 m_graph->addCustomItem(label);
935 reportBox->
setText(reportString);
939void StarProfileViewer::updateColor(
int selection)
943 setGreenToRedGradient();
947 setBlackToYellowGradient();
955void StarProfileViewer::setBlackToYellowGradient()
971 m_3DPixelSeries->setColorStyle(Q3DTheme::ColorStyleRangeGradient);
972 m_3DPixelSeries->setBaseGradient(gr);
973 m_3DPixelSeries->setSingleHighlightGradient(sinHighGr);
974 m_3DPixelSeries->setMultiHighlightGradient(highGr);
977void StarProfileViewer::setGreenToRedGradient()
993 m_3DPixelSeries->setBaseGradient(gr);
994 m_3DPixelSeries->setColorStyle(Q3DTheme::ColorStyleRangeGradient);
995 m_3DPixelSeries->setSingleHighlightGradient(sinHighGr);
996 m_3DPixelSeries->setMultiHighlightGradient(highGr);
1003int StarProfileViewer::convertToSliderValue(
float value)
1005 return (
int) qSqrt((value * 1000000.0));
1008float StarProfileViewer::convertFromSliderValue(
int value)
1010 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