File indexing completed on 2024-04-21 16:29:38

0001 /***************************************************************************
0002  *   Copyright (C) 2008-2018 by Daniel Nicoletti                           *
0003  *   dantti12@gmail.com                                                    *
0004  *                                                                         *
0005  *   This program is free software; you can redistribute it and/or modify  *
0006  *   it under the terms of the GNU General Public License as published by  *
0007  *   the Free Software Foundation; either version 2 of the License, or     *
0008  *   (at your option) any later version.                                   *
0009  *                                                                         *
0010  *   This program is distributed in the hope that it will be useful,       *
0011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
0012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
0013  *   GNU General Public License for more details.                          *
0014  *                                                                         *
0015  *   You should have received a copy of the GNU General Public License     *
0016  *   along with this program; see the file COPYING. If not, write to       *
0017  *   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,  *
0018  *   Boston, MA 02110-1301, USA.                                           *
0019  ***************************************************************************/
0020 
0021 #include "RepoSig.h"
0022 #include "ui_RepoSig.h"
0023 
0024 #include <KLocalizedString>
0025 
0026 #include <QLoggingCategory>
0027 
0028 #include "PkStrings.h"
0029 
0030 using namespace PackageKit;
0031 
0032 RepoSig::RepoSig(const QString &packageID,
0033                  const QString &repoName,
0034                  const QString &keyUrl,
0035                  const QString &keyUserid,
0036                  const QString &keyId,
0037                  const QString &keyFingerprint,
0038                  const QString &keyTimestamp,
0039                  PackageKit::Transaction::SigType type,
0040                  QWidget *parent) :
0041     QDialog(parent),
0042     m_sigType(type),
0043     m_keyID(keyId),
0044     m_packageID(packageID),
0045     ui(new Ui::RepoSig)
0046 {
0047     Q_UNUSED(keyFingerprint)
0048     Q_UNUSED(keyTimestamp)
0049     ui->setupUi(this);
0050 
0051     ui->repoNameL->setText(repoName);
0052     ui->sigUrlL->setText(keyUrl);
0053     ui->sigUserIdL->setText(keyUserid);
0054     ui->sigIdL->setText(keyId);
0055 }
0056 
0057 RepoSig::~RepoSig()
0058 {
0059     delete ui;
0060 }
0061 
0062 Transaction::SigType RepoSig::sigType() const
0063 {
0064     return m_sigType;
0065 }
0066 
0067 QString RepoSig::keyID() const
0068 {
0069     return m_keyID;
0070 }
0071 
0072 QString RepoSig::packageID() const
0073 {
0074     return m_packageID;
0075 }
0076 
0077 #include "moc_RepoSig.cpp"