From 2d3f4082b2d1f6d642f4122d09c09ead0bc5a8ca Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 10 May 2024 01:48:28 -0500 Subject: [PATCH] wip --- system/clearpilot/tools/qt_webview2.cc | 103 ------------------------- 1 file changed, 103 deletions(-) diff --git a/system/clearpilot/tools/qt_webview2.cc b/system/clearpilot/tools/qt_webview2.cc index dd09058..003ded7 100644 --- a/system/clearpilot/tools/qt_webview2.cc +++ b/system/clearpilot/tools/qt_webview2.cc @@ -22,109 +22,6 @@ #include -// class OffroadHome : public QFrame { -// Q_OBJECT - -// public: -// explicit OffroadHome(QWidget* parent = 0); - -// signals: -// void openSettings(int index = 0, const QString ¶m = ""); - -// private: -// void showEvent(QShowEvent *event) override; -// void hideEvent(QHideEvent *event) override; -// void refresh(); - -// Params params; - -// QTimer* timer; -// ElidedLabel* version; -// QStackedLayout* center_layout; -// UpdateAlert *update_widget; -// OffroadAlert* alerts_widget; -// QPushButton* alert_notif; -// QPushButton* update_notif; - -// // FrogPilot variables -// ElidedLabel* date; -// }; - -// OffroadHome::OffroadHome(QWidget* parent) : QFrame(parent) { -// QVBoxLayout* main_layout = new QVBoxLayout(this); -// main_layout->setContentsMargins(40, 40, 40, 40); - -// main_layout->addLayout(header_layout); -// center_layout = new QStackedLayout(); -// QWidget *home_widget = new QWidget(this); -// { -// QHBoxLayout *home_layout = new QHBoxLayout(home_widget); -// home_layout->setContentsMargins(0, 0, 0, 0); -// home_layout->setSpacing(30); - -// // // Create a QWebEngineView -// QWebEngineView *web_view = new QWebEngineView(); -// web_view->load(QUrl("http://fark.com")); - -// // Add the QWebEngineView to the layout -// home_layout->addWidget(web_view); -// } -// center_layout->addWidget(home_widget); -// main_layout->addLayout(center_layout, 1); -// } - -// class MainWindow : public QWidget { -// Q_OBJECT - -// public: -// explicit MainWindow(QWidget *parent = 0); - -// private: -// // bool eventFilter(QObject *obj, QEvent *event) override; -// // void openSettings(int index = 0, const QString ¶m = ""); -// // void closeSettings(); - -// QStackedLayout *main_layout; -// // OffroadHome *offroadhome; - -// // FrogPilot variables -// // Params params; -// }; - -// MainWindow::MainWindow(QWidget *parent) : QWidget(parent) { -// main_layout = new QStackedLayout(this); -// main_layout->setMargin(0); - -// // Create a QWebEngineView -// QWebEngineView *web_view = new QWebEngineView(); -// web_view->load(QUrl("http://fark.com")); - -// // Add the QWebEngineView to the layout -// main_layout->addWidget(web_view); - -// setAttribute(Qt::WA_NoSystemBackground); -// } - -// bool MainWindow::eventFilter(QObject *obj, QEvent *event) { -// bool ignore = false; -// switch (event->type()) { -// case QEvent::TouchBegin: -// case QEvent::TouchUpdate: -// case QEvent::TouchEnd: -// case QEvent::MouseButtonPress: -// case QEvent::MouseMove: { -// // ignore events when device is awakened by resetInteractiveTimeout -// ignore = !device()->isAwake(); -// device()->resetInteractiveTimeout(uiState()->scene.screen_timeout, uiState()->scene.screen_timeout_onroad); -// break; -// } -// default: -// break; -// } -// return ignore; -// } - - int main(int argc, char *argv[]) { setpriority(PRIO_PROCESS, 0, -20);