1 /***************************************************************************
2 * Copyright (C) 2004 by Albert Astals Cid <tsdgeos@terra.es> *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 ***************************************************************************/
10 #ifndef _PROPERTIESDIALOG_H_
11 #define _PROPERTIESDIALOG_H_
13 #include <qabstractitemmodel.h>
16 #include <kpagedialog.h>
18 #include "core/fontinfo.h"
28 class PropertiesDialog
: public KPageDialog
33 PropertiesDialog( QWidget
*parent
, Okular::Document
*doc
);
34 virtual ~PropertiesDialog();
37 void pageChanged( KPageWidgetItem
*, KPageWidgetItem
* );
38 void slotFontReadingProgress( int page
);
39 void slotFontReadingEnded();
40 void reallyStartFontReading();
41 void showFontsMenu(const QPoint
&pos
);
44 Okular::Document
* m_document
;
45 KPageWidgetItem
* m_fontPage
;
46 FontsListModel
* m_fontModel
;
48 QProgressBar
* m_fontProgressBar
;
49 bool m_fontScanStarted
;
53 : public QAbstractTableModel
58 FontsListModel( QObject
* parent
= 0 );
59 virtual ~FontsListModel();
61 // reimplementations from QAbstractTableModel
62 virtual int columnCount( const QModelIndex
&parent
= QModelIndex() ) const;
63 virtual QVariant
data( const QModelIndex
&index
, int role
= Qt::DisplayRole
) const;
64 virtual QVariant
headerData( int section
, Qt::Orientation orientation
, int role
= Qt::DisplayRole
) const;
65 virtual int rowCount( const QModelIndex
&parent
= QModelIndex() ) const;
68 void addFont( const Okular::FontInfo
&fi
);
71 QList
<Okular::FontInfo
> m_fonts
;
76 /* kate: replace-tabs on; indent-width 4; */