mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 19:50:27 +00:00
![Michel Ludwig](/assets/img/avatar_default.png)
In viewer mode the part will now use a different XML GUI file (part-viewermode.rc). Also, some actions won't be created, e.g. those used for exporting stuff, for launching presentation mode, or for selecting parts of the document. The captions of the configuration dialogs also contain the word 'viewer' then.
49 lines
1.4 KiB
C++
49 lines
1.4 KiB
C++
/***************************************************************************
|
|
* Copyright (C) 2006 by Pino Toscano <toscano.pino@tiscali.it> *
|
|
* *
|
|
* 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. *
|
|
***************************************************************************/
|
|
|
|
#include "dlggeneral.h"
|
|
|
|
#include <kauthorized.h>
|
|
|
|
#include <config-okular.h>
|
|
|
|
#include "ui_dlggeneralbase.h"
|
|
|
|
DlgGeneral::DlgGeneral( QWidget * parent, Okular::EmbedMode embedMode )
|
|
: QWidget( parent )
|
|
{
|
|
m_dlg = new Ui_DlgGeneralBase();
|
|
m_dlg->setupUi( this );
|
|
|
|
if( embedMode == Okular::ViewerWidgetMode )
|
|
{
|
|
m_dlg->kcfg_SyncThumbnailsViewport->setVisible( false );
|
|
m_dlg->kcfg_DisplayDocumentTitle->setVisible( false );
|
|
m_dlg->kcfg_WatchFile->setVisible( false );
|
|
}
|
|
}
|
|
|
|
DlgGeneral::~DlgGeneral()
|
|
{
|
|
delete m_dlg;
|
|
}
|
|
|
|
void DlgGeneral::showEvent( QShowEvent * )
|
|
{
|
|
#if OKULAR_FORCE_DRM
|
|
m_dlg->kcfg_ObeyDRM->hide();
|
|
#else
|
|
if ( KAuthorized::authorize( "skip_drm" ) )
|
|
m_dlg->kcfg_ObeyDRM->show();
|
|
else
|
|
m_dlg->kcfg_ObeyDRM->hide();
|
|
#endif
|
|
}
|
|
|