Back to index

unity  6.0.0
LauncherOptions.cpp
Go to the documentation of this file.
00001 // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
00002 /*
00003  * Copyright (C) 2010, 2011 Canonical Ltd
00004  *
00005  * This program is free software: you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License version 3 as
00007  * published by the Free Software Foundation.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016  *
00017  * Authored by: Jason Smith <jason.smith@canonical.com>
00018  *              Tim Penhey <tim.penhey@canonical.com>
00019  */
00020 
00021 #include "LauncherOptions.h"
00022 
00023 namespace unity
00024 {
00025 namespace launcher
00026 {
00027 
00028 Options::Options()
00029 {
00030   // defaults from XML file
00031   auto_hide_animation = FADE_AND_SLIDE;
00032   background_alpha = 0.6667;
00033   backlight_mode = BACKLIGHT_ALWAYS_ON;
00034   edge_decay_rate = 1500;
00035   edge_overcome_pressure = 2000;
00036   edge_responsiveness = 2.0f;
00037   edge_reveal_pressure = 2000;
00038   edge_stop_velocity = 6500;
00039   hide_mode = LAUNCHER_HIDE_NEVER;
00040   icon_size = 48;
00041   launch_animation = LAUNCH_ANIMATION_PULSE;
00042   reveal_trigger = RevealTrigger::EDGE;
00043   tile_size = 54;
00044   urgent_animation = URGENT_ANIMATION_WIGGLE;
00045   edge_resist = true;
00046   show_for_all = false;
00047 
00048   auto_hide_animation.changed.connect   ([&] (AutoHideAnimation value)-> void { option_changed.emit(); });
00049   background_alpha.changed.connect      ([&] (float value)            -> void { option_changed.emit(); });
00050   backlight_mode.changed.connect        ([&] (BacklightMode value)    -> void { option_changed.emit(); });
00051   edge_decay_rate.changed.connect       ([&] (int value)              -> void { option_changed.emit(); });
00052   edge_overcome_pressure.changed.connect([&] (int value)              -> void { option_changed.emit(); });
00053   edge_responsiveness.changed.connect   ([&] (float value)            -> void { option_changed.emit(); });
00054   edge_reveal_pressure.changed.connect  ([&] (int value)              -> void { option_changed.emit(); });
00055   edge_stop_velocity.changed.connect    ([&] (int value)              -> void { option_changed.emit(); });
00056   hide_mode.changed.connect             ([&] (LauncherHideMode value) -> void { option_changed.emit(); });
00057   icon_size.changed.connect             ([&] (int value)              -> void { option_changed.emit(); });
00058   launch_animation.changed.connect      ([&] (LaunchAnimation value)  -> void { option_changed.emit(); });
00059   reveal_trigger.changed.connect        ([&] (RevealTrigger vallue)   -> void { option_changed.emit(); });
00060   tile_size.changed.connect             ([&] (int value)              -> void { option_changed.emit(); });
00061   urgent_animation.changed.connect      ([&] (UrgentAnimation value)  -> void { option_changed.emit(); });
00062   edge_resist.changed.connect           ([&] (bool value)             -> void { option_changed.emit(); });
00063 }
00064 
00065 
00066 }
00067 }