Changeset 55163 in webkit
- Timestamp:
- Feb 23, 2010, 12:39:30 PM (16 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
QtLauncher/main.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r55161 r55163 1 2010-02-23 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] Need a final integration between QtLauncher and QGVLauncher 6 https://bugs.webkit.org/show_bug.cgi?id=35292 7 8 Add cloneWindow feature to QtLauncher, when running on QGraphicsView mode. 9 10 * QtLauncher/main.cpp: 11 (LauncherWindow::LauncherWindow): 12 (LauncherWindow::~LauncherWindow): 13 (LauncherWindow::init): 14 (LauncherWindow::cloneWindow): 15 (LauncherWindow::setupUI): 16 1 17 2010-02-23 Dirk Pranke <dpranke@chromium.org> 2 18 -
trunk/WebKitTools/QtLauncher/main.cpp
r55025 r55163 84 84 public: 85 85 LauncherWindow(QString url = QString()); 86 LauncherWindow(QGraphicsScene* scene); 86 87 virtual ~LauncherWindow(); 87 88 … … 121 122 public slots: 122 123 void newWindow(const QString& url = QString()); 124 void cloneWindow(); 123 125 124 126 private: … … 141 143 bool touchMocking; 142 144 #endif 145 146 void init(bool useGraphicsView = false); 143 147 }; 144 148 … … 147 151 : MainWindow(url) 148 152 , currentZoom(100) 153 { 154 init(); 155 load(url); 156 } 157 158 LauncherWindow::LauncherWindow(QGraphicsScene* scene) 159 : MainWindow() 160 , currentZoom(100) 161 { 162 init(true); // use QGraphicsView 163 QGraphicsView* view = static_cast<QGraphicsView*>(m_view); 164 view->setScene(scene); 165 } 166 167 LauncherWindow::~LauncherWindow() 168 { 169 grabZoomKeys(false); 170 } 171 172 void LauncherWindow::init(bool useGraphicsView) 149 173 { 150 174 QSplitter* splitter = new QSplitter(Qt::Vertical, this); … … 158 182 159 183 m_view = 0; 160 initializeView(); 184 185 initializeView(useGraphicsView); 161 186 162 187 connect(page(), SIGNAL(loadStarted()), this, SLOT(loadStarted())); … … 178 203 179 204 grabZoomKeys(true); 180 181 load(url);182 }183 184 LauncherWindow::~LauncherWindow()185 {186 grabZoomKeys(false);187 205 } 188 206 … … 486 504 } 487 505 506 void LauncherWindow::cloneWindow() 507 { 508 QGraphicsView* view = static_cast<QGraphicsView*>(m_view); 509 510 LauncherWindow* mw = new LauncherWindow(view->scene()); 511 mw->show(); 512 } 513 488 514 void LauncherWindow::setupUI() 489 515 { … … 570 596 flipYAnimated->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool))); 571 597 flipYAnimated->setEnabled(false); 598 599 graphicsViewMenu->addSeparator(); 600 601 QAction* cloneWindow = graphicsViewMenu->addAction("Clone Window", this, SLOT(cloneWindow())); 602 cloneWindow->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool))); 603 cloneWindow->setEnabled(false); 572 604 } 573 605
Note:
See TracChangeset
for help on using the changeset viewer.