- Timestamp:
- Aug 19, 2011, 5:03:19 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/embedded/embedded.cpp
r1004 r1010 1 1 2 #include <os2.h> 3 2 4 3 5 #include <QDebug> … … 28 30 layout->addWidget (stable); 29 31 30 return stable->winId(); 32 WId id = stable->winId(); 33 qDebug() << "stable id" << qDebugHWND (id); 34 return id; 31 35 } 32 36 … … 55 59 /* menus */ 56 60 { 57 QMenu *actionsMenu = menuBar()->addMenu ("&Actions");58 61 QAction *playAct = new QAction ("&Play", this); 59 actionsMenu->addAction (playAct);60 61 62 playAct->setShortcut (QKeySequence("Ctrl+P")); 62 63 playAct->setCheckable (true); 63 64 connect (playAct, SIGNAL (triggered(bool)), SLOT (playTriggered(bool))); 65 66 67 68 69 70 71 72 73 64 74 } 65 75 … … 75 85 stackCentralW = new QStackedWidget (main); 76 86 87 88 89 90 77 91 bgWidget = new QLabel ("Background"); 78 92 stackCentralW->addWidget (bgWidget); … … 84 98 85 99 mainLayout->insertWidget (2, new QLabel ("Controls")); 86 87 100 } 88 101 89 102 void timerEvent (QTimerEvent *) 90 103 { 104 105 106 107 108 109 91 110 if (id) 92 111 { … … 97 116 { 98 117 RECTL rcl; 99 //WinQueryWindowRect (hwnd, &rcl);118 WinQueryWindowRect (hwnd, &rcl); 100 119 101 120 rcl.xLeft = 0; … … 111 130 } 112 131 } 132 113 133 } 114 134 … … 121 141 stackCentralW->setCurrentWidget (videoWidget); 122 142 id = videoWidget->request(); 123 //timerId = startTimer (1000);143 timerId = startTimer (1000); 124 144 } 125 145 else … … 128 148 id = 0; 129 149 killTimer (timerId); 130 //timerId = 0;150 timerId = 0; 131 151 stackCentralW->setCurrentWidget (bgWidget); 152 153 154 155 156 157 158 159 160 161 162 163 132 164 } 133 165 }
Note:
See TracChangeset
for help on using the changeset viewer.