mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
generic: misc cleanups
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
abc2fe9599
commit
96cd9afe7b
12 changed files with 5 additions and 7587 deletions
|
@ -9,9 +9,7 @@
|
|||
#define __kcmaccess_h__
|
||||
|
||||
|
||||
#define KDE3_SUPPORT
|
||||
#include <kcmodule.h>
|
||||
#undef KDE3_SUPPORT
|
||||
#include <knuminput.h>
|
||||
|
||||
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
#ifndef _JOYSTICK_H_
|
||||
#define _JOYSTICK_H_
|
||||
|
||||
#define KDE3_SUPPORT
|
||||
#include <kcmodule.h>
|
||||
#undef KDE3_SUPPORT
|
||||
|
||||
class JoyWidget;
|
||||
|
||||
|
|
|
@ -19,9 +19,7 @@
|
|||
#ifndef ICONTHEMES_H
|
||||
#define ICONTHEMES_H
|
||||
|
||||
#define KDE3_SUPPORT
|
||||
#include <kcmodule.h>
|
||||
#undef KDE3_SUPPORT
|
||||
#include <QLabel>
|
||||
|
||||
class KPushButton;
|
||||
|
|
|
@ -25,10 +25,8 @@
|
|||
|
||||
#include <dcopobject.h>
|
||||
|
||||
#define KDE3_SUPPORT
|
||||
#include <kcmodule.h>
|
||||
#include <QtCore/qvariant.h>
|
||||
#undef KDE3_SUPPORT
|
||||
|
||||
#include "smartcardbase.h"
|
||||
#include "nosmartcardbase.h"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
install( FILES
|
||||
install(
|
||||
FILES
|
||||
defaults.khotkeys
|
||||
kde32b1.khotkeys
|
||||
konqueror_gestures_kde321.khotkeys
|
||||
printscreen.khotkeys
|
||||
DESTINATION ${DATA_INSTALL_DIR}/khotkeys )
|
||||
DESTINATION ${DATA_INSTALL_DIR}/khotkeys
|
||||
)
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -352,9 +352,6 @@ void SettingsReaderV2::visit(KHotKeys::DBusAction& action)
|
|||
|
||||
void SettingsReaderV2::visit(KHotKeys::GestureTrigger& trigger)
|
||||
{
|
||||
if (_config->hasKey("Gesture"))
|
||||
trigger.setKDE3Gesture(_config->readEntry("Gesture"));
|
||||
else
|
||||
trigger.setPointData(_config->readEntry("GesturePointData", QStringList()));
|
||||
}
|
||||
|
||||
|
|
|
@ -177,97 +177,6 @@ void GestureTrigger::handle_gesture( const StrokePoints &pointdata_P )
|
|||
}
|
||||
|
||||
|
||||
|
||||
// try to import a gesture from KDE3 times which is composed of a string of
|
||||
// numbers
|
||||
void GestureTrigger::setKDE3Gesture(const QString &gestureCode)
|
||||
{
|
||||
if(gestureCode.isEmpty())
|
||||
{
|
||||
_pointdata.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
Stroke stroke;
|
||||
|
||||
// the old format has very little data, so we'll interpolate a little
|
||||
// to make it work with the new format.
|
||||
// as the stroke expects the data in integer format we'll use large numbers.
|
||||
int oldx = -1;
|
||||
int oldy = -1;
|
||||
int newx = 0;
|
||||
int newy = 0;
|
||||
|
||||
for(int i=0; i < gestureCode.length(); i++)
|
||||
{
|
||||
switch(gestureCode[i].toAscii())
|
||||
{
|
||||
case '1':
|
||||
newx = 0;
|
||||
newy = 2000;
|
||||
break;
|
||||
case '2':
|
||||
newx = 1000;
|
||||
newy = 2000;
|
||||
break;
|
||||
case '3':
|
||||
newx = 2000;
|
||||
newy = 2000;
|
||||
break;
|
||||
case '4':
|
||||
newx = 0;
|
||||
newy = 1000;
|
||||
break;
|
||||
case '5':
|
||||
newx = 1000;
|
||||
newy = 1000;
|
||||
break;
|
||||
case '6':
|
||||
newx = 2000;
|
||||
newy = 1000;
|
||||
break;
|
||||
case '7':
|
||||
newx = 0;
|
||||
newy = 0;
|
||||
break;
|
||||
case '8':
|
||||
newx = 1000;
|
||||
newy = 0;
|
||||
break;
|
||||
case '9':
|
||||
newx = 2000;
|
||||
newy = 0;
|
||||
break;
|
||||
|
||||
default: return;
|
||||
}
|
||||
|
||||
// interpolate
|
||||
if(oldx != -1)
|
||||
{
|
||||
stroke.record( oldx + 1 * (newx-oldx)/4.0 , oldy + 1 * (newy-oldy)/4.0 );
|
||||
stroke.record( oldx + 2 * (newx-oldx)/4.0 , oldy + 2 * (newy-oldy)/4.0 );
|
||||
stroke.record( oldx + 3 * (newx-oldx)/4.0 , oldy + 3 * (newy-oldy)/4.0 );
|
||||
}
|
||||
|
||||
// add the one point that is really known
|
||||
stroke.record(newx, newy);
|
||||
|
||||
oldx = newx;
|
||||
oldy = newy;
|
||||
|
||||
}
|
||||
|
||||
// the calculations for the new format chop off some points at the end.
|
||||
// that's usually no problem, but here we'll want to compensate
|
||||
stroke.record(newx, newy);
|
||||
stroke.record(newx, newy);
|
||||
stroke.record(newx, newy);
|
||||
|
||||
_pointdata = stroke.processData();
|
||||
}
|
||||
|
||||
|
||||
// Create a score for how well two strokes match.
|
||||
// Algorithm taken from EasyStroke 0.4.1, modified to work in C++ and commented
|
||||
// for better maintainability. The algorithm logic should still be the same.
|
||||
|
|
|
@ -330,7 +330,6 @@ class KDE_EXPORT GestureTrigger
|
|||
//! Set the point data of the gesture
|
||||
void setPointData(const StrokePoints &data);
|
||||
void setPointData(const QStringList &strings);
|
||||
void setKDE3Gesture(const QString &gestureCode);
|
||||
|
||||
virtual void activate( bool activate_P );
|
||||
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
#ifndef __kcmsmserver_h__
|
||||
#define __kcmsmserver_h__
|
||||
|
||||
#define KDE3_SUPPORT
|
||||
#include <kcmodule.h>
|
||||
#undef KDE3_SUPPORT
|
||||
|
||||
class SMServerConfigImpl;
|
||||
|
||||
|
|
|
@ -153,13 +153,6 @@ void ServiceRunner::match(Plasma::RunnerContext &context)
|
|||
continue;
|
||||
}
|
||||
|
||||
// This is an older version, let's disambiguate it
|
||||
QString subtext("KDE3");
|
||||
|
||||
if (!match.subtext().isEmpty()) {
|
||||
subtext.append(", " + match.subtext());
|
||||
}
|
||||
|
||||
match.setSubtext(subtext);
|
||||
} else {
|
||||
relevance += .1;
|
||||
|
|
Loading…
Add table
Reference in a new issue