From 8362bf63dea22bbf6736609b0f49c152f975eb63 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 20 Jan 2010 01:29:50 +0000 Subject: Added old abandoned KDE3 version of koffice git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- lib/kofficecore/Koversiondialog.cpp | 143 ++++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 lib/kofficecore/Koversiondialog.cpp (limited to 'lib/kofficecore/Koversiondialog.cpp') diff --git a/lib/kofficecore/Koversiondialog.cpp b/lib/kofficecore/Koversiondialog.cpp new file mode 100644 index 000000000..b21ae52ff --- /dev/null +++ b/lib/kofficecore/Koversiondialog.cpp @@ -0,0 +1,143 @@ +/* This file is part of the KDE project + Copyright (C) 2005 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. +*/ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "Koversiondialog.h" + + +KoVersionDialog::KoVersionDialog( QWidget* parent, const char* name ) + : KDialogBase( parent, name, true, i18n("Version"), Ok|Cancel ) +{ + QWidget* page = new QWidget( this ); + setMainWidget( page ); + + QGridLayout *grid1 = new QGridLayout( page,10,3,KDialog::marginHint(), KDialog::spacingHint()); + + list=new KListView(page, "versionlist"); + list->addColumn(i18n("Date & Time")); + list->addColumn(i18n("Saved By")); + list->addColumn(i18n("Comment")); + + grid1->addMultiCellWidget(list,0,8,0,0); + + m_pAdd=new QPushButton(i18n("&Add"),page); + grid1->addWidget(m_pAdd,1,2); + + m_pRemove=new QPushButton(i18n("&Remove"),page); + grid1->addWidget(m_pRemove,2,2); + + m_pModify=new QPushButton(i18n("&Modify"),page); + grid1->addWidget(m_pModify,3,2); + + m_pOpen=new QPushButton(i18n("&Open"),page); + grid1->addWidget(m_pOpen,4,2); + + + connect( m_pRemove, SIGNAL( clicked() ), this, SLOT( slotRemove() ) ); + connect( m_pAdd, SIGNAL( clicked() ), this, SLOT( slotAdd() ) ); + connect( m_pOpen, SIGNAL( clicked() ), this, SLOT( slotOpen() ) ); + connect( m_pModify, SIGNAL( clicked() ), this, SLOT( slotModify() ) ); + + updateButton(); + + resize( 600, 250 ); + +} + +KoVersionDialog::~KoVersionDialog() +{ +} + +void KoVersionDialog::updateButton() +{ +#if 0 + bool state = ( list->currentItem() >= 0 ); + m_pRemove->setEnabled( state ); +#endif +} + +void KoVersionDialog::slotAdd() +{ + //TODO create entry +} + +void KoVersionDialog::slotRemove() +{ + //TODO remove entry +} + +void KoVersionDialog::slotModify() +{ + KoVersionModifyDialog * dlg = new KoVersionModifyDialog( this /*, const QString &_comment*/ /*TODO add*/ ); + if ( dlg->exec() ) + { + //TODO + kdDebug()<<" comment :"<comment()<addWidget( m_multiline ); + +} + +QString KoVersionModifyDialog::comment() const +{ + return m_multiline->text(); +} + + +#include "Koversiondialog.moc" -- cgit v1.2.3