source: src-qt4/pc-controlpanel/deinfo.h @ 1c61936

releng/10.0.1releng/10.0.2
Last change on this file since 1c61936 was 1c61936, checked in by yurkis <yurkis@…>, 6 months ago

Control panel - separate button for launch DE related config application

  • Property mode set to 100644
File size: 3.0 KB
Line 
1/**************************************************************************
2*   Copyright (C) 2011-2014 by Yuri Momotyuk                              *
3*   yurkis@pcbsd.org                                                      *
4*                                                                         *
5*   Permission is hereby granted, free of charge, to any person obtaining *
6*   a copy of this software and associated documentation files (the       *
7*   "Software"), to deal in the Software without restriction, including   *
8*   without limitation the rights to use, copy, modify, merge, publish,   *
9*   distribute, sublicense, and/or sell copies of the Software, and to    *
10*   permit persons to whom the Software is furnished to do so, subject to *
11*   the following conditions:                                             *
12*                                                                         *
13*   The above copyright notice and this permission notice shall be        *
14*   included in all copies or substantial portions of the Software.       *
15*                                                                         *
16*   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       *
17*   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    *
18*   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*
19*   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     *
20*   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
21*   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
22*   OTHER DEALINGS IN THE SOFTWARE.                                       *
23***************************************************************************/
24
25#ifndef DEINFO_F
26#define DEINFO_F
27
28#include <QString>
29#include <QVector>
30#include <QDebug>
31#include "pcbsd-utils.h"
32
33//! Class that holds list of desktop environments
34class CDEList
35{
36public:
37    /**
38      Refresh list
39
40      @param isAll- true if we want to fill list by all supported DEs outwice
41                     it fills by installed DEs
42    */
43    int refresh(/*bool isAll=false*/);
44
45    /**
46      Returns count of DE's descriptions in list
47    */
48    int size()
49        {
50            return mvDE.size();
51        }
52
53    pcbsd::DesktopEnvironmentInfo& operator[](int idx)
54        {
55            return mvDE[idx];
56        }
57
58    /**
59      Returns pointer to description of active DE
60
61      @return Pointer to description of active DE or NULL if active DE unknown
62    */
63    pcbsd::DesktopEnvironmentInfo* active();
64
65    /**
66      Returns DE description bu DE name
67
68      @param Name - Name to search (case insensative)
69
70      @return Pointer to DE description. NULL if not found
71    */
72    pcbsd::DesktopEnvironmentInfo* byName(QString Name);
73
74protected:
75    QVector <pcbsd::DesktopEnvironmentInfo> mvDE;
76};
77
78///////////////////////////////////////////////////////
79// Singleton object for DE list
80class CSingleDEList:public CDEList
81{
82public:
83    static CSingleDEList& getRef();
84};
85
86static CSingleDEList& InstalledDEList = CSingleDEList::getRef();
87
88#endif // DEINFO_F
Note: See TracBrowser for help on using the repository browser.