fullscreen_part.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
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
00049 mainWindow()->main()->showFullScreen();
00050
00051
00052
00053
00054 } else {
00055
00056
00057 mainWindow()->main()->showNormal();
00058
00059
00060
00061
00062 }
00063 }
00064
00065
00066 #include "fullscreen_part.moc"
This file is part of the documentation for KDevelop Version 3.1.2.