Adds an help menu with help and about.
Dialogs are still empty.
dialogs/extended \
dialogs/interaction \
dialogs/sout \
+ dialogs/help \
dialogs/open \
components/extended_panels \
components/infopanels \
dialogs/prefs_dialog.moc.cpp \
dialogs/interaction.moc.cpp \
dialogs/sout.moc.cpp \
+ dialogs/help.moc.cpp \
dialogs/open.moc.cpp \
components/extended_panels.moc.cpp \
components/infopanels.moc.cpp \
dialogs/errors.cpp \
dialogs/interaction.cpp \
dialogs/sout.cpp \
+ dialogs/help.cpp \
dialogs/open.cpp \
components/extended_panels.cpp \
components/infopanels.cpp \
dialogs/prefs_dialog.hpp \
dialogs/interaction.hpp \
dialogs/sout.hpp \
+ dialogs/help.hpp \
dialogs/open.hpp \
components/extended_panels.hpp \
components/infopanels.hpp \
--- /dev/null
+/*****************************************************************************
+ * Help.cpp : Help and About dialogs
+ ****************************************************************************
+ * Copyright (C) 2006 the VideoLAN team
+ * $Id: Messages.cpp 16024 2006-07-13 13:51:05Z xtophe $
+ *
+ * Authors: Jean-Baptiste Kempf <jb (at) videolan.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#include "dialogs/help.hpp"
+
+#include "dialogs_provider.hpp"
+#include "util/qvlcframe.hpp"
+#include "qt4.hpp"
+
+HelpDialog *HelpDialog::instance = NULL;
+
+HelpDialog::HelpDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
+{
+ setWindowTitle( qtr( "Help" ) );
+ resize(600, 400);
+
+ QGridLayout *layout = new QGridLayout(this);
+ QPushButton *closeButton = new QPushButton(qtr("&Close"));
+
+ BUTTONACT( closeButton, close() );
+}
+
+HelpDialog::~HelpDialog()
+{
+}
+void HelpDialog::close()
+{
+ this->toggleVisible();
+}
+
+AboutDialog *AboutDialog::instance = NULL;
+
+AboutDialog::AboutDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
+{
+ setWindowTitle( qtr( "About" ) );
+ resize(600, 400);
+
+ QGridLayout *layout = new QGridLayout(this);
+ QPushButton *closeButton = new QPushButton(qtr("&Close"));
+
+ BUTTONACT( closeButton, close() );
+}
+
+AboutDialog::~AboutDialog()
+{
+}
+void AboutDialog::close()
+{
+ this->toggleVisible();
+}
--- /dev/null
+/*****************************************************************************
+ * Help.hpp : Help and About dialogs
+ ****************************************************************************
+ * Copyright (C) 2006 the VideoLAN team
+ * $Id: Messages.hpp 16024 2006-07-13 13:51:05Z xtophe $
+ *
+ * Authors: Jean-Baptiste Kempf <jb (at) videolan.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/
+
+#ifndef _HELP_DIALOG_H_
+#define _HELP_DIALOG_H_
+
+#include "util/qvlcframe.hpp"
+
+class HelpDialog : public QVLCFrame
+{
+ Q_OBJECT;
+public:
+ static HelpDialog * getInstance( intf_thread_t *p_intf )
+ {
+ if( !instance)
+ instance = new HelpDialog( p_intf);
+ return instance;
+ }
+ virtual ~HelpDialog();
+
+private:
+ HelpDialog( intf_thread_t *);
+ static HelpDialog *instance;
+public slots:
+ void close();
+};
+
+
+class AboutDialog : public QVLCFrame
+{
+ Q_OBJECT;
+public:
+ static AboutDialog * getInstance( intf_thread_t *p_intf )
+ {
+ if( !instance)
+ instance = new AboutDialog( p_intf);
+ return instance;
+ }
+ virtual ~AboutDialog();
+
+private:
+ AboutDialog( intf_thread_t *);
+ static AboutDialog *instance;
+public slots:
+ void close();
+};
+
+#endif
#include "dialogs/extended.hpp"
#include "dialogs/sout.hpp"
#include "dialogs/open.hpp"
+#include "dialogs/help.hpp"
DialogsProvider* DialogsProvider::instance = NULL;
void DialogsProvider::MLAppendDialog()
{
}
-void DialogsProvider::openDialog( int i_dialog )
+void DialogsProvider::openDialog( int i_tab )
{
- OpenDialog::getInstance( p_intf )->toggleVisible();
+ OpenDialog::getInstance( p_intf )->showTab( i_tab );
}
void DialogsProvider::doInteraction( intf_dialog_args_t *p_arg )
MessagesDialog::getInstance( p_intf )->toggleVisible();
}
+void DialogsProvider::helpDialog()
+{
+ HelpDialog::getInstance( p_intf )->toggleVisible();
+}
+
+void DialogsProvider::aboutDialog()
+{
+ AboutDialog::getInstance( p_intf )->toggleVisible();
+}
+
void DialogsProvider::menuAction( QObject *data )
{
QVLCMenu::DoAction( p_intf, data );
void openMLDirectory();
void quit();
void switchToSkins();
+ void helpDialog();
+ void aboutDialog();
};
#endif
BAR_DADD( AudioMenu( p_intf, NULL ), qtr("Audio"), 2 );
BAR_DADD( NavigMenu( p_intf, NULL ), qtr("Navigation"), 3 );
- // BAR_ADD( HelpMenu(), qtr("Help" ) );
+ BAR_ADD( HelpMenu(), qtr("Help" ) );
}
QMenu *QVLCMenu::FileMenu()
{
return menu;
}
+QMenu *QVLCMenu::HelpMenu()
+{
+ QMenu *menu = new QMenu();
+ DP_SADD( qtr("Help") , "", "", helpDialog() );
+ menu->addSeparator();
+ DP_SADD( qtr("About VLC media player..."), "", "", aboutDialog() );
+ return menu;
+}
+
+
/*****************************************************************************
* Popup menus
*****************************************************************************/
static QMenu *VideoMenu( intf_thread_t * , QMenu * );
static QMenu *AudioMenu( intf_thread_t * , QMenu * );
static QMenu *InterfacesMenu( intf_thread_t *p_intf, QMenu * );
+ static QMenu *HelpMenu();
/* Popups */
static void AudioPopupMenu( intf_thread_t * );