Source Code (Use browser search to find items of interest.)
Class Index
kspread'KSpreadresize (./koffice/kspread/kspread_dlg_resize.h:32)
class KSpreadresize : public QDialog
{
Q_OBJECT
public:
enum type_resize {resize_column,resize_row};
KSpreadresize( KSpreadView* parent, const char* name,type_resize re);
type_resize type;
int size;
public slots:
void slotOk();
void slotClose();
protected:
KSpreadView* m_pView;
QPushButton* m_pOk;
QPushButton* m_pClose;
KIntNumInput *m_pSize2;
};
kspread'KSpreadresize::KSpreadresize() (./koffice/kspread/kspread_dlg_resize.cc:34)
KSpreadresize::KSpreadresize( KSpreadView* parent, const char* name,type_resize re)
: QDialog( parent, name )
{
m_pView=parent;
type=re;
QString tmp;
int pos;
QString label;
QVBoxLayout *lay1 = new QVBoxLayout( this );
lay1->setMargin( 5 );
lay1->setSpacing( 10 );
RowLayout *rl;
ColumnLayout *cl;
switch(type)
{
case resize_row:
pos=m_pView->vBorderWidget()->markerRow();
tmp=i18n("Row ")+tmp.setNum(pos);
rl = m_pView->activeTable()->rowLayout(pos);
size=rl->height(m_pView->canvasWidget());
label=i18n("Height");
break;
case resize_column:
pos=m_pView->hBorderWidget()->markerColumn();
tmp=i18n("Column ")+util_columnLabel(pos);
cl = m_pView->activeTable()->columnLayout(pos);
size=cl->width(m_pView->canvasWidget());
label=i18n("Width");
break;
default :
cout <<"Err in type_resize\n";
break;
}
setCaption( tmp );
m_pSize2=new KIntNumInput(size, this, 10);
m_pSize2->setRange(20, 400, 1);
m_pSize2->setLabel(label);
lay1->addWidget(m_pSize2);
KButtonBox *bb = new KButtonBox( this );
bb->addStretch();
m_pOk = bb->addButton( i18n("OK") );
m_pOk->setDefault( TRUE );
m_pClose = bb->addButton( i18n( "Close" ) );
bb->layout();
lay1->addWidget( bb );
lay1->activate();
m_pSize2->setFocus();
connect( m_pClose, SIGNAL( clicked() ), this, SLOT( slotClose() ) );
connect( m_pOk, SIGNAL( clicked() ), this, SLOT( slotOk() ) );
}
kspread'KSpreadresize::slotOk() (./koffice/kspread/kspread_dlg_resize.cc:91)
void KSpreadresize::slotOk()
{
int new_size=m_pSize2->value();
if(new_size!=size)
{
switch(type)
{
case resize_row:
m_pView->vBorderWidget()->resizeRow(new_size );
break;
case resize_column:
m_pView->hBorderWidget()->resizeColumn(new_size );
break;
default :
cout <<"Err in type_resize\n";
break;
}
}
accept();
}
kspread'KSpreadresize::slotClose() (./koffice/kspread/kspread_dlg_resize.cc:112)
void KSpreadresize::slotClose()
{
reject();
}