mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 14:50:53 +01:00
Implemented QETMainWindow::firstActivation, used it to fit view when editing an element.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1573 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -24,7 +24,8 @@
|
||||
*/
|
||||
QETMainWindow::QETMainWindow(QWidget *widget, Qt::WindowFlags flags) :
|
||||
QMainWindow(widget, flags),
|
||||
display_toolbars_(0)
|
||||
display_toolbars_(0),
|
||||
first_activation_(true)
|
||||
{
|
||||
initCommonActions();
|
||||
initCommonMenus();
|
||||
@@ -144,6 +145,15 @@ void QETMainWindow::checkToolbarsmenu() {
|
||||
bool QETMainWindow::event(QEvent *e) {
|
||||
if (e -> type() == QEvent::WindowStateChange) {
|
||||
updateFullScreenAction();
|
||||
} else if (first_activation_ && e -> type() == QEvent::WindowActivate) {
|
||||
firstActivation(e);
|
||||
first_activation_ = false;
|
||||
}
|
||||
return(QMainWindow::event(e));
|
||||
}
|
||||
|
||||
/**
|
||||
Base implementation of firstActivation (does nothing).
|
||||
*/
|
||||
void QETMainWindow::firstActivation(QEvent *) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user