Add a slotRequestVisiblePixmaps() that fixes the problem of pixmap not updating when going/returning from full screen mode with fit to page and non continuos mode. Enrico please check is not a VERY BAD THING to do it there

Add some accelerators
Plug the actions that change the mouse behaviour into a menu as everything should be menu accesible
Put the F9 in the KACtion creator

svn path=/trunk/kdegraphics/kpdf/; revision=377533
This commit is contained in:
Albert Astals Cid 2005-01-11 17:35:07 +00:00
parent 198fb52ff7
commit 0ff32c4da9
4 changed files with 13 additions and 11 deletions

3
TODO
View file

@ -33,9 +33,6 @@ More items (first items will enter 'In progress list' first):
-> move toolbar view actions in the PageView instead of the part. maybe.. or not...
-> usability: layout 2PPV [1 2,3 4,5 6] -> [1,2 3,4 5]. add option for 'ebook' style alignment. (by Mikolaj)
-> usability: trigger redraw on 'filter text' on current page (by Mikolaj)
-> fix: requestPixmaps not triggered when exiting fullscreen mode (to verify..I can't reproduce-enrico)
-> fix: On continous view mode, if you click to a link that moves you to another
page, then scroll up and click again on the same link it does not work. (by Albert)
-> display current page / total pages (with analog indicator too (progressbar/...))
maybe this can be done on a small widget at the top of the toolbox, displaying
'document' informations (pages, current pg, some metadata, etc..).

View file

@ -180,12 +180,11 @@ Part::Part(QWidget *parentWidget, const char *widgetName,
KStdAction::preferences( this, SLOT( slotPreferences() ), ac, "preferences" );
KStdAction::printPreview( this, SLOT( slotPrintPreview() ), ac );
m_showProperties = new KAction(i18n("Properties"), "info", 0, this, SLOT(slotShowProperties()), ac, "properties");
m_showProperties = new KAction(i18n("&Properties"), "info", 0, this, SLOT(slotShowProperties()), ac, "properties");
m_showProperties->setEnabled( false );
m_showPresentation = new KAction( i18n("Presentation"), "kpresenter_kpr", 0, this, SLOT(slotShowPresentation()), ac, "presentation");
m_showPresentation = new KAction( i18n("P&resentation"), "kpresenter_kpr", "F9", this, SLOT(slotShowPresentation()), ac, "presentation");
m_showPresentation->setEnabled( false );
m_showPresentation->setShortcut( "F9" );
// attach the actions of the 2 children widgets too
m_pageView->setupActions( ac );

View file

@ -11,6 +11,11 @@
<Action name="find"/>
<Action name="find_next"/>
</Menu>
<Menu name="mouseMode"><text>&amp;Mouse mode</text>
<Action name="mouse_drag"/>
<Action name="mouse_zoom"/>
<Action name="mouse_select"/>
</Menu>
<Menu name="view"><text>&amp;View</text>
<Action name="presentation"/>
<Separator/>

View file

@ -166,23 +166,23 @@ void PageView::setupActions( KActionCollection * ac )
connect( d->aZoomFitText, SIGNAL( toggled( bool ) ), SLOT( slotFitToTextToggled( bool ) ) );
// View-Layout actions
d->aViewTwoPages = new KToggleAction( i18n("Two Pages"), "view_left_right", 0, ac, "view_twopages" );
d->aViewTwoPages = new KToggleAction( i18n("&Two Pages"), "view_left_right", 0, ac, "view_twopages" );
connect( d->aViewTwoPages, SIGNAL( toggled( bool ) ), SLOT( slotTwoPagesToggled( bool ) ) );
d->aViewTwoPages->setChecked( Settings::viewColumns() > 1 );
d->aViewContinous = new KToggleAction( i18n("Continous"), "view_text", 0, ac, "view_continous" );
d->aViewContinous = new KToggleAction( i18n("&Continous"), "view_text", 0, ac, "view_continous" );
connect( d->aViewContinous, SIGNAL( toggled( bool ) ), SLOT( slotContinousToggled( bool ) ) );
d->aViewContinous->setChecked( Settings::viewContinous() );
// Mouse-Mode actions
KToggleAction * mn = new KRadioAction( i18n("Normal"), "mouse", 0, this, SLOT( slotSetMouseNormal() ), ac, "mouse_drag" );
KToggleAction * mn = new KRadioAction( i18n("&Normal"), "mouse", 0, this, SLOT( slotSetMouseNormal() ), ac, "mouse_drag" );
mn->setExclusiveGroup( "MouseType" );
mn->setChecked( true );
KToggleAction * mz = new KRadioAction( i18n("Zoom Tool"), "viewmag", 0, this, SLOT( slotSetMouseZoom() ), ac, "mouse_zoom" );
KToggleAction * mz = new KRadioAction( i18n("&Zoom Tool"), "viewmag", 0, this, SLOT( slotSetMouseZoom() ), ac, "mouse_zoom" );
mz->setExclusiveGroup( "MouseType" );
KToggleAction * mst = new KRadioAction( i18n("Select"), "frame_edit", 0, this, SLOT( slotSetMouseSelect() ), ac, "mouse_select" );
KToggleAction * mst = new KRadioAction( i18n("&Select"), "frame_edit", 0, this, SLOT( slotSetMouseSelect() ), ac, "mouse_select" );
mst->setExclusiveGroup( "MouseType" );
d->aMouseEdit = new KRadioAction( i18n("Draw"), "edit", 0, this, SLOT( slotSetMouseDraw() ), ac, "mouse_draw" );
@ -1345,6 +1345,7 @@ void PageView::slotRelayoutPages()
fullWidth += colWidth[ i ];
delete [] colWidth;
slotRequestVisiblePixmaps();
}
// 3) reset dirty state