mirror of
https://invent.kde.org/graphics/okular
synced 2024-07-07 19:29:21 +00:00
Commit "Document information" patch by Luigi Toscano, 8 months without a nack from any devel and i like it, so let's commit it
Luigi's mail says ******** The attached patch changes a bit the handling of document informations and the informations shown in the info page. - document path is added to the information and a button allows you to toggle between to file name (default) and the complete path; - the number of the page is added to the information set by documentInfo() and not by the properties dialog (so the latter will not modify datas); - the order of the information shown is the fixed now (see orderedProperties). ********* Then there are a few things of my own since some const here and there and adding three values to Key enum Also it fixes wish 208999 BUGS: 208999 svn path=/trunk/KDE/kdegraphics/okular/; revision=1049872
This commit is contained in:
parent
f18659612f
commit
b9d749bc0d
|
@ -1868,6 +1868,10 @@ void Document::closeDocument()
|
||||||
d->m_allocatedTextPagesFifo.clear();
|
d->m_allocatedTextPagesFifo.clear();
|
||||||
d->m_pageSize = PageSize();
|
d->m_pageSize = PageSize();
|
||||||
d->m_pageSizes.clear();
|
d->m_pageSizes.clear();
|
||||||
|
|
||||||
|
delete d->m_documentInfo;
|
||||||
|
d->m_documentInfo = 0;
|
||||||
|
|
||||||
AudioPlayer::instance()->d->m_currentDocument = KUrl();
|
AudioPlayer::instance()->d->m_currentDocument = KUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1975,23 +1979,37 @@ bool Document::canConfigurePrinter( ) const
|
||||||
|
|
||||||
const DocumentInfo * Document::documentInfo() const
|
const DocumentInfo * Document::documentInfo() const
|
||||||
{
|
{
|
||||||
|
if ( d->m_documentInfo )
|
||||||
|
return d->m_documentInfo;
|
||||||
|
|
||||||
if ( d->m_generator )
|
if ( d->m_generator )
|
||||||
{
|
{
|
||||||
const DocumentInfo *infoConst = d->m_generator->generateDocumentInfo();
|
DocumentInfo *info = new DocumentInfo();
|
||||||
if ( !infoConst )
|
const DocumentInfo *tmp = d->m_generator->generateDocumentInfo();
|
||||||
return 0;
|
if ( tmp )
|
||||||
|
*info = *tmp;
|
||||||
|
|
||||||
DocumentInfo *info = const_cast< DocumentInfo * >( infoConst );
|
info->set( DocumentInfo::FilePath, currentDocument().url() );
|
||||||
QString pagesSize = d->pagesSizeString();
|
const QString pagesSize = d->pagesSizeString();
|
||||||
if ( d->m_docSize != -1 )
|
if ( d->m_docSize != -1 )
|
||||||
{
|
{
|
||||||
QString sizeString = KGlobal::locale()->formatByteSize( d->m_docSize );
|
const QString sizeString = KGlobal::locale()->formatByteSize( d->m_docSize );
|
||||||
info->set( "documentSize", sizeString, i18n( "File Size" ) );
|
info->set( DocumentInfo::DocumentSize, sizeString );
|
||||||
}
|
}
|
||||||
if (!pagesSize.isEmpty())
|
if (!pagesSize.isEmpty())
|
||||||
{
|
{
|
||||||
info->set( "pagesSize", pagesSize, i18n("Page Size") );
|
info->set( DocumentInfo::PagesSize, pagesSize );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const DocumentInfo::Key keyPages = DocumentInfo::Pages;
|
||||||
|
const QString keyString = DocumentInfo::getKeyString( keyPages );
|
||||||
|
|
||||||
|
if ( info->get( keyString ).isEmpty() ) {
|
||||||
|
info->set( keyString, QString::number( this->pages() ),
|
||||||
|
DocumentInfo::getKeyTitle( keyPages ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
d->m_documentInfo = info;
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
else return NULL;
|
else return NULL;
|
||||||
|
@ -3729,67 +3747,141 @@ void DocumentInfo::set( const QString &key, const QString &value,
|
||||||
docElement.appendChild( element );
|
docElement.appendChild( element );
|
||||||
}
|
}
|
||||||
|
|
||||||
void DocumentInfo::set( enum Key key, const QString &value )
|
void DocumentInfo::set( Key key, const QString &value )
|
||||||
{
|
{
|
||||||
switch ( key ) {
|
const QString keyString = getKeyString( key );
|
||||||
case Title:
|
if ( !keyString.isEmpty() )
|
||||||
set( "title", value, i18n( "Title" ) );
|
set( keyString, value, getKeyTitle( key ) );
|
||||||
break;
|
else
|
||||||
case Subject:
|
kWarning(OkularDebug) << "Invalid key passed";
|
||||||
set( "subject", value, i18n( "Subject" ) );
|
|
||||||
break;
|
|
||||||
case Description:
|
|
||||||
set( "description", value, i18n( "Description" ) );
|
|
||||||
break;
|
|
||||||
case Author:
|
|
||||||
set( "author", value, i18n( "Author" ) );
|
|
||||||
break;
|
|
||||||
case Creator:
|
|
||||||
set( "creator", value, i18n( "Creator" ) );
|
|
||||||
break;
|
|
||||||
case Producer:
|
|
||||||
set( "producer", value, i18n( "Producer" ) );
|
|
||||||
break;
|
|
||||||
case Copyright:
|
|
||||||
set( "copyright", value, i18n( "Copyright" ) );
|
|
||||||
break;
|
|
||||||
case Pages:
|
|
||||||
set( "pages", value, i18n( "Pages" ) );
|
|
||||||
break;
|
|
||||||
case CreationDate:
|
|
||||||
set( "creationDate", value, i18n( "Created" ) );
|
|
||||||
break;
|
|
||||||
case ModificationDate:
|
|
||||||
set( "modificationDate", value, i18n( "Modified" ) );
|
|
||||||
break;
|
|
||||||
case MimeType:
|
|
||||||
set( "mimeType", value, i18n( "Mime Type" ) );
|
|
||||||
break;
|
|
||||||
case Category:
|
|
||||||
set( "category", value, i18n( "Category" ) );
|
|
||||||
break;
|
|
||||||
case Keywords:
|
|
||||||
set( "keywords", value, i18n( "Keywords" ) );
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
kWarning(OkularDebug) << "Invalid key passed";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString DocumentInfo::get( const QString &key ) const
|
QString DocumentInfo::get( const QString &key ) const
|
||||||
{
|
{
|
||||||
QDomElement docElement = documentElement();
|
const QDomElement docElement = documentElement();
|
||||||
QDomElement element;
|
|
||||||
|
|
||||||
// check whether key already exists
|
// check whether key already exists
|
||||||
QDomNodeList list = docElement.elementsByTagName( key );
|
const QDomNodeList list = docElement.elementsByTagName( key );
|
||||||
if ( list.count() > 0 )
|
if ( list.count() > 0 )
|
||||||
return list.item( 0 ).toElement().attribute( "value" );
|
return list.item( 0 ).toElement().attribute( "value" );
|
||||||
else
|
else
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString DocumentInfo::getKeyString( Key key ) //const
|
||||||
|
{
|
||||||
|
switch ( key ) {
|
||||||
|
case Title:
|
||||||
|
return "title";
|
||||||
|
break;
|
||||||
|
case Subject:
|
||||||
|
return "subject";
|
||||||
|
break;
|
||||||
|
case Description:
|
||||||
|
return "description";
|
||||||
|
break;
|
||||||
|
case Author:
|
||||||
|
return "author";
|
||||||
|
break;
|
||||||
|
case Creator:
|
||||||
|
return "creator";
|
||||||
|
break;
|
||||||
|
case Producer:
|
||||||
|
return "producer";
|
||||||
|
break;
|
||||||
|
case Copyright:
|
||||||
|
return "copyright";
|
||||||
|
break;
|
||||||
|
case Pages:
|
||||||
|
return "pages";
|
||||||
|
break;
|
||||||
|
case CreationDate:
|
||||||
|
return "creationDate";
|
||||||
|
break;
|
||||||
|
case ModificationDate:
|
||||||
|
return "modificationDate";
|
||||||
|
break;
|
||||||
|
case MimeType:
|
||||||
|
return "mimeType";
|
||||||
|
break;
|
||||||
|
case Category:
|
||||||
|
return "category";
|
||||||
|
break;
|
||||||
|
case Keywords:
|
||||||
|
return "keywords";
|
||||||
|
break;
|
||||||
|
case FilePath:
|
||||||
|
return "filePath";
|
||||||
|
break;
|
||||||
|
case DocumentSize:
|
||||||
|
return "documentSize";
|
||||||
|
break;
|
||||||
|
case PagesSize:
|
||||||
|
return "pageSize";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return QString();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QString DocumentInfo::getKeyTitle( Key key ) //const
|
||||||
|
{
|
||||||
|
switch ( key ) {
|
||||||
|
case Title:
|
||||||
|
return i18n( "Title" );
|
||||||
|
break;
|
||||||
|
case Subject:
|
||||||
|
return i18n( "Subject" );
|
||||||
|
break;
|
||||||
|
case Description:
|
||||||
|
return i18n( "Description" );
|
||||||
|
break;
|
||||||
|
case Author:
|
||||||
|
return i18n( "Author" );
|
||||||
|
break;
|
||||||
|
case Creator:
|
||||||
|
return i18n( "Creator" );
|
||||||
|
break;
|
||||||
|
case Producer:
|
||||||
|
return i18n( "Producer" );
|
||||||
|
break;
|
||||||
|
case Copyright:
|
||||||
|
return i18n( "Copyright" );
|
||||||
|
break;
|
||||||
|
case Pages:
|
||||||
|
return i18n( "Pages" );
|
||||||
|
break;
|
||||||
|
case CreationDate:
|
||||||
|
return i18n( "Created" );
|
||||||
|
break;
|
||||||
|
case ModificationDate:
|
||||||
|
return i18n( "Modified" );
|
||||||
|
break;
|
||||||
|
case MimeType:
|
||||||
|
return i18n( "Mime Type" );
|
||||||
|
break;
|
||||||
|
case Category:
|
||||||
|
return i18n( "Category" );
|
||||||
|
break;
|
||||||
|
case Keywords:
|
||||||
|
return i18n( "Keywords" );
|
||||||
|
break;
|
||||||
|
case FilePath:
|
||||||
|
return i18n( "File Path" );
|
||||||
|
break;
|
||||||
|
case DocumentSize:
|
||||||
|
return i18n( "File Size" );
|
||||||
|
break;
|
||||||
|
case PagesSize:
|
||||||
|
return i18n("Page Size");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return QString();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/** DocumentSynopsis **/
|
/** DocumentSynopsis **/
|
||||||
|
|
||||||
|
|
|
@ -829,7 +829,10 @@ class OKULAR_EXPORT DocumentInfo : public QDomDocument
|
||||||
ModificationDate, ///< The date of last modification of the document
|
ModificationDate, ///< The date of last modification of the document
|
||||||
MimeType, ///< The mime type of the document
|
MimeType, ///< The mime type of the document
|
||||||
Category, ///< The category of the document
|
Category, ///< The category of the document
|
||||||
Keywords ///< The keywords which describe the content of the document
|
Keywords, ///< The keywords which describe the content of the document
|
||||||
|
FilePath, ///< The path of the file @since 0.10 (KDE 4.4)
|
||||||
|
DocumentSize, ///< The size of the document @since 0.10 (KDE 4.4)
|
||||||
|
PagesSize ///< The size of the pages (if all pages have the same size) @since 0.10 (KDE 4.4)
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -848,13 +851,26 @@ class OKULAR_EXPORT DocumentInfo : public QDomDocument
|
||||||
* Sets the value for a predefined key. You should use this method
|
* Sets the value for a predefined key. You should use this method
|
||||||
* whenever a predefined key exists for your value.
|
* whenever a predefined key exists for your value.
|
||||||
*/
|
*/
|
||||||
void set( enum Key, const QString &value );
|
void set( Key key, const QString &value );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the value for a given key or an empty string when the
|
* Returns the value for a given key or an empty string when the
|
||||||
* key doesn't exist.
|
* key doesn't exist.
|
||||||
*/
|
*/
|
||||||
QString get( const QString &key ) const;
|
QString get( const QString &key ) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the internal string for the given key
|
||||||
|
* @since 0.10 (KDE 4.4)
|
||||||
|
*/
|
||||||
|
static QString getKeyString( Key key );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the user visible string for the given key
|
||||||
|
* @since 0.10 (KDE 4.4)
|
||||||
|
*/
|
||||||
|
static QString getKeyTitle( Key key );
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -981,3 +997,5 @@ Q_DECLARE_METATYPE( Okular::DocumentInfo::Key )
|
||||||
Q_DECLARE_OPERATORS_FOR_FLAGS( Okular::Document::PixmapRequestFlags )
|
Q_DECLARE_OPERATORS_FOR_FLAGS( Okular::Document::PixmapRequestFlags )
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* kate: replace-tabs on; indent-width 4; */
|
||||||
|
|
|
@ -84,7 +84,8 @@ class DocumentPrivate
|
||||||
m_closingLoop( 0 ),
|
m_closingLoop( 0 ),
|
||||||
m_scripter( 0 ),
|
m_scripter( 0 ),
|
||||||
m_archiveData( 0 ),
|
m_archiveData( 0 ),
|
||||||
m_fontsCached( false )
|
m_fontsCached( false ),
|
||||||
|
m_documentInfo( 0 )
|
||||||
{
|
{
|
||||||
calculateMaxTextPages();
|
calculateMaxTextPages();
|
||||||
}
|
}
|
||||||
|
@ -220,6 +221,7 @@ class DocumentPrivate
|
||||||
|
|
||||||
QPointer< FontExtractionThread > m_fontThread;
|
QPointer< FontExtractionThread > m_fontThread;
|
||||||
bool m_fontsCached;
|
bool m_fontsCached;
|
||||||
|
DocumentInfo *m_documentInfo;
|
||||||
FontInfo::List m_fontsCache;
|
FontInfo::List m_fontsCache;
|
||||||
|
|
||||||
QSet< View * > m_views;
|
QSet< View * > m_views;
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include <qheaderview.h>
|
#include <qheaderview.h>
|
||||||
#include <qmenu.h>
|
#include <qmenu.h>
|
||||||
#include <qprogressbar.h>
|
#include <qprogressbar.h>
|
||||||
|
#include <qpushbutton.h>
|
||||||
#include <qsortfilterproxymodel.h>
|
#include <qsortfilterproxymodel.h>
|
||||||
#include <qtreeview.h>
|
#include <qtreeview.h>
|
||||||
#include <qtimer.h>
|
#include <qtimer.h>
|
||||||
|
@ -25,6 +26,7 @@
|
||||||
#include <kmessagebox.h>
|
#include <kmessagebox.h>
|
||||||
#include <ksqueezedtextlabel.h>
|
#include <ksqueezedtextlabel.h>
|
||||||
#include <kglobalsettings.h>
|
#include <kglobalsettings.h>
|
||||||
|
#include <kurl.h>
|
||||||
|
|
||||||
// local includes
|
// local includes
|
||||||
#include "core/document.h"
|
#include "core/document.h"
|
||||||
|
@ -57,6 +59,8 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, Okular::Document *doc)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_showingTitle = true;
|
||||||
|
|
||||||
// mime name based on mimetype id
|
// mime name based on mimetype id
|
||||||
QString mimeName = info->get( "mimeType" ).section( '/', -1 ).toUpper();
|
QString mimeName = info->get( "mimeType" ).section( '/', -1 ).toUpper();
|
||||||
setCaption( i18n( "%1 Properties", mimeName ) );
|
setCaption( i18n( "%1 Properties", mimeName ) );
|
||||||
|
@ -65,35 +69,69 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, Okular::Document *doc)
|
||||||
|
|
||||||
int row = 0;
|
int row = 0;
|
||||||
int valMaxWidth = 100;
|
int valMaxWidth = 100;
|
||||||
for ( QDomNode node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) {
|
|
||||||
QDomElement element = node.toElement();
|
|
||||||
|
|
||||||
QString titleString = element.attribute( "title" );
|
const QString filePathKey = Okular::DocumentInfo::getKeyString( Okular::DocumentInfo::FilePath );
|
||||||
QString valueString = element.attribute( "value" );
|
|
||||||
|
/* obtains the properties list, conveniently ordered */
|
||||||
|
QStringList orderedProperties;
|
||||||
|
orderedProperties << filePathKey
|
||||||
|
<< Okular::DocumentInfo::getKeyString( Okular::DocumentInfo::PagesSize )
|
||||||
|
<< Okular::DocumentInfo::getKeyString( Okular::DocumentInfo::DocumentSize );
|
||||||
|
for (Okular::DocumentInfo::Key ks = Okular::DocumentInfo::Title;
|
||||||
|
ks <= Okular::DocumentInfo::Keywords;
|
||||||
|
ks = Okular::DocumentInfo::Key( ks+1 ) ) {
|
||||||
|
orderedProperties << Okular::DocumentInfo::getKeyString( ks );
|
||||||
|
}
|
||||||
|
for ( QDomNode node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) {
|
||||||
|
const QDomElement element = node.toElement();
|
||||||
|
|
||||||
|
const QString titleString = element.attribute( "title" );
|
||||||
|
const QString valueString = element.attribute( "value" );
|
||||||
if ( titleString.isEmpty() || valueString.isEmpty() )
|
if ( titleString.isEmpty() || valueString.isEmpty() )
|
||||||
continue;
|
continue;
|
||||||
|
if ( !orderedProperties.contains( titleString ) )
|
||||||
// create labels and layout them
|
orderedProperties << titleString;
|
||||||
QLabel *key = new QLabel( i18n( "%1:", titleString ), page );
|
|
||||||
QLabel *value = new KSqueezedTextLabel( valueString, page );
|
|
||||||
value->setTextInteractionFlags( Qt::TextSelectableByMouse );
|
|
||||||
layout->addWidget( key, row, 0, Qt::AlignRight );
|
|
||||||
layout->addWidget( value, row, 1 );
|
|
||||||
row++;
|
|
||||||
|
|
||||||
// refine maximum width of 'value' labels
|
|
||||||
valMaxWidth = qMax( valMaxWidth, fontMetrics().width( valueString ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// add the number of pages if the generator hasn't done it already
|
QDomNodeList list;
|
||||||
QDomNodeList list = docElement.elementsByTagName( "pages" );
|
|
||||||
if ( list.count() == 0 ) {
|
for ( QStringList::Iterator it = orderedProperties.begin();
|
||||||
QLabel *key = new QLabel( i18n( "Pages:" ), page );
|
it != orderedProperties.end(); ++it ) {
|
||||||
QLabel *value = new QLabel( QString::number( doc->pages() ), page );
|
list = docElement.elementsByTagName( (*it) );
|
||||||
value->setTextInteractionFlags( Qt::TextSelectableByMouse );
|
if ( list.count() == 1 ) {
|
||||||
|
|
||||||
layout->addWidget( key, row, 0, Qt::AlignRight );
|
QDomElement element = list.at(0).toElement();
|
||||||
layout->addWidget( value, row, 1 );
|
const QString titleString = element.attribute( "title" );
|
||||||
|
const QString valueString = element.attribute( "value" );
|
||||||
|
if ( titleString.isEmpty() || valueString.isEmpty() )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// create labels and layout them
|
||||||
|
KSqueezedTextLabel *value = new KSqueezedTextLabel( valueString, page );
|
||||||
|
QWidget *key;
|
||||||
|
if ( element.tagName() == filePathKey ) {
|
||||||
|
m_toggleTitlePath = new QPushButton( page );
|
||||||
|
setToggleTitlePathText();
|
||||||
|
|
||||||
|
m_toggleTitlePath->setFlat( true );
|
||||||
|
connect( m_toggleTitlePath, SIGNAL( clicked() ), this, SLOT( filePathViewChanged() ) );
|
||||||
|
key = m_toggleTitlePath;
|
||||||
|
m_filePathNameLabel = value;
|
||||||
|
m_filePathName = valueString;
|
||||||
|
|
||||||
|
KUrl vurl( valueString );
|
||||||
|
value->setText( vurl.fileName() );
|
||||||
|
} else {
|
||||||
|
key = new QLabel( i18n( "%1:", titleString ), page );
|
||||||
|
}
|
||||||
|
value->setTextInteractionFlags( Qt::TextSelectableByMouse );
|
||||||
|
layout->addWidget( key, row, 0, Qt::AlignRight );
|
||||||
|
layout->addWidget( value, row, 1 );
|
||||||
|
row++;
|
||||||
|
|
||||||
|
// refine maximum width of 'value' labels
|
||||||
|
valMaxWidth = qMax( valMaxWidth, fontMetrics().width( valueString ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FONTS
|
// FONTS
|
||||||
|
@ -166,6 +204,29 @@ void PropertiesDialog::pageChanged( KPageWidgetItem *current, KPageWidgetItem *
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PropertiesDialog::setToggleTitlePathText()
|
||||||
|
{
|
||||||
|
QString text;
|
||||||
|
if (m_showingTitle)
|
||||||
|
{
|
||||||
|
text = i18nc( "%1 is \"Title\"", "%1:", Okular::DocumentInfo::getKeyTitle( Okular::DocumentInfo::Title ) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
text = i18nc( "%1 is \"File Path\"", "%1:", Okular::DocumentInfo::getKeyTitle( Okular::DocumentInfo::FilePath ) );
|
||||||
|
}
|
||||||
|
m_toggleTitlePath->setText( text );
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropertiesDialog::filePathViewChanged()
|
||||||
|
{
|
||||||
|
m_showingTitle = !m_showingTitle;
|
||||||
|
setToggleTitlePathText();
|
||||||
|
QString tmp(m_filePathName);
|
||||||
|
m_filePathName = m_filePathNameLabel->text();
|
||||||
|
m_filePathNameLabel->setText( tmp );
|
||||||
|
}
|
||||||
|
|
||||||
void PropertiesDialog::slotFontReadingProgress( int page )
|
void PropertiesDialog::slotFontReadingProgress( int page )
|
||||||
{
|
{
|
||||||
m_fontProgressBar->setValue( m_fontProgressBar->maximum() * ( page + 1 ) / m_document->pages() );
|
m_fontProgressBar->setValue( m_fontProgressBar->maximum() * ( page + 1 ) / m_document->pages() );
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
class QLabel;
|
class QLabel;
|
||||||
class QProgressBar;
|
class QProgressBar;
|
||||||
class FontsListModel;
|
class FontsListModel;
|
||||||
|
class KSqueezedTextLabel;
|
||||||
|
|
||||||
namespace Okular {
|
namespace Okular {
|
||||||
class Document;
|
class Document;
|
||||||
|
@ -35,18 +36,25 @@ class PropertiesDialog : public KPageDialog
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void pageChanged( KPageWidgetItem *, KPageWidgetItem * );
|
void pageChanged( KPageWidgetItem *, KPageWidgetItem * );
|
||||||
|
void filePathViewChanged();
|
||||||
void slotFontReadingProgress( int page );
|
void slotFontReadingProgress( int page );
|
||||||
void slotFontReadingEnded();
|
void slotFontReadingEnded();
|
||||||
void reallyStartFontReading();
|
void reallyStartFontReading();
|
||||||
void showFontsMenu(const QPoint &pos);
|
void showFontsMenu(const QPoint &pos);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void setToggleTitlePathText();
|
||||||
|
|
||||||
Okular::Document * m_document;
|
Okular::Document * m_document;
|
||||||
KPageWidgetItem * m_fontPage;
|
KPageWidgetItem * m_fontPage;
|
||||||
FontsListModel * m_fontModel;
|
FontsListModel * m_fontModel;
|
||||||
QLabel * m_fontInfo;
|
QLabel * m_fontInfo;
|
||||||
QProgressBar * m_fontProgressBar;
|
QProgressBar * m_fontProgressBar;
|
||||||
bool m_fontScanStarted;
|
bool m_fontScanStarted;
|
||||||
|
bool m_showingTitle;
|
||||||
|
QString m_filePathName;
|
||||||
|
KSqueezedTextLabel *m_filePathNameLabel;
|
||||||
|
QPushButton *m_toggleTitlePath;
|
||||||
};
|
};
|
||||||
|
|
||||||
class FontsListModel
|
class FontsListModel
|
||||||
|
|
Loading…
Reference in New Issue
Block a user