COMMIT_MESSAGE

 1[Qt] Need a final integration between QtLauncher and QGVLauncher
 2https://bugs.webkit.org/show_bug.cgi?id=35292
 3
 4Reviewed by NOBODY (OOPS!).
 5
 6Add clone window feature to QtLauncher, when running on QGraphicsView mode.
 7
 8* QtLauncher/main.cpp:
 9(LauncherWindow::LauncherWindow):
 10(LauncherWindow::cloneWindow):
 11(LauncherWindow::setupUI):

WebKitTools/ChangeLog

 12010-02-23 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 [Qt] Need a final integration between QtLauncher and QGVLauncher
 6 https://bugs.webkit.org/show_bug.cgi?id=35292
 7
 8 Add clone window feature to QtLauncher, when running on QGraphicsView mode.
 9
 10 * QtLauncher/main.cpp:
 11 (LauncherWindow::LauncherWindow):
 12 (LauncherWindow::cloneWindow):
 13 (LauncherWindow::setupUI):
 14
1152010-02-19 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
216
317 Reviewed by NOBODY (OOPS!).

WebKitTools/QtLauncher/main.cpp

@@class LauncherWindow : public MainWindow {
8282 Q_OBJECT
8383
8484public:
85  LauncherWindow(QString url = QString());
 85 LauncherWindow(QString url = QString(), QGraphicsScene* scene = 0);
8686 virtual ~LauncherWindow();
8787
8888 virtual void keyPressEvent(QKeyEvent* event);

@@protected slots:
120120
121121public slots:
122122 void newWindow(const QString& url = QString());
 123 void cloneWindow();
123124
124125private:
125126 // create the status bar, tool bar & menu

@@private:
143144};
144145
145146
146 LauncherWindow::LauncherWindow(QString url)
 147LauncherWindow::LauncherWindow(QString url, QGraphicsScene* scene)
147148 : MainWindow(url)
148149 , currentZoom(100)
149150{

@@LauncherWindow::LauncherWindow(QString url)
157158#endif
158159
159160 m_view = 0;
160  initializeView();
 161
 162 // if there is a Scene, we should enable QGraphicsView mode
 163 if (scene == 0)
 164 initializeView();
 165 else
 166 initializeView(true);
161167
162168 connect(page(), SIGNAL(loadStarted()), this, SLOT(loadStarted()));
163169 connect(page(), SIGNAL(loadFinished(bool)), this, SLOT(loadFinished()));

@@LauncherWindow::LauncherWindow(QString url)
178184
179185 grabZoomKeys(true);
180186
181  load(url);
 187 // there is no need to load the URL if we have a scene
 188 if (scene == 0)
 189 load(url);
 190 else {
 191 QGraphicsView* view = static_cast<QGraphicsView*>(m_view);
 192 view->setScene(scene);
 193 }
182194}
183195
184196LauncherWindow::~LauncherWindow()

@@void LauncherWindow::newWindow(const QString& url)
485497 mw->show();
486498}
487499
 500void LauncherWindow::cloneWindow()
 501{
 502 QGraphicsView* view = static_cast<QGraphicsView*>(m_view);
 503
 504 LauncherWindow* mw = new LauncherWindow(QString(), view->scene());
 505 mw->show();
 506}
 507
488508void LauncherWindow::setupUI()
489509{
490510 QMenu* fileMenu = menuBar()->addMenu("&File");

@@void LauncherWindow::setupUI()
569589 flipYAnimated = graphicsViewMenu->addAction("Animated Y-Flip");
570590 flipYAnimated->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
571591 flipYAnimated->setEnabled(false);
 592
 593 graphicsViewMenu->addSeparator();
 594
 595 QAction* cloneWindow = graphicsViewMenu->addAction("Clone Window", this, SLOT(cloneWindow()));
 596 cloneWindow->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
 597 cloneWindow->setEnabled(false);
572598}
573599
574600QWebPage* WebPage::createWindow(QWebPage::WebWindowType type)