20 #ifndef _MSSEARCHDIALOG_HPP_ 21 #define _MSSEARCHDIALOG_HPP_ 23 #include <QTreeWidget> 25 #include "MeteorShowers.hpp" 26 #include "StelDialog.hpp" 28 class Ui_MSSearchDialog;
69 void selectEvent(
const QModelIndex &modelIndex);
73 void refreshRangeDates();
77 Ui_MSSearchDialog* m_ui;
80 void initListEvents();
83 void setHeaderNames();
91 : QTreeWidgetItem(parent)
96 bool operator < (
const QTreeWidgetItem &other)
const 98 int column = treeWidget()->sortColumn();
102 QDateTime a = QDateTime::fromString(text(column),
"dd/MMM/yyyy");
103 QDateTime b = QDateTime::fromString(other.text(column),
"dd/MMM/yyyy");
104 return a.operator < (b);
109 QStringList as = text(column).split(
"-");
110 QStringList bs = other.text(column).split(
"-");
112 int a = as.size() == 1? as.at(0).toInt() : as.at(1).toInt();
113 int b = bs.size() == 1? bs.at(0).toInt() : bs.at(1).toInt();
118 return text(column).toLower() < other.text(column).toLower();
123 #endif // _MSSEARCHDIALOG_HPP_
ModelColumns
Defines the number and the order of the columns in the table that lists active meteor showers...
Base class for all the GUI windows in Stellarium.
Main class of the Meteor Showers plugin, inherits from StelObjectModule.
~MSSearchDialog()
Destructor.
void createDialogContent()
Initialize the dialog and connect the signals/slots.
MSSearchDialog(MeteorShowersMgr *mgr)
Constructor.