<commit_before>/*=====================================================================

QGroundControl Open Source Ground Control Station

(c) 2009 - 2013 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>

This file is part of the QGROUNDCONTROL project

    QGROUNDCONTROL is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    QGROUNDCONTROL is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.

======================================================================*/

#include <QToolButton>
#include <QLabel>
#include <QSpacerItem>
#include "QGCStatusBar.h"
#include "UASManager.h"
#include "MainWindow.h"

QGCStatusBar::QGCStatusBar(QWidget *parent) :
    QStatusBar(parent),
    toggleLoggingButton(NULL),
    player(NULL),
    changed(true),
    m_uas(NULL),
    lastLogDirectory(QGC::MAVLinkLogDirectory())
{
    setObjectName("QGC_STATUSBAR");

    //toggleLoggingButton = new QPushButton("Logging", this);
    //toggleLoggingButton->setCheckable(true);

    //addPermanentWidget(toggleLoggingButton);

    setStyleSheet("QStatusBar { border: 0px; border-bottom: 1px solid #101010; border-top: 1px solid #4F4F4F; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #4B4B4B, stop:0.3 #404040, stop:0.34 #383838, stop:1 #181818); } ");
    connect(UASManager::instance(),SIGNAL(activeUASSet(UASInterface*)),this,SLOT(activeUASSet(UASInterface*)));
}
void QGCStatusBar::uasConnected()
{
    if (player)
    {
        if (!player->isPlayingLogFile())
        {
            this->setEnabled(false);
        }
    }
    else
    {
        this->setEnabled(false);
    }
}

void QGCStatusBar::uasDisconnected()
{
    if (player)
    {
        if (!player->isPlayingLogFile())
        {
            this->setEnabled(true);
        }
    }
    else
    {<commit_msg>Status Bar: Removed hardcoded stylesheet for QGCStatusBar<commit_after>/*=====================================================================

QGroundControl Open Source Ground Control Station

(c) 2009 - 2013 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>

This file is part of the QGROUNDCONTROL project

    QGROUNDCONTROL is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    QGROUNDCONTROL is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.

======================================================================*/

#include <QToolButton>
#include <QLabel>
#include <QSpacerItem>
#include "QGCStatusBar.h"
#include "UASManager.h"
#include "MainWindow.h"

QGCStatusBar::QGCStatusBar(QWidget *parent) :
    QStatusBar(parent),
    toggleLoggingButton(NULL),
    player(NULL),
    changed(true),
    m_uas(NULL),
    lastLogDirectory(QGC::MAVLinkLogDirectory())
{
    setObjectName("QGC_STATUSBAR");

    connect(UASManager::instance(),SIGNAL(activeUASSet(UASInterface*)),this,SLOT(activeUASSet(UASInterface*)));
}
void QGCStatusBar::uasConnected()
{
    if (player)
    {
        if (!player->isPlayingLogFile())
        {
            this->setEnabled(false);
        }
    }
    else
    {
        this->setEnabled(false);
    }
}

void QGCStatusBar::uasDisconnected()
{
    if (player)
    {
        if (!player->isPlayingLogFile())
        {
            this->setEnabled(true);
        }
    }
    else
    {
{'fraction_non_alphanumeric': 0.16110065851364064, 'fraction_numerical': 0.015522107243650047, 'mean_word_length': 3.7786516853932586, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '80225', 'n_tokens_mistral': 1298, 'n_tokens_neox': 1216, 'n_words': 349}