1 /***************************************************************************
2 interface.h - description
4 begin : Sun Mar 25 2001
5 copyright : (C) 2001 by andres
7 ***************************************************************************/
9 #ifndef _KDE_INTERFACE_H_
10 #define _KDE_INTERFACE_H_
15 #include <kmainwindow.h>
16 #include <kapplication.h>
18 #include <qdragobject.h>
26 class KRecentFilesAction;
31 /**Main Window for the KDE vlc interface
35 class KInterface : public KMainWindow
39 KInterface(intf_thread_t *p_intf, QWidget *parent=0,
44 /** open a file and load it into the document*/
46 /** opens a file from the recent files menu */
47 void slotFileOpenRecent(const KURL& url);
48 /** closes all open windows by calling close() on each
49 * memberList item until the list is empty, then quits the
50 * application. If queryClose() returns false because the
51 * user canceled the saveModified() dialog, the closing
55 void slotShowPreferences();
57 /** toggles the toolbar
59 void slotViewToolBar();
60 /** toggles the statusbar
62 void slotViewStatusBar();
63 /** changes the statusbar contents for the standard label
64 * permanently, used to indicate current actions.
65 * @param text the text that is displayed in the statusbar
67 void slotStatusMsg( const QString &text );
68 void slotShowMessages();
70 void slotSetLanguage( bool, es_descriptor_t * );
73 /** initializes the KActions of the application */
75 /** sets up the statusbar for the main window by initialzing a statuslabel.
79 virtual void dragEnterEvent( QDragEnterEvent *event );
80 virtual void dropEvent( QDropEvent *event );
83 /** we use this to manage the communication with the vlc core */
86 /** this slot is called when we drag the position seek bar */
87 void slotSliderMoved( int );
89 /** called every time the slider changes values */
90 void slotSliderChanged( int position );
92 void slotUpdateLanguages();
95 void slotOpenStream();
107 void languageMenus( KActionMenu *, es_descriptor_t *, int );
109 intf_thread_t *p_intf;
110 KMessagesWindow *p_messagesWindow;
112 /** to call p_intf->pf_manage every now and then */
115 /** slider which works well with user movement */
119 KDiskDialog *fDiskDialog;
121 /** open net stream */
122 KNetDialog *fNetDialog;
124 KTitleMenu *fTitleMenu;
126 // KAction pointers to enable/disable actions
130 KRecentFilesAction *fileOpenRecent;
132 KToggleAction *viewToolBar;
133 KToggleAction *viewStatusBar;
143 KAction *preferences;
145 KActionMenu *languages;
146 KActionMenu *subtitles;
147 KActionCollection *languageCollection;
148 KActionCollection *subtitleCollection;
149 KActionMenu *program;
151 KActionMenu *chapter;
154 /*****************************************************************************
155 * intf_sys_t: description and status of KDE interface
156 *****************************************************************************/
160 KInterface *p_window;
164 input_thread_t *p_input;
165 msg_subscription_t *p_msg;
168 #endif /* _KDE_INTERFACE_H_ */