<commit_before>/*****************************************************************************
 * Controller.hpp : Controller for the main interface
 ****************************************************************************
 * Copyright (C) 2006-2008 the VideoLAN team
 * $Id$
 *
 * Authors: <NAME> <<EMAIL>>
 *
 * 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 _CONTROLLER_H_
#define _CONTROLLER_H_

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

#include "qt4.hpp"

#include <QFrame>
#include <QString>

#define I_PLAY_TOOLTIP N_("Play\nIf the playlist is empty, open a media")

#define MAIN_TB1_DEFAULT "64;39;64;38;65"
#define MAIN_TB2_DEFAULT "0-2;64;3;1;4;64;7;10;9;64-4;37;65;35-4"
#define ADV_TB_DEFAULT "12;11;13;14"
#define INPT_TB_DEFAULT "5-1;15-1;33;6-1"
#define FSC_TB_DEFAULT "0-2;64;3;1;4;64;37;64;38;64;8;65;35-4;34"


class QPixmap;
class QLabel;

class QGridLayout;
class QHBoxLayout;
class QBoxLayout;

class QAbstractSlider;
class QAbstractButton;
class InputSlider;

class VolumeClickHandler;
class WidgetListing;

class QSignalMapper;
class QTimer;

typedef enum buttonType_e
{
    PLAY_BUTTON,
    STOP_BUTTON,
    OPEN_BUTTON,
    PREVIOUS_BUTTON,
    NEXT_BUTTON,
    SLOWER_BUTTON,
    FASTER_BUTTON,
    FULLSCREEN_BUTTON,
    DEFULLSCREEN_BUTTON,
    EXTENDED_BUTTON,
    PLAYLIST_BUTTON,
    SNAPSHOT_BUTTON,
    RECORD_BUTTON,
    ATOB_BUTTON,
    FRAME_BUTTON,
    REVERSE_BUTTON,
    SKIP_BACK_BUTTON,
    SKIP_FW_BUTTON,
    QUIT_BUTTON,
    BUTTON_MAX,

    SPLITTER = 0x20,
    INPUT_SLIDER,
    TIME_LABEL,
    VOLUME,
    VOLUME_SPECIAL,
    MENU_BUTTONS,
    TELETEXT_BUTTONS,
    ADVANCED_CONTROLLER,
    SPECIAL_MAX,

    WIDGET_SPACER = 0x40,
    WIDGET_SPACER_EXTEND,
    WIDGET_MAX,
} buttonType_e;


static const QString nameL[BUTTON_MAX] = { "Play", "Stop", "Open",
    "Previous", "Next", "Slower", "Faster", "Fullscreen", "De-Fullscreen",
    "Extended panel", "Playlist", "Snapshot", "Record", "A->B Loop",
    "Frame By Frame", "Trickplay Reverse", "Skip backward" , "Skip forward",
    "Quit" };
static const QString tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
    _("Stop playback"), _("Open a media"),
    _("Previous media in the playlist"),
    _("Next media in the playlist"), _("Slower"), _("Faster"),
    _("Toggle the video in fullscreen"), _("Toggle the video out fullscreen"),
    _("Show extended settings" ), _( "Show playlist" ), _( "Take a snapshot" ),
    _( "Record" ), _( "Loop from point A to point B continuously." ),
    _("Frame by frame"), _("Reverse"), _("Skip backward"), _("Skip forward"),
    _("Quit") };
static const QString iconL[BUTTON_MAX] ={ ":/play_b", ":/stop_b", ":/eject",
    ":/previous_b", ":/next_b", ":/slower", ":/faster", ":/fullscreen",
    ":/defullscreen", ":/extended", ":/playlist", ":/snapshot", ":/record",
    ":/atob_nob", ":/frame", ":/reverse", ":/skip_back", ":/skip_fw",
    ":/clear" };

enum
{
   WIDGET_NORMAL = 0x0,
   WIDGET_FLAT   = 0x1,
   WIDGET_BIG    = 0x2,
   WIDGET_SHINY  = 0x4,
};

class AdvControlsWidget;
class AbstractController : public QFrame
{
    friend class WidgetListing; /* For ToolBar Edition HACKS */

    Q_OBJECT
public:
    AbstractController( intf_thread_t  *_p_i, QWidget *_parent = 0 );

protected:
    intf_thread_t       *p_intf;<commit_msg>Qt: rename skip to step to match macos<commit_after>/*****************************************************************************
 * Controller.hpp : Controller for the main interface
 ****************************************************************************
 * Copyright (C) 2006-2008 the VideoLAN team
 * $Id$
 *
 * Authors: <NAME> <<EMAIL>>
 *
 * 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 _CONTROLLER_H_
#define _CONTROLLER_H_

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

#include "qt4.hpp"

#include <QFrame>
#include <QString>

#define I_PLAY_TOOLTIP N_("Play\nIf the playlist is empty, open a media")

#define MAIN_TB1_DEFAULT "64;39;64;38;65"
#define MAIN_TB2_DEFAULT "0-2;64;3;1;4;64;7;10;9;64-4;37;65;35-4"
#define ADV_TB_DEFAULT "12;11;13;14"
#define INPT_TB_DEFAULT "5-1;15-1;33;6-1"
#define FSC_TB_DEFAULT "0-2;64;3;1;4;64;37;64;38;64;8;65;35-4;34"


class QPixmap;
class QLabel;

class QGridLayout;
class QHBoxLayout;
class QBoxLayout;

class QAbstractSlider;
class QAbstractButton;
class InputSlider;

class VolumeClickHandler;
class WidgetListing;

class QSignalMapper;
class QTimer;

typedef enum buttonType_e
{
    PLAY_BUTTON,
    STOP_BUTTON,
    OPEN_BUTTON,
    PREVIOUS_BUTTON,
    NEXT_BUTTON,
    SLOWER_BUTTON,
    FASTER_BUTTON,
    FULLSCREEN_BUTTON,
    DEFULLSCREEN_BUTTON,
    EXTENDED_BUTTON,
    PLAYLIST_BUTTON,
    SNAPSHOT_BUTTON,
    RECORD_BUTTON,
    ATOB_BUTTON,
    FRAME_BUTTON,
    REVERSE_BUTTON,
    SKIP_BACK_BUTTON,
    SKIP_FW_BUTTON,
    QUIT_BUTTON,
    BUTTON_MAX,

    SPLITTER = 0x20,
    INPUT_SLIDER,
    TIME_LABEL,
    VOLUME,
    VOLUME_SPECIAL,
    MENU_BUTTONS,
    TELETEXT_BUTTONS,
    ADVANCED_CONTROLLER,
    SPECIAL_MAX,

    WIDGET_SPACER = 0x40,
    WIDGET_SPACER_EXTEND,
    WIDGET_MAX,
} buttonType_e;


static const QString nameL[BUTTON_MAX] = { "Play", "Stop", "Open",
    "Previous", "Next", "Slower", "Faster", "Fullscreen", "De-Fullscreen",
    "Extended panel", "Playlist", "Snapshot", "Record", "A->B Loop",
    "Frame By Frame", "Trickplay Reverse", "Step backward" , "Step forward",
    "Quit" };
static const QString tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
    _("Stop playback"), _("Open a media"),
    _("Previous media in the playlist"),
    _("Next media in the playlist"), _("Slower"), _("Faster"),
    _("Toggle the video in fullscreen"), _("Toggle the video out fullscreen"),
    _("Show extended settings" ), _( "Show playlist" ), _( "Take a snapshot" ),
    _( "Record" ), _( "Loop from point A to point B continuously." ),
    _("Frame by frame"), _("Reverse"), _("Step backward"), _("Step forward"),
    _("Quit") };
static const QString iconL[BUTTON_MAX] ={ ":/play_b", ":/stop_b", ":/eject",
    ":/previous_b", ":/next_b", ":/slower", ":/faster", ":/fullscreen",
    ":/defullscreen", ":/extended", ":/playlist", ":/snapshot", ":/record",
    ":/atob_nob", ":/frame", ":/reverse", ":/skip_back", ":/skip_fw",
    ":/clear" };

enum
{
   WIDGET_NORMAL = 0x0,
   WIDGET_FLAT   = 0x1,
   WIDGET_BIG    = 0x2,
   WIDGET_SHINY  = 0x4,
};

class AdvControlsWidget;
class AbstractController : public QFrame
{
    friend class WidgetListing; /* For ToolBar Edition HACKS */

    Q_OBJECT
public:
    AbstractController( intf_thread_t  *_p_i, QWidget *_parent = 0 );

protected:
    intf_thread_t       *p_intf;
{'fraction_non_alphanumeric': 0.1760207228321204, 'fraction_numerical': 0.027877143209571974, 'mean_word_length': 4.348284960422164, 'pattern_counts': {'":': 38, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3618457', 'n_tokens_mistral': 2921, 'n_tokens_neox': 2766, 'n_words': 758}