From 50b48aec6ddd451a6d1709c0942477b503457663 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 3 Feb 2010 02:15:56 +0000 Subject: Added abandoned KDE3 version of K3B git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k3b@1084400 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/projects/k3bdatavolumedescwidget.cpp | 93 ++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 src/projects/k3bdatavolumedescwidget.cpp (limited to 'src/projects/k3bdatavolumedescwidget.cpp') diff --git a/src/projects/k3bdatavolumedescwidget.cpp b/src/projects/k3bdatavolumedescwidget.cpp new file mode 100644 index 0000000..1edbc7b --- /dev/null +++ b/src/projects/k3bdatavolumedescwidget.cpp @@ -0,0 +1,93 @@ +/* + * + * $Id: k3bdatavolumedescwidget.cpp 619556 2007-01-03 17:38:12Z trueg $ + * Copyright (C) 2003 Sebastian Trueg + * + * This file is part of the K3b project. + * Copyright (C) 1998-2007 Sebastian Trueg + * + * 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. + * See the file "COPYING" for the exact licensing terms. + */ + +#include "k3bdatavolumedescwidget.h" + +#include "k3bisooptions.h" +#include + +#include +#include +#include +#include + + +K3bDataVolumeDescWidget::K3bDataVolumeDescWidget( QWidget* parent, const char* name ) + : base_K3bDataVolumeDescWidget( parent, name ) +{ + // the maximal number of characters that can be inserted are set in the ui file! + + QValidator* isoValidator = new K3bLatin1Validator( this ); + + m_editVolumeName->setValidator( isoValidator ); + m_editVolumeSetName->setValidator( isoValidator ); + m_editPublisher->setValidator( isoValidator ); + m_editPreparer->setValidator( isoValidator ); + m_editSystem->setValidator( isoValidator ); + m_editApplication->setValidator( isoValidator ); + + connect( m_spinVolumeSetSize, SIGNAL(valueChanged(int)), + this, SLOT(slotVolumeSetSizeChanged(int)) ); + + // for now we hide the volume set size stuff since it's not working anymore in mkisofs 2.01a34 + textLabel1->hide(); + textLabel2->hide(); + m_spinVolumeSetSize->hide(); + m_spinVolumeSetNumber->hide(); + + // FIXME: show the buttons and allow the selection of a file from the project + m_buttonFindAbstract->hide(); + m_buttonFindCopyright->hide(); + m_buttonFindBiblio->hide(); +} + + +K3bDataVolumeDescWidget::~K3bDataVolumeDescWidget() +{ +} + + +void K3bDataVolumeDescWidget::load( const K3bIsoOptions& o ) +{ + m_editVolumeName->setText( o.volumeID() ); + m_editVolumeSetName->setText( o.volumeSetId() ); + m_spinVolumeSetSize->setValue( o.volumeSetSize() ); + m_spinVolumeSetNumber->setValue( o.volumeSetNumber() ); + m_editPublisher->setText( o.publisher() ); + m_editPreparer->setText( o.preparer() ); + m_editSystem->setText( o.systemId() ); + m_editApplication->setText( o.applicationID() ); +} + + +void K3bDataVolumeDescWidget::save( K3bIsoOptions& o ) +{ + o.setVolumeID( m_editVolumeName->text() ); + o.setVolumeSetId( m_editVolumeSetName->text() ); + o.setVolumeSetSize( 1/*m_spinVolumeSetSize->value() */); + o.setVolumeSetNumber( 1/*m_spinVolumeSetNumber->value() */); + o.setPublisher( m_editPublisher->text() ); + o.setPreparer( m_editPreparer->text() ); + o.setSystemId( m_editSystem->text() ); + o.setApplicationID( m_editApplication->text() ); +} + + +void K3bDataVolumeDescWidget::slotVolumeSetSizeChanged( int i ) +{ + m_spinVolumeSetNumber->setMaxValue( i ); +} + +#include "k3bdatavolumedescwidget.moc" -- cgit v1.2.3