KDevelop API Documentation

fullscreen_part.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2003 by Roberto Raggi                                   *
00003  *   roberto@kdevelop.org                                                  *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  ***************************************************************************/
00011 
00012 #include <kiconloader.h>
00013 #include <klocale.h>
00014 #include <kdevgenericfactory.h>
00015 #include <kstdaction.h>
00016 #include <kmainwindow.h>
00017 #include <kmenubar.h>
00018 
00019 #include <kdevcore.h>
00020 #include <kdevmainwindow.h>
00021 
00022 #include "fullscreen_part.h"
00023 
00024 static const KAboutData data("kdevfullscreen", I18N_NOOP("Full-screen mode"), "1.0");
00025 
00026 typedef KDevGenericFactory<FullScreenPart> FullScreenFactory;
00027 K_EXPORT_COMPONENT_FACTORY( libkdevfullscreen, FullScreenFactory( &data ) )
00028 
00029 FullScreenPart::FullScreenPart(QObject *parent, const char *name, const QStringList& )
00030   : KDevPlugin("KDevPart", "kdevpart", parent, name ? name : "FullScreenPart" )
00031 {
00032   setInstance(FullScreenFactory::instance());
00033   setXMLFile("kdevpart_fullscreen.rc");
00034 
00035   m_bFullScreen = false;
00036 
00037   m_pFullScreen = KStdAction::fullScreen(this, SLOT(slotToggleFullScreen()), actionCollection(), mainWindow()->main());
00038 }
00039 
00040 FullScreenPart::~FullScreenPart()
00041 {
00042 }
00043 
00044 void FullScreenPart::slotToggleFullScreen( )
00045 {
00046    m_bFullScreen = !m_bFullScreen;
00047    if( m_bFullScreen ){
00048       //mw->menuBar()->hide();
00049       mainWindow()->main()->showFullScreen();
00050 
00051       /*m_pFullScreen->setText( i18n( "Exit Full-Screen Mode" ) );
00052       m_pFullScreen->setToolTip( i18n( "Exit full-screen mode" ) );
00053       m_pFullScreen->setIcon( "window_nofullscreen" );*/
00054    } else {
00055       //mw->menuBar()->show();
00056 
00057       mainWindow()->main()->showNormal();
00058 
00059       /*m_pFullScreen->setText( i18n( "&Full-Screen Mode" ) );
00060       m_pFullScreen->setToolTip(i18n("Full-screen mode"));
00061       m_pFullScreen->setIcon( "window_fullscreen" );*/
00062    }
00063 }
00064 
00065 
00066 #include "fullscreen_part.moc"
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Feb 22 09:22:41 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003