[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kviewshell-0.7/kviewshell
From: Stefan Kebekus <kebekus () kde ! org>
Date: 2006-03-22 20:16:44
Message-ID: 1143058604.824825.7188.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 521551 by kebekus:
API cleanup: clarify the meaning of two signals in kmultipage.h; add documentation. \
This also makes the GUI react a little faster when the render mode is changed for \
DJVUs
M +4 -4 plugins/djvu/djvumultipage.cpp
M +0 -1 plugins/dvi/dviRenderer.cpp
M +2 -1 plugins/dvi/kdvi_multipage.cpp
M +0 -14 shell/documentRenderer.h
M +33 -2 shell/kmultipage.h
M +5 -5 shell/kviewpart.cpp
--- branches/work/kviewshell-0.7/kviewshell/plugins/djvu/djvumultipage.cpp \
#521550:521551 @@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2005 by Stefan Kebekus *
+ * Copyright (C) 2005--2006 by Stefan Kebekus *
* kebekus@kde.org *
* *
* Copyright (C) 2005 by Wilfried Huss *
@@ -157,7 +157,7 @@
Prefs::setRenderMode(Prefs::EnumRenderMode::Color);
}
Prefs::writeConfig();
- emit(documentIsModified());
+ emit renderModeChanged();
}
@@ -176,7 +176,7 @@
return;
djvuRenderer.deletePages(range.getFrom(), range.getTo());
- emit(documentIsModified());
+ emit documentHasBeenModified();
}
@@ -208,7 +208,7 @@
return;
djvuRenderer.insertPages(pgins.getFile(), pgins.getPage());
- emit(documentIsModified());
+ emit documentHasBeenModified();
}
--- branches/work/kviewshell-0.7/kviewshell/plugins/dvi/dviRenderer.cpp \
#521550:521551 @@ -95,7 +95,6 @@
_postscript = flag_showPS;
editorCommand = str_editorCommand;
font_pool.setParameters( useFontHints );
- emit(documentIsChanged());
}
--- branches/work/kviewshell-0.7/kviewshell/plugins/dvi/kdvi_multipage.cpp \
#521550:521551 @@ -116,7 +116,7 @@
{
DVIRenderer.embedPostScript();
if (DVIRenderer.isModified())
- emit(documentIsModified());
+ emit renderModeChanged();
setEmbedPostScriptAction();
}
@@ -187,6 +187,7 @@
bool useFontHints = Prefs::useFontHints();
DVIRenderer.setPrefs( showPS, Prefs::editorCommand(), useFontHints);
+ emit renderModeChanged();
}
--- branches/work/kviewshell-0.7/kviewshell/shell/documentRenderer.h #521550:521551
@@ -361,20 +361,6 @@
void setAccessibleBackground(bool accessibleMode, const QColor& background = \
QColor(255, 255, 255));
signals:
- /** signals that the document is changed
-
- This signal can be emitted if the document or status of this class
- changed internally so that all associated widgets should be
- repainted. This could be emitted, e.g. if pages are removed from a
- document, or if some preferences change that have some direct
- influence on the way the document is rendered.
-
- When this signal is emitted, the whole GUI setup is re-computed, and
- all widgets are re-drawn. This can take considerable time.
- */
- void documentIsChanged();
-
-
/** sets text in the statusbar
This signal is emitted when the renderer needs to inform the user
--- branches/work/kviewshell-0.7/kviewshell/shell/kmultipage.h #521550:521551
@@ -299,14 +299,45 @@
signals:
- /** \brief signal emitted to indicate that the document has been changed
+ /** \brief signal emitted to indicate that the number of pages or
+ page sizes in the document changed and all widgets need to be
+ repainted
+ This signal can be emitted if the document or status of this class
+ changed internally so that the number, size and position of widgets
+ must be checked and all associated widgets should be repainted. This
+ could be emitted, e.g., if pages are removed from a document.
+
+ @warning When this signal is emitted, the whole GUI setup is
+ re-computed, and all widgets are re-drawn. This can take
+ considerable time. If the number of pages and the page sizes didn't
+ change, the signal renderModeChanged() is a much faster alternative.
+ */
+ void documentHasBeenModified();
+
+ /** \brief signal emitted to indicate that all widgets need to be
+ repainted
+
+ This signal can be emitted if the document or status of this class
+ changed internally or of the renderer changed internally so that all
+ associated widgets should be repainted. This signal is emitted,
+ e.g., by the DJVU-plugin where if the user changes from "color"
+ rendering mode to the faster "forground only".
+
+ This signal is similar to documentHasBeenModified(), but here the
+ receiver assumes that that the number of pages and the pages sizes
+ remain unchanged. This makes the repainting faster.
+ */
+ void renderModeChanged();
+
+ /** \brief signal emitted to indicate that the document has been changed
+
This signal MUST be emitted when the document has been changed
(e.g. when pages have been removed from a DJVU-file). This
information is used by the parent to warn the user when he tries
to close the document without saving.
*/
- void documentIsModified();
+// void documentIsModified();
/* Emitted to indicate the number of pages in the file and the
current page. The receiver will not change or update the display,
--- branches/work/kviewshell-0.7/kviewshell/shell/kviewpart.cpp #521550:521551
@@ -478,7 +478,6 @@
connect(useDocumentSpecifiedSize, SIGNAL(toggled(bool)), this, \
SLOT(setUseDocumentSpecifiedSize(bool)));
// The new renderer und page cache need to be reconnected
- connect(multiPage->getRenderer(), SIGNAL(documentIsChanged()), this, \
SLOT(renderModeChanged())); connect(multiPage->getRenderer(), \
SIGNAL(setStatusBarText(const QString&)), this, SIGNAL(setStatusBarText(const \
QString&))); connect(pageCache, SIGNAL(paperSizeChanged()), this, \
SLOT(renderModeChanged())); connect(pageCache, SIGNAL(textSelected(bool)), this, \
SIGNAL(textSelected(bool))); @@ -487,10 +486,11 @@
connect(scrollbarHandling, SIGNAL(toggled(bool)), this, \
SLOT(slotShowScrollbars(bool)));
// connect to the multi page view
- connect( this, SIGNAL(scrollbarStatusChanged(bool)), this, \
SLOT(slotShowScrollbars(bool)));
- connect( multiPage, SIGNAL(pageInfo(int, int)), this, SLOT(pageInfo(int, int)) );
- connect( multiPage, SIGNAL(setStatusBarText(const QString& ) ), this, \
SLOT(setStatusBarTextFromMultiPage(const QString& ) ) );
- connect( multiPage, SIGNAL(documentIsModified()), this, SLOT(setModified()));
+ connect(this, SIGNAL(scrollbarStatusChanged(bool)), this, \
SLOT(slotShowScrollbars(bool))); + connect(multiPage, SIGNAL(pageInfo(int, int)), \
this, SLOT(pageInfo(int, int)) ); + connect(multiPage, SIGNAL(setStatusBarText(const \
QString& ) ), this, SLOT(setStatusBarTextFromMultiPage(const QString& ) ) ); + \
connect(multiPage, SIGNAL(documentHasBeenModified()), this, SLOT(setModified())); + \
connect(multiPage, SIGNAL(renderModeChanged()), this, SLOT(renderModeChanged()));
// navigation history
connect(&document_history, SIGNAL(backItem(bool)), backAction, \
SLOT(setEnabled(bool)));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic