7#include "imageoverlaycomponent.h"
11#include "skypainter.h"
14#include "fitsviewer/fitsdata.h"
16#include "auxiliary/kspaths.h"
19#include <QTableWidget>
20#include <QImageReader>
23#include <QtConcurrent>
24#include <QRegularExpression>
26#include "ekos/auxiliary/solverutils.h"
27#include "ekos/auxiliary/stellarsolverprofile.h"
49constexpr int UNPROCESSED_INDEX = 0;
50constexpr int OK_INDEX = 4;
73void setupTableItem(
QTableWidget *table,
int row,
int column,
const QString &text,
bool editable =
true)
77 if (column >= NUM_COLUMNS)
84 table->
setItem(row, column, item);
88bool overlaySorter(
const ImageOverlay &o1,
const ImageOverlay &o2)
103 QRegularExpression re3(
"^(\\d+)\\s*h\\s(\\d+)\\s*[m\'\\s]\\s*(\\d+\\.*\\d*)\\s*([s\"]?)$");
105 return re1.match(trimmedInput).hasMatch() ||
106 re2.match(trimmedInput).hasMatch() ||
107 re3.match(trimmedInput).hasMatch();
114 if (!item)
return false;
127 return toDecString(
dms(dec));
135 m_Directory =
dir.absolutePath();
146void ImageOverlayComponent::cellChanged(
int row,
int col)
148 if (!m_Initialized || col < 0 || col >= NUM_COLUMNS || row < 0 || row >= m_ImageOverlayTable->rowCount())
return;
151 if (col == STATUS_COL || col == EAST_TO_RIGHT_COL)
return;
153 QTableWidgetItem *item = m_ImageOverlayTable->item(row, col);
157 QString itemString = item->
text();
158 auto overlay = m_Overlays[row];
162 const bool useHMS = isHMS(itemString);
166 item->
setText(dms(overlay.m_RA).toHMSString());
167 QString msg =
i18n(
"Bad RA string entered for %1. Reset to original value.", overlay.m_Filename);
174 else if (col == DEC_COL)
180 item->
setText(toDecString(overlay.m_DEC));
181 QString msg =
i18n(
"Bad DEC string entered for %1. Reset to original value.", overlay.m_Filename);
185 item->
setText(toDecString(decDMS));
187 else if (col == ORIENTATION_COL)
189 bool angleOK =
false;
190 double angle = itemString.
toDouble(&angleOK);
191 if (!angleOK || angle > 360 || angle < -360)
193 item->
setText(QString(
"%1").arg(overlay.m_Orientation, 0,
'f', 2));
194 QString msg =
i18n(
"Bad orientation angle string entered for %1. Reset to original value.", overlay.m_Filename);
198 else if (col == ARCSEC_PER_PIXEL_COL)
200 bool scaleOK =
false;
201 double scale = itemString.
toDouble(&scaleOK);
202 if (!scaleOK || scale < 0 || scale > 1000)
204 item->
setText(QString(
"%1").arg(overlay.m_ArcsecPerPixel, 0,
'f', 2));
205 QString msg =
i18n(
"Bad scale angle string entered for %1. Reset to original value.", overlay.m_Filename);
213void ImageOverlayComponent::statusCellChanged(
int row)
215 if (row < 0 || row >= m_ImageOverlayTable->rowCount())
return;
217 auto overlay = m_Overlays[row];
224 QComboBox *statusItem =
dynamic_cast<QComboBox*
>(m_ImageOverlayTable->cellWidget(row, STATUS_COL));
229 QTableWidgetItem *raItem = m_ImageOverlayTable->item(row, RA_COL);
231 const bool useHMS = isHMS(raItem->
text());
233 if (!raOK || raDMS.
Degrees() == 0)
235 QString msg =
i18n(
"Cannot set status to OK. Legal non-0 RA value required.");
241 QTableWidgetItem *decItem = m_ImageOverlayTable->item(row, DEC_COL);
242 if (!decItem)
return;
246 QString msg =
i18n(
"Cannot set status to OK. Legal non-0 DEC value required.");
251 bool angleOK =
false;
252 QTableWidgetItem *angleItem = m_ImageOverlayTable->item(row, ORIENTATION_COL);
253 if (!angleItem)
return;
254 const double angle = angleItem->
text().
toDouble(&angleOK);
255 if (!angleOK || angle > 360 || angle < -360)
257 QString msg =
i18n(
"Cannot set status to OK. Legal orientation value required.");
262 bool scaleOK =
false;
263 QTableWidgetItem *scaleItem = m_ImageOverlayTable->item(row, ARCSEC_PER_PIXEL_COL);
264 if (!scaleItem)
return;
265 const double scale = scaleItem->
text().
toDouble(&scaleOK);
266 if (!scaleOK || scale < 0 || scale > 1000)
268 QString msg =
i18n(
"Cannot set status to OK. Legal non-0 a-s/px value required.");
275 QComboBox *statusItem =
dynamic_cast<QComboBox*
>(m_ImageOverlayTable->cellWidget(row, STATUS_COL));
280 m_Overlays[row].m_Status = ImageOverlay::AVAILABLE;
281 m_Overlays[row].m_RA = raDMS.
Degrees();
282 m_Overlays[row].m_DEC = decDMS.
Degrees();
283 m_Overlays[row].m_ArcsecPerPixel = scale;
284 m_Overlays[row].m_Orientation = angle;
285 const QComboBox *ewItem =
dynamic_cast<QComboBox*
>(m_ImageOverlayTable->cellWidget(row, EAST_TO_RIGHT_COL));
286 m_Overlays[row].m_EastToTheRight = ewItem->
currentIndex();
288 if (m_Overlays[row].m_Img.get() ==
nullptr)
291 const QString fullFilename = QString(
"%1/%2").arg(m_Directory).arg(m_Overlays[row].m_Filename);
292 QImage *img = loadImageFile(fullFilename, !m_Overlays[row].m_EastToTheRight);
293 m_Overlays[row].m_Width = img->
width();
294 m_Overlays[row].m_Height = img->
height();
295 m_Overlays[row].m_Img.reset(img);
298 QString msg =
i18n(
"Stored OK status for %1.", m_Overlays[row].m_Filename);
305ImageOverlayComponent::~ImageOverlayComponent()
307 if (m_LoadImagesFuture.isRunning())
309 m_LoadImagesFuture.cancel();
310 m_LoadImagesFuture.waitForFinished();
314void ImageOverlayComponent::selectionChanged()
316 if (m_Initialized && Options::showSelectedImageOverlay())
322 return Options::showImageOverlays();
327#if !defined(KSTARS_LITE)
339 m_ImageOverlayTable = table;
344 m_SolveButton = solveButton;
345 m_TableGroupBox = tableGroupBox;
346 m_SolverProfile = solverProfile;
349 m_StatusDisplay = statusDisplay;
356 initSolverProfiles();
360void ImageOverlayComponent::initSolverProfiles()
362 QString savedOptionsProfiles = QDir(KSPaths::writableLocation(
365 QList<SSolver::Parameters> optionsList;
366 if(QFile(savedOptionsProfiles).exists())
367 optionsList = StellarSolver::loadSavedOptionsProfiles(savedOptionsProfiles);
369 optionsList = Ekos::getDefaultAlignOptionsProfiles();
371 m_SolverProfile->clear();
372 for(
auto ¶m : optionsList)
373 m_SolverProfile->addItem(param.listName);
374 m_SolverProfile->setCurrentIndex(Options::solveOptionsProfile());
377void ImageOverlayComponent::updateStatusDisplay(
const QString &message)
379 if (!m_StatusDisplay)
381 m_LogText.insert(0, message);
382 m_StatusDisplay->setPlainText(m_LogText.join(
"\n"));
387void ImageOverlayComponent::updateTable()
391 QDir directory(m_Directory);
392 emit updateLog(
i18n(
"Updating from directory: %1", m_Directory));
393 QStringList images = directory.entryList(QStringList() <<
"*",
QDir::Files);
394 QSet<QString> imageFiles;
395 foreach(QString filename, images)
397 if (!FITSData::readableFilename(filename))
399 imageFiles.
insert(filename);
403 QList<QString> sortedImageFiles;
404 for (
const auto &fn : imageFiles)
406 std::sort(sortedImageFiles.
begin(), sortedImageFiles.
end(), overlaySorter);
409 QList<ImageOverlay> tempOverlays;
410 QMap<QString, int> tempMap;
412 for (
int i = 0; i < m_Overlays.size(); ++i)
414 auto &fname = m_Overlays[i].m_Filename;
415 if (sortedImageFiles.
indexOf(fname) >= 0)
417 tempOverlays.
append(m_Overlays[i]);
418 tempMap[fname] = tempOverlays.
size() - 1;
423 m_Overlays = tempOverlays;
424 m_Filenames = tempMap;
428 for (
const auto &filename : sortedImageFiles)
430 auto item = m_Filenames.find(filename);
431 if (item == m_Filenames.end())
434 ImageOverlay overlay(filename);
435 const int size = m_Filenames.size();
436 m_Overlays.push_back(overlay);
437 m_Filenames[filename] = size;
441 emit updateLog(
i18n(
"%1 overlays (%2 new, %3 deleted) %4 solved", m_Overlays.size(), numNew, numDeleted,
443 m_TableGroupBox->setTitle(
i18n(
"Image Overlays. %1 images, %2 available.", m_Overlays.size(), numAvailable()));
450void ImageOverlayComponent::loadAllImageFiles()
452#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
453 m_LoadImagesFuture =
QtConcurrent::run(&ImageOverlayComponent::loadImageFileLoop,
this);
455 m_LoadImagesFuture =
QtConcurrent::run(
this, &ImageOverlayComponent::loadImageFileLoop);
459void ImageOverlayComponent::loadImageFileLoop()
461 emit updateLog(
i18n(
"Loading image files..."));
462 while (loadImageFile());
464 for (
const auto &o : m_Overlays)
465 if (o.m_Img.get() !=
nullptr)
467 emit updateLog(
i18n(
"%1 image files loaded.", num));
469 m_ImageOverlayTable->setEditTriggers(m_EditTriggers);
470 m_Initialized =
true;
473QImage *ImageOverlayComponent::loadImageFile (
const QString &fullFilename,
bool mirror)
475 QSharedPointer<QImage> tempImage(
new QImage(fullFilename));
476 if (tempImage.get() ==
nullptr)
return nullptr;
477 int scaleWidth = std::min(tempImage->width(), Options::imageOverlayMaxDimension());
478 QImage *processedImg =
new QImage;
487bool ImageOverlayComponent::loadImageFile()
489 bool updatedSomething =
false;
491 for (
auto &o : m_Overlays)
493 if (o.m_Status == o.ImageOverlay::AVAILABLE && o.m_Img.get() ==
nullptr)
496 QImage *img = loadImageFile(fullFilename, !o.m_EastToTheRight);
498 updatedSomething =
true;
505 return updatedSomething;
510void ImageOverlayComponent::initializeGui()
512 if (!m_ImageOverlayTable)
return;
518 setupTable(m_ImageOverlayTable);
521 for (
int i = 0; i < m_Overlays.size(); ++i)
523 const ImageOverlay &overlay = m_Overlays[row];
525 setupTableItem(m_ImageOverlayTable, row, FILENAME_COL, overlay.m_Filename,
false);
527 QStringList StatusNames =
531 QComboBox *statusBox =
new QComboBox();
532 for (
int i = 0; i < ImageOverlay::NUM_STATUS; ++i)
533 statusBox->
addItem(StatusNames[i]);
537 statusCellChanged(row);
540 m_ImageOverlayTable->setCellWidget(row, STATUS_COL, statusBox);
542 setupTableItem(m_ImageOverlayTable, row, ORIENTATION_COL, QString(
"%1").arg(overlay.m_Orientation, 0,
'f', 2));
543 setupTableItem(m_ImageOverlayTable, row, RA_COL, dms(overlay.m_RA).toHMSString());
544 setupTableItem(m_ImageOverlayTable, row, DEC_COL, toDecString(overlay.m_DEC));
545 setupTableItem(m_ImageOverlayTable, row, ARCSEC_PER_PIXEL_COL, QString(
"%1").arg(overlay.m_ArcsecPerPixel, 0,
'f', 2));
548 setupTableItem(m_ImageOverlayTable, row, WIDTH_COL, QString(
"%1").arg(overlay.m_Width),
false);
549 setupTableItem(m_ImageOverlayTable, row, HEIGHT_COL, QString(
"%1").arg(overlay.m_Height),
false);
551 QComboBox *mirroredBox =
new QComboBox();
561 m_ImageOverlayTable->setCellWidget(row, EAST_TO_RIGHT_COL, mirroredBox);
565 m_ImageOverlayTable->resizeColumnsToContents();
566 m_TableGroupBox->setTitle(
i18n(
"Image Overlays. %1 images, %2 available.", m_Overlays.size(), numAvailable()));
571void ImageOverlayComponent::loadFromUserDB()
573 QList<ImageOverlay *>
list;
576 std::sort(m_Overlays.begin(), m_Overlays.end(), overlaySorter);
579 for (
const auto &o : m_Overlays)
581 m_Filenames[o.m_Filename] = index;
586void ImageOverlayComponent::saveToUserDB()
589 for (
const ImageOverlay &metadata : m_Overlays)
593void ImageOverlayComponent::solveImage(
const QString &filename)
595 if (!m_Initialized)
return;
596 m_SolveButton->setText(
i18n(
"Abort"));
597 const int solverTimeout = Options::imageOverlayTimeout();
599 QString savedOptionsProfiles = QDir(KSPaths::writableLocation(
601 auto profiles = (QFile(savedOptionsProfiles).exists()) ?
602 StellarSolver::loadSavedOptionsProfiles(savedOptionsProfiles) :
603 Ekos::getDefaultAlignOptionsProfiles();
605 const int index = m_SolverProfile->currentIndex();
606 auto parameters = index < profiles.size() ? profiles.at(index) : profiles.at(0);
608 parameters.search_radius = parameters.search_radius * 2;
613 if (m_RowsToSolve.size() > 1)
614 emit updateLog(
i18n(
"Solving: %1. %2 in queue.", filename, m_RowsToSolve.size()));
616 emit updateLog(
i18n(
"Solving: %1.", filename));
620 int row = m_RowsToSolve[0];
621 QString raString = m_ImageOverlayTable->item(row, RA_COL)->text().toLatin1().data();
622 QString decString = m_ImageOverlayTable->item(row, DEC_COL)->text().toLatin1().data();
623 QString scaleString = m_ImageOverlayTable->item(row, ARCSEC_PER_PIXEL_COL)->text().toLatin1().data();
626 const bool useHMS = isHMS(raString);
629 bool scaleOK =
false;
630 double scale = scaleString.
toDouble(&scaleOK);
631 scaleOK = scaleOK && scale != 0.00;
634 if (!scaleOK && Options::imageOverlayDefaultScale() > 0.0001)
636 scale = Options::imageOverlayDefaultScale();
642 auto lowScale = scale * 0.75;
643 auto highScale = scale * 1.25;
644 m_Solver->useScale(
true, lowScale, highScale);
649 m_Solver->runSolver(filename);
652void ImageOverlayComponent::tryAgain()
654 m_TryAgainTimer.stop();
655 if (!m_Initialized)
return;
656 if (m_RowsToSolve.size() > 0)
660int ImageOverlayComponent::numAvailable()
663 for (
const auto &o : m_Overlays)
664 if (o.m_Status == ImageOverlay::AVAILABLE)
669void ImageOverlayComponent::show()
671 if (!m_Initialized || !m_ImageOverlayTable)
return;
672 auto selections = m_ImageOverlayTable->selectionModel();
673 if (selections->hasSelection())
675 auto selectedIndexes = selections->selectedIndexes();
676 const int row = selectedIndexes.at(0).row();
677 if (m_Overlays.size() > row && row >= 0)
679 if (m_Overlays[row].m_Status != ImageOverlay::AVAILABLE)
681 emit updateLog(
i18n(
"Can't show %1. Not plate solved.", m_Overlays[row].m_Filename));
684 if (m_Overlays[row].m_Img.get() ==
nullptr)
686 emit updateLog(
i18n(
"Can't show %1. Image not loaded.", m_Overlays[row].m_Filename));
689 const double ra = m_Overlays[row].m_RA;
690 const double dec = m_Overlays[row].m_DEC;
693 auto localTime = KStarsData::Instance()->
geo()->UTtoLT(KStarsData::Instance()->clock()->utc());
694 const dms raDms(ra), decDms(dec);
695 SkyPoint coord(raDms, decDms);
696 coord.apparentCoord(
static_cast<long double>(J2000),
KStars::Instance()->data()->ut().djd());
699 Options::setIsTracking(
false);
702 SkyMap::Instance()->
setFocus(dms(coord.ra()), dms(coord.dec()));
705 double zoomFactor = (400 * 60.0 * 10800.0) / (m_Overlays[row].m_Width * m_Overlays[row].m_ArcsecPerPixel *
dms::PI);
713void ImageOverlayComponent::abortSolving()
715 if (!m_Initialized)
return;
716 m_RowsToSolve.clear();
719 emit updateLog(
i18n(
"Solving aborted."));
720 m_SolveButton->setText(
i18n(
"Solve"));
723void ImageOverlayComponent::startSolving()
725 if (!m_Initialized)
return;
726 if (m_SolveButton->text() ==
i18n(
"Abort"))
731 if (m_Solver && m_Solver->isRunning())
734 if (m_RowsToSolve.size() > 0)
735 m_TryAgainTimer.start(2000);
739 if (m_RowsToSolve.size() == 0)
741 QSet<int> selectedRows;
742 auto selections = m_ImageOverlayTable->selectionModel();
743 if (selections->hasSelection())
746 auto selectedIndexes = selections->selectedIndexes();
747 for (
int i = 0; i < selectedIndexes.count(); ++i)
750 const int row = selectedIndexes.at(i).row();
751 if ((m_Overlays[row].m_Status == ImageOverlay::AVAILABLE) &&
752 !shouldSolveAnyway(m_ImageOverlayTable, row))
754 emit updateLog(
i18n(
"Skipping already solved: %1.", m_Overlays[row].m_Filename));
760 m_RowsToSolve.clear();
761 for (
int row : selectedRows)
762 m_RowsToSolve.push_back(row);
765 if (m_RowsToSolve.size() > 0)
767 const int row = m_RowsToSolve[0];
768 const QString filename =
769 QString(
"%1/%2").
arg(m_Directory).
arg(m_Overlays[row].m_Filename);
770 if ((m_Overlays[row].m_Status == ImageOverlay::AVAILABLE) &&
771 !shouldSolveAnyway(m_ImageOverlayTable, row))
773 emit updateLog(
i18n(
"%1 already solved. Skipping.", filename));
774 m_RowsToSolve.removeFirst();
775 if (m_RowsToSolve.size() > 0)
780 auto img =
new QImage(filename);
781 m_Overlays[row].m_Width = img->width();
782 m_Overlays[row].m_Height = img->height();
783 solveImage(filename);
787void ImageOverlayComponent::reload()
789 if (!m_Initialized)
return;
790 m_Initialized =
false;
791 emit updateLog(
i18n(
"Reloading. Image overlays temporarily disabled."));
796void ImageOverlayComponent::solverDone(
bool timedOut,
bool success,
const FITSImage::Solution &solution,
797 double elapsedSeconds)
799 disconnect(m_Solver.get(), &SolverUtils::done,
this, &ImageOverlayComponent::solverDone);
800 m_SolveButton->setText(
i18n(
"Solve"));
801 if (m_RowsToSolve.size() == 0)
804 const int solverRow = m_RowsToSolve[0];
805 m_RowsToSolve.removeFirst();
807 QComboBox *statusItem =
dynamic_cast<QComboBox*
>(m_ImageOverlayTable->cellWidget(solverRow, STATUS_COL));
811 m_Overlays[solverRow].m_Status = ImageOverlay::PLATE_SOLVE_FAILURE;
812 statusItem->
setCurrentIndex(
static_cast<int>(m_Overlays[solverRow].m_Status));
817 m_Overlays[solverRow].m_Status = ImageOverlay::PLATE_SOLVE_FAILURE;
818 statusItem->
setCurrentIndex(
static_cast<int>(m_Overlays[solverRow].m_Status));
822 m_Overlays[solverRow].m_Orientation = solution.orientation;
823 m_Overlays[solverRow].m_RA = solution.ra;
824 m_Overlays[solverRow].m_DEC = solution.dec;
825 m_Overlays[solverRow].m_ArcsecPerPixel = solution.pixscale;
826 m_Overlays[solverRow].m_EastToTheRight = solution.parity;
827 m_Overlays[solverRow].m_Status = ImageOverlay::AVAILABLE;
829 QString msg =
i18n(
"Solver success in %1s: RA %2 DEC %3 Scale %4 Angle %5",
838 auto overlay = m_Overlays[solverRow];
839 m_ImageOverlayTable->item(solverRow, RA_COL)->setText(dms(overlay.m_RA).toHMSString());
840 m_ImageOverlayTable->item(solverRow, DEC_COL)->setText(toDecString(overlay.m_DEC));
841 m_ImageOverlayTable->item(solverRow, ARCSEC_PER_PIXEL_COL)->setText(
842 QString(
"%1").arg(overlay.m_ArcsecPerPixel, 0,
'f', 2));
843 m_ImageOverlayTable->item(solverRow, ORIENTATION_COL)->setText(QString(
"%1").arg(overlay.m_Orientation, 0,
'f', 2));
844 QComboBox *ewItem =
dynamic_cast<QComboBox*
>(m_ImageOverlayTable->cellWidget(solverRow, EAST_TO_RIGHT_COL));
847 QComboBox *statusItem =
dynamic_cast<QComboBox*
>(m_ImageOverlayTable->cellWidget(solverRow, STATUS_COL));
851 QString fullFilename = QString(
"%1/%2").
arg(m_Directory).
arg(m_Overlays[solverRow].m_Filename);
852 QImage *img = loadImageFile(fullFilename, !m_Overlays[solverRow].m_EastToTheRight);
853 m_Overlays[solverRow].m_Img.reset(img);
857 if (m_RowsToSolve.size() > 0)
861 emit updateLog(
i18n(
"Done solving. %1 available.", numAvailable()));
862 m_TableGroupBox->setTitle(
i18n(
"Image Overlays. %1 images, %2 available.", m_Overlays.size(), numAvailable()));
void draw(SkyPainter *skyp) override
Draw the object on the SkyMap skyp a pointer to the SkyPainter to use.
bool GetAllImageOverlays(QList< ImageOverlay > *imageOverlayList)
Gets all the image overlay rows from the database.
bool AddImageOverlay(const ImageOverlay &overlay)
Adds a new image overlay row into the database.
bool DeleteAllImageOverlays()
Deletes all image overlay rows from the database.
static KStars * Instance()
SkyComponent represents an object on the sky map.
SkyComposite is a kind of container class for SkyComponent objects.
void setZoomFactor(double factor)
@ Set zoom factor.
void forceUpdate(bool now=false)
Recalculates the positions of objects in the sky, and then repaints the sky map.
void setFocus(SkyPoint *f)
sets the central focus point of the sky map.
void setFocusObject(SkyObject *o)
Set the FocusObject pointer to the argument.
void setFocusPoint(SkyPoint *f)
set the FocusPoint; the position that is to be the next Destination.
Draws things on the sky, without regard to backend.
virtual bool drawImageOverlay(const QList< ImageOverlay > *imageOverlays, bool useCache=false)=0
drawImageOverlay Draws a user-supplied image onto the skymap
An angle, stored as degrees, but expressible in many ways.
virtual bool setFromString(const QString &s, bool isDeg=true)
Attempt to parse the string argument as a dms value, and set the dms object accordingly.
static constexpr double PI
PI is a const static member; it's public so that it can be used anywhere, as long as dms....
const QString toHMSString(const bool machineReadable=false, const bool highPrecision=false) const
const double & Degrees() const
QString i18n(const char *text, const TYPE &arg...)
KIOCORE_EXPORT QString dir(const QString &fileClass)
KIOCORE_EXPORT QStringList list(const QString &fileClass)
void setText(const QString &text)
void activated(int index)
void addItem(const QIcon &icon, const QString &text, const QVariant &userData)
QImage mirrored(bool horizontal, bool vertical) &&
QImage scaledToWidth(int width, Qt::TransformationMode mode) const const
void append(QList< T > &&value)
qsizetype indexOf(const AT &value, qsizetype from) const const
void push_back(parameter_type value)
qsizetype size() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
iterator insert(const T &value)
QString arg(Args &&... args) const const
QString number(double n, char format, int precision)
double toDouble(bool *ok) const const
QString toLower() const const
QString trimmed() const const
QTextStream & dec(QTextStream &stream)
void setShowGrid(bool show)
void setWordWrap(bool on)
void setText(const QString &text)
void setTextAlignment(Qt::Alignment alignment)
QString text() const const
QFuture< T > run(Function function,...)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)