add a simple config page to configure the identity settings (only the author at the moment)

svn path=/trunk/playground/graphics/okular/; revision=601342
This commit is contained in:
Pino Toscano 2006-11-02 22:47:52 +00:00
parent 5862ea6dc8
commit a3fad9594f
6 changed files with 136 additions and 0 deletions

View file

@ -33,6 +33,7 @@ set(okularcore_SRCS
conf/preferencesdialog.cpp
conf/dlgaccessibility.cpp
conf/dlggeneral.cpp
conf/dlgidentity.cpp
conf/dlgperformance.cpp
conf/dlgpresentation.cpp
core/annotations.cpp
@ -51,6 +52,7 @@ set(okularcore_SRCS
kde4_add_ui_files(okularcore_SRCS
conf/dlgaccessibilitybase.ui
conf/dlggeneralbase.ui
conf/dlgidentitybase.ui
conf/dlgperformancebase.ui
conf/dlgpresentationbase.ui
core/chooseenginewidget.ui

19
conf/dlgidentity.cpp Normal file
View file

@ -0,0 +1,19 @@
/***************************************************************************
* 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 "ui_dlgidentitybase.h"
#include "dlgidentity.h"
DlgIdentity::DlgIdentity( QWidget * parent )
: QWidget( parent )
{
m_dlg = new Ui_DlgIdentityBase();
m_dlg->setupUi( this );
}

26
conf/dlgidentity.h Normal file
View file

@ -0,0 +1,26 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef _DLGIDENTITY_H_
#define _DLGIDENTITY_H_
#include <qwidget.h>
class Ui_DlgIdentityBase;
class DlgIdentity : public QWidget
{
public:
DlgIdentity( QWidget * parent = 0 );
protected:
Ui_DlgIdentityBase * m_dlg;
};
#endif

83
conf/dlgidentitybase.ui Normal file
View file

@ -0,0 +1,83 @@
<ui version="4.0" >
<class>DlgIdentityBase</class>
<widget class="QWidget" name="DlgIdentityBase" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>381</width>
<height>155</height>
</rect>
</property>
<property name="windowTitle" >
<string>Form</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<string>Identity</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>&amp;Author:</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy" >
<cstring>kcfg_IdentityAuthor</cstring>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="kcfg_IdentityAuthor" />
</item>
<item row="1" column="0" colspan="2" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>&lt;b>Note&lt;/b>: the information here are used only for comments and reviews. Information inserted here will be transmitted only under your knowledge.</string>
</property>
<property name="alignment" >
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>4</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View file

@ -14,6 +14,7 @@
#include "dlgperformance.h"
#include "dlgaccessibility.h"
#include "dlgpresentation.h"
#include "dlgidentity.h"
// reimplementing this
#include "preferencesdialog.h"
@ -25,10 +26,13 @@ PreferencesDialog::PreferencesDialog( QWidget * parent, KConfigSkeleton * skelet
m_performance = new DlgPerformance(0);
m_accessibility = new DlgAccessibility(0);
m_presentation = new DlgPresentation(0);
m_identity = new DlgIdentity(0);
addPage( m_general, i18n("General"), "okular", i18n("General Options") );
addPage( m_accessibility, i18n("Accessibility"), "access", i18n("Reading Aids") );
addPage( m_performance, i18n("Performance"), "launch", i18n("Performance Tuning") );
addPage( m_presentation, i18n("Presentation"), "kpresenter_kpr",
i18n("Options for Presentation Mode") );
addPage( m_identity, i18n("Identity"), "identity",
i18n("Identity Settings") );
}

View file

@ -22,6 +22,7 @@ class DlgGeneral;
class DlgPerformance;
class DlgAccessibility;
class DlgPresentation;
class DlgIdentity;
class OKULAR_EXPORT PreferencesDialog : public KConfigDialog
{
@ -41,6 +42,7 @@ class OKULAR_EXPORT PreferencesDialog : public KConfigDialog
DlgPerformance * m_performance;
DlgAccessibility * m_accessibility;
DlgPresentation * m_presentation;
DlgIdentity * m_identity;
};
#endif