* added a simple dialog to show id3-tags and other info

 * finally added languages/subtitles selections menus, found and got fixed two
 bugs in kdelibs in the process, but only one of them will get into kde 3.1.
 * made the location of the ui.rc file configureable, usefull for testing.
parent cdde2391
......@@ -8,7 +8,9 @@ SOURCES_kde = \
modules/gui/kde/preferences.cpp \
modules/gui/kde/pluginsbox.cpp \
modules/gui/kde/QConfigItem.cpp \
modules/gui/kde/messages.cpp
modules/gui/kde/messages.cpp \
modules/gui/kde/info.cpp \
modules/gui/kde/languagemenu.cpp
nodist_SOURCES_kde = \
modules/gui/kde/interface.moc.cpp \
......@@ -19,7 +21,9 @@ nodist_SOURCES_kde = \
modules/gui/kde/preferences.moc.cpp \
modules/gui/kde/pluginsbox.moc.cpp \
modules/gui/kde/QConfigItem.moc.cpp \
modules/gui/kde/messages.moc.cpp
modules/gui/kde/messages.moc.cpp \
modules/gui/kde/info.moc.cpp \
modules/gui/kde/languagemenu.moc.cpp
noinst_HEADERS += \
modules/gui/kde/common.h \
......@@ -31,7 +35,9 @@ noinst_HEADERS += \
modules/gui/kde/pluginsbox.h \
modules/gui/kde/preferences.h \
modules/gui/kde/slider.h \
modules/gui/kde/messages.h
modules/gui/kde/messages.h \
modules/gui/kde/info.h \
modules/gui/kde/languagemenu.h
modules/gui/kde/interface.moc.cpp: modules/gui/kde/interface.h
$(MOC) $< -o $@
......@@ -51,5 +57,11 @@ modules/gui/kde/QConfigItem.moc.cpp: modules/gui/kde/QConfigItem.h
$(MOC) $< -o $@
modules/gui/kde/messages.moc.cpp: modules/gui/kde/messages.h
$(MOC) $< -o $@
modules/gui/kde/info.moc.cpp: modules/gui/kde/info.h
$(MOC) $< -o $@
modules/gui/kde/languagemenu.moc.cpp: modules/gui/kde/languagemenu.h
$(MOC) $< -o $@
kdedatadir = $(datadir)\vlc
EXTRA_DIST += modules/gui/kde/ui.rc
dist_kdedata_DATA = modules/gui/kde/ui.rc
\ No newline at end of file
#include "info.h"
#include "common.h"
#include <qtextview.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qvbox.h>
KInfoWindow::KInfoWindow( intf_thread_t * p_intf, input_thread_t *p_input ) :
KDialogBase( Tabbed, _( "Messages" ), Ok, Ok, 0, 0, false)
{
// clearWFlags(~0);
// setWFlags(WType_TopLevel);
setSizeGripEnabled(true);
vlc_mutex_lock( &p_input->stream.stream_lock );
input_info_category_t *p_category = p_input->stream.p_info;
while ( p_category )
{
QFrame *page = addPage( QString(p_category->psz_name) );
QVBoxLayout *toplayout = new QVBoxLayout( page);
QVBox *category_table = new QVBox(page);
toplayout->addWidget(category_table);
toplayout->setResizeMode(QLayout::FreeResize);
toplayout->addStretch(10);
category_table->setSpacing(spacingHint());
input_info_t *p_info = p_category->p_info;
while ( p_info )
{
QHBox *hb = new QHBox( category_table );
new QLabel( QString(p_info->psz_name) + ":", hb );
new QLabel( p_info->psz_value, hb );
p_info = p_info->p_next;
}
p_category = p_category->p_next;
}
vlc_mutex_unlock( &p_input->stream.stream_lock );
resize(300,400);
show();
}
KInfoWindow::~KInfoWindow()
{
;
}
#include <kdialogbase.h>
#include "common.h"
class KInfoWindow : public KDialogBase
{
Q_OBJECT
public:
KInfoWindow( intf_thread_t*, input_thread_t * );
~KInfoWindow();
};
This diff is collapsed.
......@@ -11,6 +11,7 @@
#include "common.h"
#include <kaction.h>
#include <kmainwindow.h>
#include <kapplication.h>
#include <kurl.h>
......@@ -44,9 +45,6 @@ class KInterface : public KMainWindow
void slotFileOpen();
/** opens a file from the recent files menu */
void slotFileOpenRecent(const KURL& url);
/** asks for saving if the file is modified, then closes the
* actual file and window*/
void slotFileClose();
/** closes all open windows by calling close() on each
* memberList item until the list is empty, then quits the
* application. If queryClose() returns false because the
......@@ -68,6 +66,8 @@ class KInterface : public KMainWindow
*/
void slotStatusMsg( const QString &text );
void slotShowMessages();
void slotShowInfo();
void slotSetLanguage( bool, es_descriptor_t * );
protected:
/** initializes the KActions of the application */
......@@ -84,11 +84,13 @@ class KInterface : public KMainWindow
void slotManage();
/** this slot is called when we drag the position seek bar */
void slotSliderMoved( int position );
void slotSliderMoved( int );
/** called every time the slider changes values */
void slotSliderChanged( int position );
void slotUpdateLanguages();
void slotOpenDisk();
void slotOpenStream();
......@@ -102,6 +104,7 @@ class KInterface : public KMainWindow
void slotNext();
private:
void languageMenus( KActionMenu *, es_descriptor_t *, int );
intf_thread_t *p_intf;
KMessagesWindow *p_messagesWindow;
......@@ -125,7 +128,6 @@ class KInterface : public KMainWindow
KAction *diskOpen;
KAction *streamOpen;
KRecentFilesAction *fileOpenRecent;
KAction *fileClose;
KAction *fileQuit;
KToggleAction *viewToolBar;
KToggleAction *viewStatusBar;
......@@ -139,6 +141,14 @@ class KInterface : public KMainWindow
KAction *next;
KAction *messages;
KAction *preferences;
KAction *info;
KActionMenu *languages;
KActionMenu *subtitles;
KActionCollection *languageCollection;
KActionCollection *subtitleCollection;
KActionMenu *program;
KActionMenu *title;
KActionMenu *chapter;
};
/*****************************************************************************
......@@ -149,6 +159,7 @@ struct intf_sys_t
KApplication *p_app;
KInterface *p_window;
KAboutData *p_about;
int b_playing;
input_thread_t *p_input;
msg_subscription_t *p_msg;
......
......@@ -2,7 +2,7 @@
* kde.cpp : KDE plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: kde.cpp,v 1.3 2002/10/03 10:15:01 sigmunau Exp $
* $Id: kde.cpp,v 1.4 2002/10/27 23:10:19 sigmunau Exp $
*
* Authors: Andres Krapf <dae@chez.com> Sun Mar 25 2001
*
......@@ -55,6 +55,8 @@ vlc_module_begin();
#else
int i = getenv( "DISPLAY" ) == NULL ? 8 : 85;
#endif
add_category_hint( "kde", NULL );
add_file( "kdeuirc", "", NULL, N_( "Path to ui.rc file" ), NULL );
set_description( _("KDE interface module") );
set_capability( "interface", i );
set_program( "kvlc" );
......
#include "languagemenu.h"
KLanguageMenuAction::KLanguageMenuAction( intf_thread_t *p_intf, const QString &text, es_descriptor_t * p_es, QObject *parent) : KRadioAction( text,0,parent), p_es(p_es), p_intf(p_intf)
{
;
}
void KLanguageMenuAction::setChecked( bool on )
{
if ( on != isChecked() )
{
emit toggled( on, p_es );
KRadioAction::setChecked( on );
}
}
KLanguageMenuAction::~KLanguageMenuAction()
{
}
#include <kaction.h>
#include "common.h"
class KLanguageMenuAction : public KRadioAction
{
Q_OBJECT
public:
KLanguageMenuAction(intf_thread_t*, const QString&, es_descriptor_t *, QObject *);
~KLanguageMenuAction();
signals:
void toggled( bool, es_descriptor_t *);
public slots:
void setChecked( bool );
private:
es_descriptor_t *p_es;
intf_thread_t *p_intf;
};
......@@ -15,18 +15,24 @@
</ActionProperties>
<MenuBar>
<Menu name="file" noMerge="1">
<Menu name="file">
<text>&amp;File</text>
<Action name="file_open"/>
<Action name="file_open_recent"/>
<Action name="open_disk"/>
<Action name="open_stream"/>
<Separator lineSeparator="true"/>
<Action name="file_quit"/>
</Menu>
<Menu name="view" noMerge="1">
<Menu name="view">
<text>&amp;View</text>
<Action name="program"/>
<Action name="title"/>
<Action name="chapter"/>
<Separator lineSeparator="true"/>
<Action name="view_messages"/>
<Action name="view_stream_info"/>
</Menu>
<Menu name="settings">
<text>&amp;Settings</text>
<Action name="language"/>
<Action name="subtitles"/>
</Menu>
</MenuBar>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment