Kstars
finddialog.cpp
79 QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
98 connect(KStars::Instance()->map(), &SkyMap::removeSkyObject, fModel, &SkyObjectListModel::removeSkyObject);
140 connect(ui->SearchList->selectionModel(), &QItemSelectionModel::selectionChanged, this, &FindDialog::slotUpdateButtons);
302 connect(m_asyncDBManager.get(), &CatalogsDB::AsyncDBManager::resultReady, &loop, &QEventLoop::quit);
313 bool exactMatchExists = objs->size() > 0 ? QString::compare(objs->front().name(), SearchText, Qt::CaseInsensitive) : false;
322 ui->InternetSearchButton->setText(i18n("Search the Internet for %1", SearchText.isEmpty() ? i18nc("no text to search for",
349 SearchText, Qt::CaseInsensitive)); // Disable searching the internet when an exact match for SearchText exists in KStars
375 QVariant sObj = sortModel->data(sortModel->index(i.row(), 0), SkyObjectListModel::SkyObjectRole);
409 // If it is an NGC/IC/M catalog number, as in "M 76" or "NGC 5139", check for absence of the space
431 // If it is a IAU standard three letter abbreviation for a constellation, then go to that constellation
452 finishProcessing(selObj, Options::resolveNamesOnline() && ui->InternetSearchButton->isEnabled());
460 CatalogObject *FindDialog::resolveAndAdd(CatalogsDB::DBManager &db_manager, const QString &query)
553 QModelIndex selectItem = sortModel->index(currentRow - 1, sortModel->filterKeyColumn(), QModelIndex());
554 ui->SearchList->selectionModel()->setCurrentIndex(selectItem, QItemSelectionModel::SelectCurrent);
563 QModelIndex selectItem = sortModel->index(currentRow + 1, sortModel->filterKeyColumn(), QModelIndex());
564 ui->SearchList->selectionModel()->setCurrentIndex(selectItem, QItemSelectionModel::SelectCurrent);
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
DisplayRole
Definition: detaildialog.h:70
std::pair< bool, QString > add_object(const int catalog_id, const SkyObject::TYPE t, const CachingDms &r, const CachingDms &d, const QString &n, const float m=NaN::f, const QString &lname=QString(), const QString &catalog_identifier=QString(), const float a=0.0, const float b=0.0, const double pa=0.0, const float flux=0)
Add a CatalogObject to a table with catalog_id.
Definition: catalogsdb.cpp:677
CaseInsensitive
singleShot
QCA_EXPORT void init()
T value() const const
QList< Key > keys() const const
bool contains(const QString &str, Qt::CaseSensitivity cs) const const
void append(const T &value)
void clicked(bool checked)
Definition: kstarsdata.h:70
Manages the catalog database and provides an interface to provide an interface to query and modify th...
Definition: catalogsdb.h:181
static CatalogObject * resolveAndAdd(CatalogsDB::DBManager &db_manager, const QString &query)
Resolves an object using the internet and adds it to the database.
Definition: finddialog.cpp:460
int exec(QEventLoop::ProcessEventsFlags flags)
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
ClearAndSelect
Tool
int size() const const
QStringList filter(QStringView str, Qt::CaseSensitivity cs) const const
QString i18n(const char *text, const TYPE &arg...)
ActionRole
CatalogObject & insertStaticObject(const CatalogObject &obj)
Insert an object obj into m_static_objects and return a reference to the newly inserted object.
Definition: catalogscomponent.cpp:297
void quit()
void currentTextChanged(const QString &text)
void textChanged(const QString &text)
void timeout()
bool isEmpty() const const
void removeSkyObject(SkyObject *object)
Emitted when a sky object is removed from the database.
void returnPressed()
void addButton(QAbstractButton *button, QDialogButtonBox::ButtonRole role)
virtual void updateCoordsNow(const KSNumbers *num)
updateCoordsNow Shortcut for updateCoords( const KSNumbers *num, false, nullptr, nullptr,...
Definition: skypoint.h:382
virtual int exec()
Key_Escape
void setCaseSensitivity(Qt::CaseSensitivity cs)
bool isValid() const const
void setEnabled(bool)
void slotResolve()
This slot resolves the object on the internet, ignoring the selection on the list.
Definition: finddialog.cpp:455
QString & replace(int position, int n, QChar after)
QString & remove(int position, int n)
int row() const const
void filterList()
When Text is entered in the QLineEdit, filter the List of objects so that only objects which start wi...
Definition: finddialog.cpp:295
std::pair< bool, CatalogObject > get_object(const CatalogObject::oid &oid)
Get an object by oid.
Definition: catalogsdb.cpp:536
std::pair< bool, CatalogObject > resolveName(const QString &name)
Resolve the name of the given DSO and extract data from various sources.
Definition: nameresolver.cpp:30
int key() const const
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const
QPushButton * button(QDialogButtonBox::StandardButton which) const const
int execWithParent(QWidget *parent=nullptr)
exec overrides base's QDialog::exec() to provide a parent widget.
Definition: finddialog.cpp:582
bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType type, QGenericReturnArgument ret, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8, QGenericArgument val9)
const QChar at(int position) const const
QString i18nc(const char *context, const char *text, const TYPE &arg...)
void setPattern(const QString &pattern)
int compare(const QString &other, Qt::CaseSensitivity cs) const const
void slotOk()
Overloading the Standard QDialogBase slotOk() to show a "sorry" message box if no object is selected ...
Definition: finddialog.cpp:437
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
QFuture< void > map(Sequence &sequence, MapFunctor function)
static QString processSearchText(QString searchText)
Do some post processing on the search text to interpret what the user meant This could include replac...
Definition: finddialog.cpp:400
A simple container object to hold the minimum information for a Deeb Sky Object to be drawn on the sk...
Definition: catalogobject.h:40
void activated(int index)
QString message
void accept()
void sort(Qt::CaseSensitivity cs)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sun Aug 14 2022 04:13:55 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sun Aug 14 2022 04:13:55 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.