Kstars

culturelist.h
1 /*
2  SPDX-FileCopyrightText: 2008 Jerome SONRIER <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <QStringList>
10 
11 /**
12  * @class CultureList
13  * A list of all cultures
14  * FIXME: Why not use a QStringList?
15  */
17 {
18  public:
19  /** @short Create culture list and load its content from file */
20  CultureList();
21 
22  /** @short Return the current sky culture */
23  QString current() const { return m_CurrentCulture; }
24 
25  /** @short Set the current culture name */
26  void setCurrent(QString newName);
27 
28  /** @short Return a sorted list of cultures */
29  QStringList getNames() const { return m_CultureList; }
30 
31  /**
32  * @short Return the name of the culture at index.
33  * @return null string if is index is out of range
34  * */
35  QString getName(int index) const;
36 
37  private:
38  QString m_CurrentCulture;
39  // List of all available cultures. It's assumed that list is sorted.
40  QStringList m_CultureList;
41 };
void setCurrent(QString newName)
Set the current culture name.
Definition: culturelist.cpp:39
QString current() const
Return the current sky culture.
Definition: culturelist.h:23
QString getName(int index) const
Return the name of the culture at index.
Definition: culturelist.cpp:44
CultureList()
Create culture list and load its content from file.
Definition: culturelist.cpp:11
QStringList getNames() const
Return a sorted list of cultures.
Definition: culturelist.h:29
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Oct 1 2023 04:02:38 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.