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 | |
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')
-rw-r--r-- | parts/fullscreen/Makefile.am | 15 | ||||
-rw-r--r-- | parts/fullscreen/README.dox | 10 | ||||
-rw-r--r-- | parts/fullscreen/fullscreen_part.cpp | 72 | ||||
-rw-r--r-- | parts/fullscreen/fullscreen_part.h | 36 | ||||
-rw-r--r-- | parts/fullscreen/kdevfullscreen.desktop | 86 | ||||
-rw-r--r-- | parts/fullscreen/kdevpart_fullscreen.rc | 12 |
6 files changed, 231 insertions, 0 deletions
diff --git a/parts/fullscreen/Makefile.am b/parts/fullscreen/Makefile.am new file mode 100644 index 00000000..3fecf8e5 --- /dev/null +++ b/parts/fullscreen/Makefile.am @@ -0,0 +1,15 @@ +INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) + +kde_module_LTLIBRARIES = libkdevfullscreen.la +libkdevfullscreen_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevfullscreen_la_LIBADD = $(top_builddir)/lib/libkdevelop.la + +libkdevfullscreen_la_SOURCES = fullscreen_part.cpp + +METASOURCES = AUTO + +servicedir = $(kde_servicesdir) +service_DATA = kdevfullscreen.desktop + +rcdir = $(kde_datadir)/kdevfullscreen +rc_DATA = kdevpart_fullscreen.rc diff --git a/parts/fullscreen/README.dox b/parts/fullscreen/README.dox new file mode 100644 index 00000000..10f74509 --- /dev/null +++ b/parts/fullscreen/README.dox @@ -0,0 +1,10 @@ +/** \class FullScreenPart +Displays KDevelop in full screen + +\authors <a href="mailto:roberto AT kdevelop.org">Roberto Raggi</a> + +\maintainer <a href="mailto:roberto AT kdevelop.org">Roberto Raggi</a> + +\feature Displays KDevelop in full screen + +*/ 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" diff --git a/parts/fullscreen/fullscreen_part.h b/parts/fullscreen/fullscreen_part.h new file mode 100644 index 00000000..a7ce3c0a --- /dev/null +++ b/parts/fullscreen/fullscreen_part.h @@ -0,0 +1,36 @@ +/*************************************************************************** + * 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. * + * * + ***************************************************************************/ + +#ifndef __KDEVPART_FULLSCREEN_H__ +#define __KDEVPART_FULLSCREEN_H__ + +#include <qguardedptr.h> +#include <kdevplugin.h> + +class KAction; + +class FullScreenPart : public KDevPlugin +{ + Q_OBJECT +public: + FullScreenPart(QObject *parent, const char *name, const QStringList &); + virtual ~FullScreenPart(); + +public slots: + void slotToggleFullScreen(); + +private: + KToggleFullScreenAction* m_pFullScreen; + bool m_bFullScreen; +}; + + +#endif diff --git a/parts/fullscreen/kdevfullscreen.desktop b/parts/fullscreen/kdevfullscreen.desktop new file mode 100644 index 00000000..e9cf55f0 --- /dev/null +++ b/parts/fullscreen/kdevfullscreen.desktop @@ -0,0 +1,86 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=FullScreen +Comment[br]=Skramm leun +Comment[ca]=Pantalla completa +Comment[da]=Fuldskærm +Comment[de]=Vollbild +Comment[el]=ΠλήρηςΟθόνη +Comment[es]=Pantalla completa +Comment[eu]=Pantaila osoa +Comment[fa]=تمام صفحه +Comment[fr]=Plein écran +Comment[ga]=Lánscáileán +Comment[hi]=फुल-स्क्रीन +Comment[hu]=Teljes képernyő +Comment[it]=Schermo pieno +Comment[ja]=フルスクリーン +Comment[ms]=SkrinPenuh +Comment[nds]=Heel Schirm +Comment[ne]=पूरा पर्दा +Comment[nl]=Volledig scherm +Comment[pl]=Pełny ekran +Comment[pt]=Todo o Ecrã +Comment[pt_BR]=Tela Cheia +Comment[ru]=Полноэкранный режим +Comment[sk]=Celá obrazovka +Comment[sl]=Celozaslonski način +Comment[sr]=Преко целог екрана +Comment[sr@Latn]=Preko celog ekrana +Comment[sv]=Fullskärm +Comment[ta]=முழுத்திரை +Comment[tg]=Тартиботи экрани пурра +Comment[tr]=Tam Ekran +Comment[zh_CN]=全屏 +Comment[zh_TW]=全螢幕 +Name=KDevFullScreen +Name[da]=KDevelop fuldskærm +Name[de]=Vollbild (KDevelop) +Name[hi]=के-डेव-फुलस्क्रीन +Name[nds]=KDevelop-Heelschirm +Name[pl]=KDevPełnyEkran +Name[sk]=KDev celá obrazovka +Name[sv]=KDevelop fullskärm +Name[ta]=KDev முழுத்திரை +Name[tg]=Васеъкуниии KDev +Name[zh_TW]=KDevelop 全螢幕 +GenericName=FullScreen +GenericName[br]=Skramm leun +GenericName[ca]=Pantalla completa +GenericName[da]=Fuldskærm +GenericName[de]=Vollbild +GenericName[el]=ΠλήρηςΟθόνη +GenericName[es]=Pantalla completa +GenericName[et]=Täisekraan +GenericName[eu]=Pantaila osoa +GenericName[fa]=تمام صفحه +GenericName[fr]=Plein écran +GenericName[ga]=Lánscáileán +GenericName[hi]=फुल-स्क्रीन +GenericName[hu]=Teljes képernyő +GenericName[it]=Schermo pieno +GenericName[ja]=フルスクリーン +GenericName[nds]=Heel Schirm +GenericName[ne]=पूरा पर्दा +GenericName[nl]=Volledig scherm +GenericName[pl]=Pełny ekran +GenericName[pt]=Todo o Ecrã +GenericName[pt_BR]=Tela Cheia +GenericName[ru]=Полноэкранный режим +GenericName[sk]=Celá obrazovka +GenericName[sl]=Celozaslonski način +GenericName[sr]=Преко целог екрана +GenericName[sr@Latn]=Preko celog ekrana +GenericName[sv]=Fullskärm +GenericName[ta]=முழுத்திரை +GenericName[tg]=Тартиботи экрани пурра +GenericName[tr]=Tam Ekran +GenericName[zh_CN]=全屏 +GenericName[zh_TW]=全螢幕 +Icon=kdevelop +ServiceTypes=KDevelop/Plugin +X-KDevelop-Scope=Core +X-KDE-Library=libkdevfullscreen +X-KDevelop-Version=5 +X-KDevelop-Properties=ViewManagement diff --git a/parts/fullscreen/kdevpart_fullscreen.rc b/parts/fullscreen/kdevpart_fullscreen.rc new file mode 100644 index 00000000..3bd67c9d --- /dev/null +++ b/parts/fullscreen/kdevpart_fullscreen.rc @@ -0,0 +1,12 @@ +<!DOCTYPE kpartgui> +<kpartplugin name="fullscreen" library="libfullscreenplugin" version="3"> +<MenuBar> + <Menu name="settings"> + <Text>&Settings</Text> + <Action name="fullscreen" group="show_merge"/> + </Menu> +</MenuBar> +<ToolBar name="mainToolBar"> + <Action name="fullscreen" group="screenmode_operations"/> +</ToolBar> +</kpartplugin> |