Changeset d0f00ee670c147f64e39d552767aa4924a77126a
- Timestamp:
- 10/06/07 15:40:16
(1 year ago)
- Author:
- Jean-Baptiste Kempf <jb@videolan.org>
- git-committer:
- Jean-Baptiste Kempf <jb@videolan.org> 1191678016 +0000
- git-parent:
[f913159da06612d0278f87bd8160dafaa8a30b53]
- git-author:
- Jean-Baptiste Kempf <jb@videolan.org> 1191678016 +0000
- Message:
Qt4: podcast configuration, don't use a modal window, don't use a Qdailog but a QVLCFrame.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r6ee1e19 |
rd0f00ee |
|
| 24 | 24 | #include "podcast_configuration.hpp" |
|---|
| 25 | 25 | |
|---|
| 26 | | PodcastConfigurationDialog::PodcastConfigurationDialog( intf_thread_t *_p_intf ) |
|---|
| 27 | | :p_intf( _p_intf ) |
|---|
| | 26 | PodcastConfigDialog *PodcastConfigDialog::instance = NULL; |
|---|
| | 27 | |
|---|
| | 28 | PodcastConfigDialog::PodcastConfigDialog( intf_thread_t *_p_intf) |
|---|
| | 29 | : QVLCFrame( _p_intf ) |
|---|
| | 30 | |
|---|
| 28 | 31 | { |
|---|
| 29 | 32 | ui.setupUi( this ); |
|---|
| 30 | | |
|---|
| | 33 | |
|---|
| 31 | 34 | QPushButton *okButton = new QPushButton( qtr( "OK" ), this ); |
|---|
| 32 | 35 | QPushButton *cancelButton = new QPushButton( qtr( "Cancel" ), this ); |
|---|
| … | … | |
| 52 | 55 | } |
|---|
| 53 | 56 | |
|---|
| 54 | | void PodcastConfigurationDialog::accept() |
|---|
| | 57 | PodcastConfigDialog::~PodcastConfigDialog() |
|---|
| | 58 | { |
|---|
| | 59 | } |
|---|
| | 60 | |
|---|
| | 61 | void PodcastConfigDialog::accept() |
|---|
| 55 | 62 | { |
|---|
| 56 | 63 | QString urls = ""; |
|---|
| … | … | |
| 75 | 82 | msg_Dbg( p_intf, "You will need to reload the podcast module to take into account deleted podcast urls" ); |
|---|
| 76 | 83 | } |
|---|
| 77 | | |
|---|
| 78 | | QDialog::accept(); |
|---|
| 79 | 84 | } |
|---|
| 80 | 85 | |
|---|
| 81 | | void PodcastConfigurationDialog::add() |
|---|
| | 86 | void PodcastConfigDialog::add() |
|---|
| 82 | 87 | { |
|---|
| 83 | 88 | if( ui.podcastURL->text() != QString( "" ) ) |
|---|
| … | … | |
| 88 | 93 | } |
|---|
| 89 | 94 | |
|---|
| 90 | | void PodcastConfigurationDialog::remove() |
|---|
| | 95 | void PodcastConfigDialog::remove() |
|---|
| 91 | 96 | { |
|---|
| 92 | 97 | delete ui.podcastList->currentItem(); |
|---|
| re4bbf1c |
rd0f00ee |
|
| 25 | 25 | #define _PODCAST_CONFIGURATION_DIALOG_H_ |
|---|
| 26 | 26 | |
|---|
| 27 | | #include "qt4.hpp" |
|---|
| | 27 | #include "util/qvlcframe.hpp" |
|---|
| 28 | 28 | #include "ui/podcast_configuration.h" |
|---|
| 29 | 29 | |
|---|
| 30 | | class PodcastConfigurationDialog : public QDialog |
|---|
| | 30 | class PodcastConfigDialog : public QVLCFrame |
|---|
| 31 | 31 | { |
|---|
| 32 | 32 | Q_OBJECT; |
|---|
| 33 | | |
|---|
| 34 | 33 | public: |
|---|
| 35 | | PodcastConfigurationDialog( intf_thread_t *p_intf ); |
|---|
| | 34 | static PodcastConfigDialog * getInstance( intf_thread_t *p_intf ) |
|---|
| | 35 | { |
|---|
| | 36 | if( !instance) |
|---|
| | 37 | instance = new PodcastConfigDialog( p_intf ); |
|---|
| | 38 | return instance; |
|---|
| | 39 | } |
|---|
| | 40 | virtual ~PodcastConfigDialog(); |
|---|
| 36 | 41 | |
|---|
| 37 | 42 | private: |
|---|
| | 43 | PodcastConfigDialog( intf_thread_t *); |
|---|
| | 44 | static PodcastConfigDialog *instance; |
|---|
| 38 | 45 | Ui::PodcastConfiguration ui; |
|---|
| 39 | | intf_thread_t *p_intf; |
|---|
| 40 | | |
|---|
| 41 | | private slots: |
|---|
| | 46 | public slots: |
|---|
| 42 | 47 | void accept(); |
|---|
| 43 | 48 | void add(); |
|---|
| r0d41ec4 |
rd0f00ee |
|
| 111 | 111 | case INTF_DIALOG_EXTENDED: |
|---|
| 112 | 112 | extendedDialog(); break; |
|---|
| 113 | | /* We might want to make it better with custom functions */ |
|---|
| | 113 | case INTF_DIALOG_VLM: |
|---|
| | 114 | vlmDialog(); break; |
|---|
| | 115 | case INTF_DIALOG_INTERACTION: |
|---|
| | 116 | doInteraction( de->p_arg ); break; |
|---|
| 114 | 117 | case INTF_DIALOG_POPUPMENU: |
|---|
| 115 | 118 | QVLCMenu::PopupMenu( p_intf, (de->i_arg != 0) ); break; |
|---|
| … | … | |
| 120 | 123 | case INTF_DIALOG_MISCPOPUPMENU: |
|---|
| 121 | 124 | QVLCMenu::MiscPopupMenu( p_intf ); break; |
|---|
| 122 | | case INTF_DIALOG_INTERACTION: |
|---|
| 123 | | doInteraction( de->p_arg ); break; |
|---|
| 124 | | case INTF_DIALOG_VLM: |
|---|
| 125 | | vlmDialog(); break; |
|---|
| 126 | 125 | case INTF_DIALOG_WIZARD: |
|---|
| 127 | 126 | case INTF_DIALOG_STREAMWIZARD: |
|---|
| … | … | |
| 191 | 190 | /* BookmarkDialog::getInstance( p_intf )->toggleVisible(); */ |
|---|
| 192 | 191 | } |
|---|
| | 192 | |
|---|
| | 193 | void DialogsProvider::podcastConfigureDialog() |
|---|
| | 194 | { |
|---|
| | 195 | PodcastConfigDialog::getInstance( p_intf )->toggleVisible(); |
|---|
| | 196 | } |
|---|
| | 197 | |
|---|
| 193 | 198 | |
|---|
| 194 | 199 | /**************************************************************************** |
|---|
| … | … | |
| 504 | 509 | } |
|---|
| 505 | 510 | |
|---|
| 506 | | void DialogsProvider::podcastConfigureDialog() |
|---|
| 507 | | { |
|---|
| 508 | | PodcastConfigurationDialog c( p_intf ); |
|---|
| 509 | | c.exec(); |
|---|
| 510 | | } |
|---|
| 511 | | |
|---|
| 512 | 511 | void DialogsProvider::switchToSkins() |
|---|
| 513 | 512 | { |
|---|
| r7b19600 |
rd0f00ee |
|
| 1 | 1 | <ui version="4.0" > |
|---|
| 2 | 2 | <class>PodcastConfiguration</class> |
|---|
| 3 | | <widget class="QDialog" name="PodcastConfiguration" > |
|---|
| | 3 | <widget class="QWidget" name="PodcastConfiguration" > |
|---|
| 4 | 4 | <property name="geometry" > |
|---|
| 5 | 5 | <rect> |
|---|