diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch) | |
tree | acaf47eb0fa12142d3896416a69e74cbf5a72242 /parts/fullscreen/fullscreen_part.cpp | |
download | tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/fullscreen/fullscreen_part.cpp')
-rw-r--r-- | parts/fullscreen/fullscreen_part.cpp | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/parts/fullscreen/fullscreen_part.cpp b/parts/fullscreen/fullscreen_part.cpp new file mode 100644 index 00000000..20e046f1 --- /dev/null +++ b/parts/fullscreen/fullscreen_part.cpp @@ -0,0 +1,72 @@ +/*************************************************************************** + * Copyright (C) 2003 by Roberto Raggi * + * roberto@kdevelop.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include <kiconloader.h> +#include <klocale.h> +#include <kdevgenericfactory.h> +#include <kstdaction.h> +#include <kmainwindow.h> +#include <kmenubar.h> + +#include <kdevcore.h> +#include <kdevmainwindow.h> +#include <kdevplugininfo.h> + +#include "fullscreen_part.h" + +static const KDevPluginInfo data("kdevfullscreen"); + +typedef KDevGenericFactory<FullScreenPart> FullScreenFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevfullscreen, FullScreenFactory( data ) ) + +FullScreenPart::FullScreenPart(QObject *parent, const char *name, const QStringList& ) + : KDevPlugin(&data, parent, name ? name : "FullScreenPart" ) +{ + setInstance(FullScreenFactory::instance()); +// const KAboutData &abdata1 = *(info()); +// kdDebug() << abdata1.appName() << endl; + const KDevPluginInfo &_info = *info(); + const KAboutData *abdata = _info; + kdDebug() << abdata->appName() << endl; + setXMLFile("kdevpart_fullscreen.rc"); + + m_bFullScreen = false; + + m_pFullScreen = KStdAction::fullScreen(this, SLOT(slotToggleFullScreen()), actionCollection(), mainWindow()->main()); +} + +FullScreenPart::~FullScreenPart() +{ +} + +void FullScreenPart::slotToggleFullScreen( ) +{ + m_bFullScreen = !m_bFullScreen; + if( m_bFullScreen ){ + //mw->menuBar()->hide(); + mainWindow()->main()->showFullScreen(); + + /*m_pFullScreen->setText( i18n( "Exit Full-Screen Mode" ) ); + m_pFullScreen->setToolTip( i18n( "Exit full-screen mode" ) ); + m_pFullScreen->setIcon( "window_nofullscreen" );*/ + } else { + //mw->menuBar()->show(); + + mainWindow()->main()->showNormal(); + + /*m_pFullScreen->setText( i18n( "&Full-Screen Mode" ) ); + m_pFullScreen->setToolTip(i18n("Full-screen mode")); + m_pFullScreen->setIcon( "window_fullscreen" );*/ + } +} + + +#include "fullscreen_part.moc" |