kspread_dlg_pasteinsert.cc
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "kspread_dlg_pasteinsert.h"
00025 #include "kspread_canvas.h"
00026 #include "kspread_doc.h"
00027 #include "kspread_sheet.h"
00028 #include "kspread_view.h"
00029
00030 #include <qlayout.h>
00031 #include <klocale.h>
00032 #include <kbuttonbox.h>
00033 #include <qbuttongroup.h>
00034 #include <kdebug.h>
00035 #include <qradiobutton.h>
00036 #include <qcheckbox.h>
00037
00038 KSpreadpasteinsert::KSpreadpasteinsert( KSpreadView* parent, const char* name,const QRect &_rect)
00039 : KDialogBase( parent, name, TRUE,i18n("Paste Inserting Cells"),Ok|Cancel )
00040 {
00041 m_pView = parent;
00042 rect=_rect;
00043
00044 QWidget *page = new QWidget( this );
00045 setMainWidget(page);
00046 QVBoxLayout *lay1 = new QVBoxLayout( page, 0, spacingHint() );
00047
00048 QButtonGroup *grp = new QButtonGroup( 1, QGroupBox::Horizontal, i18n("Insert"),page);
00049 grp->setRadioButtonExclusive( TRUE );
00050 grp->layout();
00051 lay1->addWidget(grp);
00052 rb1 = new QRadioButton( i18n("Move towards right"), grp );
00053 rb2 = new QRadioButton( i18n("Move towards bottom"), grp );
00054 rb1->setChecked(true);
00055
00056 connect( this, SIGNAL( okClicked() ), this, SLOT( slotOk() ) );
00057 }
00058
00059 void KSpreadpasteinsert::slotOk()
00060 {
00061 m_pView->doc()->emitBeginOperation( false );
00062 if( rb1->isChecked() )
00063 m_pView->activeSheet()->paste( m_pView->selection() ,
00064 true, Normal,OverWrite,true,-1);
00065 else if( rb2->isChecked() )
00066 m_pView->activeSheet()->paste( m_pView->selection() ,
00067 true, Normal,OverWrite,true,+1);
00068
00069 m_pView->slotUpdateView( m_pView->activeSheet() );
00070 accept();
00071 }
00072
00073 #include "kspread_dlg_pasteinsert.moc"
This file is part of the documentation for kspread Library Version 1.4.2.