All pastes #897042 Raw Edit

Anonymous

public text v1 · immutable
·published 2008-02-09 04:17 UTC
rendered paste body
void MainWindowImpl::adjust(){
	if(!tabWidget->currentIndex())return;
	
	gWin->actionUndo->disconnect();
	gWin->actionRedo->disconnect();
	gWin->actionCut->disconnect();
	gWin->actionCopy->disconnect();
	gWin->actionPaste->disconnect();
	gWin->actionSelect_All->disconnect();
	
	gApp->connect(gWin->actionUndo, SIGNAL( activated() ), places[tabWidget->currentIndex()-1]->textEdit, SLOT ( undo() ) );
	gApp->connect(gWin->actionRedo, SIGNAL( activated() ), places[tabWidget->currentIndex()-1]->textEdit, SLOT ( redo() ) );
	gApp->connect(gWin->actionCut, SIGNAL( activated() ), places[tabWidget->currentIndex()-1]->textEdit, SLOT ( cut() ) );
	gApp->connect(gWin->actionCopy, SIGNAL( activated() ), places[tabWidget->currentIndex()-1]->textEdit, SLOT ( copy() ) );
	gApp->connect(gWin->actionPaste, SIGNAL( activated() ), places[tabWidget->currentIndex()-1]->textEdit, SLOT ( paste() ) );
	gApp->connect(gWin->actionSelect_All, SIGNAL( activated() ), places[tabWidget->currentIndex()-1]->textEdit, SLOT ( selectAll() ) );
}