Репозитории ALT
S: | 4.8.7-alt25 |
5.1: | 4.6.3-alt1.M51.1 |
4.1: | 4.4.3-alt1.M41.1 |
4.0: | 4.3.4-alt5.M40.1 |
3.0: | 4.0.1-alt1 |
+updates: | 4.0.1-alt2 |
+backports: | 4.2.3-alt7.1.M30 |
Группа :: Система/Библиотеки
Пакет: qt4
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: 9105-qt-qt3support-4.5.0-menubar_activate.patch
Скачать
Скачать
diff -Naur qt-x11-opensource-src-4.5.0-beta1-orig/src/qt3support/widgets/q3mainwindow.cpp qt-x11-opensource-src-4.5.0-beta1/src/qt3support/widgets/q3mainwindow.cpp
--- qt-x11-opensource-src-4.5.0-beta1-orig/src/qt3support/widgets/q3mainwindow.cpp 2008-12-17 20:16:42.000000000 +0300
+++ qt-x11-opensource-src-4.5.0-beta1/src/qt3support/widgets/q3mainwindow.cpp 2009-01-03 18:01:28.000000000 +0300
@@ -702,6 +702,9 @@
d->rightDock = new Q3DockArea(Qt::Vertical, Q3DockArea::Reverse, this, "qt_right_dock");
d->rightDock->installEventFilter(this);
d->hideDock = new QHideDock(this);
+#ifndef QT_NO_MENUBAR
+ createMenuBarAction();
+#endif // QT_NO_MENUBAR
}
@@ -2414,6 +2417,33 @@
QT_END_NAMESPACE
+#ifndef QT_NO_MENUBAR
+void Q3MainWindow::createMenuBarAction()
+{
+ QList<QKeySequence> vShortcuts;
+ vShortcuts.append(QKeySequence(Qt::SHIFT | Qt::Key_F10));
+ vShortcuts.append(QKeySequence(Qt::CTRL | Qt::Key_Super_L));
+ vShortcuts.append(QKeySequence(Qt::CTRL | Qt::Key_Super_R));
+
+ QAction *vpAction = new QAction(this);
+ vpAction->setShortcuts(vShortcuts);
+ connect(vpAction, SIGNAL(triggered()), this, SLOT(activateMenuBar()));
+ addAction(vpAction);
+}
+
+void Q3MainWindow::activateMenuBar()
+{
+ QMenuBar *vpMenuBar = menuBar();
+ if(!vpMenuBar) return;
+ if(vpMenuBar->actions().count()<=0) return;
+
+ QAction *vpAction = vpMenuBar->actions().at(0);
+ if(!vpAction) return;
+ vpMenuBar->setActiveAction(vpAction);
+}
+#endif // QT_NO_MENUBAR
+
+
#include "q3mainwindow.moc"
#endif
diff -Naur qt-x11-opensource-src-4.5.0-beta1-orig/src/qt3support/widgets/q3mainwindow.h qt-x11-opensource-src-4.5.0-beta1/src/qt3support/widgets/q3mainwindow.h
--- qt-x11-opensource-src-4.5.0-beta1-orig/src/qt3support/widgets/q3mainwindow.h 2008-12-17 20:16:42.000000000 +0300
+++ qt-x11-opensource-src-4.5.0-beta1/src/qt3support/widgets/q3mainwindow.h 2009-01-03 18:01:28.000000000 +0300
@@ -180,6 +180,14 @@
void childEvent(QChildEvent *);
bool event(QEvent *);
+#ifndef QT_NO_MENUBAR
+protected:
+ void createMenuBarAction();
+
+protected Q_SLOTS:
+ void activateMenuBar();
+#endif
+
private Q_SLOTS:
void slotPlaceChanged();
void doLineUp() { lineUpDockWindows(true); }