Implemented row deletion / insertion.

--HG--
branch : gsoc2014-dfighter
hg/feature/cdb-packed
dfighter1985 10 years ago
parent 485ee77406
commit d9c2620e6e

@ -148,6 +148,30 @@ void UXTEditor::activateWindow()
}
void UXTEditor::insertRow()
{
d_ptr->infos.push_back( STRING_MANAGER::TStringInfo() );
d_ptr->t->setRowCount( d_ptr->t->rowCount() + 1 );
setWindowModified( true );
}
void UXTEditor::deleteRow()
{
int r = d_ptr->t->currentRow();
if( r < 0 )
return;
std::vector< STRING_MANAGER::TStringInfo >::iterator itr = d_ptr->infos.begin();
itr += r;
d_ptr->infos.erase( itr );
d_ptr->t->removeRow( r );
setWindowModified( true );
}
void UXTEditor::closeEvent( QCloseEvent *e )
{
if( isWindowModified() )

@ -37,6 +37,10 @@ public:
void saveAs( QString filename );
void activateWindow();
public Q_SLOTS:
void insertRow();
void deleteRow();
protected:
void closeEvent( QCloseEvent *e );

Loading…
Cancel
Save