25#include <kbuttonbox.h>
26#include <tqbuttongroup.h>
28#include <tqradiobutton.h>
29#include <tqcheckbox.h>
31#include "kspread_dlg_pasteinsert.h"
32#include "kspread_canvas.h"
33#include "kspread_doc.h"
34#include "kspread_sheet.h"
35#include "kspread_view.h"
40PasteInsertDialog::PasteInsertDialog( View* parent, const char* name, const TQRect &_rect)
41 : KDialogBase( parent, name, true,i18n( "Paste Inserting Cells"),Ok|Cancel )
46 TQWidget *page = new TQWidget( this );
48 TQVBoxLayout *lay1 = new TQVBoxLayout( page, 0, spacingHint() );
50 TQButtonGroup *grp = new TQButtonGroup( 1, TQt::Horizontal, i18n( "Insert"),page);
51 grp->setRadioButtonExclusive( true );
54 rb1 = new TQRadioButton( i18n( "Move towards right"), grp );
55 rb2 = new TQRadioButton( i18n( "Move towards bottom"), grp );
56 rb1->setChecked( true);
58 connect( this, TQ_SIGNAL( okClicked() ), this, TQ_SLOT( slotOk() ) );
61void PasteInsertDialog::slotOk()
63 m_pView->doc()->emitBeginOperation( false );
64 if( rb1->isChecked() )
65 m_pView->activeSheet()->paste( m_pView->selectionInfo()->lastRange(),
68 else if( rb2->isChecked() )
69 m_pView->activeSheet()->paste( m_pView->selectionInfo()->lastRange(),
73 m_pView->slotUpdateView( m_pView->activeSheet() );
77#include "kspread_dlg_pasteinsert.moc"
The View class displays a KSpread document.
|