trikRuntime
systemSettingsWidget.h
Go to the documentation of this file.
1 /* Copyright 2014 CyberTech Labs Ltd.
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License. */
14 
15 #pragma once
16 
17 #include <QtCore/qglobal.h>
18 
19 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
20  #include <QtGui/QWidget>
21  #include <QtGui/QVBoxLayout>
22  #include <QtGui/QRadioButton>
23  #include <QtGui/QButtonGroup>
24 #else
25  #include <QtWidgets/QWidget>
26  #include <QtWidgets/QVBoxLayout>
27  #include <QtWidgets/QRadioButton>
28  #include <QtWidgets/QButtonGroup>
29 #endif
30 
31 #include "trikGuiDialog.h"
32 
33 namespace trikGui {
34 
37 {
38  Q_OBJECT
39 
40 public:
44  explicit SystemSettingsWidget(MainWidget::FileManagerRootType fileManagerRoot, QWidget *parent = 0);
45 
48 
50  static QString menuEntry();
51 
52 public slots:
53  void renewFocus() override;
54 
55 signals:
58 
59 protected:
60  void keyPressEvent(QKeyEvent *event) override;
61 
62 private:
63  void changeDefaultButton();
64  void emitCheckedDirPath();
65  void setCurrentFilesRootButton(MainWidget::FileManagerRootType fileManagerRoot);
66 
68  QButtonGroup mButtonGroup;
69  QVBoxLayout mLayout;
70  QRadioButton* mAllFSButton = nullptr; // Has ownership.
71  QRadioButton* mOnlyScriptsButton = nullptr; // Has ownership.
72 };
73 
74 }
~SystemSettingsWidget()
Destructor.
Definition: systemSettingsWidget.cpp:51
Base class for all trikGui dialog widgets.
Definition: trikGuiDialog.h:24
void keyPressEvent(QKeyEvent *event) override
Definition: systemSettingsWidget.cpp:77
SystemSettingsWidget(MainWidget::FileManagerRootType fileManagerRoot, QWidget *parent=0)
Constructor.
Definition: systemSettingsWidget.cpp:28
Definition: abstractIndicator.h:21
void renewFocus() override
Definition: systemSettingsWidget.cpp:68
Widget that shows some system settings.
Definition: systemSettingsWidget.h:36
FileManagerRootType
Definition: mainWidget.h:33
void currentFilesDirPath(MainWidget::FileManagerRootType const &path)
Emitted when we want to save current FilesManegerRoot.
static QString menuEntry()
String that shall appear in menu for this widget.
Definition: systemSettingsWidget.cpp:72