mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +01:00
GCS-No more hidden settings.
This commit is contained in:
parent
b637bfaca9
commit
4edf78d1cd
@ -39,7 +39,6 @@
|
|||||||
#include <QtCore/QSettings>
|
#include <QtCore/QSettings>
|
||||||
|
|
||||||
#include "ui_generalsettings.h"
|
#include "ui_generalsettings.h"
|
||||||
#include <QKeyEvent>
|
|
||||||
|
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
using namespace Core::Internal;
|
using namespace Core::Internal;
|
||||||
@ -113,14 +112,8 @@ void GeneralSettings::fillLanguageBox() const
|
|||||||
QWidget *GeneralSettings::createPage(QWidget *parent)
|
QWidget *GeneralSettings::createPage(QWidget *parent)
|
||||||
{
|
{
|
||||||
m_page = new Ui::GeneralSettings();
|
m_page = new Ui::GeneralSettings();
|
||||||
globalSettingsWidget *w = new globalSettingsWidget(parent);
|
QWidget *w = new QWidget(parent);
|
||||||
connect(w,SIGNAL(showHidden()),this,SLOT(showHidden()));
|
|
||||||
m_page->setupUi(w);
|
m_page->setupUi(w);
|
||||||
m_page->labelUDP->setVisible(false);
|
|
||||||
m_page->cbUseUDPMirror->setVisible(false);
|
|
||||||
m_page->labelExpert->setVisible(false);
|
|
||||||
m_page->cbExpertMode->setVisible(false);
|
|
||||||
|
|
||||||
fillLanguageBox();
|
fillLanguageBox();
|
||||||
connect(m_page->checkAutoConnect,SIGNAL(stateChanged(int)),this,SLOT(slotAutoConnect(int)));
|
connect(m_page->checkAutoConnect,SIGNAL(stateChanged(int)),this,SLOT(slotAutoConnect(int)));
|
||||||
m_page->checkBoxSaveOnExit->setChecked(m_saveSettingsOnExit);
|
m_page->checkBoxSaveOnExit->setChecked(m_saveSettingsOnExit);
|
||||||
@ -263,21 +256,3 @@ void GeneralSettings::slotAutoConnect(int value)
|
|||||||
else
|
else
|
||||||
m_page->checkAutoSelect->setEnabled(true);
|
m_page->checkAutoSelect->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneralSettings::showHidden()
|
|
||||||
{
|
|
||||||
m_page->labelUDP->setVisible(true);
|
|
||||||
m_page->cbUseUDPMirror->setVisible(true);
|
|
||||||
m_page->labelExpert->setVisible(true);
|
|
||||||
m_page->cbExpertMode->setVisible(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
globalSettingsWidget::globalSettingsWidget(QWidget *parent):QWidget(parent){}
|
|
||||||
|
|
||||||
void globalSettingsWidget::keyPressEvent(QKeyEvent *event)
|
|
||||||
{
|
|
||||||
if(event->key()==Qt::Key_F7)
|
|
||||||
{
|
|
||||||
emit showHidden();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -69,7 +69,6 @@ private slots:
|
|||||||
void resetLanguage();
|
void resetLanguage();
|
||||||
void showHelpForExternalEditor();
|
void showHelpForExternalEditor();
|
||||||
void slotAutoConnect(int);
|
void slotAutoConnect(int);
|
||||||
void showHidden();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void fillLanguageBox() const;
|
void fillLanguageBox() const;
|
||||||
@ -86,17 +85,6 @@ private:
|
|||||||
QList<QTextCodec *> m_codecs;
|
QList<QTextCodec *> m_codecs;
|
||||||
|
|
||||||
};
|
};
|
||||||
class globalSettingsWidget:public QWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
globalSettingsWidget(QWidget * parent);
|
|
||||||
protected:
|
|
||||||
void keyPressEvent(QKeyEvent *);
|
|
||||||
signals:
|
|
||||||
void showHidden();
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user