void ChatWindow::init() { kdebugf(); setWindowRole("kadu-chat"); m_chatWidget = m_injectedFactory->makeInjected<ChatWidgetImpl>(m_chat, this); connect(m_chatWidget, SIGNAL(closeRequested(ChatWidget*)), this, SLOT(close())); if (m_chatWidget && m_chatWidget->chat().details() && m_chatWidget->chat().details()->type()) setWindowRole(m_chatWidget->chat().details()->type()->windowRole()); setAttribute(Qt::WA_DeleteOnClose); m_chatWidget->edit()->setFocus(); m_chatWidget->kaduRestoreGeometry(); QVBoxLayout *layout = new QVBoxLayout(this); layout->addWidget(m_chatWidget); layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(0); configurationUpdated(); updateTitle(); CustomPropertiesVariantWrapper *variantWrapper = new CustomPropertiesVariantWrapper( m_chatWidget->chat().data()->customProperties(), "chat-geometry:WindowGeometry", CustomProperties::Storable); new WindowGeometryManager(variantWrapper, defaultGeometry(), this); connect(m_chatWidget->title(), SIGNAL(titleChanged(ChatWidget*)), this, SLOT(updateTitle())); }
ScreenshotWidget::ScreenshotWidget(QWidget *parent) : QWidget( parent, Qt::CustomizeWindowHint | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint), ShotMode(ShotModeStandard) { setWindowRole("kadu-screenshot"); setFocusPolicy(Qt::StrongFocus); #if defined(Q_OS_UNIX) // set always-on-top and force taskbar and pager skipping Atom win_state = XInternAtom(QX11Info::display(), "_NET_WM_STATE", False); Atom win_state_setting[] = {XInternAtom(QX11Info::display(), "_NET_WM_STATE_ABOVE", False), XInternAtom(QX11Info::display(), "_NET_WM_STATE_SKIP_TASKBAR", False), XInternAtom(QX11Info::display(), "_NET_WM_STATE_SKIP_PAGER", False)}; XChangeProperty( QX11Info::display(), window()->winId(), win_state, XA_ATOM, 32, PropModeReplace, (unsigned char *)&win_state_setting, 3); // prevent compositing suspension on KDE4 setAttribute(Qt::WA_TranslucentBackground, true); #endif QHBoxLayout *layout = new QHBoxLayout(this); layout->setMargin(0); layout->setContentsMargins(0, 0, 0, 0); CropWidget = new CropImageWidget(this); connect(CropWidget, SIGNAL(pixmapCropped(QPixmap)), this, SLOT(pixmapCapturedSlot(QPixmap))); connect(CropWidget, SIGNAL(canceled()), this, SLOT(canceledSlot())); layout->addWidget(CropWidget); }
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() ); }
ConfigWizardWindow::ConfigWizardWindow(QWidget *parent) : QWizard(parent) { kdebugf(); setWindowRole("kadu-wizard"); setAttribute(Qt::WA_DeleteOnClose); setWindowTitle(tr("Kadu Wizard")); #ifdef Q_OS_MAC /* MacOSX has it's own QWizard style which requires much more space * than the other ones so we're forcing the ClassicStyle to unify * the window sizes and look. Mac users will love us for that. */ setWizardStyle(QWizard::ClassicStyle); #else #ifdef Q_OS_WIN // NOTE: Workaround for bug #1912. // TODO: Remove this as soon as QTBUG-10478 is fixed in // a release we bundle in the Windows build. setWizardStyle(QWizard::ModernStyle); #endif setMinimumSize(500, 500); #endif setPage(ProfilePage, new ConfigWizardProfilePage(this)); setPage(ChooseNetworkPage, new ConfigWizardChooseNetworkPage(this)); setPage(SetUpAccountPage, new ConfigWizardSetUpAccountPage(this)); setPage(CompletedPage, new ConfigWizardCompletedPage(this)); connect(this, SIGNAL(accepted()), this, SLOT(acceptedSlot())); connect(this, SIGNAL(rejected()), this, SLOT(rejectedSlot())); kdebugf2(); }
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(); }
ChatDataWindow::ChatDataWindow(ChatConfigurationWidgetFactoryRepository *chatConfigurationWidgetFactoryRepository, const Chat &chat) : QWidget(0, Qt::Dialog), MyChatConfigurationWidgetFactoryRepository(chatConfigurationWidgetFactoryRepository), ValueStateNotifier(new CompositeConfigurationValueStateNotifier(this)), SimpleStateNotifier(new SimpleConfigurationValueStateNotifier(this)), MyChat(chat), EditWidget(0) { setWindowRole("kadu-chat-data"); setAttribute(Qt::WA_DeleteOnClose); setWindowTitle(tr("Chat Properties - %1").arg(MyChat.display())); createGui(); new WindowGeometryManager(new ConfigFileVariantWrapper("General", "ChatDataWindowGeometry"), QRect(0, 50, 425, 500), this); connect(Core::instance()->chatManager(), SIGNAL(chatRemoved(Chat)), this, SLOT(chatRemoved(Chat))); SimpleStateNotifier->setState(StateNotChanged); ValueStateNotifier->addConfigurationValueStateNotifier(SimpleStateNotifier); connect(ValueStateNotifier, SIGNAL(stateChanged(ConfigurationValueState)), this, SLOT(stateChangedSlot(ConfigurationValueState))); stateChangedSlot(ValueStateNotifier->state()); if (MyChatConfigurationWidgetFactoryRepository) { connect(MyChatConfigurationWidgetFactoryRepository, SIGNAL(factoryRegistered(ChatConfigurationWidgetFactory*)), this, SLOT(factoryRegistered(ChatConfigurationWidgetFactory*))); connect(MyChatConfigurationWidgetFactoryRepository, SIGNAL(factoryUnregistered(ChatConfigurationWidgetFactory*)), this, SLOT(factoryUnregistered(ChatConfigurationWidgetFactory*))); foreach (ChatConfigurationWidgetFactory *factory, MyChatConfigurationWidgetFactoryRepository->factories()) factoryRegistered(factory); } }
ProxyEditWindow::ProxyEditWindow(QWidget *parent) : QWidget(parent), ForceProxyChange(false) { setWindowRole("kadu-proxy-configuration"); setAttribute(Qt::WA_DeleteOnClose); setWindowTitle(tr("Proxy Configuration")); }
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 }
ProgressWindow::ProgressWindow(const QString &label, QWidget *parent) : QDialog(parent), Label(label), Finished(false), Cancellable(false) { setAttribute(Qt::WA_DeleteOnClose); setWindowRole("kadu-progress"); createGui(); setFixedWidth(width()); }
void FirstRun::buildPrivDialog() { setWindowTitle( qtr( "Privacy and Network Access Policy" ) ); setWindowRole( "vlc-privacy" ); setWindowModality( Qt::ApplicationModal ); setWindowFlags( Qt::Dialog ); setAttribute( Qt::WA_DeleteOnClose ); QGridLayout *gLayout = new QGridLayout( this ); QGroupBox *blabla = new QGroupBox( qtr( "Privacy and Network Access Policy" ) ); QGridLayout *blablaLayout = new QGridLayout( blabla ); QLabel *text = new QLabel( qtr( "<p>In order to protect your privacy, <i>VLC media player</i> " "does <b>not</b> collect personal data or transmit them, " "not even in anonymized form, to anyone." "</p>\n" "<p>Nevertheless, <i>VLC</i> is able to automatically retrieve " "information about the media in your playlist from third party " "Internet-based services. This includes cover art, track names, " "artist names and other meta-data." "</p>\n" "<p>Consequently, this may entail identifying some of your media files to third party " "entities. Therefore the <i>VLC</i> developers require your express " "consent for the media player to access the Internet automatically." "</p>\n" ) ); text->setWordWrap( true ); text->setTextFormat( Qt::RichText ); blablaLayout->addWidget( text, 0, 0 ) ; QGroupBox *options = new QGroupBox( qtr( "Network Access Policy" ) ); QGridLayout *optionsLayout = new QGridLayout( options ); gLayout->addWidget( blabla, 0, 0, 1, 3 ); gLayout->addWidget( options, 1, 0, 1, 3 ); int line = 0; checkbox = new QCheckBox( qtr( "Automatically retrieve media info" ) ); checkbox->setChecked( true ); optionsLayout->addWidget( checkbox, line++, 0 ); #ifdef UPDATE_CHECK checkbox2 = new QCheckBox( qtr( "Regularly check for VLC updates" ) ); checkbox2->setChecked( true ); optionsLayout->addWidget( checkbox2, line++, 0 ); #endif QDialogButtonBox *buttonsBox = new QDialogButtonBox( this ); buttonsBox->addButton( qtr( "Continue" ), QDialogButtonBox::AcceptRole ); gLayout->addWidget( buttonsBox, 2, 0, 2, 3 ); CONNECT( buttonsBox, accepted(), this, save() ); buttonsBox->setFocus(); }
BuddyDeleteWindow::BuddyDeleteWindow(const BuddySet &buddiesToDelete, QWidget *parent) : QDialog(parent), BuddiesToDelete(buddiesToDelete) { setWindowRole("kadu-buddy-delete"); setAttribute(Qt::WA_DeleteOnClose); setModal(false); setMaximumHeight(250); }
void FirstRun::buildPrivDialog() { setWindowTitle( qtr( "Privacy and Network Access Policy" ) ); setWindowRole( "vlc-privacy" ); setWindowModality( Qt::ApplicationModal ); setWindowFlags( Qt::Dialog ); setAttribute( Qt::WA_DeleteOnClose ); QGridLayout *gLayout = new QGridLayout( this ); QGroupBox *blabla = new QGroupBox( qtr( "Privacy and Network Access Policy" ) ); QGridLayout *blablaLayout = new QGridLayout( blabla ); QLabel *text = new QLabel( qtr( "<p><i>VLC media player</i> does <b>not</b> send or collect any " "information, even anonymously, about your usage.</p>\n" "<p>However, it can connect to the Internet " "in order to display <b>medias information</b> " #ifdef UPDATE_CHECK "or to check for available <b>updates</b>" #endif ".</p>\n" "<p><i>VideoLAN</i> (the authors) requires you to express your consent " "before allowing this software to access the Internet.</p>\n" "<p>According to your choices, please check or uncheck the following options:</p>\n" ) ); text->setWordWrap( true ); text->setTextFormat( Qt::RichText ); blablaLayout->addWidget( text, 0, 0 ) ; QGroupBox *options = new QGroupBox( qtr( "Network Access Policy" ) ); QGridLayout *optionsLayout = new QGridLayout( options ); gLayout->addWidget( blabla, 0, 0, 1, 3 ); gLayout->addWidget( options, 1, 0, 1, 3 ); int line = 0; checkbox = new QCheckBox( qtr( "Allow downloading media information" ) ); checkbox->setChecked( true ); optionsLayout->addWidget( checkbox, line++, 0 ); #ifdef UPDATE_CHECK checkbox2 = new QCheckBox( qtr( "Allow checking for VLC updates" ) ); checkbox2->setChecked( true ); optionsLayout->addWidget( checkbox2, line++, 0 ); #endif QDialogButtonBox *buttonsBox = new QDialogButtonBox( this ); buttonsBox->addButton( qtr( "Save and Continue" ), QDialogButtonBox::AcceptRole ); gLayout->addWidget( buttonsBox, 2, 0, 2, 3 ); CONNECT( buttonsBox, accepted(), this, save() ); buttonsBox->setFocus(); }
ConfigurationWindow::ConfigurationWindow(const QString &name, const QString &caption, const QString §ion, ConfigurationWindowDataManager *dataManager, QWidget *parent) : QDialog(parent, Qt::Window), DesktopAwareObject(this), m_dataManager{dataManager}, Name(name), Section(section) { setWindowRole("kadu-configuration"); setAttribute(Qt::WA_DeleteOnClose); setWindowTitle(caption); }
void YourAccounts::init() { setWindowRole("kadu-your-accounts"); setAttribute(Qt::WA_DeleteOnClose); setWindowTitle(tr("Your accounts")); createGui(); AccountsView->selectionModel()->select(AccountsView->model()->index(0, 0), QItemSelectionModel::ClearAndSelect); new WindowGeometryManager(new ConfigFileVariantWrapper(m_configuration, "General", "YourAccountsWindowGeometry"), QRect(0, 50, 700, 500), this); }
AboutDialog::AboutDialog( intf_thread_t *_p_intf) : QVLCDialog( (QWidget*)_p_intf->p_sys->p_mi, _p_intf ) { /* Build UI */ ui.setupUi( this ); ui.closeButtonBox->addButton( new QPushButton( qtr("&Close"), this ), QDialogButtonBox::RejectRole ); setWindowTitle( qtr( "About" ) ); setWindowRole( "vlc-about" ); setMinimumSize( 600, 500 ); resize( 600, 500 ); setWindowModality( Qt::WindowModal ); CONNECT( ui.closeButtonBox, rejected(), this, close() ); ui.closeButtonBox->setFocus(); ui.introduction->setText( qtr( "VLC media player" ) + qfu( " " VERSION_MESSAGE ) ); if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY && var_InheritBool( p_intf, "qt-icon-change" ) ) ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128-xmas.png" ) ); else ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128.png" ) ); /* Main Introduction */ ui.infoLabel->setText( qtr( "VLC media player is a free media player, " "encoder and streamer that can read from files, " "CDs, DVDs, network streams, capture cards and even more!\n" "VLC uses its internal codecs and works on essentially every " "popular platform.\n\n" ) + qtr( "This version of VLC was compiled by:\n " ) + qfu( VLC_CompileBy() )+ " on " + qfu( VLC_CompileHost() ) + + " ("__DATE__" "__TIME__").\n" + qtr( "Compiler: " ) + qfu( VLC_Compiler() ) + ".\n" + qtr( "You are using the Qt Interface.\n\n" ) + qtr( "Copyright (C) " ) + COPYRIGHT_YEARS + qtr( " by the VideoLAN Team.\n" ) + "<a href=\"http://www.videolan.org\">http://www.videolan.org</a>" ); /* Be translators friendly: Convert to rich text */ ui.infoLabel->setText( ui.infoLabel->text().replace( "\n", "<br/>" ) ); /* GPL License */ ui.licenseEdit->setText( qfu( psz_license ) ); /* People who helped */ ui.thanksEdit->setText( qfu( psz_thanks ) ); /* People who wrote the software */ ui.authorsEdit->setText( qfu( psz_authors ) ); }
PlaylistDialog::PlaylistDialog( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) { setWindowTitle( qtr( "Playlist" ) ); setWindowRole( "vlc-playlist" ); setWindowOpacity( var_InheritFloat( p_intf, "qt-opacity" ) ); playlistWidget = new PlaylistWidget( p_intf, this ); setCentralWidget( playlistWidget ); readSettings( "playlistdialog", QSize( 600,700 ) ); }
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() ); }
YourAccounts::YourAccounts(QWidget *parent) : QWidget(parent), DesktopAwareObject(this), CurrentWidget(0), IsCurrentWidgetEditAccount(false), ForceWidgetChange(false), LastProtocol(0), CanRegisterFilter(new CanRegisterProtocolFilter()) { setWindowRole("kadu-your-accounts"); setAttribute(Qt::WA_DeleteOnClose); setWindowTitle(tr("Your accounts")); createGui(); AccountsView->selectionModel()->select(AccountsView->model()->index(0, 0), QItemSelectionModel::ClearAndSelect); new WindowGeometryManager(new ConfigFileVariantWrapper("General", "YourAccountsWindowGeometry"), QRect(0, 50, 700, 500), this); }
void HistoryWindow::init() { setWindowRole("kadu-history"); setAttribute(Qt::WA_DeleteOnClose); setWindowTitle(tr("History")); setWindowIcon(m_iconsManager->iconByPath(KaduIcon("kadu_icons/history"))); createGui(); new WindowGeometryManager(new ConfigFileVariantWrapper(m_configuration, "History", "HistoryWindowGeometry"), QRect(200, 200, 750, 500), this); connect(m_history, SIGNAL(storageChanged(HistoryStorage*)), this, SLOT(storageChanged(HistoryStorage*))); }
AboutDialog::AboutDialog( intf_thread_t *_p_intf) : QVLCDialog( (QWidget*)_p_intf->p_sys->p_mi, _p_intf ), b_advanced( false ) { /* Build UI */ ui.setupUi( this ); setWindowTitle( qtr( "About" ) ); setWindowRole( "vlc-about" ); setWindowModality( Qt::WindowModal ); ui.version->setText(qfu( " " VERSION_MESSAGE ) ); ui.title->setText("<html><head/><body><p><span style=\" font-size:26pt; color:#353535;\"> " + qtr( "VLC media player" ) + " </span></p></body></html>"); ui.MainBlabla->setText("<html><head/><body>" + qtr( "<p>VLC media player is a free and open source media player, encoder, and streamer made by the volunteers of the <a href=\"http://www.videolan.org/\"><span style=\" text-decoration: underline; color:#0057ae;\">VideoLAN</span></a> community.</p><p>VLC uses its internal codecs, works on essentially every popular platform, and can read almost all files, CDs, DVDs, network streams, capture cards and other media formats!</p><p><a href=\"http://www.videolan.org/contribute/\"><span style=\" text-decoration: underline; color:#0057ae;\">Help and join us!</span></a>" ) + "</p></body> </html>"); #if 0 if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY && var_InheritBool( p_intf, "qt-icon-change" ) ) ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128-xmas.png" ) ); else ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128.png" ) ); #endif #if 0 ifdef UPDATE_CHECK #else ui.update->hide(); #endif /* GPL License */ ui.licensePage->setText( qfu( psz_license ) ); /* People who helped */ ui.creditPage->setText( qfu( psz_thanks ) ); /* People who wrote the software */ ui.authorsPage->setText( qfu( psz_authors ) ); ui.licenseButton->setText( "<html><head/><body><p><span style=\" text-decoration: underline; color:#0057ae;\">"+qtr( "License" )+"</span></p></body></html>"); ui.licenseButton->installEventFilter( this ); ui.authorsButton->setText( "<html><head/><body><p><span style=\" text-decoration: underline; color:#0057ae;\">"+qtr( "Authors" )+"</span></p></body></html>"); ui.authorsButton->installEventFilter( this ); ui.creditsButton->setText( "<html><head/><body><p><span style=\" text-decoration: underline; color:#0057ae;\">"+qtr( "Credits" )+"</span></p></body></html>"); ui.creditsButton->installEventFilter( this ); ui.version->installEventFilter( this ); }
HistoryWindow::HistoryWindow(History *history, QWidget *parent) : QWidget(parent), m_history{history}, CurrentTab(-1) { setWindowRole("kadu-history"); setAttribute(Qt::WA_DeleteOnClose); setWindowTitle(tr("History")); setWindowIcon(KaduIcon("kadu_icons/history").icon()); createGui(); new WindowGeometryManager(new ConfigFileVariantWrapper("History", "HistoryWindowGeometry"), QRect(200, 200, 750, 500), this); connect(m_history, SIGNAL(storageChanged(HistoryStorage*)), this, SLOT(storageChanged(HistoryStorage*))); }
RendererDialog::RendererDialog( intf_thread_t *_p_intf ) : QVLCDialog( (QWidget*)_p_intf->p_sys->p_mi, _p_intf ) , p_rd( NULL ) , b_rd_started( false ) { setWindowTitle( qtr( "Renderer Output" ) ); setWindowRole( "vlc-renderer" ); /* Build Ui */ ui.setupUi( this ); CONNECT( ui.buttonBox, accepted(), this, accept() ); CONNECT( ui.buttonBox, rejected(), this, onReject() ); CONNECT( ui.receiversListWidget, itemDoubleClicked(QListWidgetItem*), this, accept()); QVLCTools::restoreWidgetPosition( p_intf, "Renderer", this, QSize( 400 , 440 ) ); }
ScreenshotWidget::ScreenshotWidget(QWidget *parent) : QWidget(parent), ButtonPressed(false), ShotMode(ShotModeStandard) { setWindowRole("kadu-screenshot"); setWindowFlags(Qt::Tool | Qt::CustomizeWindowHint | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); QHBoxLayout *layout = new QHBoxLayout(this); layout->setMargin(0); layout->setContentsMargins(0, 0, 0, 0); CropWidget = new CropImageWidget(this); connect(CropWidget, SIGNAL(pixmapCropped(QPixmap)), this, SLOT(pixmapCapturedSlot(QPixmap))); connect(CropWidget, SIGNAL(canceled()), this, SLOT(canceled())); layout->addWidget(CropWidget); }
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 ); }
void StatusWindow::init() { setWindowRole("kadu-status-window"); QString windowTitle = Container->subStatusContainers().count() > 1 ? tr("Change status") : tr("Change account status: %1").arg(Container->statusContainerName()); setWindowTitle(windowTitle); setAttribute(Qt::WA_DeleteOnClose); createLayout(); DescriptionCounter->setVisible(Container->maxDescriptionLength() > 0); setupStatusSelect(); QString description = m_statusSetter->manuallySetStatus(Container->subStatusContainers().first()).description(); setupDescriptionSelect(description); IgnoreNextTextChange = true; DescriptionEdit->setPlainText(description); descriptionEditTextChanged(); // not connected yet IgnoreNextTextChange = false; QTextCursor cursor = DescriptionEdit->textCursor(); cursor.movePosition(QTextCursor::End); DescriptionEdit->setTextCursor(cursor); DescriptionEdit->setFocus(); connect(DescriptionSelect, SIGNAL(currentIndexChanged(int)), this, SLOT(descriptionSelected(int))); connect(ClearDescriptionsHistoryButton, SIGNAL(clicked(bool)), this, SLOT(clearDescriptionsHistory())); connect(DescriptionEdit, SIGNAL(textChanged()), this, SLOT(descriptionEditTextChanged())); connect(EraseButton, SIGNAL(clicked(bool)), this, SLOT(eraseDescription())); connect(SetStatusButton, SIGNAL(clicked(bool)), this, SLOT(accept())); connect(CancelButton, SIGNAL(clicked(bool)), this, SLOT(reject())); connect(this, SIGNAL(accepted()), this, SLOT(applyStatus())); setFixedSize(sizeHint().expandedTo(QSize(460, 1))); }
QvisMessageWindow::QvisMessageWindow(MessageAttributes *msgAttr, const QString &captionString) : QvisWindowBase(captionString, Qt::Dialog), Observer(msgAttr) { setWindowRole("message"); preserveInformation = false; enableWarningPopups = true; // Create the central widget and the top layout. QWidget *central = new QWidget( this ); setCentralWidget( central ); QVBoxLayout *topLayout = new QVBoxLayout(central); topLayout->setMargin(10); // Create a multi line edit to display the message text. messageText = new QTextEdit(central); messageText->setWordWrapMode(QTextOption::WordWrap); messageText->setReadOnly(true); messageText->setMinimumWidth(3 * fontMetrics().width("Closed the compute " "engine on host sunburn.llnl.gov. ") / 2); messageText->setMinimumHeight(8 * fontMetrics().lineSpacing()); severityLabel = new QLabel(tr("Message"), central); severityLabel->setBuddy(messageText); QFont f("helvetica", 18); f.setBold(true); severityLabel->setFont(f); topLayout->addWidget(severityLabel); topLayout->addSpacing(10); topLayout->addWidget(messageText); topLayout->addSpacing(10); QHBoxLayout *buttonLayout = new QHBoxLayout(0); topLayout->addLayout(buttonLayout); // Create a button to hide the window. QPushButton *dismissButton = new QPushButton(tr("Dismiss"), central); buttonLayout->addStretch(10); buttonLayout->addWidget(dismissButton); connect(dismissButton, SIGNAL(clicked()), this, SLOT(doHide())); }
FileTransferWindow::FileTransferWindow(FileTransferManager *manager, QWidget *parent) : QFrame{parent}, DesktopAwareObject{this}, m_manager{manager} { new TaskbarProgress{manager, this}; setWindowRole("kadu-file-transfer"); createGui(); new WindowGeometryManager{new ConfigFileVariantWrapper{"General", "TransferWindowGeometry"}, QRect(200, 200, 500, 300), this}; for (auto &&fileTransfer : m_manager->items()) fileTransferAdded(fileTransfer); connect(m_manager, SIGNAL(fileTransferAdded(FileTransfer)), this, SLOT(fileTransferAdded(FileTransfer))); connect(m_manager, SIGNAL(fileTransferRemoved(FileTransfer)), this, SLOT(fileTransferRemoved(FileTransfer))); contentsChanged(); }
OpenUrlDialog::OpenUrlDialog( intf_thread_t *_p_intf, bool _bClipboard ) : QVLCDialog( (QWidget*)_p_intf->p_sys->p_mi, _p_intf ), bClipboard( _bClipboard ) { setWindowTitle( qtr( "Open URL" ) ); setWindowRole( "vlc-open-url" ); /* Buttons */ QPushButton *but; QDialogButtonBox *box = new QDialogButtonBox( this ); but = box->addButton( qtr( "&Play" ), QDialogButtonBox::AcceptRole ); CONNECT( but, clicked(), this, play() ); but = box->addButton( qtr( "&Enqueue" ), QDialogButtonBox::AcceptRole ); CONNECT( but, clicked(), this, enqueue() ); but = box->addButton( qtr( "&Cancel" ) , QDialogButtonBox::RejectRole ); CONNECT( box, rejected(), this, reject() ); /* Info label and line edit */ edit = new ClickLineEdit( qtr( "Enter URL here..." ), this ); edit->setValidator( new UrlValidator( edit ) ); QLabel *info = new QLabel( qtr( "Please enter the URL or path " "to the media you want to play."), this ); setToolTip( qtr( "If your clipboard contains a valid URL\n" "or the path to a file on your computer,\n" "it will be automatically selected." ) ); /* Layout */ QVBoxLayout *vlay = new QVBoxLayout( this ); vlay->addWidget( info ); vlay->addWidget( edit ); vlay->addWidget( box ); }
HelpDialog::HelpDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf ) { setWindowTitle( qtr( "Help" ) ); setWindowRole( "vlc-help" ); setMinimumSize( 350, 300 ); QVBoxLayout *layout = new QVBoxLayout( this ); QTextBrowser *helpBrowser = new QTextBrowser( this ); helpBrowser->setOpenExternalLinks( true ); helpBrowser->setHtml( qtr(I_LONGHELP) ); QDialogButtonBox *closeButtonBox = new QDialogButtonBox( this ); closeButtonBox->addButton( new QPushButton( qtr("&Close") ), QDialogButtonBox::RejectRole ); closeButtonBox->setFocus(); layout->addWidget( helpBrowser ); layout->addWidget( closeButtonBox ); CONNECT( closeButtonBox, rejected(), this, close() ); restoreWidgetPosition( "Help", QSize( 500, 450 ) ); }
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() ); BUTTONACT( selectButton, close() ); BUTTONACT( cancelButton, cancel() ); /* Hide the advancedPanel */ if( !getSettings()->value( "OpenDialog/advanced", false ).toBool()) { ui.advancedFrame->hide(); ui.advancedFrame->setEnabled( false ); } else ui.advancedCheckBox->setChecked( true ); /* Initialize caching */ storedMethod = ""; newCachingMethod( "file-caching" ); /* enforce section due to .ui bug */ ui.startTimeTimeEdit->setCurrentSection( QDateTimeEdit::SecondSection ); setMinimumSize( sizeHint() ); setMaximumWidth( 900 ); resize( getSettings()->value( "OpenDialog/size", QSize( 500, 400 ) ).toSize() ); }