summaryrefslogtreecommitdiffstats
path: root/kpdf/ui
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-02-01 15:12:51 -0600
committerTimothy Pearson <[email protected]>2013-02-01 15:12:51 -0600
commit65eca7929c22f0f0bc64135c02d85d1243df376c (patch)
tree5b47361590fb6693a0f6258d6a8d725856ef2ad9 /kpdf/ui
parentcd6d514066c22206c388eddbb7fbec32648dbaeb (diff)
downloadtdegraphics-65eca7929c22f0f0bc64135c02d85d1243df376c.tar.gz
tdegraphics-65eca7929c22f0f0bc64135c02d85d1243df376c.zip
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'kpdf/ui')
-rw-r--r--kpdf/ui/minibar.cpp2
-rw-r--r--kpdf/ui/pageview.cpp58
-rw-r--r--kpdf/ui/pageview.h4
-rw-r--r--kpdf/ui/presentationwidget.cpp6
-rw-r--r--kpdf/ui/presentationwidget.h12
-rw-r--r--kpdf/ui/propertiesdialog.cpp2
-rw-r--r--kpdf/ui/searchwidget.cpp4
-rw-r--r--kpdf/ui/searchwidget.h6
-rw-r--r--kpdf/ui/thumbnaillist.cpp2
-rw-r--r--kpdf/ui/thumbnaillist.h4
-rw-r--r--kpdf/ui/toc.cpp14
-rw-r--r--kpdf/ui/toc.h4
12 files changed, 59 insertions, 59 deletions
diff --git a/kpdf/ui/minibar.cpp b/kpdf/ui/minibar.cpp
index eec74581..262b74c7 100644
--- a/kpdf/ui/minibar.cpp
+++ b/kpdf/ui/minibar.cpp
@@ -403,7 +403,7 @@ HoverButton::HoverButton( TQWidget * parent )
{
setMouseTracking( true );
#if KDE_IS_VERSION(3,3,90)
- KAcceleratorManager::setNoAccel( this );
+ TDEAcceleratorManager::setNoAccel( this );
#endif
}
diff --git a/kpdf/ui/pageview.cpp b/kpdf/ui/pageview.cpp
index a76d03ea..a0ce66e7 100644
--- a/kpdf/ui/pageview.cpp
+++ b/kpdf/ui/pageview.cpp
@@ -105,16 +105,16 @@ public:
TQTimer dragScrollTimer;
// actions
- KToggleAction * aMouseNormal;
- KToggleAction * aMouseSelect;
- KToggleAction * aMouseEdit;
- KSelectAction * aZoom;
- KToggleAction * aZoomFitWidth;
- KToggleAction * aZoomFitPage;
- KToggleAction * aZoomFitText;
- KToggleAction * aViewTwoPages;
- KToggleAction * aViewContinuous;
- KAction * aPrevAction;
+ TDEToggleAction * aMouseNormal;
+ TDEToggleAction * aMouseSelect;
+ TDEToggleAction * aMouseEdit;
+ TDESelectAction * aZoom;
+ TDEToggleAction * aZoomFitWidth;
+ TDEToggleAction * aZoomFitPage;
+ TDEToggleAction * aZoomFitText;
+ TDEToggleAction * aViewTwoPages;
+ TDEToggleAction * aViewContinuous;
+ TDEAction * aPrevAction;
};
@@ -242,10 +242,10 @@ PageView::~PageView()
delete d;
}
-void PageView::setupActions( KActionCollection * ac )
+void PageView::setupActions( TDEActionCollection * ac )
{
// Zoom actions ( higher scales takes lots of memory! )
- d->aZoom = new KSelectAction( i18n( "Zoom" ), "viewmag", 0, TQT_TQOBJECT(this), TQT_SLOT( slotZoom() ), ac, "zoom_to" );
+ d->aZoom = new TDESelectAction( i18n( "Zoom" ), "viewmag", 0, TQT_TQOBJECT(this), TQT_SLOT( slotZoom() ), ac, "zoom_to" );
d->aZoom->setEditable( true );
#if KDE_IS_VERSION(3,4,89)
d->aZoom->setMaxComboViewCount( 13 );
@@ -256,52 +256,52 @@ void PageView::setupActions( KActionCollection * ac )
KStdAction::zoomOut( TQT_TQOBJECT(this), TQT_SLOT( slotZoomOut() ), ac, "zoom_out" );
- d->aZoomFitWidth = new KToggleAction( i18n("Fit to Page &Width"), "view_fit_width", 0, ac, "zoom_fit_width" );
+ d->aZoomFitWidth = new TDEToggleAction( i18n("Fit to Page &Width"), "view_fit_width", 0, ac, "zoom_fit_width" );
connect( d->aZoomFitWidth, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotFitToWidthToggled( bool ) ) );
- d->aZoomFitPage = new KToggleAction( i18n("Fit to &Page"), "view_fit_window", 0, ac, "zoom_fit_page" );
+ d->aZoomFitPage = new TDEToggleAction( i18n("Fit to &Page"), "view_fit_window", 0, ac, "zoom_fit_page" );
connect( d->aZoomFitPage, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotFitToPageToggled( bool ) ) );
- d->aZoomFitText = new KToggleAction( i18n("Fit to &Text"), "viewmagfit", 0, ac, "zoom_fit_text" );
+ d->aZoomFitText = new TDEToggleAction( i18n("Fit to &Text"), "viewmagfit", 0, ac, "zoom_fit_text" );
connect( d->aZoomFitText, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotFitToTextToggled( bool ) ) );
// rotate actions
- KAction *action;
- action = new KAction( i18n("Rotate Right"), "rotate_cw", KShortcut( "Ctrl+Shift++" ),
+ TDEAction *action;
+ action = new TDEAction( i18n("Rotate Right"), "rotate_cw", TDEShortcut( "Ctrl+Shift++" ),
TQT_TQOBJECT(this), TQT_SLOT( slotRotateRight() ), ac, "rotate_right" );
- action = new KAction( i18n("Rotate Left"), "rotate_ccw", KShortcut( "Ctrl+Shift+-" ),
+ action = new TDEAction( i18n("Rotate Left"), "rotate_ccw", TDEShortcut( "Ctrl+Shift+-" ),
TQT_TQOBJECT(this), TQT_SLOT( slotRotateLeft() ), ac, "rotate_left" );
// View-Layout actions
- d->aViewTwoPages = new KToggleAction( i18n("&Two Pages"), "view_left_right", 0, ac, "view_twopages" );
+ d->aViewTwoPages = new TDEToggleAction( i18n("&Two Pages"), "view_left_right", 0, ac, "view_twopages" );
connect( d->aViewTwoPages, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotTwoPagesToggled( bool ) ) );
d->aViewTwoPages->setChecked( KpdfSettings::viewColumns() > 1 );
- d->aViewContinuous = new KToggleAction( i18n("&Continuous"), "view_text", 0, ac, "view_continuous" );
+ d->aViewContinuous = new TDEToggleAction( i18n("&Continuous"), "view_text", 0, ac, "view_continuous" );
connect( d->aViewContinuous, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotContinuousToggled( bool ) ) );
d->aViewContinuous->setChecked( KpdfSettings::viewContinuous() );
// Mouse-Mode actions
- d->aMouseNormal = new KRadioAction( i18n("&Browse Tool"), "mouse", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseNormal() ), ac, "mouse_drag" );
+ d->aMouseNormal = new TDERadioAction( i18n("&Browse Tool"), "mouse", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseNormal() ), ac, "mouse_drag" );
d->aMouseNormal->setExclusiveGroup( "MouseType" );
d->aMouseNormal->setChecked( true );
- KToggleAction * mz = new KRadioAction( i18n("&Zoom Tool"), "viewmag", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseZoom() ), ac, "mouse_zoom" );
+ TDEToggleAction * mz = new TDERadioAction( i18n("&Zoom Tool"), "viewmag", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseZoom() ), ac, "mouse_zoom" );
mz->setExclusiveGroup( "MouseType" );
- d->aMouseSelect = new KRadioAction( i18n("&Select Tool"), "frame_edit", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseSelect() ), ac, "mouse_select" );
+ d->aMouseSelect = new TDERadioAction( i18n("&Select Tool"), "frame_edit", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseSelect() ), ac, "mouse_select" );
d->aMouseSelect->setExclusiveGroup( "MouseType" );
-/* d->aMouseEdit = new KRadioAction( i18n("Draw"), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseDraw() ), ac, "mouse_draw" );
+/* d->aMouseEdit = new TDERadioAction( i18n("Draw"), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseDraw() ), ac, "mouse_draw" );
d->aMouseEdit->setExclusiveGroup("MouseType");
d->aMouseEdit->setEnabled( false ); // implement feature before removing this line*/
// Other actions
- KAction * su = new KAction( i18n("Scroll Up"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotScrollUp() ), ac, "view_scroll_up" );
+ TDEAction * su = new TDEAction( i18n("Scroll Up"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotScrollUp() ), ac, "view_scroll_up" );
su->setShortcut( "Shift+Up" );
- KAction * sd = new KAction( i18n("Scroll Down"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotScrollDown() ), ac, "view_scroll_down" );
+ TDEAction * sd = new TDEAction( i18n("Scroll Down"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotScrollDown() ), ac, "view_scroll_down" );
sd->setShortcut( "Shift+Down" );
}
@@ -673,7 +673,7 @@ void PageView::keyPressEvent( TQKeyEvent * e )
}
}
// F3: go to next occurrency
- else if( e->key() == KStdAccel::findNext() )
+ else if( e->key() == TDEStdAccel::findNext() )
{
// part doesn't get this key event because of the keyboard grab
d->findTimeoutTimer->stop(); // restore normal operation during possible messagebox is displayed
@@ -1121,7 +1121,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e )
}
// popup that ask to copy:text and copy/save:image
- KPopupMenu menu( this );
+ TDEPopupMenu menu( this );
if ( !selectedText.isEmpty() )
{
menu.insertTitle( i18n( "Text (1 character)", "Text (%n characters)", selectedText.length() ) );
@@ -1508,7 +1508,7 @@ void PageView::updateZoom( ZoomMode newZoomMode )
}
float newFactor = d->zoomFactor;
- KAction * checkedZoomAction = 0;
+ TDEAction * checkedZoomAction = 0;
switch ( newZoomMode )
{
case ZoomFixed:{ //ZoomFixed case
diff --git a/kpdf/ui/pageview.h b/kpdf/ui/pageview.h
index 76c9607c..901ec9e6 100644
--- a/kpdf/ui/pageview.h
+++ b/kpdf/ui/pageview.h
@@ -24,7 +24,7 @@
#include "core/observer.h"
class KURL;
-class KActionCollection;
+class TDEActionCollection;
class KPDFDocument;
class PageViewItem;
@@ -53,7 +53,7 @@ class PageView : public TQScrollView, public DocumentObserver
enum MouseMode { MouseNormal, MouseZoom, MouseSelect, MouseEdit };
// create actions that interact with this widget
- void setupActions( KActionCollection * collection );
+ void setupActions( TDEActionCollection * collection );
// used from RMB menu
bool canFitPageWidth();
diff --git a/kpdf/ui/presentationwidget.cpp b/kpdf/ui/presentationwidget.cpp
index 6639dbc5..94cfdc08 100644
--- a/kpdf/ui/presentationwidget.cpp
+++ b/kpdf/ui/presentationwidget.cpp
@@ -61,7 +61,7 @@ PresentationWidget::PresentationWidget( TQWidget * parent, KPDFDocument * doc )
m_width = -1;
- m_accel = new KAccel( this, TQT_TQOBJECT(this), "presentationmode-accel" );
+ m_accel = new TDEAccel( this, TQT_TQOBJECT(this), "presentationmode-accel" );
// show widget and take control
showFullScreen();
@@ -98,7 +98,7 @@ PresentationWidget::~PresentationWidget()
delete *fIt;
}
-void PresentationWidget::setupActions( KActionCollection * ac )
+void PresentationWidget::setupActions( TDEActionCollection * ac )
{
m_accel->insert( "previous_page", ac->action( "previous_page" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotPrevPage() ), false, true );
m_accel->insert( "next_page", ac->action( "next_page" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotNextPage() ), false, true );
@@ -304,7 +304,7 @@ void PresentationWidget::paintEvent( TQPaintEvent * pe )
m_height = d.height();
// create top toolbar
- m_topBar = new KToolBar( this, "presentationBar" );
+ m_topBar = new TDEToolBar( this, "presentationBar" );
m_topBar->setIconSize( 32 );
m_topBar->setMovingEnabled( false );
m_topBar->insertButton( TQApplication::reverseLayout() ? "1rightarrow" : "1leftarrow", 2, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( slotPrevPage() ) );
diff --git a/kpdf/ui/presentationwidget.h b/kpdf/ui/presentationwidget.h
index 413f4258..177b3da0 100644
--- a/kpdf/ui/presentationwidget.h
+++ b/kpdf/ui/presentationwidget.h
@@ -17,9 +17,9 @@
#include "core/observer.h"
#include "core/pagetransition.h"
-class KAccel;
-class KActionCollection;
-class KToolBar;
+class TDEAccel;
+class TDEActionCollection;
+class TDEToolBar;
class TQTimer;
class KPDFDocument;
@@ -40,7 +40,7 @@ class PresentationWidget : public TQDialog, public DocumentObserver
PresentationWidget( TQWidget * parent, KPDFDocument * doc );
~PresentationWidget();
- void setupActions( KActionCollection * ac );
+ void setupActions( TDEActionCollection * ac );
// inherited from DocumentObserver
uint observerId() const { return PRESENTATION_ID; }
@@ -94,8 +94,8 @@ class PresentationWidget : public TQDialog, public DocumentObserver
TQValueVector< PresentationFrame * > m_frames;
int m_frameIndex;
TQStringList m_metaStrings;
- KToolBar * m_topBar;
- KAccel * m_accel;
+ TDEToolBar * m_topBar;
+ TDEAccel * m_accel;
private slots:
void slotNextPage();
diff --git a/kpdf/ui/propertiesdialog.cpp b/kpdf/ui/propertiesdialog.cpp
index e00d8cfe..feff5eae 100644
--- a/kpdf/ui/propertiesdialog.cpp
+++ b/kpdf/ui/propertiesdialog.cpp
@@ -76,7 +76,7 @@ PropertiesDialog::PropertiesDialog(TQWidget *parent, KPDFDocument *doc)
{
TQFrame *page2 = addPage(i18n("Fonts"));
page2Layout = new TQVBoxLayout(page2, 0, KDialog::spacingHint());
- KListView *lv = new KListView(page2);
+ TDEListView *lv = new TDEListView(page2);
page2Layout->add(lv);
doc->putFontInfo(lv);
}
diff --git a/kpdf/ui/searchwidget.cpp b/kpdf/ui/searchwidget.cpp
index f21d8b73..19f77753 100644
--- a/kpdf/ui/searchwidget.cpp
+++ b/kpdf/ui/searchwidget.cpp
@@ -29,7 +29,7 @@
#define FIND_ID 3
SearchWidget::SearchWidget( TQWidget * parent, KPDFDocument * document )
- : KToolBar( parent, "iSearchBar" ), m_document( document ),
+ : TDEToolBar( parent, "iSearchBar" ), m_document( document ),
m_searchType( 0 ), m_caseSensitive( false )
{
// change toolbar appearance
@@ -55,7 +55,7 @@ SearchWidget::SearchWidget( TQWidget * parent, KPDFDocument * document )
i18n( "Clear filter" ), 0/*index*/ );
// 3.1. create the popup menu for changing filtering features
- m_menu = new KPopupMenu( this );
+ m_menu = new TDEPopupMenu( this );
m_menu->insertItem( i18n("Case Sensitive"), 1 );
m_menu->insertSeparator( 2 );
m_menu->insertItem( i18n("Match Phrase"), 3 );
diff --git a/kpdf/ui/searchwidget.h b/kpdf/ui/searchwidget.h
index b0be5dc9..a6a9efb4 100644
--- a/kpdf/ui/searchwidget.h
+++ b/kpdf/ui/searchwidget.h
@@ -12,7 +12,7 @@
#include <ktoolbar.h>
-class KPopupMenu;
+class TDEPopupMenu;
class KPDFDocument;
class m_inputDelayTimer;
@@ -27,7 +27,7 @@ class m_inputDelayTimer;
* It supports case sensitive/unsensitive(default) and provieds a button
* for switching between the 2 modes.
*/
-class SearchWidget : public KToolBar
+class SearchWidget : public TDEToolBar
{
Q_OBJECT
@@ -37,7 +37,7 @@ class SearchWidget : public KToolBar
private:
KPDFDocument * m_document;
- KPopupMenu * m_menu;
+ TDEPopupMenu * m_menu;
TQTimer * m_inputDelayTimer;
int m_searchType;
bool m_caseSensitive;
diff --git a/kpdf/ui/thumbnaillist.cpp b/kpdf/ui/thumbnaillist.cpp
index 6c5e2b5f..14d9d2f5 100644
--- a/kpdf/ui/thumbnaillist.cpp
+++ b/kpdf/ui/thumbnaillist.cpp
@@ -553,7 +553,7 @@ void ThumbnailWidget::paintEvent( TQPaintEvent * e )
#define FILTERB_ID 1
ThumbnailController::ThumbnailController( TQWidget * parent, ThumbnailList * list )
- : KToolBar( parent, "ThumbsControlBar" )
+ : TDEToolBar( parent, "ThumbsControlBar" )
{
// change toolbar appearance
setMargin( 3 );
diff --git a/kpdf/ui/thumbnaillist.h b/kpdf/ui/thumbnaillist.h
index 5365dff0..5b1e5f94 100644
--- a/kpdf/ui/thumbnaillist.h
+++ b/kpdf/ui/thumbnaillist.h
@@ -17,7 +17,7 @@
#include "core/observer.h"
class TQTimer;
-class KActionCollection;
+class TDEActionCollection;
class KPDFDocument;
class ThumbnailWidget;
@@ -113,7 +113,7 @@ class ThumbnailsBox : public TQVBox
* emits signals whenever a button is pressed. A click action results
* in invoking some method (or slot) in ThumbnailList.
*/
-class ThumbnailController : public KToolBar
+class ThumbnailController : public TDEToolBar
{
public:
ThumbnailController( TQWidget * parent, ThumbnailList * thumbnailList );
diff --git a/kpdf/ui/toc.cpp b/kpdf/ui/toc.cpp
index 015ba313..8e2f9531 100644
--- a/kpdf/ui/toc.cpp
+++ b/kpdf/ui/toc.cpp
@@ -22,11 +22,11 @@
// they're slow when converted to page number. drop the 2nd column idea.
//#define TOC_ENABLE_PAGE_COLUMN
-class TOCItem : public KListViewItem
+class TOCItem : public TDEListViewItem
{
public:
- TOCItem( KListView *parent, TOCItem *after, const TQDomElement & e )
- : KListViewItem( parent, after, e.tagName() ), m_element( e )
+ TOCItem( TDEListView *parent, TOCItem *after, const TQDomElement & e )
+ : TDEListViewItem( parent, after, e.tagName() ), m_element( e )
{
#ifdef TOC_ENABLE_PAGE_COLUMN
if ( e.hasAttribute( "Page" ) )
@@ -35,8 +35,8 @@ class TOCItem : public KListViewItem
setMultiLinesEnabled(true);
}
- TOCItem( KListViewItem *parent, TOCItem *after, const TQDomElement & e )
- : KListViewItem( parent, after, e.tagName() ), m_element( e )
+ TOCItem( TDEListViewItem *parent, TOCItem *after, const TQDomElement & e )
+ : TDEListViewItem( parent, after, e.tagName() ), m_element( e )
{
#ifdef TOC_ENABLE_PAGE_COLUMN
if ( e.hasAttribute( "Page" ) )
@@ -54,7 +54,7 @@ class TOCItem : public KListViewItem
TQDomElement m_element;
};
-TOC::TOC(TQWidget *parent, KPDFDocument *document) : KListView(parent), m_document(document)
+TOC::TOC(TQWidget *parent, KPDFDocument *document) : TDEListView(parent), m_document(document)
{
addColumn( i18n("Topic") );
#ifdef TOC_ENABLE_PAGE_COLUMN
@@ -104,7 +104,7 @@ void TOC::notifySetup( const TQValueVector< KPDFPage * > & /*pages*/, bool docum
emit hasTOC( true );
}
-void TOC::addChildren( const TQDomNode & parentNode, KListViewItem * parentItem )
+void TOC::addChildren( const TQDomNode & parentNode, TDEListViewItem * parentItem )
{
// keep track of the current listViewItem
TOCItem * currentItem = 0;
diff --git a/kpdf/ui/toc.h b/kpdf/ui/toc.h
index 6159bfd9..eef7dbb4 100644
--- a/kpdf/ui/toc.h
+++ b/kpdf/ui/toc.h
@@ -17,7 +17,7 @@
class KPDFDocument;
-class TOC : public KListView, public DocumentObserver
+class TOC : public TDEListView, public DocumentObserver
{
Q_OBJECT
@@ -36,7 +36,7 @@ Q_OBJECT
void slotExecuted(TQListViewItem *i);
private:
- void addChildren( const TQDomNode & parentNode, KListViewItem * parentItem = 0 );
+ void addChildren( const TQDomNode & parentNode, TDEListViewItem * parentItem = 0 );
DocumentViewport getViewport( const TQDomElement &e ) const;
KPDFDocument *m_document;
};