1
/***************************************************************************
2
* Copyright (C) 2014 by Savoir-Faire Linux *
3
* Author : Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>*
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 3 of the License, or *
8
* (at your option) any later version. *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
17
**************************************************************************/
18
#ifndef SECURITYPROGRESS_H
19
#define SECURITYPROGRESS_H
21
#include <QtGui/QProgressBar>
30
#include <lib/securityvalidationmodel.h>
31
class SecurityProgress;
33
class IssuesIcon : public QWidget {
36
explicit IssuesIcon(QWidget* parent = nullptr);
40
void setBuddy(QWidget* buddy);
41
void setModel(SecurityValidationModel* model);
44
QWidget* buddy() const;
47
void addFlaw(const Flaw* flaw);
48
void setupForLineEdit(QLineEdit* le);
51
virtual bool eventFilter(QObject *obj, QEvent *event);
54
QHBoxLayout* m_pLayout;
56
SecurityValidationModel* m_pModel;
59
void slotFlawClicked();
61
void selectFlaw(const QModelIndex idx);
64
class SecurityLevelWidget : public QWidget
68
explicit SecurityLevelWidget(QWidget* parent = nullptr);
69
virtual ~SecurityLevelWidget();
72
QListView* view() const;
75
void setModel(SecurityValidationModel* model);
78
virtual void mouseReleaseEvent ( QMouseEvent * event );
81
SecurityProgress* m_pLevel;
83
SecurityValidationModel* m_pModel;
93
void dblClicked(const QModelIndex& idx);