Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/VLC/modules/gui/qt/dialogs/help/   (VLC Media Plyer ©)  Datei vom 23.9.2026 mit Größe 4 kB image not shown  

Quelle  help.hpp   Sprache: C

 

/*****************************************************************************
 * help.hpp : Help and About dialogs
 ****************************************************************************
 * Copyright (C) 2007 the VideoLAN team
 *
 * Authors: Jean-Baptiste Kempf <jb (at) videolan.org>
 *
 * This program 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 2 of the License, or
 * (at your option) any later version.
 *
 * This program 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 this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/


#ifndef QVLC_HELP_DIALOG_H_
#define QVLC_HELP_DIALOG_H_ 1

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include "qt.hpp"

#include "widgets/native/qvlcframe.hpp"
#include "util/singleton.hpp"

/* Auto-generated from .ui files */
#include "ui_about.h"
#include "ui_update.h"

class QEvent;

class HelpDialog : public QVLCFrame
{
    Q_OBJECT
public:
    HelpDialog( qt_intf_t * );
    virtual ~HelpDialog();

public slots:
    void close() override { toggleVisible(); }
};

class AboutDialog : public QVLCDialog
{
    Q_OBJECT
public:
    AboutDialog( qt_intf_t * );

protected:
    bool eventFilter(QObject *obj, QEvent *event) override;
    void showEvent ( QShowEvent * ) override;

private:
    bool b_advanced;
    Ui::aboutWidget ui;

private slots:
    void showLicense();
    void showAuthors();
    void showCredit();
};

#if defined(UPDATE_CHECK)

class UpdateModelPrivate;
class UpdateModel : public QObject
{
    Q_OBJECT

public:
    enum Status {
        Unchecked,
        Checking,
        UpToDate,
        NeedUpdate,
        CheckFailed,
        Downloading // TODO
    };
    Q_ENUM(Status)

    Q_PROPERTY(Status updateStatus READ updateStatus RESET resetStatus NOTIFY updateStatusChanged FINAL)
    Q_PROPERTY(int major READ getMajor NOTIFY updateStatusChanged FINAL)
    Q_PROPERTY(int minor READ getMinor NOTIFY updateStatusChanged FINAL)
    Q_PROPERTY(int revision READ getRevision NOTIFY updateStatusChanged FINAL)
    Q_PROPERTY(int extra READ getExtra NOTIFY updateStatusChanged FINAL)
    Q_PROPERTY(QString description READ getDescription NOTIFY updateStatusChanged FINAL)
    Q_PROPERTY(QString url READ getUrl NOTIFY updateStatusChanged FINAL)
    Q_PROPERTY(double progress READ getProgress NOTIFY progressChanged FINAL) // TODO
    Q_PROPERTY(bool explicitCheck READ explicitCheck WRITE _setExplicitCheck RESET resetExplicitCheck NOTIFY explicitCheckChanged FINAL)

public:
    explicit UpdateModel(qt_intf_t * p_intf);
    ~UpdateModel();

    Q_INVOKABLE void checkUpdate(bool explicitCheck = false);

    Q_INVOKABLE bool download(QString destDir);
    Q_INVOKABLE bool download();

    Q_INVOKABLE void resetStatus();

    Status updateStatus() const;
    int getMajor() const;
    int getMinor() const;
    int getRevision() const;
    int getExtra() const;
    QString getDescription() const;
    QString getUrl() const;
    double getProgress() const;
    bool explicitCheck() const;
    void resetExplicitCheck();

signals:
    void updateStatusChanged();
    void progressChanged();
    void explicitCheckChanged();

private:
    void _setExplicitCheck(bool) const
    {
        // This method is added as a workaround for QML engine bug
        // where the property can't be reset, if it does not have
        // WRITE method. Do not use it.
        assert(false);
    }

    Q_DECLARE_PRIVATE(UpdateModel)
    QScopedPointer<UpdateModelPrivate> d_ptr;
};

class UpdateDialog : public QVLCFrame
{
    Q_OBJECT
public:
    UpdateDialog( qt_intf_t * );
    virtual ~UpdateDialog();

    bool event(QEvent *event) override;

private:
    Ui::updateWidget ui;
    UpdateModel* m_model = nullptr;

private slots:
    void checkOrDownload();
    void updateUI();
    void close() override { toggleVisible(); }
};
#endif

#endif

Messung
CHZG
8610010095

¤ Dauer der Verarbeitung: 0.5 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.