libyui-qt-pkg
 
Loading...
Searching...
No Matches
YQPkgHistoryDialog.h
1/*
2 Copyright (c) 2000 - 2011 Novell, Inc.
3 Copyright (c) 2018 - 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 File: YQPkgHistoryDialog.h
20 Author: Stanislav Visnovsky <visnov@suse.com>
21*/
22
23
24#ifndef YQPkgHistoryDialog_h
25#define YQPkgHistoryDialog_h
26
27#include <QDialog>
28#include <zypp/parser/HistoryLogReader.h>
29
30
31class YQPkgList;
32class YQPkgHistoryView;
33class QTreeWidget;
34
35
39class YQPkgHistoryDialog : public QDialog
40{
41 Q_OBJECT
42
43public:
44
48 static void showHistoryDialog( QWidget* parent = 0);
49
50
51protected:
52
57 YQPkgHistoryDialog( QWidget * parent );
58
62 void populate();
63
67 void showReadHistoryWarning( const QString & message );
68
69
70protected slots:
71
72 void selectDate();
73 void selectAction();
74
75
76protected:
77
78 // Data members
79
80 QTreeWidget * _datesTree; // Flat list for dates
81 QTreeWidget * _actionsTree; // Tree with action items below date items
82};
83
84
93{
94public:
95
100 YQPkgHistoryItemCollector( QTreeWidget * datesTree,
101 QTreeWidget * actionsTree );
102
109 bool operator() ( const zypp::HistoryLogData::Ptr & item_ptr );
110
111protected:
112
116 void addDatesTreeItem ( const QString & actionDate );
117
122 void addActionsDateItem( const QString & actionDate );
123
130 QStringList actionColumns( const zypp::HistoryLogData::Ptr & item_ptr );
131
135 QPixmap actionIcon( zypp::HistoryActionID id );
136
137
138 // Data members
139
140 QTreeWidget * _datesTree;
141 QTreeWidget * _actionsTree;
142 QTreeWidgetItem * _actionsDateItem; // parent item for all actions of this date
143 QString _lastDate; // initialized empty like all QStrings
144};
145
146
147#endif // ifndef YQPkgHistoryDialog_h
static void showHistoryDialog(QWidget *parent=0)
Definition YQPkgHistoryDialog.cc:147
YQPkgHistoryDialog(QWidget *parent)
Definition YQPkgHistoryDialog.cc:63
void populate()
Definition YQPkgHistoryDialog.cc:168
void showReadHistoryWarning(const QString &message)
Definition YQPkgHistoryDialog.cc:187
QStringList actionColumns(const zypp::HistoryLogData::Ptr &item_ptr)
Definition YQPkgHistoryDialog.cc:303
void addDatesTreeItem(const QString &actionDate)
Definition YQPkgHistoryDialog.cc:288
YQPkgHistoryItemCollector(QTreeWidget *datesTree, QTreeWidget *actionsTree)
Definition YQPkgHistoryDialog.cc:253
QPixmap actionIcon(zypp::HistoryActionID id)
Definition YQPkgHistoryDialog.cc:376
bool operator()(const zypp::HistoryLogData::Ptr &item_ptr)
Definition YQPkgHistoryDialog.cc:263
void addActionsDateItem(const QString &actionDate)
Definition YQPkgHistoryDialog.cc:295
Display a list of zypp::Package objects.
Definition YQPkgList.h:39