forked from len0rd/rockbox
Move manual tab contents to separate widget.
Create a new widget which holds the contents of the manual tab and its logic. Unify its display / download code. Fixes FS#12587, which was caused by duplicated code. Change-Id: I5721d2a95ebeaf80481c1fd149eda22cf1328501
This commit is contained in:
parent
3933afcc09
commit
f7fdf13468
8 changed files with 317 additions and 190 deletions
46
rbutil/rbutilqt/gui/manualwidget.h
Normal file
46
rbutil/rbutilqt/gui/manualwidget.h
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
*
|
||||
* Copyright (C) 2012 by Dominik Riebeling
|
||||
*
|
||||
* All files in this archive are subject to the GNU General Public License.
|
||||
* See the file COPYING in the source tree root for full license agreement.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef MANUALWIDGET_H
|
||||
#define MANUALWIDGET_H
|
||||
|
||||
#include <QtGui>
|
||||
#include "ui_manualwidgetfrm.h"
|
||||
|
||||
class ManualWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum ManualFormat {
|
||||
ManualPdf,
|
||||
ManualHtml,
|
||||
ManualZip,
|
||||
};
|
||||
ManualWidget(QWidget *parent = 0);
|
||||
|
||||
public slots:
|
||||
void downloadManual(void);
|
||||
void updateManual();
|
||||
QString manualUrl(ManualFormat format);
|
||||
|
||||
private:
|
||||
Ui::ManualWidgetFrm ui;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue