|
54 | 54 | #include <QHotkey> |
55 | 55 | #endif |
56 | 56 |
|
57 | | -#if defined(Q_OS_MACOS) |
58 | | -#include <../3rdparty/KDMacTouchBar/src/kdmactouchbar.h> |
59 | | -#endif |
| 57 | +// #if defined(Q_OS_MACOS) |
| 58 | +// #include <../3rdparty/KDMacTouchBar/src/kdmactouchbar.h> |
| 59 | +// #endif |
60 | 60 |
|
61 | 61 | #include "../qprompt_version.h" |
62 | 62 | #include "abstractunits.hpp" |
@@ -181,43 +181,43 @@ Q_DECL_EXPORT int main(int argc, char *argv[]) |
181 | 181 | // KirigamiPlugin::getInstance().registerTypes(); |
182 | 182 | // #endif |
183 | 183 |
|
184 | | -#if defined(Q_OS_MACOS) |
185 | | - // Enable automatic display of dialog prompts on the touchbar. |
186 | | - KDMacTouchBar::setAutomaticallyCreateMessageBoxTouchBar(true); |
187 | | -// // Create touchbar for use through all of QPrompt's execusion |
188 | | -// KDMacTouchBar *touchBar = new KDMacTouchBar(); |
189 | | -// //QMainWindow *mainWindow = nullptr; |
190 | | -// //foreach(QWidget *widget, app.topLevelWidgets()) |
191 | | -// // if(widget->inherits("QMainWindow")) { |
192 | | -// // mainWindow = qobject_cast<QMainWindow *>(widget); |
193 | | -// // break; |
194 | | -// // }; |
195 | | -// //KDMacTouchBar *touchBar = new KDMacTouchBar(mainWindow); |
196 | | -// // Toggle teleprompter state |
197 | | -// QIcon qpromptIcon(QStringLiteral(":images/qprompt")); |
198 | | -// QAction *action = new QAction(qpromptIcon, "Toggle"); |
199 | | -// touchBar->addAction(action); |
200 | | -// // connect(action, &QAction::triggered, this, &MainWindow::activated); |
201 | | -// touchBar->addSeparator(); |
202 | | -// // Velocity and placement toachbar controls |
203 | | -// touchBar->setTouchButtonStyle(KDMacTouchBar::IconOnly); |
204 | | -// // Up |
205 | | -// QIcon upIcon(QStringLiteral(":icons/go-previous")); |
206 | | -// QAction *reduceAction = new QAction(upIcon, "Reduce"); |
207 | | -// touchBar->addAction(reduceAction); |
208 | | -// touchBar->setPrincipialAction(reduceAction); |
209 | | -// // connect(reduceAction, &QAction::triggered, this, &MainWindow::activated); |
210 | | -// // Down |
211 | | -// QIcon downIcon(QStringLiteral(":icons/go-next")); |
212 | | -// QAction *increaseAction = new QAction(downIcon, "Increase"); |
213 | | -// touchBar->addAction(increaseAction); |
214 | | -// // connect(increaseAction, &QAction::triggered, this, &MainWindow::activated); |
215 | | -//// touchBar->addSeparator(); |
216 | | -//// // Stop prompter |
217 | | -//// QAction *stopAction = new QAction(upIcon, "Stop"); |
218 | | -//// touchBar->addAction(stopAction); |
219 | | -//// // connect(stopAction, &QAction::triggered, this, &MainWindow::activated); |
220 | | -#endif |
| 184 | +// #if defined(Q_OS_MACOS) |
| 185 | +// // Enable automatic display of dialog prompts on the touchbar. |
| 186 | +// KDMacTouchBar::setAutomaticallyCreateMessageBoxTouchBar(true); |
| 187 | +// // // Create touchbar for use through all of QPrompt's execusion |
| 188 | +// // KDMacTouchBar *touchBar = new KDMacTouchBar(); |
| 189 | +// // //QMainWindow *mainWindow = nullptr; |
| 190 | +// // //foreach(QWidget *widget, app.topLevelWidgets()) |
| 191 | +// // // if(widget->inherits("QMainWindow")) { |
| 192 | +// // // mainWindow = qobject_cast<QMainWindow *>(widget); |
| 193 | +// // // break; |
| 194 | +// // // }; |
| 195 | +// // //KDMacTouchBar *touchBar = new KDMacTouchBar(mainWindow); |
| 196 | +// // // Toggle teleprompter state |
| 197 | +// // QIcon qpromptIcon(QStringLiteral(":images/qprompt")); |
| 198 | +// // QAction *action = new QAction(qpromptIcon, "Toggle"); |
| 199 | +// // touchBar->addAction(action); |
| 200 | +// // // connect(action, &QAction::triggered, this, &MainWindow::activated); |
| 201 | +// // touchBar->addSeparator(); |
| 202 | +// // // Velocity and placement toachbar controls |
| 203 | +// // touchBar->setTouchButtonStyle(KDMacTouchBar::IconOnly); |
| 204 | +// // // Up |
| 205 | +// // QIcon upIcon(QStringLiteral(":icons/go-previous")); |
| 206 | +// // QAction *reduceAction = new QAction(upIcon, "Reduce"); |
| 207 | +// // touchBar->addAction(reduceAction); |
| 208 | +// // touchBar->setPrincipialAction(reduceAction); |
| 209 | +// // // connect(reduceAction, &QAction::triggered, this, &MainWindow::activated); |
| 210 | +// // // Down |
| 211 | +// // QIcon downIcon(QStringLiteral(":icons/go-next")); |
| 212 | +// // QAction *increaseAction = new QAction(downIcon, "Increase"); |
| 213 | +// // touchBar->addAction(increaseAction); |
| 214 | +// // // connect(increaseAction, &QAction::triggered, this, &MainWindow::activated); |
| 215 | +// //// touchBar->addSeparator(); |
| 216 | +// //// // Stop prompter |
| 217 | +// //// QAction *stopAction = new QAction(upIcon, "Stop"); |
| 218 | +// //// touchBar->addAction(stopAction); |
| 219 | +// //// // connect(stopAction, &QAction::triggered, this, &MainWindow::activated); |
| 220 | +// #endif |
221 | 221 |
|
222 | 222 | #if defined(QHotkey_FOUND) |
223 | 223 | // Toggle transparency of all windows |
|
0 commit comments