This commit is contained in:
Your Name
2024-05-10 01:48:28 -05:00
parent 9d227d1c74
commit 2d3f4082b2

View File

@@ -22,109 +22,6 @@
#include <QStackedLayout> #include <QStackedLayout>
// class OffroadHome : public QFrame {
// Q_OBJECT
// public:
// explicit OffroadHome(QWidget* parent = 0);
// signals:
// void openSettings(int index = 0, const QString &param = "");
// 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 &param = "");
// // 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[]) { int main(int argc, char *argv[]) {
setpriority(PRIO_PROCESS, 0, -20); setpriority(PRIO_PROCESS, 0, -20);