Commit 242710ca authored by Katarina Behrens's avatar Katarina Behrens Committed by Albert Astals Cid
Browse files

Recycle WidgetConfigurationToolsBase for certificate management dlg

parent 06017573
......@@ -361,6 +361,7 @@ if(BUILD_DESKTOP)
part/dlgperformance.cpp
part/dlgpresentation.cpp
part/dlgsignatures.cpp
part/certificatetools.cpp
part/editannottooldialog.cpp
part/editdrawingtooldialog.cpp
part/widgetannottools.cpp
......
/***************************************************************************
* Copyright (C) 2019 by Bubli *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#include "certificatetools.h"
#include <iostream>
CertificateTools::CertificateTools( QWidget * parent )
: WidgetConfigurationToolsBase( parent )
{
}
QStringList CertificateTools::tools() const
{
QStringList res;
return res;
}
void CertificateTools::setTools(const QStringList& /*items*/)
{
return;
}
void CertificateTools::slotAdd()
{
std::cout << "add" << std::endl;
}
void CertificateTools::slotEdit()
{
std::cout << "edit" << std::endl;
}
/***************************************************************************
* Copyright (C) 2012 by Bubli *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#ifndef _CERTIFICATETOOLS_H_
#define _CERTIFICATETOOLS_H_
#include "widgetconfigurationtoolsbase.h"
#include <qwidget.h>
class CertificateTools : public WidgetConfigurationToolsBase
{
Q_OBJECT
public:
explicit CertificateTools( QWidget * parent = nullptr );
~CertificateTools() {};
QStringList tools() const override;
void setTools(const QStringList& items) override;
protected Q_SLOTS:
void slotAdd() override;
void slotEdit() override;
};
#endif
......@@ -9,6 +9,7 @@
#include "dlgsignatures.h"
#include "certificatetools.h"
#include "ui_dlgsignaturesbase.h"
DlgSignatures::DlgSignatures(QWidget *parent)
......@@ -16,6 +17,9 @@ DlgSignatures::DlgSignatures(QWidget *parent)
{
m_dlg = new Ui_DlgSignaturesBase();
m_dlg->setupUi(this);
CertificateTools * kcfg_CertTools = new CertificateTools( m_dlg->certificatesGroup );
m_dlg->certificatesPlaceholder->addWidget( kcfg_CertTools );
}
DlgSignatures::~DlgSignatures()
......
......@@ -24,29 +24,11 @@
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox_2">
<widget class="QGroupBox" name="certificatesGroup">
<property name="title">
<string>Digital Signatures</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pushButton_2">
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
<item row="0" column="0" rowspan="2">
<widget class="QListWidget" name="listWidget"/>
</item>
</layout>
<layout class="QVBoxLayout" name="certificatesPlaceholder" />
</widget>
</item>
<item>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment