Add config dialog for trackmouse.
It doesn't let you configure anything yet, just shows which keys activate the effect. But hopefully one day it will be configurable as well. svn path=/trunk/KDE/kdebase/workspace/; revision=736297
This commit is contained in:
parent
1daba58c35
commit
797bece861
5 changed files with 155 additions and 0 deletions
|
@ -140,6 +140,7 @@ if(OPENGL_FOUND)
|
|||
mousemark_config.cpp
|
||||
mousemark_config.ui
|
||||
sharpen_config.cpp
|
||||
trackmouse_config.cpp
|
||||
)
|
||||
install( FILES
|
||||
invert_config.desktop
|
||||
|
@ -147,6 +148,7 @@ if(OPENGL_FOUND)
|
|||
magnifier_config.desktop
|
||||
mousemark_config.desktop
|
||||
sharpen_config.desktop
|
||||
trackmouse_config.desktop
|
||||
DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
|
||||
endif(OPENGL_FOUND)
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ License. See the file "COPYING" for the exact licensing terms.
|
|||
#include "mousemark_config.h"
|
||||
#include "magnifier_config.h"
|
||||
#include "sharpen_config.h"
|
||||
#include "trackmouse_config.h"
|
||||
#endif
|
||||
|
||||
#include <kwineffects.h>
|
||||
|
@ -47,6 +48,7 @@ K_PLUGIN_FACTORY_DEFINITION(EffectFactory,
|
|||
registerPlugin<KWin::MouseMarkEffectConfig>("mousemark");
|
||||
registerPlugin<KWin::MagnifierEffectConfig>("magnifier");
|
||||
registerPlugin<KWin::SharpenEffectConfig>("sharpen");
|
||||
registerPlugin<KWin::TrackMouseEffectConfig>("trackmouse");
|
||||
#endif
|
||||
)
|
||||
K_EXPORT_PLUGIN(EffectFactory("kwin"))
|
||||
|
|
76
effects/trackmouse_config.cpp
Normal file
76
effects/trackmouse_config.cpp
Normal file
|
@ -0,0 +1,76 @@
|
|||
/*****************************************************************
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
Copyright (C) 2007 Rivo Laks <rivolaks@hot.ee>
|
||||
|
||||
You can Freely distribute this program under the GNU General Public
|
||||
License. See the file "COPYING" for the exact licensing terms.
|
||||
******************************************************************/
|
||||
|
||||
#include "trackmouse_config.h"
|
||||
|
||||
#include <kwineffects.h>
|
||||
|
||||
#include <klocale.h>
|
||||
#include <kdebug.h>
|
||||
#include <KActionCollection>
|
||||
#include <kaction.h>
|
||||
#include <KShortcutsEditor>
|
||||
#include <KGlobalAccel>
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QLabel>
|
||||
#ifndef KDE_USE_FINAL
|
||||
KWIN_EFFECT_CONFIG_FACTORY
|
||||
#endif
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
TrackMouseEffectConfig::TrackMouseEffectConfig(QWidget* parent, const QVariantList& args) :
|
||||
KCModule(EffectFactory::componentData(), parent, args)
|
||||
{
|
||||
KGlobalAccel::self()->overrideMainComponentData(componentData());
|
||||
kDebug() ;
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout(this);
|
||||
QLabel* label = new QLabel(i18n("Hold Ctrl+Meta keys to see where the mouse cursor is."), this);
|
||||
layout->addWidget(label);
|
||||
|
||||
layout->addStretch();
|
||||
|
||||
load();
|
||||
}
|
||||
|
||||
TrackMouseEffectConfig::~TrackMouseEffectConfig()
|
||||
{
|
||||
kDebug() ;
|
||||
}
|
||||
|
||||
void TrackMouseEffectConfig::load()
|
||||
{
|
||||
kDebug() ;
|
||||
KCModule::load();
|
||||
|
||||
emit changed(false);
|
||||
}
|
||||
|
||||
void TrackMouseEffectConfig::save()
|
||||
{
|
||||
kDebug() ;
|
||||
KCModule::save();
|
||||
|
||||
emit changed(false);
|
||||
EffectsHandler::sendReloadMessage( "trackmouse" );
|
||||
}
|
||||
|
||||
void TrackMouseEffectConfig::defaults()
|
||||
{
|
||||
kDebug() ;
|
||||
emit changed(true);
|
||||
}
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
#include "trackmouse_config.moc"
|
37
effects/trackmouse_config.desktop
Normal file
37
effects/trackmouse_config.desktop
Normal file
|
@ -0,0 +1,37 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Type=Service
|
||||
ServiceTypes=KCModule
|
||||
|
||||
X-KDE-Library=kcm_kwin4_effect_builtins
|
||||
X-KDE-ParentComponents=kwin4_effect_trackmouse
|
||||
X-KDE-PluginKeyword=trackmouse
|
||||
|
||||
Name=Track Mouse
|
||||
Name[be]=Адследжваць мыш
|
||||
Name[bg]=Мишка
|
||||
Name[de]=Mausspur
|
||||
Name[el]=Ανίχνευση ποντικιού
|
||||
Name[es]=Seguir el ratón
|
||||
Name[et]=Hiire jälgimine
|
||||
Name[fa]=ردگیری موشی
|
||||
Name[he]=עקבות עכבר
|
||||
Name[ja]=トラックマウス
|
||||
Name[kk]=Тышқандың ізі
|
||||
Name[km]=ដានកណ្តុរ
|
||||
Name[ko]=마우스 추적
|
||||
Name[nb]=Spor mus
|
||||
Name[nds]=Muusspoor
|
||||
Name[ne]=ट्रयाक माउस
|
||||
Name[nl]=Muis volgen
|
||||
Name[nn]=Følg mus
|
||||
Name[pa]=ਮਾਊਸ ਟਰੈਕ
|
||||
Name[pt]=Seguir o Rato
|
||||
Name[pt_BR]=Seguir o Mouse
|
||||
Name[sr]=Праћење миша
|
||||
Name[sr@latin]=Praćenje miša
|
||||
Name[sv]=Musspår
|
||||
Name[vi]=Vết chuột
|
||||
Name[x-test]=xxTrack Mousexx
|
||||
Name[zh_CN]=跟踪鼠标
|
||||
Name[zh_TW]=追蹤滑鼠
|
38
effects/trackmouse_config.h
Normal file
38
effects/trackmouse_config.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*****************************************************************
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
Copyright (C) 2007 Rivo Laks <rivolaks@hot.ee>
|
||||
|
||||
You can Freely distribute this program under the GNU General Public
|
||||
License. See the file "COPYING" for the exact licensing terms.
|
||||
******************************************************************/
|
||||
|
||||
#ifndef KWIN_TRACKMOUSE_CONFIG_H
|
||||
#define KWIN_TRACKMOUSE_CONFIG_H
|
||||
|
||||
#define KDE3_SUPPORT
|
||||
#include <kcmodule.h>
|
||||
#undef KDE3_SUPPORT
|
||||
|
||||
class KShortcutsEditor;
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
class TrackMouseEffectConfig : public KCModule
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit TrackMouseEffectConfig(QWidget* parent = 0, const QVariantList& args = QVariantList());
|
||||
~TrackMouseEffectConfig();
|
||||
|
||||
public slots:
|
||||
virtual void save();
|
||||
virtual void load();
|
||||
virtual void defaults();
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue