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);
300 // JM 2022.08.28: Disabling use of async DB manager until further notice since it appears to cause a crash
304 // connect(m_asyncDBManager.get(), &CatalogsDB::AsyncDBManager::resultReady, &loop, &QEventLoop::quit);
315 bool exactMatchExists = objs.size() > 0 ? QString::compare(objs.front().name(), SearchText, Qt::CaseInsensitive) : false;
324 ui->InternetSearchButton->setText(i18n("Search the Internet for %1", SearchText.isEmpty() ? i18nc("no text to search for",
351 SearchText, Qt::CaseInsensitive)); // Disable searching the internet when an exact match for SearchText exists in KStars
412 // If it is an NGC/IC/M catalog number, as in "M 76" or "NGC 5139", check for absence of the space
463CatalogObject *FindDialog::resolveAndAdd(CatalogsDB::DBManager &db_manager, const QString &query)
556 QModelIndex selectItem = sortModel->index(currentRow - 1, sortModel->filterKeyColumn(), QModelIndex());
557 ui->SearchList->selectionModel()->setCurrentIndex(selectItem, QItemSelectionModel::SelectCurrent);
566 QModelIndex selectItem = sortModel->index(currentRow + 1, sortModel->filterKeyColumn(), QModelIndex());
567 ui->SearchList->selectionModel()->setCurrentIndex(selectItem, QItemSelectionModel::SelectCurrent);
A simple container object to hold the minimum information for a Deep Sky Object to be drawn on the sk...
Definition catalogobject.h:41
Manages the catalog database and provides an interface to provide an interface to query and modify th...
Definition catalogsdb.h:183
CatalogObjectList find_objects_by_name(const QString &name, const int limit=-1, const bool exactMatchOnly=false)
Find an objects by name.
Definition catalogsdb.cpp:499
CatalogObjectList get_objects(float maglim=default_maglim, int limit=-1)
Get limit objects with magnitude smaller than maglim (smaller = brighter) from the database.
Definition catalogsdb.cpp:572
DetailDialog is a window showing detailed information for a selected object.
Definition detaildialog.h:71
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:463
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
void slotResolve()
This slot resolves the object on the internet, ignoring the selection on the list.
Definition finddialog.cpp:458
int execWithParent(QWidget *parent=nullptr)
exec overrides base's QDialog::exec() to provide a parent widget.
Definition finddialog.cpp:585
void slotOk()
Overloading the Standard QDialogBase slotOk() to show a "sorry" message box if no object is selected ...
Definition finddialog.cpp:440
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:403
void removeSkyObject(SkyObject *object)
Emitted when a sky object is removed from the database.
int indexOf(const QString &objectName) const
Definition skyobjectlistmodel.cpp:24
Provides all necessary information about an object in the sky: its coordinates, name(s),...
Definition skyobject.h:42
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
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
QCA_EXPORT void init()
void clicked(bool checked)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
void activated(int index)
void addItem(const QIcon &icon, const QString &text, const QVariant &userData)
void currentTextChanged(const QString &text)
virtual void accept()
virtual int exec()
virtual void reject()
int result() const const
ActionRole
QPushButton * addButton(StandardButton button)
QPushButton * button(StandardButton which) const const
void accept()
QList< Key > keys() const const
ClearAndSelect
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
int key() const const
void returnPressed()
void textChanged(const QString &text)
void append(QList< T > &&value)
bool contains(const AT &value) const const
qsizetype size() const const
int row() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QObject * parent() const const
void setDefault(bool)
virtual QVariant data(const QModelIndex &index, int role) const const override
filterKeyColumn
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const const override
virtual int rowCount(const QModelIndex &parent) const const override
void setFilterFixedString(const QString &pattern)
virtual void sort(int column, Qt::SortOrder order) override
QString arg(Args &&... args) const const
const QChar at(qsizetype position) const const
int compare(QLatin1StringView s1, const QString &s2, Qt::CaseSensitivity cs)
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
QString & remove(QChar ch, Qt::CaseSensitivity cs)
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
void sort(Qt::CaseSensitivity cs)
CaseInsensitive
DisplayRole
Key_Escape
Tool
QFuture< void > map(Iterator begin, Iterator end, MapFunctor &&function)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
singleShot
void timeout()
void setEnabled(bool)
QWidget * parentWidget() const const
void setFocus()
void setParent(QWidget *parent)
void setWindowFlag(Qt::WindowType flag, bool on)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:02 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:02 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.