• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ BUTTONACT函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中BUTTONACT函数的典型用法代码示例。如果您正苦于以下问题:C++ BUTTONACT函数的具体用法?C++ BUTTONACT怎么用?C++ BUTTONACT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了BUTTONACT函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: QVLCDialog

ErrorsDialog::ErrorsDialog( intf_thread_t *_p_intf )
             : QVLCDialog( (QWidget*)_p_intf->p_sys->p_mi, _p_intf )
{
    setWindowTitle( qtr( "Errors" ) );
    setWindowRole( "vlc-errors" );
    resize( 500 , 300 );

    QGridLayout *layout = new QGridLayout( this );

    QDialogButtonBox *buttonBox = new QDialogButtonBox( Qt::Horizontal, this );
    QPushButton *clearButton = new QPushButton( qtr( "Cl&ear" ), this );
    buttonBox->addButton( clearButton, QDialogButtonBox::ActionRole );
    buttonBox->addButton( new QPushButton( qtr("&Close"), this ), QDialogButtonBox::RejectRole );

    messages = new QTextEdit();
    messages->setReadOnly( true );
    messages->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
    stopShowing = new QCheckBox( qtr( "Hide future errors" ) );

    layout->addWidget( messages, 0, 0, 1, 3 );
    layout->addWidget( stopShowing, 1, 0 );
    layout->addWidget( buttonBox, 1, 2 );

    CONNECT( buttonBox, rejected(), this, close() );
    BUTTONACT( clearButton, clear() );
    BUTTONACT( stopShowing, dontShow() );
}
开发者ID:0xheart0,项目名称:vlc,代码行数:27,代码来源:errors.cpp


示例2: QWidget

VLCProfileSelector::VLCProfileSelector( QWidget *_parent ): QWidget( _parent )
{
    QHBoxLayout *layout = new QHBoxLayout( this );

    QLabel *prLabel = new QLabel( qtr( "Profile"), this );
    layout->addWidget( prLabel );

    profileBox = new QComboBox( this );
    layout->addWidget( profileBox );

    QToolButton *editButton = new QToolButton( this );
    editButton->setIcon( QIcon( ":/menu/preferences" ) );
    editButton->setToolTip( qtr( "Edit selected profile" ) );
    layout->addWidget( editButton );

    QToolButton *deleteButton = new QToolButton( this );
    deleteButton->setIcon( QIcon( ":/toolbar/clear" ) );
    deleteButton->setToolTip( qtr( "Delete selected profile" ) );
    layout->addWidget( deleteButton );

    QToolButton *newButton = new QToolButton( this );
    newButton->setIcon( QIcon( ":/new" ) );
    newButton->setToolTip( qtr( "Create a new profile" ) );
    layout->addWidget(newButton);

    BUTTONACT( newButton, newProfile() );
    BUTTONACT( editButton, editProfile() );
    BUTTONACT( deleteButton, deleteProfile() );
    fillProfilesCombo();

    CONNECT( profileBox, activated( int ),
             this, updateOptions( int ) );
    updateOptions( 0 );
}
开发者ID:BloodExecutioner,项目名称:vlc,代码行数:34,代码来源:profile_selector.cpp


示例3: VLMAWidget

/****************
 * VLMBroadcast
 ****************/
VLMBroadcast::VLMBroadcast( const QString& _name, const QString& _input,
                            const QString& _inputOptions,
                            const QString& _output, bool _enabled,
                            bool _looped, VLMDialog *_parent )
                          : VLMAWidget( _name, _input, _inputOptions, _output,
                                        _enabled, _parent, QVLM_Broadcast )
{
    nameLabel->setText( qtr("Broadcast: ") + name );
    type = QVLM_Broadcast;
    b_looped = _looped;

    playButton = new QToolButton;
    playButton->setIcon( QIcon( ":/menu/play" ) );
    playButton->setToolTip( qtr("Play") );
    objLayout->addWidget( playButton, 1, 0 );
    b_playing = true;

    QToolButton *stopButton = new QToolButton;
    stopButton->setIcon( QIcon( ":/toolbar/stop_b" ) );
    stopButton->setToolTip( qtr("Stop") );
    objLayout->addWidget( stopButton, 1, 1 );

    loopButton = new QToolButton;
    loopButton->setToolTip( qtr("Repeat") );
    objLayout->addWidget( loopButton, 1, 2 );

    BUTTONACT( playButton, togglePlayPause() );
    BUTTONACT( stopButton, stop() );
    BUTTONACT( loopButton, toggleLoop() );

    update();
}
开发者ID:BloodExecutioner,项目名称:vlc,代码行数:35,代码来源:vlm.cpp


示例4: QVLCDialog

GotoTimeDialog::GotoTimeDialog( QWidget *parent, intf_thread_t *_p_intf)
               : QVLCDialog( parent, _p_intf )
{
    setWindowFlags( Qt::Tool );
    setWindowTitle( qtr( "Go to Time" ) );
    setWindowRole( "vlc-goto-time" );

    QGridLayout *mainLayout = new QGridLayout( this );
    mainLayout->setSizeConstraint( QLayout::SetFixedSize );

    QPushButton *gotoButton = new QPushButton( qtr( "&Go" ) );
    QPushButton *cancelButton = new QPushButton( qtr( "&Cancel" ) );
    QDialogButtonBox *buttonBox = new QDialogButtonBox;

    gotoButton->setDefault( true );
    buttonBox->addButton( gotoButton, QDialogButtonBox::AcceptRole );
    buttonBox->addButton( cancelButton, QDialogButtonBox::RejectRole );

    QGroupBox *timeGroupBox = new QGroupBox;
    QGridLayout *boxLayout = new QGridLayout( timeGroupBox );

    QLabel *timeIntro = new QLabel( qtr( "Go to time" ) + ":" );
    timeIntro->setWordWrap( true );
    timeIntro->setAlignment( Qt::AlignCenter );

    timeEdit = new QTimeEdit();
    timeEdit->setDisplayFormat( "hh : mm : ss" );
    timeEdit->setAlignment( Qt::AlignRight );
    timeEdit->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum );

    QLabel *helpFormat = new QLabel( timeEdit->displayFormat() );
    helpFormat->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Preferred );

    QSpacerItem *spacerBox = new QSpacerItem( 20, 10, QSizePolicy::Minimum,
                                        QSizePolicy::Fixed );

    QSpacerItem *spacerItem = new QSpacerItem( 20, 3, QSizePolicy::Minimum,
                                        QSizePolicy::Expanding );

    boxLayout->addWidget( timeIntro, 0, 0, 1, 2 );
    boxLayout->addItem( spacerBox, 1, 0, 1, 2 );
    boxLayout->addWidget( timeEdit, 2, 0, 1, 1 );
    boxLayout->addWidget( helpFormat, 2, 1, 1, 1 );

    mainLayout->addWidget( timeGroupBox, 0, 0, 1, 4 );
    mainLayout->addItem( spacerItem, 1, 0 );
    mainLayout->addWidget( buttonBox, 2, 3 );

    BUTTONACT( gotoButton, close() );
    BUTTONACT( cancelButton, cancel() );
}
开发者ID:FLYKingdom,项目名称:vlc,代码行数:51,代码来源:gototime.cpp


示例5: OpenPanel

/**************************************************************************
 * Open Files and subtitles                                               *
 **************************************************************************/
FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
                                OpenPanel( _parent, _p_intf ), dialogBox( NULL )
{
    /* Classic UI Setup */
    ui.setupUi( this );

    /* Set Filters for file selection */
/*    QString fileTypes = "";
    ADD_FILTER_MEDIA( fileTypes );
    ADD_FILTER_VIDEO( fileTypes );
    ADD_FILTER_AUDIO( fileTypes );
    ADD_FILTER_PLAYLIST( fileTypes );
    ADD_FILTER_ALL( fileTypes );
    fileTypes.replace( QString(";*"), QString(" *")); */


/*    lineFileEdit = ui.fileEdit;
    //TODO later: fill the fileCompleteList with previous items played.
    QCompleter *fileCompleter = new QCompleter( fileCompleteList, this );
    fileCompleter->setModel( new QDirModel( fileCompleter ) );
    lineFileEdit->setCompleter( fileCompleter );*/
    if( config_GetInt( p_intf, "qt-embedded-open" ) )
    {
        ui.tempWidget->hide();
        BuildOldPanel();
    }

    /* Subtitles */
    /* Deactivate the subtitles control by default. */
    ui.subFrame->setEnabled( false );
    /* Build the subs size combo box */
    setfillVLCConfigCombo( "freetype-rel-fontsize" , p_intf,
                            ui.sizeSubComboBox );
    /* Build the subs align combo box */
    setfillVLCConfigCombo( "subsdec-align", p_intf, ui.alignSubComboBox );

    /* Connects  */
    BUTTONACT( ui.fileBrowseButton, browseFile() );
    BUTTONACT( ui.removeFileButton, removeFile() );

    BUTTONACT( ui.subBrowseButton, browseFileSub() );
    CONNECT( ui.subCheckBox, toggled( bool ), this, toggleSubtitleFrame( bool ) );

    CONNECT( ui.fileListWidg, itemChanged( QListWidgetItem * ), this, updateMRL() );
    CONNECT( ui.subInput, textChanged( const QString& ), this, updateMRL() );
    CONNECT( ui.alignSubComboBox, currentIndexChanged( int ), this, updateMRL() );
    CONNECT( ui.sizeSubComboBox, currentIndexChanged( int ), this, updateMRL() );
    updateButtons();
}
开发者ID:shanewfx,项目名称:vlc-arib,代码行数:52,代码来源:open_panels.cpp


示例6: QVLCFrame

UpdateDialog::UpdateDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
{
    setWindowTitle( qtr( "VLC media player updates" ) );

    QGridLayout *layout = new QGridLayout( this );

    QPushButton *closeButton = new QPushButton( qtr( "&Cancel" ) );
    updateButton = new QPushButton( qtr( "&Recheck version" ) );
    updateButton->setDefault( true );

    QDialogButtonBox *buttonBox = new QDialogButtonBox( Qt::Horizontal );
    buttonBox->addButton( updateButton, QDialogButtonBox::ActionRole );
    buttonBox->addButton( closeButton, QDialogButtonBox::AcceptRole );

    updateLabelTop = new QLabel( qtr( "Checking for an update..." ) );
    updateLabelTop->setWordWrap( true );
    updateLabelTop->setMargin( 8 );

    updateLabelDown = new QLabel( qtr( "\nDo you want to download it?\n" ) );
    updateLabelDown->setWordWrap( true );
    updateLabelDown->hide();

    updateText = new QTextEdit( this );
    updateText->setAcceptRichText(false);
    updateText->setTextInteractionFlags( Qt::TextSelectableByKeyboard|
                                         Qt::TextSelectableByMouse);
    updateText->setEnabled( false );

    layout->addWidget( updateLabelTop, 0, 0 );
    layout->addWidget( updateText, 1, 0 );
    layout->addWidget( updateLabelDown, 2, 0 );
    layout->addWidget( buttonBox, 3, 0 );

    BUTTONACT( updateButton, UpdateOrDownload() );
    BUTTONACT( closeButton, close() );

    /* Create the update structure */
    p_update = update_New( p_intf );
    b_checked = false;

    setMinimumSize( 300, 300 );
    setMaximumSize( 400, 300 );

    readSettings( "Update", QSize( 300, 250 ) );

    /* Check for updates */
    UpdateOrDownload();
}
开发者ID:Kafay,项目名称:vlc,代码行数:48,代码来源:help.cpp


示例7: QVLCFrame

UpdateDialog::UpdateDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
{
    /* build Ui */
    ui.setupUi( this );
    ui.updateDialogButtonBox->addButton( new QPushButton( qtr("&Close"), this ),
                                         QDialogButtonBox::RejectRole );
    QPushButton *recheckButton = new QPushButton( qtr("&Recheck version"), this );
    ui.updateDialogButtonBox->addButton( recheckButton, QDialogButtonBox::ActionRole );

    ui.updateNotifyButtonBox->addButton( new QPushButton( qtr("&Yes"), this ),
                                         QDialogButtonBox::AcceptRole );
    ui.updateNotifyButtonBox->addButton( new QPushButton( qtr("&No"), this ),
                                         QDialogButtonBox::RejectRole );

    setWindowTitle( qtr( "VLC media player updates" ) );
    setWindowRole( "vlc-update" );

    BUTTONACT( recheckButton, UpdateOrDownload() );
    CONNECT( ui.updateDialogButtonBox, rejected(), this, close() );

    CONNECT( ui.updateNotifyButtonBox, accepted(), this, UpdateOrDownload() );
    CONNECT( ui.updateNotifyButtonBox, rejected(), this, close() );

    /* Create the update structure */
    p_update = update_New( p_intf );
    b_checked = false;

    setMinimumSize( 300, 300 );
    setMaximumSize( 400, 300 );

    restoreWidgetPosition( "Update", QSize( 300, 250 ) );

    /* Check for updates */
    UpdateOrDownload();
}
开发者ID:Mettbrot,项目名称:vlc,代码行数:35,代码来源:help.cpp


示例8: VStringConfigControl

/*********** File **************/
FileConfigControl::FileConfigControl( vlc_object_t *_p_this,
                                          module_config_t *_p_item,
                                          QWidget *_parent, QGridLayout *l,
                                          int &line ) :
                           VStringConfigControl( _p_this, _p_item, _parent )
{
    label = new QLabel( qtr(p_item->psz_text) );
    text = new QLineEdit( qfu(p_item->value.psz) );
    browse = new QPushButton( qtr( "Browse..." ) );
    QHBoxLayout *textAndButton = new QHBoxLayout();
    textAndButton->setMargin( 0 );
    textAndButton->addWidget( text, 2 );
    textAndButton->addWidget( browse, 0 );

    BUTTONACT( browse, updateField() );

    finish();

    if( !l )
    {
        QHBoxLayout *layout = new QHBoxLayout();
        layout->addWidget( label, 0 );
        layout->insertSpacing( 1, 10 );
        layout->addLayout( textAndButton, LAST_COLUMN );
        widget->setLayout( layout );
    }
    else
    {
        l->addWidget( label, line, 0 );
        l->setColumnMinimumWidth( 1, 10 );
        l->addLayout( textAndButton, line, LAST_COLUMN );
    }
}
开发者ID:Kafay,项目名称:vlc,代码行数:34,代码来源:preferences_widgets.cpp


示例9: VirtualDestBox

/* FileDest Box */
FileDestBox::FileDestBox( QWidget *_parent, intf_thread_t * _p_intf ) : VirtualDestBox( _parent )
{
    p_intf = _p_intf;

    QPushButton *fileSelectButton;
    QGridLayout *layout = new QGridLayout( this );

    QLabel *fileOutput = new QLabel(
         qtr( "This module writes the transcoded stream to a file."), this );
    layout->addWidget(fileOutput, 0, 0, 1, -1);

    QLabel *fileLabel = new QLabel( qtr( "Filename"), this );
    layout->addWidget(fileLabel, 1, 0, 1, 1);

    fileEdit = new QLineEdit(this);
    layout->addWidget(fileEdit, 1, 4, 1, 1);

    fileSelectButton = new QPushButton( qtr( "Browse..." ), this );
    QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed);
    fileSelectButton->setSizePolicy(sizePolicy);

    layout->addWidget(fileSelectButton, 1, 5, 1, 1);
    CT( fileEdit );
    BUTTONACT( fileSelectButton, fileBrowse() );
}
开发者ID:AsamQi,项目名称:vlc,代码行数:26,代码来源:sout_widgets.cpp


示例10: QWizard

SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, const QString& inputMRL )
           : QWizard( parent )
{
    p_intf = _p_intf;

    setWindowTitle( qtr( "Stream Output" ) );
    setWindowRole( "vlc-stream-output" );

    /* UI stuff */
    ui.setupUi( this );
    ui.inputBox->setMRL( inputMRL );
    ui.helpEdit->setPlainText( qtr("This wizard will allow you to stream or "
            "convert your media for use locally, on your private network, "
            "or on the Internet.\n"
            "You should start by checking that source matches what you want "
            "your input to be and then press the \"Next\" "
            "button to continue.\n") );

    ui.mrlEdit->setToolTip ( qtr( "Stream output string.\n"
                "This is automatically generated "
                 "when you change the above settings,\n"
                 "but you can change it manually." ) ) ;

    ui.destTab->setTabsClosable( true );
    QTabBar* tb = ui.destTab->findChild<QTabBar*>();
    if( tb != NULL ) tb->tabButton(0, QTabBar::RightSide)->hide();
    CONNECT( ui.destTab, tabCloseRequested( int ), this, closeTab( int ) );
    ui.destTab->setTabIcon( 0, QIcon( ":/buttons/playlist/playlist_add" ) );

    ui.destBox->addItem( qtr( "File" ) );
    ui.destBox->addItem( "HTTP" );
    ui.destBox->addItem( "MS-WMSP (MMSH)" );
    ui.destBox->addItem( "RTSP" );
    ui.destBox->addItem( "RTP / MPEG Transport Stream" );
    ui.destBox->addItem( "RTP Audio/Video Profile" );
    ui.destBox->addItem( "UDP (legacy)" );
    ui.destBox->addItem( "IceCast" );

    BUTTONACT( ui.addButton, addDest() );

//     /* Connect everything to the updateMRL function */
#define CB( x ) CONNECT( ui.x, toggled( bool ), this, updateMRL() );
#define CT( x ) CONNECT( ui.x, textChanged( const QString& ), this, updateMRL() );
#define CS( x ) CONNECT( ui.x, valueChanged( int ), this, updateMRL() );
#define CC( x ) CONNECT( ui.x, currentIndexChanged( int ), this, updateMRL() );

    /* Misc */
    CB( soutAll );
    CB( localOutput ); CB( transcodeBox );
    CONNECT( ui.profileSelect, optionsChanged(), this, updateMRL() );

    setButtonText( QWizard::FinishButton, "Stream" );

#undef CC
#undef CS
#undef CT
#undef CB
}
开发者ID:AsamQi,项目名称:vlc,代码行数:58,代码来源:sout.cpp


示例11: QVLCFrame

EpgDialog::EpgDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
{
    setWindowTitle( qtr( "Program Guide" ) );

    QVBoxLayout *layout = new QVBoxLayout( this );
    layout->setMargin( 0 );
    epg = new EPGWidget( this );

    QGroupBox *descBox = new QGroupBox( qtr( "Description" ), this );

    QVBoxLayout *boxLayout = new QVBoxLayout( descBox );

    description = new QTextEdit( this );
    description->setReadOnly( true );
    description->setFrameStyle( QFrame::Sunken | QFrame::StyledPanel );
    description->setAutoFillBackground( true );
    description->setAlignment( Qt::AlignLeft | Qt::AlignTop );
    description->setFixedHeight( 100 );

    QPalette palette;
    palette.setBrush(QPalette::Active, QPalette::Window, palette.brush( QPalette::Base ) );
    description->setPalette( palette );

    title = new QLabel( qtr( "Title" ), this );
    title->setWordWrap( true );

    boxLayout->addWidget( title );
    boxLayout->addWidget( description );

    layout->addWidget( epg, 10 );
    layout->addWidget( descBox );

    CONNECT( epg, itemSelectionChanged( EPGItem *), this, displayEvent( EPGItem *) );
    CONNECT( epg, programActivated(int), THEMIM->getIM(), changeProgram(int) );
    CONNECT( THEMIM->getIM(), epgChanged(), this, scheduleUpdate() );
    CONNECT( THEMIM, inputChanged( bool ), this, inputChanged() );

    QDialogButtonBox *buttonsBox = new QDialogButtonBox( this );

#if 0
    QPushButton *update = new QPushButton( qtr( "Update" ) ); // Temporary to test
    buttonsBox->addButton( update, QDialogButtonBox::ActionRole );
    BUTTONACT( update, updateInfos() );
#endif

    buttonsBox->addButton( new QPushButton( qtr( "&Close" ) ),
                           QDialogButtonBox::RejectRole );
    boxLayout->addWidget( buttonsBox );
    CONNECT( buttonsBox, rejected(), this, close() );

    timer = new QTimer( this );
    timer->setSingleShot( true );
    timer->setInterval( 5000 );
    CONNECT( timer, timeout(), this, timeout() );

    updateInfos();
    restoreWidgetPosition( "EPGDialog", QSize( 650, 450 ) );
}
开发者ID:mstorsjo,项目名称:vlc,代码行数:58,代码来源:epg.cpp


示例12: OpenPanel

/**************************************************************************
 * Open Files and subtitles                                               *
 **************************************************************************/
FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
                                OpenPanel( _parent, _p_intf ), dialogBox( NULL )
{
    /* Classic UI Setup */
    ui.setupUi( this );

    setAcceptDrops( true );

    /* Set Filters for file selection */
/*    QString fileTypes = "";
    ADD_FILTER_MEDIA( fileTypes );
    ADD_FILTER_VIDEO( fileTypes );
    ADD_FILTER_AUDIO( fileTypes );
    ADD_FILTER_PLAYLIST( fileTypes );
    ADD_FILTER_ALL( fileTypes );
    fileTypes.replace( QString(";*"), QString(" *")); */


/*    lineFileEdit = ui.fileEdit;
    //TODO later: fill the fileCompleteList with previous items played.
    QCompleter *fileCompleter = new QCompleter( fileCompleteList, this );
    fileCompleter->setModel( new QDirModel( fileCompleter ) );
    lineFileEdit->setCompleter( fileCompleter );*/
    if( var_InheritBool( p_intf, "qt-embedded-open" ) )
    {
        ui.tempWidget->hide();
        BuildOldPanel();
    }

    /* Subtitles */
    /* Deactivate the subtitles control by default. */
    ui.subGroupBox->setEnabled( false );

    /* Connects  */
    BUTTONACT( ui.fileBrowseButton, browseFile() );
    BUTTONACT( ui.removeFileButton, removeFile() );

    BUTTONACT( ui.subBrowseButton, browseFileSub() );
    CONNECT( ui.subGroupBox, toggled( bool ), this, updateMRL() );

    CONNECT( ui.fileListWidg, itemChanged( QListWidgetItem * ), this, updateMRL() );
    CONNECT( ui.subInput, textChanged( const QString& ), this, updateMRL() );
    updateButtons();
}
开发者ID:0xheart0,项目名称:vlc,代码行数:47,代码来源:open_panels.cpp


示例13: QVLCDialog

GotoTimeDialog::GotoTimeDialog( intf_thread_t *_p_intf)
               : QVLCDialog( (QWidget*)_p_intf->p_sys->p_mi, _p_intf )
{
    setWindowFlags( Qt::Tool );
    setWindowTitle( qtr( "Go to Time" ) );
    setWindowRole( "vlc-goto-time" );

    QGridLayout *mainLayout = new QGridLayout( this );
    mainLayout->setSizeConstraint( QLayout::SetFixedSize );

    QPushButton *gotoButton = new QPushButton( qtr( "&Go" ) );
    QPushButton *cancelButton = new QPushButton( qtr( "&Cancel" ) );
    QDialogButtonBox *buttonBox = new QDialogButtonBox;

    gotoButton->setDefault( true );
    buttonBox->addButton( gotoButton, QDialogButtonBox::AcceptRole );
    buttonBox->addButton( cancelButton, QDialogButtonBox::RejectRole );

    QLabel *timeIntro = new QLabel( qtr( "Go to time" ) + ":" );
    timeIntro->setWordWrap( true );
    timeIntro->setAlignment( Qt::AlignCenter );

    timeEdit = new QTimeEdit();
    timeEdit->setDisplayFormat( "HH'H':mm'm':ss's'" );
    timeEdit->setAlignment( Qt::AlignRight );
    timeEdit->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum );

    QPushButton *resetButton = new QPushButton( QIcon(":/update.svg"), "" );
    resetButton->setToolTip( qtr("Reset") );

    mainLayout->addWidget( timeIntro, 0, 0, 1, 1 );
    mainLayout->addWidget( timeEdit, 0, 1, 1, 1 );
    mainLayout->addWidget( resetButton, 0, 2, 1, 1 );

    mainLayout->addWidget( buttonBox, 1, 0, 1, 3 );

    BUTTONACT( gotoButton, close() );
    BUTTONACT( cancelButton, cancel() );
    BUTTONACT( resetButton, reset() );

    QVLCTools::restoreWidgetPosition( p_intf, "gototimedialog", this );
}
开发者ID:tguillem,项目名称:vlc,代码行数:42,代码来源:gototime.cpp


示例14: VStringConfigControl

/*********** File **************/
FileConfigControl::FileConfigControl( vlc_object_t *_p_this,
                                      module_config_t *_p_item, QWidget *p ) :
                           VStringConfigControl( _p_this, _p_item )
{
    label = new QLabel( qtr(p_item->psz_text), p );
    text = new QLineEdit( qfu(p_item->value.psz), p );
    browse = new QPushButton( qtr( "Browse..." ), p );

    BUTTONACT( browse, updateField() );

    finish();
}
开发者ID:12307,项目名称:VLC-for-VS2010,代码行数:13,代码来源:preferences_widgets.cpp


示例15: QGroupBox

VLMAWidget::VLMAWidget( const QString& _name, const QString& _input,
                        const QString& _inputOptions, const QString& _output,
                        bool _enabled, VLMDialog *_parent, int _type )
                      : QGroupBox( _name, _parent )
{
    parent = _parent;
    name = _name;
    input = _input;
    inputOptions = _inputOptions;
    output = _output;
    b_enabled = _enabled;
    type = _type;

    setCheckable( true );
    setChecked( b_enabled );

    objLayout = new QGridLayout( this );
    setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum );

    nameLabel = new QLabel;
    objLayout->addWidget( nameLabel, 0, 0, 1, 4 );

    /*QLabel *time = new QLabel( "--:--/--:--" );
    objLayout->addWidget( time, 1, 3, 1, 2 );*/

    QToolButton *modifyButton = new QToolButton;
    modifyButton->setIcon( QIcon( ":/menu/settings" ) );
    modifyButton->setToolTip( qtr("Change") );
    objLayout->addWidget( modifyButton, 0, 5 );

    QToolButton *deleteButton = new QToolButton;
    deleteButton->setIcon( QIcon( ":/menu/quit" ) );
    deleteButton->setToolTip("Delete");
    objLayout->addWidget( deleteButton, 0, 6 );

    BUTTONACT( modifyButton, modify() );
    BUTTONACT( deleteButton, del() );
    CONNECT( this, clicked( bool ), this, toggleEnabled( bool ) );
}
开发者ID:BloodExecutioner,项目名称:vlc,代码行数:39,代码来源:vlm.cpp


示例16: QFrame

/**********************************************************************
 * Visualization selector panel
 **********************************************************************/
VisualSelector::VisualSelector( intf_thread_t *_p_i ) :
                                QFrame( NULL ), p_intf( _p_i )
{
    QHBoxLayout *layout = new QHBoxLayout( this );
    layout->setMargin( 0 );
    QPushButton *prevButton = new QPushButton( "Prev" );
    QPushButton *nextButton = new QPushButton( "Next" );
    layout->addWidget( prevButton );
    layout->addWidget( nextButton );

    layout->addStretch( 10 );
    layout->addWidget( new QLabel( qtr( "Current visualization" ) ) );

    current = new QLabel( qtr( "None" ) );
    layout->addWidget( current );

    BUTTONACT( prevButton, prev() );
    BUTTONACT( nextButton, next() );

    setLayout( layout );
    setMaximumHeight( 35 );
}
开发者ID:BloodExecutioner,项目名称:vlc,代码行数:25,代码来源:interface_widgets.cpp


示例17: QVLCFrame

PluginDialog::PluginDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
{
    setAttribute( Qt::WA_DeleteOnClose );

    setWindowTitle( qtr( "Plugins and extensions" ) );
    QGridLayout *layout = new QGridLayout( this );

    /* Main Tree for modules */
    treePlugins = new QTreeWidget;
    layout->addWidget( treePlugins, 0, 0, 1, -1 );

    /* Users cannot move the columns around but we need to sort */
    treePlugins->header()->setMovable( false );
    treePlugins->header()->setSortIndicatorShown( true );
    //    treePlugins->header()->setResizeMode( QHeaderView::ResizeToContents );
    treePlugins->setAlternatingRowColors( true );
    treePlugins->setColumnWidth( 0, 200 );

    QStringList headerNames;
    headerNames << qtr("Name") << qtr("Capability" ) << qtr( "Score" );
    treePlugins->setHeaderLabels( headerNames );

    FillTree();

    /* Set capability column to the correct Size*/
    treePlugins->resizeColumnToContents( 1 );
    treePlugins->header()->restoreState(
            getSettings()->value( "Plugins/Header-State" ).toByteArray() );

    treePlugins->setSortingEnabled( true );
    treePlugins->sortByColumn( 1, Qt::AscendingOrder );

    QLabel *label = new QLabel( qtr("&Search:"), this );
    edit = new SearchLineEdit( this );
    label->setBuddy( edit );

    layout->addWidget( label, 1, 0 );
    layout->addWidget( edit, 1, 1, 1, -1 );
    CONNECT( edit, textChanged( const QString& ),
            this, search( const QString& ) );

    QDialogButtonBox *box = new QDialogButtonBox;
    QPushButton *okButton = new QPushButton( qtr( "&Close" ), this );
    box->addButton( okButton, QDialogButtonBox::AcceptRole );
    layout->addWidget( box, 2, 2 );

    BUTTONACT( okButton, close() );

    setMinimumSize( 500, 300 );
    readSettings( "Plugins", QSize( 540, 400 ) );
}
开发者ID:Kafay,项目名称:vlc,代码行数:51,代码来源:plugins.cpp


示例18: QVLCDialog

OpenDialog::OpenDialog( QWidget *parent,
                        intf_thread_t *_p_intf,
                        bool b_selectMode,
                        int _action_flag,
                        bool _b_pl)  :  QVLCDialog( parent, _p_intf )
{
    i_action_flag = _action_flag;
    b_pl =_b_pl;

    if( b_selectMode ) /* Select mode */
        i_action_flag = SELECT;

    /* Basic Creation of the Window */
    ui.setupUi( this );
    setWindowTitle( qtr( "Open Media" ) );
    setWindowRole( "vlc-open-media" );
    setWindowModality( Qt::WindowModal );

    /* Tab definition and creation */
    fileOpenPanel    = new FileOpenPanel( this, p_intf );
    discOpenPanel    = new DiscOpenPanel( this, p_intf );
    netOpenPanel     = new NetOpenPanel( this, p_intf );
    captureOpenPanel = new CaptureOpenPanel( this, p_intf );

    /* Insert the tabs */
    ui.Tab->insertTab( OPEN_FILE_TAB, fileOpenPanel, QIcon( ":/type/file-asym" ),
                       qtr( "&File" ) );
    ui.Tab->insertTab( OPEN_DISC_TAB, discOpenPanel, QIcon( ":/type/disc" ),
                       qtr( "&Disc" ) );
    ui.Tab->insertTab( OPEN_NETWORK_TAB, netOpenPanel, QIcon( ":/type/network" ),
                       qtr( "&Network" ) );
    ui.Tab->insertTab( OPEN_CAPTURE_TAB, captureOpenPanel,
                       QIcon( ":/type/capture-card" ), qtr( "Capture &Device" ) );

    /* Hide the Slave input widgets */
    ui.slaveLabel->hide();
    ui.slaveText->hide();
    ui.slaveBrowseButton->hide();

    /* Buttons Creation */
    /* Play Button */
    playButton = ui.playButton;

    /* Cancel Button */
    cancelButton = new QPushButton( qtr( "&Cancel" ) );

    /* Select Button */
    selectButton = new QPushButton( qtr( "&Select" ) );

    /* Menu for the Play button */
    QMenu * openButtonMenu = new QMenu( "Open" );
    openButtonMenu->addAction( qtr( "&Enqueue" ), this, SLOT( enqueue() ),
                               QKeySequence( "Alt+E" ) );
    openButtonMenu->addAction( qtr( "&Play" ), this, SLOT( play() ),
                               QKeySequence( "Alt+P" ) );
    openButtonMenu->addAction( qtr( "&Stream" ), this, SLOT( stream() ) ,
                               QKeySequence( "Alt+S" ) );
    openButtonMenu->addAction( qtr( "C&onvert" ), this, SLOT( transcode() ) ,
                               QKeySequence( "Alt+O" ) );

    playButton->setMenu( openButtonMenu );

    /* Add the three Buttons */
    ui.buttonsBox->addButton( selectButton, QDialogButtonBox::AcceptRole );
    ui.buttonsBox->addButton( cancelButton, QDialogButtonBox::RejectRole );

    /* At creation time, modify the default buttons */
    setMenuAction();

    /* Force MRL update on tab change */
    CONNECT( ui.Tab, currentChanged( int ), this, signalCurrent( int ) );

    CONNECT( fileOpenPanel, mrlUpdated( const QStringList&, const QString& ),
             this, updateMRL( const QStringList&, const QString& ) );
    CONNECT( netOpenPanel, mrlUpdated( const QStringList&, const QString& ),
             this, updateMRL( const QStringList&, const QString& ) );
    CONNECT( discOpenPanel, mrlUpdated( const QStringList&, const QString& ),
             this, updateMRL( const QStringList&, const QString& ) );
    CONNECT( captureOpenPanel, mrlUpdated( const QStringList&, const QString& ),
             this, updateMRL( const QStringList&, const QString& ) );

    CONNECT( fileOpenPanel, methodChanged( const QString& ),
             this, newCachingMethod( const QString& ) );
    CONNECT( netOpenPanel, methodChanged( const QString& ),
             this, newCachingMethod( const QString& ) );
    CONNECT( discOpenPanel, methodChanged( const QString& ),
             this, newCachingMethod( const QString& ) );
    CONNECT( captureOpenPanel, methodChanged( const QString& ),
             this, newCachingMethod( const QString& ) );

    /* Advanced frame Connects */
    CONNECT( ui.slaveCheckbox, toggled( bool ), this, updateMRL() );
    CONNECT( ui.slaveText, textChanged( const QString& ), this, updateMRL() );
    CONNECT( ui.cacheSpinBox, valueChanged( int ), this, updateMRL() );
    CONNECT( ui.startTimeTimeEdit, timeChanged ( const QTime& ), this, updateMRL() );
    BUTTONACT( ui.advancedCheckBox, toggleAdvancedPanel() );
    BUTTONACT( ui.slaveBrowseButton, browseInputSlave() );

    /* Buttons action */
    BUTTONACT( playButton, selectSlots() );
//.........这里部分代码省略.........
开发者ID:DawidNowicki,项目名称:vlc,代码行数:101,代码来源:open.cpp


示例19: QVLCDialog


//.........这里部分代码省略.........
                                          MAIN_TB2_DEFAULT ).toString();
    controller2 = new DroppingController( p_intf, line2, this );
    mainTboxLayout->addRow( new QLabel( qtr("Line 2:") ), controller2 );

    /* TimeToolBar */
    QString line = getSettings()->value( "MainWindow/InputToolbar",
                                         INPT_TB_DEFAULT ).toString();
    controller = new DroppingController( p_intf, line, this );
    QWidget *timeToolbarBox = new QWidget();
    timeToolbarBox->setLayout( new QVBoxLayout() );
    timeToolbarBox->layout()->addWidget( controller );
    tabWidget->addTab( timeToolbarBox, qtr( "Time Toolbar" ) );

    /* Advanced ToolBar */
    QString lineA = getSettings()->value( "MainWindow/AdvToolbar",
                                          ADV_TB_DEFAULT ).toString();
    controllerA = new DroppingController( p_intf, lineA, this );
    QWidget *advToolbarBox = new QWidget();
    advToolbarBox->setLayout( new QVBoxLayout() );
    advToolbarBox->layout()->addWidget( controllerA );
    tabWidget->addTab( advToolbarBox, qtr( "Advanced Widget" ) );

    /* FSCToolBar */
    QString lineFSC = getSettings()->value( "MainWindow/FSCtoolbar",
                                            FSC_TB_DEFAULT ).toString();
    controllerFSC = new DroppingController( p_intf, lineFSC, this );
    QWidget *FSCToolbarBox = new QWidget();
    FSCToolbarBox->setLayout( new QVBoxLayout() );
    FSCToolbarBox->layout()->addWidget( controllerFSC );
    tabWidget->addTab( FSCToolbarBox, qtr( "Fullscreen Controller" ) );

    /* Profile */
    QGridLayout *profileBoxLayout = new QGridLayout();

    profileCombo = new QComboBox;

    QToolButton *newButton = new QToolButton;
    newButton->setIcon( QIcon( ":/new.svg" ) );
    newButton->setToolTip( qtr("New profile") );
    QToolButton *deleteButton = new QToolButton;
    deleteButton->setIcon( QIcon( ":/toolbar/clear.svg" ) );
    deleteButton->setToolTip( qtr( "Delete the current profile" ) );

    profileBoxLayout->addWidget( new QLabel( qtr( "Select profile:" ) ), 0, 0 );
    profileBoxLayout->addWidget( profileCombo, 0, 1 );
    profileBoxLayout->addWidget( newButton, 0, 2 );
    profileBoxLayout->addWidget( deleteButton, 0, 3 );

    mainLayout->addLayout( profileBoxLayout, 0, 0, 1, 9 );

    /* Fill combos */
    int i_size = getSettings()->beginReadArray( "ToolbarProfiles" );
    for( int i = 0; i < i_size; i++ )
    {
        getSettings()->setArrayIndex(i);
        profileCombo->addItem( getSettings()->value( "ProfileName" ).toString(),
                               getSettings()->value( "Value" ).toString() );
    }
    getSettings()->endArray();

    /* Load defaults ones if we have no combos */
    /* We could decide that we load defaults on first launch of the dialog
       or when the combo is back to 0. I choose the second solution, because some clueless
       user might hit on delete a bit too much, but discussion is opened. -- jb */
    if( i_size == 0 )
    {
        profileCombo->addItem( PROFILE_NAME_6, QString( VALUE_6 ) );
        profileCombo->addItem( PROFILE_NAME_1, QString( VALUE_1 ) );
        profileCombo->addItem( PROFILE_NAME_2, QString( VALUE_2 ) );
        profileCombo->addItem( PROFILE_NAME_3, QString( VALUE_3 ) );
        profileCombo->addItem( PROFILE_NAME_4, QString( VALUE_4 ) );
        profileCombo->addItem( PROFILE_NAME_5, QString( VALUE_5 ) );
    }
    profileCombo->setCurrentIndex( -1 );

    /* Build and prepare our preview */
    PreviewWidget *previewWidget = new PreviewWidget( controller, controller1, controller2,
                                                      positionCheckbox->isChecked() );
    QGroupBox *previewBox = new QGroupBox( qtr("Preview"), this );
    previewBox->setLayout( new QVBoxLayout() );
    previewBox->layout()->addWidget( previewWidget );
    mainLayout->addWidget( previewBox, 5, 6, 3, 3 );
    CONNECT( positionCheckbox, stateChanged(int),
             previewWidget, setBarsTopPosition(int) );

    /* Buttons */
    QDialogButtonBox *okCancel = new QDialogButtonBox;
    QPushButton *okButton = new QPushButton( qtr( "Cl&ose" ), this );
    okButton->setDefault( true );
    QPushButton *cancelButton = new QPushButton( qtr( "&Cancel" ), this );
    okCancel->addButton( okButton, QDialogButtonBox::AcceptRole );
    okCancel->addButton( cancelButton, QDialogButtonBox::RejectRole );

    BUTTONACT( deleteButton, deleteProfile() );
    BUTTONACT( newButton, newProfile() );
    CONNECT( profileCombo, currentIndexChanged( int ), this, changeProfile( int ) );
    BUTTONACT( okButton, close() );
    BUTTONACT( cancelButton, cancel() );
    mainLayout->addWidget( okCancel, 8, 0, 1, 9 );
}
开发者ID:videolan,项目名称:vlc,代码行数:101,代码来源:toolbar.cpp


示例20: QVLCDialog

ConvertDialog::ConvertDialog( QWidget *parent, intf_thread_t *_p_intf,
                              const QString& inputMRL )
              : QVLCDialog( parent, _p_intf )
{
    setWindowTitle( qtr( "Convert" ) );
    setWindowRole( "vlc-convert" );

    QGridLayout *mainLayout = new QGridLayout( this );
    SoutInputBox *inputBox = new SoutInputBox( this );
    inputBox->setM 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ BUTTON_CHILD函数代码示例发布时间:2022-05-30
下一篇:
C++ BUS_RegBitWrite函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap