2006-03-30 13:23:38 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* 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. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
2007-04-19 18:30:20 +00:00
|
|
|
#include "dlggeneral.h"
|
|
|
|
|
2006-03-30 13:23:38 +00:00
|
|
|
#include <kauthorized.h>
|
|
|
|
|
2006-05-20 12:35:11 +00:00
|
|
|
#include <config-okular.h>
|
2006-03-30 13:23:38 +00:00
|
|
|
|
2006-04-10 19:50:00 +00:00
|
|
|
#include "ui_dlggeneralbase.h"
|
2006-03-30 13:23:38 +00:00
|
|
|
|
2011-10-12 19:36:01 +00:00
|
|
|
DlgGeneral::DlgGeneral( QWidget * parent, Okular::EmbedMode embedMode )
|
2006-03-30 13:23:38 +00:00
|
|
|
: QWidget( parent )
|
|
|
|
{
|
|
|
|
m_dlg = new Ui_DlgGeneralBase();
|
|
|
|
m_dlg->setupUi( this );
|
2011-10-12 19:36:01 +00:00
|
|
|
|
|
|
|
if( embedMode == Okular::ViewerWidgetMode )
|
|
|
|
{
|
|
|
|
m_dlg->kcfg_SyncThumbnailsViewport->setVisible( false );
|
|
|
|
m_dlg->kcfg_DisplayDocumentTitle->setVisible( false );
|
|
|
|
m_dlg->kcfg_WatchFile->setVisible( false );
|
|
|
|
}
|
2006-03-30 13:23:38 +00:00
|
|
|
}
|
|
|
|
|
2007-06-08 22:29:07 +00:00
|
|
|
DlgGeneral::~DlgGeneral()
|
|
|
|
{
|
|
|
|
delete m_dlg;
|
|
|
|
}
|
|
|
|
|
2006-03-30 13:23:38 +00:00
|
|
|
void DlgGeneral::showEvent( QShowEvent * )
|
|
|
|
{
|
2006-05-20 12:35:11 +00:00
|
|
|
#if OKULAR_FORCE_DRM
|
2006-03-30 13:23:38 +00:00
|
|
|
m_dlg->kcfg_ObeyDRM->hide();
|
|
|
|
#else
|
|
|
|
if ( KAuthorized::authorize( "skip_drm" ) )
|
|
|
|
m_dlg->kcfg_ObeyDRM->show();
|
|
|
|
else
|
|
|
|
m_dlg->kcfg_ObeyDRM->hide();
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|