Re: [Okular-devel] white screen mode in presentation view

2008-11-16 Thread Pino Toscano
Hi,

> i saw, that a black screen mode was added to okular.
> I thought it is also usefull if there is a white screen mode.
> So I made a path.
>
> If you press 'w' in presentation view, the screen gets white.

Not sure having two "colored" screen modes at the same time would be a good 
idea, especially as in your patch they will step on each other's toes.

In case this is really needed, then the current black screen mode should get a 
configuration (most probably hidden) with its color.

But, first of all, I'd like to know what is the use case of the "white screen" 
feature, especially why the current "black screen" would not be enough 
(remember that "Evince has it" is not a reason).

-- 
Pino Toscano


signature.asc
Description: This is a digitally signed message part.
___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] white screen mode in presentation view

2008-10-28 Thread Uwe Kaiser
Yes in some way you are right, I thought about that too!
But I think there is no one who wants a red or pink screen mode.

I was very happy that black screen mode was introduced.
But I think in some situation it is good if you can switch the light on ->
white screen mode.

In the way I implemented it is also compatible with evince.

If you think it is not a good idea i will try to get a config page
implemented.

Uwe





2008/10/27 Albert Astals Cid <[EMAIL PROTECTED]>

> A Diumenge 26 Octubre 2008, Uwe Kaiser va escriure:
> > hi,
> >
> > i saw, that a black screen mode was added to okular.
> > I thought it is also usefull if there is a white screen mode.
> > So I made a path.
> >
> > If you press 'w' in presentation view, the screen gets white.
>
> I want a red screen mode!
>
> If we are going to add XYZ screen mode, better add a config page to chose
> the
> color and just have one shortcut than 33 differnt ones.
>
> Not sure we want that though.
>
> Albert
>
> >
> > Greets
> > Uwe Kaiser
>
>
> ___
> Okular-devel mailing list
> Okular-devel@kde.org
> https://mail.kde.org/mailman/listinfo/okular-devel
>
___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] white screen mode in presentation view

2008-10-27 Thread Albert Astals Cid
A Diumenge 26 Octubre 2008, Uwe Kaiser va escriure:
> hi,
>
> i saw, that a black screen mode was added to okular.
> I thought it is also usefull if there is a white screen mode.
> So I made a path.
>
> If you press 'w' in presentation view, the screen gets white.

I want a red screen mode!

If we are going to add XYZ screen mode, better add a config page to chose the 
color and just have one shortcut than 33 differnt ones.

Not sure we want that though.

Albert

>
> Greets
> Uwe Kaiser


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


[Okular-devel] white screen mode in presentation view

2008-10-26 Thread Uwe Kaiser

hi,

i saw, that a black screen mode was added to okular.
I thought it is also usefull if there is a white screen mode.
So I made a path.

If you press 'w' in presentation view, the screen gets white.

Greets
Uwe Kaiser 
Index: kdegraphics/okular/part.cpp
===
--- kdegraphics/okular/part.cpp	(revision 875982)
+++ kdegraphics/okular/part.cpp	(working copy)
@@ -534,6 +534,11 @@
 blackscreenAction->setShortcut( QKeySequence( Qt::Key_B ) );
 blackscreenAction->setIcon( KIcon( "view-presentation" ) );
 
+KToggleAction *whitescreenAction = new KToggleAction( i18n( "Switch Whitescreen Mode" ), ac );
+ac->addAction( "switch_whitescreen_mode", whitescreenAction );
+whitescreenAction->setShortcut( QKeySequence( Qt::Key_W ) );
+whitescreenAction->setIcon( KIcon( "view-presentation" ) );
+
 // document watcher and reloader
 m_watcher = new KDirWatch( this );
 connect( m_watcher, SIGNAL( dirty( const QString& ) ), this, SLOT( slotFileDirty( const QString& ) ) );
Index: kdegraphics/okular/ui/presentationwidget.h
===
--- kdegraphics/okular/ui/presentationwidget.h	(revision 875982)
+++ kdegraphics/okular/ui/presentationwidget.h	(working copy)
@@ -123,6 +123,7 @@
 KSelectAction * m_screenSelect;
 bool m_blockNotifications;
 bool m_inBlackScreenMode;
+bool m_inWhiteScreenMode;
 
 private slots:
 void slotNextPage();
@@ -138,6 +139,7 @@
 void screenResized( int );
 void chooseScreen( QAction * );
 void toggleBlackScreenMode( bool );
+void toggleWhiteScreenMode( bool );
 };
 
 #endif
Index: kdegraphics/okular/ui/presentationwidget.cpp
===
--- kdegraphics/okular/ui/presentationwidget.cpp	(revision 875982)
+++ kdegraphics/okular/ui/presentationwidget.cpp	(working copy)
@@ -128,7 +128,8 @@
 : QWidget( 0 /* must be null, to have an independent widget */, Qt::FramelessWindowHint ),
 m_pressedLink( 0 ), m_handCursor( false ), m_drawingEngine( 0 ), m_screenSaverCookie( -1 ),
 m_document( doc ), m_frameIndex( -1 ), m_topBar( 0 ), m_pagesEdit( 0 ), m_searchBar( 0 ),
-m_screenSelect( 0 ), m_blockNotifications( false ), m_inBlackScreenMode( false )
+m_screenSelect( 0 ), m_blockNotifications( false ), m_inBlackScreenMode( false ),
+m_inWhiteScreenMode( false )
 {
 Q_UNUSED( parent )
 setAttribute( Qt::WA_DeleteOnClose );
@@ -354,9 +355,14 @@
 addAction( m_ac->action( "first_page" ) );
 addAction( m_ac->action( "last_page" ) );
 
-QAction *action = m_ac->action( "switch_blackscreen_mode" );
-connect( action, SIGNAL( toggled( bool ) ), SLOT( toggleBlackScreenMode( bool ) ) );
-addAction( action );
+QAction *blackscreenAction = m_ac->action( "switch_blackscreen_mode" );
+connect( blackscreenAction, SIGNAL( toggled( bool ) ), SLOT( toggleBlackScreenMode( bool ) ) );
+addAction( blackscreenAction );
+
+QAction *whitescreenAction = m_ac->action( "switch_whitescreen_mode" );
+connect( whitescreenAction, SIGNAL( toggled( bool ) ), SLOT( toggleWhiteScreenMode( bool ) ) );
+addAction( whitescreenAction );
+
 }
 
 
@@ -541,6 +547,13 @@
 return;
 }
 
+if ( m_inWhiteScreenMode )
+{
+QPainter painter( this );
+painter.fillRect( pe->rect(), Qt::white );
+return;
+}
+
 if (m_width == -1)
 {
 m_width = width();
@@ -1286,10 +1299,19 @@
 void PresentationWidget::toggleBlackScreenMode( bool )
 {
 m_inBlackScreenMode = !m_inBlackScreenMode;
+m_inWhiteScreenMode = false;
 
 update();
 }
 
+void PresentationWidget::toggleWhiteScreenMode( bool )
+{
+m_inWhiteScreenMode = !m_inWhiteScreenMode;
+m_inBlackScreenMode = false;
+
+update();
+}
+
 void PresentationWidget::setScreen( int newScreen )
 {
 const QRect screenGeom = QApplication::desktop()->screenGeometry( newScreen );
___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel