libyui-ncurses-pkg
Loading...
Searching...
No Matches
NCPkgFilterRepo.h
1/*
2 Copyright (c) [2002-2011] 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 File: NCPkgFilterRepo.h
19 Author: Bubli <kmachalkova@suse.cz>
20
21*/
22
23
24#ifndef NCPkgFilterRepo_h
25#define NCPkgFilterRepo_h
26
27#include <iosfwd>
28#include <string>
29#include <vector>
30#include <algorithm>
31
32#include <yui/ncurses/NCPadWidget.h>
33#include <yui/ncurses/NCPopup.h>
34#include <yui/ncurses/NCPushButton.h>
35#include <yui/ncurses/NCTable.h>
36#include <yui/ncurses/NCTablePad.h>
37
38#include "NCZypp.h"
39
40
41class NCTable;
42class NCPushButton;
44
45class NCPkgRepoTag : public YTableCell
46{
47
48private:
49
50 ZyppRepo repo;
51
52public:
60 NCPkgRepoTag ( ZyppRepo repo);
61
62 // Nikdy, ale opravdu nikdy nenechavej v odvozene tride virtualni
63 // destruktor, kdyz ani v puvodni neni, Bublino!
64 ~NCPkgRepoTag() {};
65
66 /*
67 * Get repository reference from the line tag
68 * @return ZyppRepo
69 */
70
71 ZyppRepo getRepo() const { return repo; }
72
73};
74
75class NCPkgRepoTable : public NCTable
76{
77private:
78
79 NCPkgRepoTable & operator=( const NCPkgRepoTable & );
81
82 NCPackageSelector *packager;
83public:
84
92 NCPkgRepoTable ( YWidget *parent, YTableHeader *tableHeader, NCPackageSelector *pkg);
93
94 virtual ~NCPkgRepoTable() {};
95
101 virtual void addLine( ZyppRepo r, const std::vector<std::string> & cols );
102
103 /*
104 * Fill header of repositories table (name + URL)
105 */
106 void fillHeader();
107
114 NCPkgRepoTag * getTag ( const int & index );
115
121 ZyppRepo getRepo( int index );
122
123 std::string showDescription (ZyppRepo r);
124
125 virtual NCursesEvent wHandleInput ( wint_t ch );
126
134 ZyppProduct findProductForRepo (ZyppRepo repo);
135
141 bool fillRepoList();
142
143 bool showRepoPackages();
144
145};
146#endif
Definition NCPackageSelector.h:105
Definition NCPkgFilterRepo.h:76
NCPkgRepoTag * getTag(const int &index)
Definition NCPkgFilterRepo.cc:133
virtual void addLine(ZyppRepo r, const std::vector< std::string > &cols)
Definition NCPkgFilterRepo.cc:104
ZyppRepo getRepo(int index)
Definition NCPkgFilterRepo.cc:159
bool fillRepoList()
Definition NCPkgFilterRepo.cc:201
ZyppProduct findProductForRepo(ZyppRepo repo)
Definition NCPkgFilterRepo.cc:272
Definition NCPkgFilterRepo.h:46
NCPkgRepoTag(ZyppRepo repo)
Definition NCPkgFilterRepo.cc:51