view ui/certificateitemwidget.h @ 1248:9f5893faa60b

(issue143) Only show warning when multiple users exist. This enumerates the ProfileList registry key and looks for SID's starting with S-1-5-21- (like the certificate installer does) and count the users. Only when more then one users are found the warning is shown. Otherwise the nss-installer will be removed.
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 25 Sep 2014 12:04:54 +0200
parents ad4fc3649ffb
children 2a1aa9df8f11
line wrap: on
line source
/* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
 * Software engineering by Intevation GmbH
 *
 * This file is Free Software under the GNU GPL (v>=2)
 * and comes with ABSOLUTELY NO WARRANTY!
 * See LICENSE.txt for details.
 */
#ifndef CERTIFICATELISTITEM_H
#define CERTIFICATELISTITEM_H
/**
 * @file certificateitemwidget.h
 * @brief Item delegate drawing custom certificate items in list views.
 *
 */
#include <QWidget>
#include <QLabel>
#include <QToolButton>

#include "certificate.h"

class CheckLessToolBtn : public QToolButton
{
    void paintEvent(QPaintEvent * pe);
};

class CertificateItemWidget : public QWidget
{
Q_OBJECT
public:
    CertificateItemWidget(
        QWidget *parent = 0,
        const Certificate &cert = Certificate(),
        bool state = false,
        QToolButton * btn = NULL);

    bool state();
    void setState(bool state);
    Certificate certificate();

private:
    void setupGUI();

    Certificate mCertificate;
    bool mOriginalState;
    QLabel *mLabel;
    QToolButton *mButton;

private slots:
    void currentStateChanged(bool state);

signals:
    void stateChanged(bool state, const Certificate &cert);
};
#endif

http://wald.intevation.org/projects/trustbridge/