libyui-qt-pkg
Loading...
Searching...
No Matches
YQPkgLangList.h
1/*
2 Copyright (c) 2000 - 2010 Novell, Inc.
3 Copyright (c) 2021 SUSE LLC
4
5 This library is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) version 3.0 of the License. This library
9 is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12 License for more details. You should have received a copy of the GNU
13 Lesser General Public License along with this library; if not, write
14 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
15 Floor, Boston, MA 02110-1301 USA
16*/
17
18
19/*
20 File: YQPkgLangList.h
21 Author: Stefan Hundhammer <shundhammer.de>
22*/
23
24
25#ifndef YQPkgLangList_h
26#define YQPkgLangList_h
27
28#include "YQPkgObjList.h"
29
30
32
37{
38 Q_OBJECT
39
40public:
41
45 YQPkgLangList( QWidget * parent );
46
50 virtual ~YQPkgLangList();
51
52
53public slots:
54
62 void filter();
63
67 void filterIfVisible();
68
69
75 void addLangItem( const zypp::Locale & lang );
76
80 virtual void updateActions( YQPkgObjListItem * item = 0);
81
82public:
83
88
89
90signals:
91
97
101 void filterMatch( ZyppSel selectable,
102 ZyppPkg pkg );
103
108
109
110protected slots:
111
115 void fillList();
116};
117
118
119
121{
122public:
123
128 YQPkgLangListItem( YQPkgLangList * pkgSelList,
129 const zypp::Locale & lang );
130
134 virtual ~YQPkgLangListItem();
135
139 zypp::Locale zyppLang() const { return _zyppLang; }
140
142 virtual void init();
143
144 // Columns
145
146 int statusCol() const { return _langList->statusCol(); }
147
152 virtual ZyppStatus status() const;
153 virtual void setStatus( ZyppStatus newStatus, bool sendSignals = true );
154
159 virtual bool bySelection() const;
160
164 virtual void cycleStatus();
165
171 virtual bool operator< ( const QTreeWidgetItem & other ) const;
172
173protected:
174
181 virtual void applyChanges();
182
183
184 // Data members
185
186 YQPkgLangList * _langList;
187 zypp::Locale _zyppLang;
188};
189
190
191#endif // ifndef YQPkgLangList_h
Definition YQPkgLangList.h:121
virtual void init()
overloaded
Definition YQPkgLangList.cc:212
virtual bool bySelection() const
Definition YQPkgLangList.cc:276
virtual void cycleStatus()
Definition YQPkgLangList.cc:283
virtual ~YQPkgLangListItem()
Definition YQPkgLangList.cc:198
virtual ZyppStatus status() const
Definition YQPkgLangList.cc:229
zypp::Locale zyppLang() const
Definition YQPkgLangList.h:139
virtual void applyChanges()
Definition YQPkgLangList.cc:205
virtual void setStatus(ZyppStatus newStatus, bool sendSignals=true)
Definition YQPkgLangList.cc:238
virtual bool operator<(const QTreeWidgetItem &other) const
Definition YQPkgLangList.cc:297
Display a list of zypp::Selection objects.
Definition YQPkgLangList.h:37
virtual ~YQPkgLangList()
Definition YQPkgLangList.cc:85
void filterFinished()
void filterStart()
void fillList()
Definition YQPkgLangList.cc:92
void filter()
Definition YQPkgLangList.cc:119
void filterMatch(ZyppSel selectable, ZyppPkg pkg)
void filterIfVisible()
Definition YQPkgLangList.cc:111
virtual void updateActions(YQPkgObjListItem *item=0)
Definition YQPkgLangList.cc:167
void addLangItem(const zypp::Locale &lang)
Definition YQPkgLangList.cc:148
YQPkgLangListItem * selection() const
Definition YQPkgLangList.cc:155
Definition YQPkgObjList.h:413
Abstract base class to display a list of zypp::ResObjects. Handles most generic stuff like setting st...
Definition YQPkgObjList.h:53