Browse Source

kmilo: added keyboard shortcuts for fine settings of screen brightness.

Signed-off-by: Roman Savochenko <roman@oscada.org>
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/29/head
Roman Savochenko 1 month ago
committed by Michele Calgaro
parent
commit
5c212d1abc
Signed by: MicheleC GPG Key ID: 2A75B7CA8ADED5CF
2 changed files with 15 additions and 1 deletions
  1. +13
    -1
      kmilo/generic/generic_monitor.cpp
  2. +2
    -0
      kmilo/generic/generic_monitor.h

+ 13
- 1
kmilo/generic/generic_monitor.cpp View File

@@ -69,7 +69,9 @@ static const ShortcutInfo shortcuts[] =
{ "SlowVolumeDown", TQt::CTRL+TQt::Key_VolumeDown, TQT_SLOT(slowVolumeDown()) },
{ "Mute", TDEShortcut("XF86AudioMute"), TQT_SLOT(toggleMute()) },
{ "BrightnessUp", TDEShortcut("XF86MonBrightnessUp"), TQT_SLOT(brightnessUp()) },
{ "BrightnessDown", TDEShortcut("XF86MonBrightnessDown"), TQT_SLOT(brightnessDown()) }
{ "BrightnessDown", TDEShortcut("XF86MonBrightnessDown"), TQT_SLOT(brightnessDown()) },
{ "BrightnessSlowUp", TDEShortcut("Ctrl+XF86MonBrightnessUp"), TQT_SLOT(brightnessSlowUp()) },
{ "BrightnessSlowDown", TDEShortcut("Ctrl+XF86MonBrightnessDown"), TQT_SLOT(brightnessSlowDown()) }
};

GenericMonitor::GenericMonitor(TQObject *parent, const char *name, const TQStringList& args)
@@ -261,6 +263,16 @@ void GenericMonitor::brightnessDown()
brightnessChange(-1, 10);
}

void GenericMonitor::brightnessSlowUp()
{
brightnessChange(1, 1);
}

void GenericMonitor::brightnessSlowDown()
{
brightnessChange(-1, 1);
}

void GenericMonitor::brightnessChange(int direction, int step)
{
if (!tdepowersave)


+ 2
- 0
kmilo/generic/generic_monitor.h View File

@@ -57,6 +57,8 @@ public slots:
void toggleMute();
void brightnessUp();
void brightnessDown();
void brightnessSlowUp();
void brightnessSlowDown();
void launchMail();
void launchBrowser();
void launchSearch();


Loading…
Cancel
Save