parent
99c041312b
commit
4973863521
@ -0,0 +1,65 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2012 by Timothy Pearson *
|
||||||
|
* kb9vqf@pearsoncomputing.net *
|
||||||
|
* *
|
||||||
|
* 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. *
|
||||||
|
* *
|
||||||
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU General Public License *
|
||||||
|
* along with this program; if not, write to the *
|
||||||
|
* Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#include <klocale.h>
|
||||||
|
#include <klineedit.h>
|
||||||
|
#include <ktextedit.h>
|
||||||
|
#include <knuminput.h>
|
||||||
|
#include <kactionselector.h>
|
||||||
|
#include <tqlistbox.h>
|
||||||
|
#include <kpushbutton.h>
|
||||||
|
#include <tqpixmap.h>
|
||||||
|
#include <tqiconset.h>
|
||||||
|
#include <tqlabel.h>
|
||||||
|
#include <kconfig.h>
|
||||||
|
#include <tqcheckbox.h>
|
||||||
|
|
||||||
|
#include "configdlgbase.h"
|
||||||
|
#include "configdlg.h"
|
||||||
|
#include "toplevel.h"
|
||||||
|
|
||||||
|
KTMConfigureDialog::KTMConfigureDialog(TopLevel* tlapp, TQWidget* parent, const char* name)
|
||||||
|
: KDialogBase(parent, name, true, i18n("Kerberos Ticket Manager Configuration"), Ok|Cancel|Apply, Ok, true), m_tlapp(tlapp)
|
||||||
|
{
|
||||||
|
m_base = new ConfigDlgBase(this);
|
||||||
|
|
||||||
|
setMainWidget(m_base);
|
||||||
|
|
||||||
|
m_base->notifyExpiry->setChecked(m_tlapp->notifyExpiry);
|
||||||
|
m_base->notifyExpiryMinutes->setValue(m_tlapp->notifyExpiryMinutes);
|
||||||
|
}
|
||||||
|
|
||||||
|
void KTMConfigureDialog::save() {
|
||||||
|
m_tlapp->notifyExpiry = m_base->notifyExpiry->isOn();
|
||||||
|
m_tlapp->notifyExpiryMinutes = m_base->notifyExpiryMinutes->value();
|
||||||
|
|
||||||
|
m_tlapp->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
void KTMConfigureDialog::slotOk() {
|
||||||
|
save();
|
||||||
|
accept();
|
||||||
|
}
|
||||||
|
|
||||||
|
void KTMConfigureDialog::slotApply() {
|
||||||
|
save();
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "configdlg.moc"
|
@ -0,0 +1,49 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2012 by Timothy Pearson *
|
||||||
|
* kb9vqf@pearsoncomputing.net *
|
||||||
|
* *
|
||||||
|
* 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. *
|
||||||
|
* *
|
||||||
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU General Public License *
|
||||||
|
* along with this program; if not, write to the *
|
||||||
|
* Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#ifndef _KTMCONFIGDIALOG_H_
|
||||||
|
#define _KTMCONFIGDIALOG_H_
|
||||||
|
|
||||||
|
#include <kdialogbase.h>
|
||||||
|
#include <kcombobox.h>
|
||||||
|
|
||||||
|
class ConfigDlgBase;
|
||||||
|
class TopLevel;
|
||||||
|
|
||||||
|
class KTMConfigureDialog : public KDialogBase
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
KTMConfigureDialog(TopLevel* tlapp, TQWidget* parent = 0, const char* name = 0);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void slotOk();
|
||||||
|
void slotApply();
|
||||||
|
|
||||||
|
public:
|
||||||
|
ConfigDlgBase *m_base;
|
||||||
|
TopLevel* m_tlapp;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void save();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,36 @@
|
|||||||
|
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
|
||||||
|
<class>ConfigDlgBase</class>
|
||||||
|
<widget class="TQWidget">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>ConfigDlgBase</cstring>
|
||||||
|
</property>
|
||||||
|
<grid>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>unnamed</cstring>
|
||||||
|
</property>
|
||||||
|
<widget class="TQCheckBox" row="1" column="0" colspan="3">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>notifyExpiry</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Notify me before my ticket(s) expire</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="TQLabel" row="2" column="0" colspan="2">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>unnamed</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Minutes before expiration:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="KIntNumInput" row="2" column="2">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>notifyExpiryMinutes</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</grid>
|
||||||
|
</widget>
|
||||||
|
<layoutdefaults spacing="3" margin="6"/>
|
||||||
|
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
|
||||||
|
</UI>
|
After Width: | Height: | Size: 1.4 KiB |
Loading…
Reference in new issue