[vlc-devel] [PATCH 09/10] MED Support - Edit dialogs
Francois Cartegnie
fcvlcdev at free.fr
Sun Apr 6 09:33:58 CEST 2014
> +
> +private slots:
> + friend class Singleton<DeleteEventDialog>;
...
> +#ifdef __APPLE__
> + setWindowFlags( Qt::Drawer );
> +#else
> + setWindowFlags( Qt::Tool );
> +#endif
Dubious.
> + int64_t startTime = (int64_t) ( QTime( 0, 0, 0 ).msecsTo( startTimeEdit->time() ) ) * 1000;
> +
> + int64_t endTime = (int64_t) ( QTime( 0, 0, 0 ).msecsTo( endTimeEdit->time() ) ) * 1000;
INT64_C
> + QDialogButtonBox *editButtonBox = new QDialogButtonBox( Qt::Horizontal, this );
> + editButtonBox->addButton(
> + new QPushButton( qtr("&Edit"), this ), QDialogButtonBox::AcceptRole );
> +
> + QDialogButtonBox *closeButtonBox = new QDialogButtonBox( Qt::Horizontal, this );
> + closeButtonBox->addButton(
> + new QPushButton( qtr("&Cancel"), this ), QDialogButtonBox::RejectRole );
There should be only 1 button box per window.
> + if ( mainLayout != NULL )
> + {
> + QLayoutItem* item;
> + while ( ( item = mainLayout->takeAt( 0 ) ) != NULL )
> + {
> + delete item->widget();
> + delete item;
> + }
> + delete mainLayout;
> + mainLayout = NULL;
> + }
See Qt parent-child relationships
> + input_Control( p_input, INPUT_SET_TIME, jumpTime );
> + vlc_object_release( p_input );
> +}
> +
If you want to access/interact with input, do it through
Main/InputManager. Valid for many places.
> + startTimeIntro->setStyleSheet( "font: bold" );
font-weight
> + QTimeEdit *orgEndTime;
> + QLabel *endTimeIntro;
> + QTimeEdit *endTimeEdit;
> + QPushButton *focusEndButton;
> + QPushButton *resetEndButton;
Most controls likely do not need to be class member.
> +private slots:
> + friend class Singleton<EditEventDialog>;
????
More information about the vlc-devel
mailing list