30#include "kspread_canvas.h"
31#include "kspread_doc.h"
32#include "kspread_locale.h"
33#include "kspread_util.h"
34#include "kspread_view.h"
37#include "kspread_dlg_goto.h"
41GotoDialog::GotoDialog( View* parent, const char* name )
42 : KDialogBase( parent, name, true, i18n( "Goto Cell"), Ok|Cancel )
45 TQWidget *page = new TQWidget( this );
47 TQVBoxLayout *lay1 = new TQVBoxLayout( page, 0, spacingHint() );
49 TQLabel *label = new TQLabel(i18n( "Enter cell:"), page);
50 lay1->addWidget(label);
52 m_nameCell = new KLineEdit( page );
53 lay1->addWidget(m_nameCell);
55 m_nameCell->setFocus();
56 enableButtonOK( false );
58 connect( this, TQ_SIGNAL( okClicked() ), this, TQ_SLOT( slotOk() ) );
59 connect( m_nameCell, TQ_SIGNAL(textChanged ( const TQString & )),
60 this, TQ_SLOT(textChanged ( const TQString & )));
63void GotoDialog::textChanged ( const TQString &_text )
65 enableButtonOK(!_text.isEmpty());
68void GotoDialog::slotOk()
70 m_pView->doc()->emitBeginOperation( false );
73 tmp_upper=m_nameCell->text().upper();
74 Region region(m_pView, tmp_upper);
75 if ( region.isValid() )
77 m_pView->selectionInfo()->initialize(region);
84 m_pView->slotUpdateView( m_pView->activeSheet() );
87#include "kspread_dlg_goto.moc"
The View class displays a KSpread document.
|