Kstars

sessionsortfilterproxymodel.h
1 /*
2  SPDX-FileCopyrightText: 2012 Akarsh Simha <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <QSortFilterProxyModel>
10 
11 class QModelIndex;
12 
13 /**
14  * @class SessionSortFilterProxyModel
15  * @short Sort best observation times by reimplementing lessThan() to work on the transit times of objects
16  *
17  * Any observing session starts at about sunset (~ 6 PM local time)
18  * and goes on till sunrise (~ 6 AM local time). Thus, the correct
19  * order to view objects in is to view those with meridian transit
20  * times just after 12 noon local time first, working towards those
21  * that transit in the evening, and finishing the ones that have
22  * meridian transits just before 12 noon at the end of the
23  * session. So, the observing session list should be sorted in a
24  * special manner when sorting by time. This class reimplements
25  * lessThan() in QSortFilterProxyModel to obtain the required sorting.
26  */
28 {
29  Q_OBJECT;
30 
31  public:
32  explicit SessionSortFilterProxyModel(QObject *parent = nullptr);
33 
34  protected:
35  bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
36 };
Q_OBJECTQ_OBJECT
QObject * parent() const const
Sort best observation times by reimplementing lessThan() to work on the transit times of objects.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 12 2022 04:00:58 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.