diff --git a/configure.ac b/configure.ac index c2d7ebcaa9c5e9961f7918f39f29a10ddf7804e4..80a361aad82e14ad163ee23f29357319b5b9ea34 100644 --- a/configure.ac +++ b/configure.ac @@ -30,15 +30,16 @@ AC_LANG_CPLUSPLUS AC_PROG_CXX AC_PROG_CC -dnl AM_GNU_GETTEXT +AC_PATH_QT +AC_CHECK_COMPILERS +AC_SUBST(LIBQT) + +LIBS="$LIBS -lstdc++ $LIB_QT" -dnl AC_PATH_QT -dnl KDE_USE_QT(3.3) AC_CANONICAL_SYSTEM AC_ARG_PROGRAM AM_INIT_AUTOMAKE(sflphoned, $VERSION) AC_PROG_LIBTOOL -dnl AC_CHECK_COMPILERS dnl check for portaudio LP_SETUP_PORTAUDIO @@ -168,6 +169,7 @@ debian/changelog \ sflphone.spec \ Makefile \ m4/Makefile \ +libs/taxidermy/Makefile \ libs/Makefile \ libs/eXosip2/Makefile \ libs/portaudio/Makefile \ @@ -177,6 +179,9 @@ libs/utilspp/functor/Makefile \ libs/utilspp/singleton/Makefile \ include/Makefile \ include/eXosip2/Makefile \ +skins/Makefile \ +skins/metal/Makefile \ +skins/gmetal/Makefile \ src/Makefile \ src/sflphone \ src/audio/Makefile \ @@ -188,6 +193,7 @@ src/audio/pacpp/source/Makefile \ src/audio/pacpp/source/portaudiocpp/Makefile \ src/config/Makefile \ src/gui/Makefile \ +src/gui/qt/Makefile \ src/gui/server/Makefile \ src/zeroconf/Makefile \ ringtones/Makefile \ diff --git a/images/about.png b/images/about.png new file mode 100644 index 0000000000000000000000000000000000000000..03600d6b0ac02bf687795ff13aab794e4ba8f5e6 Binary files /dev/null and b/images/about.png differ diff --git a/images/audio.png b/images/audio.png new file mode 100644 index 0000000000000000000000000000000000000000..d43e938810f27edf8f62a0d3cf5914e92e14086b Binary files /dev/null and b/images/audio.png differ diff --git a/images/clear_off.png b/images/clear_off.png new file mode 100644 index 0000000000000000000000000000000000000000..be1436097c210a578bb51be5f8d15f89da387314 Binary files /dev/null and b/images/clear_off.png differ diff --git a/images/clear_on.png b/images/clear_on.png new file mode 100644 index 0000000000000000000000000000000000000000..9605e89ae9d104ab2d627a27f7c4ddcffb42ff94 Binary files /dev/null and b/images/clear_on.png differ diff --git a/images/close_off.png b/images/close_off.png new file mode 100644 index 0000000000000000000000000000000000000000..e962b31b1630f1cfababa9f153fd97d7ee56058f Binary files /dev/null and b/images/close_off.png differ diff --git a/images/close_on.png b/images/close_on.png new file mode 100644 index 0000000000000000000000000000000000000000..747c7fb09c461bef92cb4fdf9af9cc03fa7e9731 Binary files /dev/null and b/images/close_on.png differ diff --git a/images/conference_off.png b/images/conference_off.png new file mode 100644 index 0000000000000000000000000000000000000000..e395b4c1545ab57b5f717c5e5e61d9866fad2704 Binary files /dev/null and b/images/conference_off.png differ diff --git a/images/conference_on.png b/images/conference_on.png new file mode 100644 index 0000000000000000000000000000000000000000..a565e16d30e2a96b5a4b06f0767bc40dffbae0d8 Binary files /dev/null and b/images/conference_on.png differ diff --git a/images/directory_off.png b/images/directory_off.png new file mode 100644 index 0000000000000000000000000000000000000000..549106a473846a7fc39cec736876a4d57b7ef3d9 Binary files /dev/null and b/images/directory_off.png differ diff --git a/images/directory_on.png b/images/directory_on.png new file mode 100644 index 0000000000000000000000000000000000000000..265075178051802e1195dfa022b596310b1caccf Binary files /dev/null and b/images/directory_on.png differ diff --git a/images/dtmf_0_off.png b/images/dtmf_0_off.png new file mode 100644 index 0000000000000000000000000000000000000000..1b4a2ebe466177aaa91c951c306cf139940983d2 Binary files /dev/null and b/images/dtmf_0_off.png differ diff --git a/images/dtmf_0_on.png b/images/dtmf_0_on.png new file mode 100644 index 0000000000000000000000000000000000000000..57c0f4fcee858e98d94a5c8d0663622b33065366 Binary files /dev/null and b/images/dtmf_0_on.png differ diff --git a/images/dtmf_1_off.png b/images/dtmf_1_off.png new file mode 100644 index 0000000000000000000000000000000000000000..0b47b61c32f73d098a994a3b87796bad9f24cf4c Binary files /dev/null and b/images/dtmf_1_off.png differ diff --git a/images/dtmf_1_on.png b/images/dtmf_1_on.png new file mode 100644 index 0000000000000000000000000000000000000000..737e614cf153e1e6d2abdf6c2318bbefb54bd48b Binary files /dev/null and b/images/dtmf_1_on.png differ diff --git a/images/dtmf_2_off.png b/images/dtmf_2_off.png new file mode 100644 index 0000000000000000000000000000000000000000..6e8a44e7d7f87a785267c478e84e54795eba1987 Binary files /dev/null and b/images/dtmf_2_off.png differ diff --git a/images/dtmf_2_on.png b/images/dtmf_2_on.png new file mode 100644 index 0000000000000000000000000000000000000000..978fe76f592f570279a9a7d267d9595b23e68f7e Binary files /dev/null and b/images/dtmf_2_on.png differ diff --git a/images/dtmf_3_off.png b/images/dtmf_3_off.png new file mode 100644 index 0000000000000000000000000000000000000000..6688cadc488b61b25592a5edfc553e4dd309e95d Binary files /dev/null and b/images/dtmf_3_off.png differ diff --git a/images/dtmf_3_on.png b/images/dtmf_3_on.png new file mode 100644 index 0000000000000000000000000000000000000000..28f1b655763540078018b971c8d8bad761e6bf57 Binary files /dev/null and b/images/dtmf_3_on.png differ diff --git a/images/dtmf_4_off.png b/images/dtmf_4_off.png new file mode 100644 index 0000000000000000000000000000000000000000..d37207a4b98c686cf6ea0c058edb59a08baf71cc Binary files /dev/null and b/images/dtmf_4_off.png differ diff --git a/images/dtmf_4_on.png b/images/dtmf_4_on.png new file mode 100644 index 0000000000000000000000000000000000000000..1ef21959008f13919df13d48e9695013a84816d7 Binary files /dev/null and b/images/dtmf_4_on.png differ diff --git a/images/dtmf_5_off.png b/images/dtmf_5_off.png new file mode 100644 index 0000000000000000000000000000000000000000..48ce1373bf1970c0b711566f71ed08473b2ca6a4 Binary files /dev/null and b/images/dtmf_5_off.png differ diff --git a/images/dtmf_5_on.png b/images/dtmf_5_on.png new file mode 100644 index 0000000000000000000000000000000000000000..40b08cb37d6e9cab1002c29e963acf51ec0126d7 Binary files /dev/null and b/images/dtmf_5_on.png differ diff --git a/images/dtmf_6_off.png b/images/dtmf_6_off.png new file mode 100644 index 0000000000000000000000000000000000000000..33667c242a61ecc99f97f2cda4ebd00065b4e750 Binary files /dev/null and b/images/dtmf_6_off.png differ diff --git a/images/dtmf_6_on.png b/images/dtmf_6_on.png new file mode 100644 index 0000000000000000000000000000000000000000..cc36556546babec6de6da07db5e03e4af759a63c Binary files /dev/null and b/images/dtmf_6_on.png differ diff --git a/images/dtmf_7_off.png b/images/dtmf_7_off.png new file mode 100644 index 0000000000000000000000000000000000000000..a401f432537fd4498cadf001cbd6ad65905bbcda Binary files /dev/null and b/images/dtmf_7_off.png differ diff --git a/images/dtmf_7_on.png b/images/dtmf_7_on.png new file mode 100644 index 0000000000000000000000000000000000000000..e6adb35e516c38b24193ceb3c5a4f40c13d52778 Binary files /dev/null and b/images/dtmf_7_on.png differ diff --git a/images/dtmf_8_off.png b/images/dtmf_8_off.png new file mode 100644 index 0000000000000000000000000000000000000000..4db35c37d7613a166808fd8e5854a9f163c5d674 Binary files /dev/null and b/images/dtmf_8_off.png differ diff --git a/images/dtmf_8_on.png b/images/dtmf_8_on.png new file mode 100644 index 0000000000000000000000000000000000000000..50f0bf36beacbe9a30246ad0c4dd1aedc95e4570 Binary files /dev/null and b/images/dtmf_8_on.png differ diff --git a/images/dtmf_9_off.png b/images/dtmf_9_off.png new file mode 100644 index 0000000000000000000000000000000000000000..8a678a4c63eab850e5cebeebc0fa1f34966eb078 Binary files /dev/null and b/images/dtmf_9_off.png differ diff --git a/images/dtmf_9_on.png b/images/dtmf_9_on.png new file mode 100644 index 0000000000000000000000000000000000000000..12e4c1a11c756f793080a0ac7ae433376918fe91 Binary files /dev/null and b/images/dtmf_9_on.png differ diff --git a/images/dtmf_close_off.png b/images/dtmf_close_off.png new file mode 100644 index 0000000000000000000000000000000000000000..85006d153f47c13b06938e1fdd81544bbac0649e Binary files /dev/null and b/images/dtmf_close_off.png differ diff --git a/images/dtmf_close_on.png b/images/dtmf_close_on.png new file mode 100644 index 0000000000000000000000000000000000000000..0a962cb18c1178e8012a8d859ad6489a8e6bd017 Binary files /dev/null and b/images/dtmf_close_on.png differ diff --git a/images/dtmf_main.png b/images/dtmf_main.png new file mode 100644 index 0000000000000000000000000000000000000000..37086908a03304b29e5de1e638f9e16e16b932ea Binary files /dev/null and b/images/dtmf_main.png differ diff --git a/images/dtmf_off.png b/images/dtmf_off.png new file mode 100644 index 0000000000000000000000000000000000000000..c6d28ea168800a4c5038d271910b65ffb3547492 Binary files /dev/null and b/images/dtmf_off.png differ diff --git a/images/dtmf_on.png b/images/dtmf_on.png new file mode 100644 index 0000000000000000000000000000000000000000..a2eeddc4460f4f560a12bb532d7d9ae3686e8ea4 Binary files /dev/null and b/images/dtmf_on.png differ diff --git a/images/dtmf_pound_off.png b/images/dtmf_pound_off.png new file mode 100644 index 0000000000000000000000000000000000000000..e89be9d7191880865d4ac22face1277c60f95454 Binary files /dev/null and b/images/dtmf_pound_off.png differ diff --git a/images/dtmf_pound_on.png b/images/dtmf_pound_on.png new file mode 100644 index 0000000000000000000000000000000000000000..1a1fa6e065782ea2b159df1668f9ea4eb581cae6 Binary files /dev/null and b/images/dtmf_pound_on.png differ diff --git a/images/dtmf_star_off.png b/images/dtmf_star_off.png new file mode 100644 index 0000000000000000000000000000000000000000..b3702b2418328d20e6e433a14e0094e386f9c810 Binary files /dev/null and b/images/dtmf_star_off.png differ diff --git a/images/dtmf_star_on.png b/images/dtmf_star_on.png new file mode 100644 index 0000000000000000000000000000000000000000..b77a5221bda7d438d51c3fefb6924fa602f1fcb5 Binary files /dev/null and b/images/dtmf_star_on.png differ diff --git a/images/gsm.png b/images/gsm.png new file mode 100644 index 0000000000000000000000000000000000000000..888e7c550a528295e235a7e878fdd1b0af0ece9d Binary files /dev/null and b/images/gsm.png differ diff --git a/images/hangup_off.png b/images/hangup_off.png new file mode 100644 index 0000000000000000000000000000000000000000..094405f83d55d1e565370581d244379f7ac11d85 Binary files /dev/null and b/images/hangup_off.png differ diff --git a/images/hangup_on.png b/images/hangup_on.png new file mode 100644 index 0000000000000000000000000000000000000000..56313f6df102d7926a5b898a4c0126f7a5351219 Binary files /dev/null and b/images/hangup_on.png differ diff --git a/images/hold_off.png b/images/hold_off.png new file mode 100644 index 0000000000000000000000000000000000000000..8cd06ad5fd2d71dd654eb5636bf6c635a7d89735 Binary files /dev/null and b/images/hold_off.png differ diff --git a/images/hold_on.png b/images/hold_on.png new file mode 100644 index 0000000000000000000000000000000000000000..c02be220b2e97a82f5387660fc81fe3d2548912a Binary files /dev/null and b/images/hold_on.png differ diff --git a/images/l.png b/images/l.png new file mode 100644 index 0000000000000000000000000000000000000000..fe035f1a4d380363b5afaf11b0081b846a11edd0 Binary files /dev/null and b/images/l.png differ diff --git a/images/l1_green_off.png b/images/l1_green_off.png new file mode 100644 index 0000000000000000000000000000000000000000..54cd7f0995374c4f3d64595e0773dd1193c4d733 Binary files /dev/null and b/images/l1_green_off.png differ diff --git a/images/l1_green_on.png b/images/l1_green_on.png new file mode 100644 index 0000000000000000000000000000000000000000..34fb0f08423f75c3e614bd5f843c060f3f420d72 Binary files /dev/null and b/images/l1_green_on.png differ diff --git a/images/l1_off.png b/images/l1_off.png new file mode 100644 index 0000000000000000000000000000000000000000..864c2556cdfd48c1717d01ac1ee2da0bba9c64d0 Binary files /dev/null and b/images/l1_off.png differ diff --git a/images/l1_on.png b/images/l1_on.png new file mode 100644 index 0000000000000000000000000000000000000000..b6bffb37d75b3ff1a0501e3e9fea45821ccb2a8f Binary files /dev/null and b/images/l1_on.png differ diff --git a/images/l2_green_off.png b/images/l2_green_off.png new file mode 100644 index 0000000000000000000000000000000000000000..43ea2a0e7c12e417fa1fa656ba9114206279af90 Binary files /dev/null and b/images/l2_green_off.png differ diff --git a/images/l2_green_on.png b/images/l2_green_on.png new file mode 100644 index 0000000000000000000000000000000000000000..fde8599b7b1acd1e68653bc1786bc183c9aa3423 Binary files /dev/null and b/images/l2_green_on.png differ diff --git a/images/l2_off.png b/images/l2_off.png new file mode 100644 index 0000000000000000000000000000000000000000..c770ff6bce5cb7458b4b5d018e1d6a729d7a6d5d Binary files /dev/null and b/images/l2_off.png differ diff --git a/images/l2_on.png b/images/l2_on.png new file mode 100644 index 0000000000000000000000000000000000000000..7fbc7cded84d6d659a5b0a7a311b37f3c0c0f25f Binary files /dev/null and b/images/l2_on.png differ diff --git a/images/l3_green_off.png b/images/l3_green_off.png new file mode 100644 index 0000000000000000000000000000000000000000..3a5d065fd455671ddbb7d1721f3d178bd1e43798 Binary files /dev/null and b/images/l3_green_off.png differ diff --git a/images/l3_green_on.png b/images/l3_green_on.png new file mode 100644 index 0000000000000000000000000000000000000000..dc27c9c1c91077496086b9c87fde9e3373614d30 Binary files /dev/null and b/images/l3_green_on.png differ diff --git a/images/l3_off.png b/images/l3_off.png new file mode 100644 index 0000000000000000000000000000000000000000..345206f17d79376685c24ad9970ca157c8b0b25b Binary files /dev/null and b/images/l3_off.png differ diff --git a/images/l3_on.png b/images/l3_on.png new file mode 100644 index 0000000000000000000000000000000000000000..d28d55755f9adbec98d7f0aed848055801dc09d0 Binary files /dev/null and b/images/l3_on.png differ diff --git a/images/l4_green_off.png b/images/l4_green_off.png new file mode 100644 index 0000000000000000000000000000000000000000..4405359ec5f9aceb883a5c4d7845d7502201fe38 Binary files /dev/null and b/images/l4_green_off.png differ diff --git a/images/l4_green_on.png b/images/l4_green_on.png new file mode 100644 index 0000000000000000000000000000000000000000..69897e42b5af89a5d04973ca727d21a926e0a6b4 Binary files /dev/null and b/images/l4_green_on.png differ diff --git a/images/l4_off.png b/images/l4_off.png new file mode 100644 index 0000000000000000000000000000000000000000..bef390ac4082e50f4934ca6b947e4f558493daf2 Binary files /dev/null and b/images/l4_off.png differ diff --git a/images/l4_on.png b/images/l4_on.png new file mode 100644 index 0000000000000000000000000000000000000000..e63427d93bf11ca89fcc57cc79c1698ba0a7fa23 Binary files /dev/null and b/images/l4_on.png differ diff --git a/images/l5_green_off.png b/images/l5_green_off.png new file mode 100644 index 0000000000000000000000000000000000000000..f32807ae93e8829ddefd56b0d92e40f7ab585f91 Binary files /dev/null and b/images/l5_green_off.png differ diff --git a/images/l5_green_on.png b/images/l5_green_on.png new file mode 100644 index 0000000000000000000000000000000000000000..b74bc4d26a6626c6faa7aa62c97eb431b2977058 Binary files /dev/null and b/images/l5_green_on.png differ diff --git a/images/l5_off.png b/images/l5_off.png new file mode 100644 index 0000000000000000000000000000000000000000..1303ed2ce264f2d335f79e04fb5ec6738b0cdea4 Binary files /dev/null and b/images/l5_off.png differ diff --git a/images/l5_on.png b/images/l5_on.png new file mode 100644 index 0000000000000000000000000000000000000000..d77e64e18edd5db14005f0d060e352c59ba245c3 Binary files /dev/null and b/images/l5_on.png differ diff --git a/images/l6_green_off.png b/images/l6_green_off.png new file mode 100644 index 0000000000000000000000000000000000000000..395a77476738ae47d89c6d3a8dabea718dd39a6f Binary files /dev/null and b/images/l6_green_off.png differ diff --git a/images/l6_green_on.png b/images/l6_green_on.png new file mode 100644 index 0000000000000000000000000000000000000000..06b19b4e4b483b9c22dd7ae93085102a0f7164e0 Binary files /dev/null and b/images/l6_green_on.png differ diff --git a/images/l6_off.png b/images/l6_off.png new file mode 100644 index 0000000000000000000000000000000000000000..d5e7ec474e364a66ee009cfbbcdeb50e9be651f5 Binary files /dev/null and b/images/l6_off.png differ diff --git a/images/l6_on.png b/images/l6_on.png new file mode 100644 index 0000000000000000000000000000000000000000..383d3dd4197ef1661950535f79b3fb46de0dc4ec Binary files /dev/null and b/images/l6_on.png differ diff --git a/images/line_off.png b/images/line_off.png new file mode 100644 index 0000000000000000000000000000000000000000..864c2556cdfd48c1717d01ac1ee2da0bba9c64d0 Binary files /dev/null and b/images/line_off.png differ diff --git a/images/line_on.png b/images/line_on.png new file mode 100644 index 0000000000000000000000000000000000000000..b6bffb37d75b3ff1a0501e3e9fea45821ccb2a8f Binary files /dev/null and b/images/line_on.png differ diff --git a/images/logo_ico.png b/images/logo_ico.png new file mode 100644 index 0000000000000000000000000000000000000000..d40cbdb2a827b91e537d23e4282520e5008f2427 Binary files /dev/null and b/images/logo_ico.png differ diff --git a/images/main.png b/images/main.png new file mode 100644 index 0000000000000000000000000000000000000000..ddf434171b5f5b93f31616615a603bbb593b4475 Binary files /dev/null and b/images/main.png differ diff --git a/images/minimize_off.png b/images/minimize_off.png new file mode 100644 index 0000000000000000000000000000000000000000..ad531e82f19c89cce2944b8943571cffc4788067 Binary files /dev/null and b/images/minimize_off.png differ diff --git a/images/minimize_on.png b/images/minimize_on.png new file mode 100644 index 0000000000000000000000000000000000000000..20bb4e175433a92bef6c12cac6ac849e574e4229 Binary files /dev/null and b/images/minimize_on.png differ diff --git a/images/mute_off.png b/images/mute_off.png new file mode 100644 index 0000000000000000000000000000000000000000..42bf8f657c0b094768097ef2622a68f6fcd07ff0 Binary files /dev/null and b/images/mute_off.png differ diff --git a/images/mute_on.png b/images/mute_on.png new file mode 100644 index 0000000000000000000000000000000000000000..e46a9a8d663abb9b2fdec0b6bdd226cd1884962c Binary files /dev/null and b/images/mute_on.png differ diff --git a/images/network.png b/images/network.png new file mode 100644 index 0000000000000000000000000000000000000000..197b2355ec454b96a32c0b252da3646504ae8a65 Binary files /dev/null and b/images/network.png differ diff --git a/images/ok_off.png b/images/ok_off.png new file mode 100644 index 0000000000000000000000000000000000000000..3434c1ff8b6928c42729b5a867b3c9f310773456 Binary files /dev/null and b/images/ok_off.png differ diff --git a/images/ok_on.png b/images/ok_on.png new file mode 100644 index 0000000000000000000000000000000000000000..7c8327dba56f3702dd3d7e584028efef8cea7308 Binary files /dev/null and b/images/ok_on.png differ diff --git a/images/overscreen.png b/images/overscreen.png new file mode 100644 index 0000000000000000000000000000000000000000..704cbbdbac5174e79260c345834cf47c78984134 Binary files /dev/null and b/images/overscreen.png differ diff --git a/images/preferences.png b/images/preferences.png new file mode 100644 index 0000000000000000000000000000000000000000..9fcf92510ff9170dde910c8387b88f9606942115 Binary files /dev/null and b/images/preferences.png differ diff --git a/images/redial_off.png b/images/redial_off.png new file mode 100644 index 0000000000000000000000000000000000000000..178574f7fa0f94e8ca820a2c1a805213e8f785bb Binary files /dev/null and b/images/redial_off.png differ diff --git a/images/redial_on.png b/images/redial_on.png new file mode 100644 index 0000000000000000000000000000000000000000..6a71b707ee1d59d5bdf9450be1087716b20da832 Binary files /dev/null and b/images/redial_on.png differ diff --git a/images/screen_green.png b/images/screen_green.png new file mode 100644 index 0000000000000000000000000000000000000000..6b7ffadd9f338753a1742f24f886887e2d92de7e Binary files /dev/null and b/images/screen_green.png differ diff --git a/images/screen_main.png b/images/screen_main.png new file mode 100644 index 0000000000000000000000000000000000000000..dace67850cc0a380da03d9938cb85508feb93d66 Binary files /dev/null and b/images/screen_main.png differ diff --git a/images/setup_off.png b/images/setup_off.png new file mode 100644 index 0000000000000000000000000000000000000000..233d26f6005cfc67509606e2cc8213d71ef49b92 Binary files /dev/null and b/images/setup_off.png differ diff --git a/images/setup_on.png b/images/setup_on.png new file mode 100644 index 0000000000000000000000000000000000000000..cba7b68c9fac21e5ec9c2c909d179361f3d35b65 Binary files /dev/null and b/images/setup_on.png differ diff --git a/images/sfl-logo.png b/images/sfl-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..27301e9050c698c85091716ce6566762eddde38f Binary files /dev/null and b/images/sfl-logo.png differ diff --git a/images/sflphone_logo.png b/images/sflphone_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..a1637322248865099cc2b88d75cbf6d091d84f24 Binary files /dev/null and b/images/sflphone_logo.png differ diff --git a/images/signalisations.png b/images/signalisations.png new file mode 100644 index 0000000000000000000000000000000000000000..61a34b98a02d84d9e13f2f5df19e146e054b402c Binary files /dev/null and b/images/signalisations.png differ diff --git a/images/slider.png b/images/slider.png new file mode 100644 index 0000000000000000000000000000000000000000..22d9e9ed3bed149d3416a02ff3ed7edd7e82bb0a Binary files /dev/null and b/images/slider.png differ diff --git a/images/splash.png b/images/splash.png new file mode 100644 index 0000000000000000000000000000000000000000..70f9207abcf5155e4ed8f3cd97823da08629a0be Binary files /dev/null and b/images/splash.png differ diff --git a/images/transfer_off.png b/images/transfer_off.png new file mode 100644 index 0000000000000000000000000000000000000000..7e9db097e9c97687121206985c8e173781a506ec Binary files /dev/null and b/images/transfer_off.png differ diff --git a/images/transfer_on.png b/images/transfer_on.png new file mode 100644 index 0000000000000000000000000000000000000000..806f06de449184ef527220dae7b6228ace2d727f Binary files /dev/null and b/images/transfer_on.png differ diff --git a/images/tray-icon.png b/images/tray-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..f9af862f1bcd76ea726a900648521b7fe5e70ff3 Binary files /dev/null and b/images/tray-icon.png differ diff --git a/images/video.png b/images/video.png new file mode 100644 index 0000000000000000000000000000000000000000..f642e00ba09a024c240475438db64c3c955e1838 Binary files /dev/null and b/images/video.png differ diff --git a/images/voicemail_off.png b/images/voicemail_off.png new file mode 100644 index 0000000000000000000000000000000000000000..9dea4984d90c0b28220d059b16368ef8a6dbb6c3 Binary files /dev/null and b/images/voicemail_off.png differ diff --git a/images/voicemail_on.png b/images/voicemail_on.png new file mode 100644 index 0000000000000000000000000000000000000000..9c0f1666dd69251add93b7ecb1d8ec58be4c0ff4 Binary files /dev/null and b/images/voicemail_on.png differ diff --git a/images/volume.png b/images/volume.png new file mode 100644 index 0000000000000000000000000000000000000000..4a4da95f8879bc66fddbee530cdeb2c14eb1509e Binary files /dev/null and b/images/volume.png differ diff --git a/images/volume_off.png b/images/volume_off.png new file mode 100644 index 0000000000000000000000000000000000000000..fd7a004e8909c524d5f67bd336a6b800a94f5385 Binary files /dev/null and b/images/volume_off.png differ diff --git a/images/volume_on.png b/images/volume_on.png new file mode 100644 index 0000000000000000000000000000000000000000..13189014b3b0c34c25dd7b65f1ce4900d4f86e1e Binary files /dev/null and b/images/volume_on.png differ diff --git a/libs/taxidermy/ButtonBuilder.hpp b/libs/taxidermy/ButtonBuilder.hpp new file mode 100644 index 0000000000000000000000000000000000000000..ff109419240575619c9a350bd5265d9803235f67 --- /dev/null +++ b/libs/taxidermy/ButtonBuilder.hpp @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2004-2005 Savoir-Faire Linux inc. + * Author: Jean-Philippe Barrette-LaPierre + * (jean-philippe.barrette-lapierre@savoirfairelinux.com) + * + * This 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, + * or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with dpkg; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + diff --git a/libs/taxidermy/EventFilter.cpp b/libs/taxidermy/EventFilter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b0d70f501626c88542ed2c847dc6306da7be2986 --- /dev/null +++ b/libs/taxidermy/EventFilter.cpp @@ -0,0 +1,40 @@ +/* + * WengoPhone, a voice over Internet phone + * Copyright (C) 2004-2005 Wengo + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "EventFilter.hpp" + +taxidermy::EventFilter::EventFilter(QObject * receiver, const char * member, QObject * watched) + : QObject() +{ + mWatched = watched; + connect(this, SIGNAL(activate(QEvent *)), + receiver, member); +} + +void +taxidermy::EventFilter::filter(QEvent * event) +{ + emit activate(event); +} + +bool +taxidermy::EventFilter::eventFilter(QObject * watched, QEvent * event) +{ + return QObject::eventFilter(watched, event); +} diff --git a/libs/taxidermy/EventFilter.hpp b/libs/taxidermy/EventFilter.hpp new file mode 100644 index 0000000000000000000000000000000000000000..3a26661a1b7a20bfbdc60c5c206624483691c223 --- /dev/null +++ b/libs/taxidermy/EventFilter.hpp @@ -0,0 +1,87 @@ +/* + * WengoPhone, a voice over Internet phone + * Copyright (C) 2004-2005 Wengo + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef EVENTFILTER_H +#define EVENTFILTER_H + +#include "utilspp/NonCopyable.hpp" +#include <qobject.h> +#include <qevent.h> + +namespace taxidermy { + /** + * EventFilter for QObject. + * + * Permits to make some special actions on Qt events. + * Example: + * <code> + * QMainWindow * widget = new QMainWindow(); + * CloseEventFilter * closeFilter = new CloseEventFilter(this, SLOT(printHelloWorld())); + * ResizeEventFilter * resizeFilter = new ResizeEventFilter(this, SLOT(printHelloWorld())); + * widget->installEventFilter(closeFilter); + * widget->installEventFilter(resizeFilter); + * </code> + * + * @author Tanguy Krotoff + */ + class EventFilter : public QObject, utilspp::NonCopyable { + Q_OBJECT + public: + + /** + * Filters an event. + * + * @param receiver object receiver of the filter signal + * @param member member of the object called by the filter signal + * @param watched watched object the filter is going to be applied on + */ + EventFilter(QObject * receiver, const char * member, QObject * watched); + + protected: + + /** + * Emits the filter signal. + * + * @param event event filtered + */ + void filter(QEvent * event); + + /** + * Filters the event. + * + * @param watched watched object + * @param event event filtered of the watched object + * @return true then stops the event being handled further + */ + virtual bool eventFilter(QObject * watched, QEvent * event); + + /** + * Watched object. + * + * The filter is going to be applied only on this QObject. + */ + QObject * mWatched; + + signals: + + void activate(QEvent * event); + }; +}; + +#endif //EVENTFILTER_H diff --git a/libs/taxidermy/Hunter.cpp b/libs/taxidermy/Hunter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a4b2947ae9b7198d118c2096b267bf5e1bf284a3 --- /dev/null +++ b/libs/taxidermy/Hunter.cpp @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2004-2005 Savoir-Faire Linux inc. + * Author: Jean-Philippe Barrette-LaPierre + * (jean-philippe.barrette-lapierre@savoirfairelinux.com) + * + * This 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, + * or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with dpkg; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include <iostream> +#include <stdexcept> + +#include "Hunter.hpp" +#include "WidgetBuilder.hpp" +#include "WidgetBuilderFactory.hpp" +#include "config.h" + + +#define DEFAULT_DIRECTORY "skins/" + +#define fill_config_str(name, value) \ + (_config.addConfigTreeItem(section, Conf::ConfigTreeItem(std::string(name), std::string(value), type_str))) +#define fill_config_int(name, value) \ + (_config.addConfigTreeItem(section, Conf::ConfigTreeItem(std::string(name), std::string(value), type_int))) + + +taxidermy::Hunter::Hunter() + : mSkinsDirectory(DEFAULT_DIRECTORY) +{} + +taxidermy::Hunter::Hunter(const QString &directory) + : mSkinsDirectory(directory) +{} + +taxidermy::Hunter::Hunter(const QDir &directory) + : mSkinsDirectory(directory) +{} + +QStringList +taxidermy::Hunter::getSkinNames() +{ + QStringList skins; + mSkinsDirectory.setNameFilter("*.ini"); + QStringList list = mSkinsDirectory.entryList(QDir::Files); + for(QStringList::Iterator it = list.begin(); it != list.end(); ++it) { + QString skin(*it); + skin = skin.left(skin.length() - 4); + skins.push_back(skin); + } + + return skins; +} + +QString +taxidermy::Hunter::getSkinFile(const QString &name) +{ + return mSkinsDirectory.absPath() + "/" + name + ".ini"; +} + +taxidermy::Taxidermist +taxidermy::Hunter::getTaxidermist(const QString &skinName) +{ + taxidermy::Taxidermist skin(skinName); + load(&skin); + + return skin; +} + +// void +// taxidermy::Hunter::load(taxidermy::Taxidermist *skin) +// { +// load(mSkinsDirectory, skin); +// } + +void +taxidermy::Hunter::load(taxidermy::Taxidermist *skin) +{ + Conf::ConfigTree config; + config.populateFromFile(getSkinFile(skin->name())); + Conf::TokenList tree = config.getSectionNames(); + for(Conf::TokenList::iterator it = tree.begin(); it != tree.end(); it++) { + Conf::ValuesMap values = config.getSection(*it); + Conf::ValuesMap::iterator type = values.find("type"); + + if(type != values.end()) { + QMap< QString, QString > v; + WidgetBuilder *builder = + taxidermy::WidgetBuilderFactory::instance().create(type->second); + if(builder != NULL) { + for(Conf::ValuesMap::iterator pos = values.begin(); + pos != values.end(); + pos++) { + v.insert(pos->first, pos->second); + } + builder->load(v); + skin->add(*it, builder); + } + } + } +} diff --git a/libs/taxidermy/Hunter.hpp b/libs/taxidermy/Hunter.hpp new file mode 100644 index 0000000000000000000000000000000000000000..bb748c2d8d55edc8f6c6445a05b8e30999aa9e66 --- /dev/null +++ b/libs/taxidermy/Hunter.hpp @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2004-2005 Savoir-Faire Linux inc. + * Author: Jean-Philippe Barrette-LaPierre + * (jean-philippe.barrette-lapierre@savoirfairelinux.com) + * + * This 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, + * or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with dpkg; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __TAXIDERMY_HUNTER_HPP__ +#define __TAXIDERMY_HUNTER_HPP__ + +#include <qdir.h> +#include <qfile.h> +#include <qstring.h> +#include <qstringlist.h> + +#include "Taxidermist.hpp" +#include "config.h" + +namespace taxidermy +{ + + /** + * This class is responsible of finding skins directories. + * It is also responsible of reading the settings. + */ + class Hunter + { + private: + QDir mSkinsDirectory; + + public: + Hunter(); + Hunter(const QString &directory); + Hunter(const QDir &dir); + + QStringList getSkinNames(); + QString getSkinFile(const QString &skinName); + Taxidermist getTaxidermist(const QString &skinName); + void load(Taxidermist *skin); + //static void load(QFile file, Taxidermist *skin); + }; +}; + +#endif diff --git a/libs/taxidermy/Makefile.am b/libs/taxidermy/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..a395be5eef4890e7cb4a970ed482d40df5b343f7 --- /dev/null +++ b/libs/taxidermy/Makefile.am @@ -0,0 +1,68 @@ +noinst_LTLIBRARIES = libtaxidermy.la + +BUILT_SOURCES = \ + EventFiltermoc.cpp \ + Huntermoc.cpp \ + PaintEventFiltermoc.cpp \ + QButtonBuildermoc.cpp \ + WidgetBuilderCreatormoc.cpp WidgetBuilderCreator.inl \ + WidgetBuilderFactorymoc.cpp \ + WidgetBuilderFactoryImplmoc.cpp WidgetBuilderFactoryImpl.inl \ + WidgetBuildermoc.cpp + + +noinst_HEADERS = \ + EventFilter.hpp \ + Hunter.hpp \ + PaintEventFilter.hpp \ + QButtonBuilder.hpp \ + Taxidermist.hpp \ + WidgetBuilderCreator.hpp WidgetBuilderCreator.inl \ + WidgetBuilderFactory.hpp \ + WidgetBuilderFactoryImpl.hpp WidgetBuilderFactoryImpl.inl \ + WidgetBuilder.hpp \ + config.h \ + qtutils.hpp + + +libtaxidermy_la_SOURCES = \ + $(BUILT_SOURCES) \ + EventFilter.cpp \ + Hunter.cpp \ + PaintEventFilter.cpp \ + QButtonBuilder.cpp \ + Taxidermist.cpp \ + WidgetBuilder.cpp \ + WidgetBuilderFactoryImpl.cpp \ + config.cpp \ + qtutils.cpp + +CLEANFILES = \ + $(BUILT_SOURCES) + + +KDE_CXXFLAGS = $(USE_EXCEPTIONS) +AM_CPPFLAGS = -I$(top_srcdir)/libs/ $(QT_INCLUDES) $(X_INCLUDES) +AM_LDFLAGS = $(QT_LDFLAGS) $(X_LDFLAGS) + + + +%.h: %.ui + $(UIC) -o $@ $< + +moc_%.cpp: %.h + $(MOC) -o $@ $< + +%moc.cpp: %.hpp + $(MOC) -o $@ $< + +%ui.cpp: %.ui + $(UIC) -o $@ -impl $*.h $< + + + +#UI_DIR = bin/ui +#MOC_DIR = bin/moc +#OBJECTS_DIR = bin/obj + + diff --git a/libs/taxidermy/PaintEventFilter.cpp b/libs/taxidermy/PaintEventFilter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0a0fdd3db3c413f16f2a50869f2bcc0a737bb374 --- /dev/null +++ b/libs/taxidermy/PaintEventFilter.cpp @@ -0,0 +1,35 @@ +/* + * WengoPhone, a voice over Internet phone + * Copyright (C) 2004-2005 Wengo + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "PaintEventFilter.hpp" + +taxidermy::PaintEventFilter::PaintEventFilter(QObject * receiver, const char * member, QObject * watched) + : EventFilter(receiver, member, watched) { +} + +bool +taxidermy::PaintEventFilter::eventFilter(QObject * watched, QEvent * event) { + if (mWatched == watched) { + if (event->type() == QEvent::Paint) { + filter(event); + return true; + } + } + return EventFilter::eventFilter(watched, event); +} diff --git a/libs/taxidermy/PaintEventFilter.hpp b/libs/taxidermy/PaintEventFilter.hpp new file mode 100644 index 0000000000000000000000000000000000000000..eac5ccee813f00909ffca46bb5c5eebd820425c9 --- /dev/null +++ b/libs/taxidermy/PaintEventFilter.hpp @@ -0,0 +1,43 @@ +/* + * WengoPhone, a voice over Internet phone + * Copyright (C) 2004-2005 Wengo + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __TAXIDERMY_PAINT_EVENT_FILTER_HPP__ +#define __TAXIDERMY_PAINT_EVENT_FILTER_HPP__ + +#include "EventFilter.hpp" + +namespace taxidermy +{ + /** + * Catch Paint. + * + * @author Tanguy Krotoff + */ + class PaintEventFilter : public EventFilter + { + public: + PaintEventFilter(QObject * receiver, const char * member, QObject * watched); + + protected: + virtual bool eventFilter(QObject * watched, QEvent * event); + }; +}; + +#endif + diff --git a/libs/taxidermy/QButtonBuilder.cpp b/libs/taxidermy/QButtonBuilder.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0e342c5e93a939e5ce31463149782ee4ba64f1dc --- /dev/null +++ b/libs/taxidermy/QButtonBuilder.cpp @@ -0,0 +1,154 @@ +/* + * Copyright (C) 2004-2005 Savoir-Faire Linux inc. + * Author: Jean-Philippe Barrette-LaPierre + * (jean-philippe.barrette-lapierre@savoirfairelinux.com) + * + * This 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, + * or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with dpkg; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include <iostream> +#include <qpainter.h> + +#include "PaintEventFilter.hpp" +#include "QButtonBuilder.hpp" +#include "qtutils.hpp" + +taxidermy::QButtonBuilder::QButtonBuilder() + : WidgetBuilder("QButton") + , mButton(NULL) + , mPosSet(false) + , mX(0) + , mY(0) + , mImages(false) + , mPaint(false) +{} + +void +taxidermy::QButtonBuilder::load(const QMap< QString, QString > &values) +{ + QMap< QString, QString >::ConstIterator xpos = values.find("x"); + QMap< QString, QString >::ConstIterator ypos = values.find("y"); + if(xpos != values.end() && ypos != values.end()) { + mPosSet = true; + mX = (*xpos).toInt(); + mY = (*ypos).toInt(); + } + + QMap< QString, QString >::ConstIterator pressed = values.find("pressed"); + QMap< QString, QString >::ConstIterator released = values.find("released"); + QMap< QString, QString >::ConstIterator paint = values.find("paint"); + if(pressed != values.end() && released != values.end()) { + mImages = true; + mPressed = qtutils::transparize(*pressed); + mReleased = qtutils::transparize(*released); + if(paint != values.end() && (*paint).toInt()) { + mPaint = true; + } + } +} + +void +taxidermy::QButtonBuilder::update() +{ + update(mButton); +} + +void +taxidermy::QButtonBuilder::update(QWidget *widget) +{ + setButton(widget); + + if(mButton) { + if(mPosSet) { + mButton->move(mX, mY); + } + + if(mImages) { + if(mButton->isToggleButton()) { + QObject::connect(mButton, SIGNAL(toggled(bool)), + this, SLOT(toggled(bool))); + } + else { + QObject::connect(mButton, SIGNAL(pressed()), + this, SLOT(pressed())); + QObject::connect(mButton, SIGNAL(released()), + this, SLOT(released())); + } + if(mPaint) { + mButton->installEventFilter(new PaintEventFilter(this, SLOT(paintEvent()), mButton)); + } + + if(mButton->isDown()) { + pressed(); + } + else { + released(); + } + } + } +} + +void +taxidermy::QButtonBuilder::setButton(QWidget *widget) { + if(widget) { + mButton = (QButton *)widget; + } + else { + mButton = NULL; + } +} + +void +taxidermy::QButtonBuilder::pressed() +{ + mButton->setPixmap(mPressed); + if(mPressed.hasAlpha()) { + mButton->setMask(*mPressed.mask()); + } + mButton->resize(mPressed.size()); +} + +void +taxidermy::QButtonBuilder::released() +{ + if(mButton) { + mButton->setPixmap(mReleased); + if(mReleased.hasAlpha()) { + mButton->setMask(*mReleased.mask()); + } + mButton->resize(mReleased.size()); + } +} + +void +taxidermy::QButtonBuilder::toggled(bool on) +{ + if(on) { + pressed(); + } + else { + released(); + } +} + +void +taxidermy::QButtonBuilder::paintEvent() +{ + const QPixmap *p = mButton->pixmap(); + if (p && !p->isNull()) { + QPainter painter(mButton); + painter.drawPixmap(QPoint(0, 0), *p); + } +} diff --git a/libs/taxidermy/QButtonBuilder.hpp b/libs/taxidermy/QButtonBuilder.hpp new file mode 100644 index 0000000000000000000000000000000000000000..f331eb150b2891bbb06e3d14455b31663ad86d4b --- /dev/null +++ b/libs/taxidermy/QButtonBuilder.hpp @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2004-2005 Savoir-Faire Linux inc. + * Author: Jean-Philippe Barrette-LaPierre + * (jean-philippe.barrette-lapierre@savoirfairelinux.com) + * + * This 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, + * or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with dpkg; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __TAXIDERMY_QBUTTON_BUILDER_HPP__ +#define __TAXIDERMY_QBUTTON_BUILDER_HPP__ + +#include <qbutton.h> +#include <qpixmap.h> +#include <qwidget.h> + +#include "WidgetBuilder.hpp" + +namespace taxidermy +{ + class QButtonBuilder : public WidgetBuilder + { + Q_OBJECT; + + private: + QButton *mButton; + + //Position + bool mPosSet; + int mX; + int mY; + + //Images + bool mImages; + bool mPaint; + QPixmap mPressed; + QPixmap mReleased; + + virtual void setButton(QWidget *widget); + + public slots: + void pressed(); + void released(); + void toggled(bool); + void paintEvent(); + + public: + QButtonBuilder(); + + virtual void load(const QMap< QString, QString > &entries); + virtual void update(); + virtual void update(QWidget *widget); + }; +}; + +#endif diff --git a/libs/taxidermy/ResizeEventFilter.cpp b/libs/taxidermy/ResizeEventFilter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..524d563413948a06bf047b788cf56dd05a57cd0a --- /dev/null +++ b/libs/taxidermy/ResizeEventFilter.cpp @@ -0,0 +1,36 @@ +/* + * WengoPhone, a voice over Internet phone + * Copyright (C) 2004-2005 Wengo + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <ResizeEventFilter.h> + +#include <QEvent> + +ResizeEventFilter::ResizeEventFilter(QObject * receiver, const char * member, QObject * watched) +: EventFilter(receiver, member, watched) { +} + +bool ResizeEventFilter::eventFilter(QObject * watched, QEvent * event) { + if (_watched == watched) { + if (event->type() == QEvent::Resize) { + filter(event); + return true; + } + } + return EventFilter::eventFilter(watched, event); +} diff --git a/libs/taxidermy/ResizeEventFilter.h b/libs/taxidermy/ResizeEventFilter.h new file mode 100644 index 0000000000000000000000000000000000000000..d1a04b957f4ba4f38ece42326b4aff4914cdfd3f --- /dev/null +++ b/libs/taxidermy/ResizeEventFilter.h @@ -0,0 +1,40 @@ +/* + * WengoPhone, a voice over Internet phone + * Copyright (C) 2004-2005 Wengo + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef RESIZEEVENTFILTER_H +#define RESIZEEVENTFILTER_H + +#include <EventFilter.h> + +/** + * Catch Resize. + * + * @author Tanguy Krotoff + */ +class ResizeEventFilter : public EventFilter { +public: + + ResizeEventFilter(QObject * receiver, const char * member, QObject * watched); + +protected: + + virtual bool eventFilter(QObject * watched, QEvent * event); +}; + +#endif //RESIZEEVENTFILTER_H diff --git a/libs/taxidermy/Taxidermist.cpp b/libs/taxidermy/Taxidermist.cpp new file mode 100644 index 0000000000000000000000000000000000000000..022210ae7258a84d526391ce9b4fffc7db9e11cb --- /dev/null +++ b/libs/taxidermy/Taxidermist.cpp @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2004-2005 Savoir-Faire Linux inc. + * Author: Jean-Philippe Barrette-LaPierre + * (jean-philippe.barrette-lapierre@savoirfairelinux.com) + * + * This 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, + * or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with dpkg; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include <stdexcept> +#include <qapplication.h> +#include <qwidgetlist.h> + +#include "Hunter.hpp" +#include "Taxidermist.hpp" +#include "WidgetBuilder.hpp" + +taxidermy::Taxidermist::Taxidermist(const QString &skinName) +{ + mSkinName = skinName; +} + +void +taxidermy::Taxidermist::add(const QString &name, WidgetBuilder *builder) +{ + mBuilders.insert(name, builder, true); +} + +void +taxidermy::Taxidermist::skin(QWidget *widget) +{ + QMap< QString, WidgetBuilder * >::Iterator pos = mBuilders.find(widget->name()); + if(pos != mBuilders.end()) { + (*pos)->update(widget); + } +} + +void +taxidermy::Taxidermist::update(QApplication *app) +{ + QWidget *mainWidget = app->mainWidget(); + if(mainWidget) { + for(QMap< QString, WidgetBuilder * >::Iterator pos = mBuilders.begin(); + pos != mBuilders.end(); + pos++) { + QObject *w = mainWidget->child(pos.key()); + if(w && w->isWidgetType()) { + pos.data()->update((QWidget *)w); + } + } + } +} + + diff --git a/libs/taxidermy/Taxidermist.hpp b/libs/taxidermy/Taxidermist.hpp new file mode 100644 index 0000000000000000000000000000000000000000..8dcc3f3acb100f7b2d4a3143690a6ee8c64df750 --- /dev/null +++ b/libs/taxidermy/Taxidermist.hpp @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2004-2005 Savoir-Faire Linux inc. + * Author: Jean-Philippe Barrette-LaPierre + * (jean-philippe.barrette-lapierre@savoirfairelinux.com) + * + * This 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, + * or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with dpkg; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __TAXIDERMY_TAXIDERMIST_HPP__ +#define __TAXIDERMY_TAXIDERMIST_HPP__ + +#include <qmap.h> +#include <qstring.h> +#include <qwidget.h> + +namespace taxidermy { + + class WidgetBuilder; + + class Taxidermist + { + private: + QMap< QString, WidgetBuilder * > mBuilders; + QString mSkinName; + + public: + Taxidermist(const QString &skinName); + + QString name() + {return mSkinName;} + + /** + * This function will set the skin to the widget. + * It will use the widget's name to find what to + * specify for the skin. + */ + void skin(QWidget *widget); + + /** + * This function will add a widget builder for a specific + * widget. This widget is identified by his name. + */ + void add(const QString &name, WidgetBuilder *builder); + + /** + * This function will load the current skin, by + * retreiving each QWidget skinnable and updating it. + * + * Note: if you have an another skin currently used, you + * need to unload it. + */ + void update(QApplication *app); + }; + +}; + +#endif diff --git a/libs/taxidermy/WidgetBuilder.cpp b/libs/taxidermy/WidgetBuilder.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3a869b368ed80a28b28b037dcaf5bf4efdd870f2 --- /dev/null +++ b/libs/taxidermy/WidgetBuilder.cpp @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2004-2005 Savoir-Faire Linux inc. + * Author: Jean-Philippe Barrette-LaPierre + * (jean-philippe.barrette-lapierre@savoirfairelinux.com) + * + * This 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, + * or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with dpkg; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "WidgetBuilder.hpp" + +taxidermy::WidgetBuilder::WidgetBuilder(const QString &type) + : mObjectType(type) +{} + +QString +taxidermy::WidgetBuilder::getObjectType() +{ + return mObjectType; +} + diff --git a/libs/taxidermy/WidgetBuilder.hpp b/libs/taxidermy/WidgetBuilder.hpp new file mode 100644 index 0000000000000000000000000000000000000000..d4d23fc1794b6aa0c6bbe9272b5d5e51fe606a65 --- /dev/null +++ b/libs/taxidermy/WidgetBuilder.hpp @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2004-2005 Savoir-Faire Linux inc. + * Author: Jean-Philippe Barrette-LaPierre + * (jean-philippe.barrette-lapierre@savoirfairelinux.com) + * + * This 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, + * or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with dpkg; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include <qmap.h> +#include <qobject.h> +#include <qsettings.h> +#include <qstring.h> +#include <qwidget.h> + +namespace taxidermy { + /** + * This class is responsible of loading a skin for a + * type of widget from a QSettings, and then be able to + * set the values loaded to a widget. + */ + class WidgetBuilder : public QObject + { + Q_OBJECT + + private: + QString mObjectType; + + private: + WidgetBuilder(); + + public: + WidgetBuilder(const QString &objectType); + virtual ~WidgetBuilder() {} + + QString getObjectType(); + + virtual void load(const QMap< QString, QString > &entries) = 0; + virtual void update() = 0; + virtual void update(QWidget *widget) = 0; + }; +}; diff --git a/libs/taxidermy/WidgetBuilderCreator.hpp b/libs/taxidermy/WidgetBuilderCreator.hpp new file mode 100644 index 0000000000000000000000000000000000000000..f7114cd43334b3398e019b28e9c3af629e7ca43d --- /dev/null +++ b/libs/taxidermy/WidgetBuilderCreator.hpp @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2004-2005 Savoir-Faire Linux inc. + * Author: Jean-Philippe Barrette-LaPierre + * (jean-philippe.barrette-lapierre@savoirfairelinux.com) + * + * This 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, + * or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with dpkg; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef TAXIDERMY_WIDGET_BUILDER_CREATOR_HPP +#define TAXIDERMY_WIDGET_BUILDER_CREATOR_HPP + +namespace taxidermy +{ + class WidgetBuilder; + + class WidgetBuilderCreatorBase + { + public: + virtual WidgetBuilder *create() = 0; + virtual ~WidgetBuilderCreatorBase() {} + }; + + template< typename T > + class WidgetBuilderCreator : public WidgetBuilderCreatorBase + { + virtual WidgetBuilder *create(); + virtual ~WidgetBuilderCreator() {} + }; +}; + +#include "WidgetBuilderCreator.inl" + +#endif diff --git a/libs/taxidermy/WidgetBuilderFactory.hpp b/libs/taxidermy/WidgetBuilderFactory.hpp new file mode 100644 index 0000000000000000000000000000000000000000..1509f0317f917193faf1eeb3164d45d4dd90f1a3 --- /dev/null +++ b/libs/taxidermy/WidgetBuilderFactory.hpp @@ -0,0 +1,33 @@ +/** + * Copyright (C) 2004-2005 Savoir-Faire Linux inc. + * Author : Jean-Philippe Barrette-LaPierre + * <jean-philippe.barrette-lapierre@savoirfairelinux.com> + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __TAXIDERMY_WIDGET_BUILDER_FACTORY_HPP__ +#define __TAXIDERMY_WIDGET_BUILDER_FACTORY_HPP__ + +#include "utilspp/Singleton.hpp" +#include "WidgetBuilderFactoryImpl.hpp" + +namespace taxidermy +{ + typedef utilspp::SingletonHolder< WidgetBuilderFactoryImpl > WidgetBuilderFactory; +}; + +#endif + diff --git a/libs/taxidermy/WidgetBuilderFactoryImpl.cpp b/libs/taxidermy/WidgetBuilderFactoryImpl.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0a3741ba97608ec1015ada526bedae701ace1794 --- /dev/null +++ b/libs/taxidermy/WidgetBuilderFactoryImpl.cpp @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2004-2005 Savoir-Faire Linux inc. + * Author: Jean-Philippe Barrette-LaPierre + * (jean-philippe.barrette-lapierre@savoirfairelinux.com) + * + * This 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, + * or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with dpkg; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "WidgetBuilderFactoryImpl.hpp" +#include "QButtonBuilder.hpp" + +taxidermy::WidgetBuilderFactoryImpl::WidgetBuilderFactoryImpl() +{ + add<QButtonBuilder>("QButton"); +} + + +taxidermy::WidgetBuilder * +taxidermy::WidgetBuilderFactoryImpl::create(const QString &objectType) +{ + WidgetBuilder *wb = NULL; + + QMap< QString, WidgetBuilderCreatorBase * >::Iterator pos = mBuilders.find(objectType); + if(pos != mBuilders.end()) { + wb = (*pos)->create(); + } + + return wb; +} diff --git a/libs/taxidermy/WidgetBuilderFactoryImpl.hpp b/libs/taxidermy/WidgetBuilderFactoryImpl.hpp new file mode 100644 index 0000000000000000000000000000000000000000..ef360b6bb1f14c75781fe8b0e0765ae13e23d7f7 --- /dev/null +++ b/libs/taxidermy/WidgetBuilderFactoryImpl.hpp @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2004-2005 Savoir-Faire Linux inc. + * Author: Jean-Philippe Barrette-LaPierre + * (jean-philippe.barrette-lapierre@savoirfairelinux.com) + * + * This 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, + * or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with dpkg; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef TAXIDERMY_WIDGET_BUILDER_FACTORY_IMPL_HPP +#define TAXIDERMY_WIDGET_BUILDER_FACTORY_IMPL_HPP + +#include <qmap.h> + +#include "WidgetBuilderCreator.hpp" + +namespace taxidermy +{ + class WidgetBuilderFactoryImpl + { + private: + QMap< QString, WidgetBuilderCreatorBase * > mBuilders; + + public: + WidgetBuilderFactoryImpl(); + + template< typename T > + void add(const QString &objectType); + + WidgetBuilder *create(const QString &objectType); + }; +}; + +#include "WidgetBuilderFactoryImpl.inl" + +#endif diff --git a/libs/taxidermy/config.cpp b/libs/taxidermy/config.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f5c4ae51da9428cee35bb0a6e16fdd62f8dc62f4 --- /dev/null +++ b/libs/taxidermy/config.cpp @@ -0,0 +1,342 @@ +/** + * Copyright (C) 2005 Savoir-Faire Linux inc. + * Author: Yan Morin <yan.morin@savoirfairelinux.com> + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "config.h" +#include <fstream> + +namespace Conf { + +// ctor +ConfigTree::ConfigTree() +{ +} + +// dtor +ConfigTree::~ConfigTree() +{ + // erase every new ItemMap (by CreateSection) + SectionMap::iterator iter = _sections.begin(); + while(iter != _sections.end()) { + delete iter->second; iter->second = NULL; + iter++; + } +} + +/** + * Create the section only if it doesn't exists + */ +void +ConfigTree::createSection(const std::string& section) { + // if we doesn't find the item, create it + if (_sections.find(section) == _sections.end()) { + _sections[section] = new ItemMap; + } +} + +/** + * Add the config item only if it exists.. + * If the section doesn't exists, create it + */ +void +ConfigTree::addConfigTreeItem(const std::string& section, const ConfigTreeItem item) +{ + // if we doesn't find the item, create it + SectionMap::iterator iter = _sections.find(section); + if ( iter == _sections.end()) { + _sections[section] = new ItemMap; + iter = _sections.find(section); + } + // be prudent here + if (iter != _sections.end()) { + std::string name = item.getName(); + + if ( iter->second->find(name) == iter->second->end()) { + (*(iter->second))[name] = item; + } + } +} + +// throw a ConfigTreeItemException if not found +std::string +ConfigTree::getConfigTreeItemValue(const std::string& section, const std::string& itemName) +{ + ConfigTreeItem* item = getConfigTreeItem(section, itemName); + if (item!=NULL) { + return item->getValue(); + } else { + throw ConfigTreeItemException(); + } + return ""; +} + +// throw a ConfigTreeItemException if not found +int +ConfigTree::getConfigTreeItemIntValue(const std::string& section, const std::string& itemName) +{ + ConfigTreeItem* item = getConfigTreeItem(section, itemName); + if (item!=NULL && item->getType() == "int") { + return atoi(item->getValue().data()); + } else { + throw ConfigTreeItemException(); + } + return 0; +} + +bool +ConfigTree::getConfigTreeItemToken(const std::string& section, const std::string& itemName, TokenList& arg) { + ConfigTreeItem *item = getConfigTreeItem(section, itemName); + if (item) { + arg.clear(); + arg.push_back(section); + arg.push_back(itemName); + arg.push_back(item->getType()); + arg.push_back(item->getValue()); + arg.push_back(item->getDefaultValue()); + return true; + } + return false; +} + + + +/** + * Return a ConfigTreeItem or NULL if not found + */ +ConfigTreeItem* +ConfigTree::getConfigTreeItem(const std::string& section, const std::string& itemName) { + SectionMap::iterator iter = _sections.find(section); + if ( iter == _sections.end()) { + return NULL; + } + ItemMap::iterator iterItem = iter->second->find(itemName); + if ( iterItem == iter->second->end()) { + return NULL; + } + return &(iterItem->second); +} + +/** + * Set the configItem if found, else do nothing + */ +bool +ConfigTree::setConfigTreeItem(const std::string& section, const std::string& itemName, const std::string& value) { + SectionMap::iterator iter = _sections.find(section); + if ( iter == _sections.end()) { + _sections.insert(std::make_pair(section, new ItemMap())); + iter = _sections.find(section); + } + + ItemMap::iterator iterItem = iter->second->find(itemName); + if ( iterItem == iter->second->end()) { + iter->second->insert(std::make_pair(itemName, ConfigTreeItem(itemName, value, "string"))); + iterItem = iter->second->find(itemName); + } + iterItem->second.setValue(value); + return true; +} + +// Save config to a file (ini format) +// return false if empty, no config, or enable to open +// return true if everything is ok +bool +ConfigTree::saveConfigTree(const std::string& fileName) { + if (fileName.empty() && _sections.begin() == _sections.end() ) { + return false; + } + + std::fstream file; + file.open(fileName.data(), std::fstream::out); + + if (!file.is_open()) { + return false; + } + + // for each section, for each item... + SectionMap::iterator iter = _sections.begin(); + while(iter != _sections.end()) { + file << "[" << iter->first << "]" << std::endl; + ItemMap::iterator iterItem = iter->second->begin(); + while ( iterItem != iter->second->end() ) { + file << iterItem->first << "=" << iterItem->second.getValue() << std::endl; + iterItem++; + } + file << std::endl; + + iter++; + } + + file.close(); + return true; +} + +// Create the tree from an existing ini file +// 0 = error +// 1 = OK +// 2 = unable to open +int +ConfigTree::populateFromFile(const std::string& fileName) { + bool out = false; + if (fileName.empty()) { + return 0; + } + + std::fstream file; + file.open(fileName.data(), std::fstream::in); + + if (!file.is_open()) { + file.open(fileName.data(), std::fstream::out); + out = true; + if (!file.is_open()) { + return 0; + } + file.close(); + return 2; + } + // get length of file: + file.seekg (0, std::ios::end); + int length = file.tellg(); + file.seekg (0, std::ios::beg); + + if ( length == 0 ) { + file.close(); + return 2; // should load config + } + + std::string line; + std::string section(""); + std::string key(""); + std::string val(""); + int pos; + + while (!file.eof()) { + // Read the file line by line + std::getline(file, line); + if (!line.empty()) { + if (line[0] == '[') { + // If the line is a section + pos = line.find(']'); + section = line.substr(1, pos - 1); + + } else if (line[0] != '#') { + // If the line is "key=value" and doesn't begin with '#'(comments) + + pos = line.find('='); + key = line.substr(0, pos); + val = line.substr(pos + 1, line.length() - pos); + + if (key.length() > 0 && val.length() > 0) { + setConfigTreeItem(section, key, val); + } + } + } + } + + file.close(); + return 1; +} + +TokenList +ConfigTree::getSectionNames() +{ + TokenList sections; + for(SectionMap::iterator pos = _sections.begin(); + pos != _sections.end(); + pos++) { + sections.push_back(pos->first); + } + + return sections; +} + +ValuesMap +ConfigTree::getSection(const std::string& section) +{ + ValuesMap values; + ItemMap::iterator it; + + SectionMap::iterator pos = _sections.find(section); + if(pos != _sections.end()) { + ItemMap *section = pos->second; + for(it = section->begin(); + it != section->end(); + it++) { + values.insert(make_pair(it->second.getName(), + it->second.getValue())); + } + } + + return values; +} + +TokenList +ConfigTreeIterator::begin() +{ + TokenList tk; + _iter = _tree->_sections.begin(); + if (_iter!=_tree->_sections.end()) { + _iterItem = _iter->second->begin(); + if (_iterItem!=_iter->second->end()) { + tk.push_back(_iter->first); + tk.push_back(_iterItem->first); + tk.push_back(_iterItem->second.getType()); + tk.push_back(_iterItem->second.getValue()); + tk.push_back(_iterItem->second.getDefaultValue()); + } + } + return tk; +} + + +TokenList +ConfigTreeIterator::next() +{ + TokenList tk; + // we return tk empty if we are at the end of the list... + if (_iter==_tree->_sections.end()) { + return tk; + } + if (_iterItem!=_iter->second->end()) { + _iterItem++; + } + if (_iterItem==_iter->second->end()) { + // if we increment, and we are at the end of a section + _iter++; + if (_iter!=_tree->_sections.end()) { + _iterItem = _iter->second->begin(); + if (_iterItem!=_iter->second->end()) { + tk.push_back(_iter->first); + tk.push_back(_iterItem->first); + tk.push_back(_iterItem->second.getType()); + tk.push_back(_iterItem->second.getValue()); + tk.push_back(_iterItem->second.getDefaultValue()); + } + } + } else { + tk.push_back(_iter->first); + tk.push_back(_iterItem->first); + tk.push_back(_iterItem->second.getType()); + tk.push_back(_iterItem->second.getValue()); + tk.push_back(_iterItem->second.getDefaultValue()); + } + return tk; +} + +} // end namespace ConfigTree + + diff --git a/libs/taxidermy/config.h b/libs/taxidermy/config.h new file mode 100644 index 0000000000000000000000000000000000000000..14a588d4711caf51793ceeb3aaff797d8ef623bb --- /dev/null +++ b/libs/taxidermy/config.h @@ -0,0 +1,117 @@ +/** + * Copyright (C) 2005 Savoir-Faire Linux inc. + * Author: Yan Morin <yan.morin@savoirfairelinux.com> + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __CONFIG_CONFIG_H_ +#define __CONFIG_CONFIG_H_ + +#include <map> +#include <string> +#include <list> + +namespace Conf { + +class ConfigTreeItem; +typedef std::map<std::string, ConfigTreeItem> ItemMap; +typedef std::map<std::string, ItemMap*> SectionMap; +typedef std::map<std::string, std::string> ValuesMap; +typedef std::list<std::string> TokenList; + +class ConfigTreeItemException { +public: + ConfigTreeItemException() {} + ~ConfigTreeItemException() {} +}; + +class ConfigTree; +class ConfigTreeIterator +{ +public: + TokenList begin(); + const TokenList& end() const { return _endToken; } + TokenList next(); + +private: + friend class ConfigTree; + ConfigTreeIterator(ConfigTree *configTree) : _tree(configTree) {} + + ConfigTree* _tree; + TokenList _endToken; + SectionMap::iterator _iter; + ItemMap::iterator _iterItem; +}; + +class ConfigTree { +public: + ConfigTree(); + ~ConfigTree(); + + void createSection(const std::string& section); + void addConfigTreeItem(const std::string& section, const ConfigTreeItem item); + bool setConfigTreeItem(const std::string& section, const std::string& itemName, const std::string& value); + + // throw a ConfigTreeItemException if not found + std::string getConfigTreeItemValue(const std::string& section, const std::string& itemName); + int getConfigTreeItemIntValue(const std::string& section, const std::string& itemName); + bool saveConfigTree(const std::string& fileName); + int populateFromFile(const std::string& fileName); + TokenList getSectionNames(); + ValuesMap getSection(const std::string& section); + + bool getConfigTreeItemToken(const std::string& section, const std::string& itemName, TokenList& arg); + +private: + ConfigTreeItem* getConfigTreeItem(const std::string& section, const std::string& itemName); + + SectionMap _sections; + friend class ConfigTreeIterator; + +public: + ConfigTreeIterator createIterator() { + return ConfigTreeIterator(this); + } +}; + +class ConfigTreeItem { +public: + ConfigTreeItem() : _defaultValue(""), _type("string") {} + // defaultvalue = value + ConfigTreeItem(const std::string& name, const std::string& value, const std::string& type) : + _name(name), _value(value), + _defaultValue(value), _type(type) {} + ConfigTreeItem(const std::string& name, const std::string& value, const std::string& defaultValue, const std::string& type) : + _name(name), _value(value), + _defaultValue(defaultValue), _type(type) {} + ~ConfigTreeItem() {} + + void setValue(const std::string& value) { _value = value; } + const std::string getName() const { return _name; } + const std::string getValue() const { return _value; } + const std::string getDefaultValue() const { return _defaultValue; } + const std::string getType() const { return _type; } + +private: + std::string _name; + std::string _value; + std::string _defaultValue; + std::string _type; +}; + +} // end namespace ConfigTree + +#endif diff --git a/libs/taxidermy/qtutils.cpp b/libs/taxidermy/qtutils.cpp new file mode 100644 index 0000000000000000000000000000000000000000..266bbfcc41b0b65848914793c93512306d5fc731 --- /dev/null +++ b/libs/taxidermy/qtutils.cpp @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2004-2005 Savoir-Faire Linux inc. + * Author: Jean-Philippe Barrette-LaPierre + * (jean-philippe.barrette-lapierre@savoirfairelinux.com) + * + * This 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, + * or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with dpkg; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "qtutils.hpp" + +#include <qbitmap.h> +#include <qimage.h> + +QPixmap +taxidermy::qtutils::transparize(const QString &image) +{ +#ifdef QT3_SUPPORT + QPixmap p(retreive(image)); + if (!p.mask()) { + if (p.hasAlphaChannel()) { + p.setMask(p.alphaChannel()); + } + else { + p.setMask(p.createHeuristicMask()); + } + } +#else + // QPixmap p(QPixmap::fromMimeSource(image)); + QImage img(QImage::fromMimeSource(image)); + QPixmap p; + p.convertFromImage(img); + + + QBitmap bm; + if (img.hasAlphaBuffer()) { + bm = img.createAlphaMask(); + } + else { + bm = img.createHeuristicMask(); + } + p.setMask(bm); +#endif + return p; +} + diff --git a/libs/taxidermy/qtutils.hpp b/libs/taxidermy/qtutils.hpp new file mode 100644 index 0000000000000000000000000000000000000000..8c64bafcad3143d0fe726de0ea8bc13179a05e08 --- /dev/null +++ b/libs/taxidermy/qtutils.hpp @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2004-2005 Savoir-Faire Linux inc. + * Author: Jean-Philippe Barrette-LaPierre + * (jean-philippe.barrette-lapierre@savoirfairelinux.com) + * + * This 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, + * or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with dpkg; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include <qpixmap.h> + +namespace taxidermy +{ + namespace qtutils + { + QPixmap transparize(const QString &image); + }; +}; diff --git a/libs/taxidermy/taxidermy.pro b/libs/taxidermy/taxidermy.pro new file mode 100644 index 0000000000000000000000000000000000000000..2b4ee45262db086ed6a2b7c6c46ff04bde2731ac --- /dev/null +++ b/libs/taxidermy/taxidermy.pro @@ -0,0 +1,42 @@ +TEMPLATE = lib +LANGUAGE = C++ + +CONFIG += qt stl warn_on debug staticlib + +TARGET = taxidermy +#DESTDIR = bin +#DLLDESTDIR = tests/demo1/bin/styles + +#INCLUDEPATH += ../util-ng/include +#INCLUDEPATH += ../qtutil/include +INCLUDEPATH += ../ + +HEADERS += ButtonBuilder.hpp \ + EventFilter.hpp \ + Hunter.hpp \ + PaintEventFilter.hpp \ + QButtonBuilder.hpp \ + Taxidermist.hpp \ + WidgetBuilderCreator.hpp WidgetBuilderCreator.inl \ + WidgetBuilderFactory.hpp \ + WidgetBuilderFactoryImpl.hpp WidgetBuilderFactoryImpl.inl \ + WidgetBuilder.hpp \ + config.h \ + qtutils.hpp + + +SOURCES += EventFilter.cpp \ + Hunter.cpp \ + PaintEventFilter.cpp \ + QButtonBuilder.cpp \ + Taxidermist.cpp \ + WidgetBuilder.cpp \ + WidgetBuilderFactoryImpl.cpp \ + config.cpp \ + qtutils.cpp + +#UI_DIR = bin/ui +#MOC_DIR = bin/moc +#OBJECTS_DIR = bin/obj + + diff --git a/skins/Makefile.am b/skins/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..5c3063bce8895db8393c60228bc9ad0b2ad37c99 --- /dev/null +++ b/skins/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = metal gmetal +datadir = $(sflphone_datadir)/skins/ +data_DATA = *.ini \ No newline at end of file diff --git a/skins/gmetal.ini b/skins/gmetal.ini new file mode 100644 index 0000000000000000000000000000000000000000..a464e6eedfefbcc384a09ab4fef26f2e4453e74c --- /dev/null +++ b/skins/gmetal.ini @@ -0,0 +1,186 @@ +[hold] +type=QButton +x=225 +y=68 +pressed=hold_on.png +released=hold_off.png +paint=1 + +[line0] +type=QButton +x=21 +y=181 +pressed=l1_green_on.png +released=l1_green_off.png +paint=1 + +[line1] +type=QButton +x=52 +y=181 +pressed=l2_green_on.png +released=l2_green_off.png +paint=1 + +[line2] +type=QButton +x=83 +y=181 +pressed=l3_green_on.png +released=l3_green_off.png +paint=1 + +[line3] +type=QButton +x=114 +y=181 +pressed=l4_green_on.png +released=l4_green_off.png +paint=1 + +[line4] +type=QButton +x=145 +y=181 +pressed=l5_green_on.png +released=l5_green_off.png +paint=1 + +[line5] +type=QButton +x=176 +y=181 +pressed=l6_green_on.png +released=l6_green_off.png +paint=1 + +[hangup] +type=QButton +x=225 +y=156 +pressed=hangup_on.png +released=hangup_off.png +paint=1 + +[ok] +type=QButton +x=225 +y=182 +pressed=ok_on.png +released=ok_off.png +paint=1 + + +[mute] +type=QButton +x=225 +y=94 +pressed=mute_on.png +released=mute_off.png +paint=1 + +[conference] +type=QButton +x=225 +y=69 +pressed=conference_on.png +released=conference_off.png +paint=1 + + +[transfer] +type=QButton +x=225 +y=42 +pressed=transfer_on.png +released=transfer_off.png +paint=1 + +[voicemail] +type=QButton +x=310 +y=43 +pressed=voicemail_on.png +released=voicemail_off.png +paint=1 + +[setup] +type=QButton +x=310 +y=68 +pressed=setup_on.png +released=setup_off.png +paint=1 + +[dtmf] +type=QButton +x=20 +y=151 +pressed=dtmf_on.png +released=dtmf_off.png +paint=1 + +[directory] +type=QButton +x=140 +y=181 +pressed=ok_on.png +released=ok_off.png +paint=1 + +[screen] +type=QButton +x=22 +y=44 +pressed=ok_on.png +released=ok_off.png +paint=1 + +[minimize] +type=QButton +x=353 +y=5 +pressed=minimize_on.png +released=minimize_off.png +paint=1 + +[clear] +type=QButton +x=225 +y=130 +pressed=clear_on.png +released=clear_off.png +paint=1 + +[close] +type=QButton +x=374 +y=5 +pressed=close_on.png +released=close_off.png +paint=1 + +[redial] +type=QButton +x=130 +y=151 +pressed=redial_on.png +released=redial_off.png +paint=1 + +# DTMF Keypad +#dtmf_1=12,22 +#dtmf_2=58,22 +#dtmf_3=104,22 +#dtmf_4=12,67 +#dtmf_5=58,67 +#dtmf_6=104,67 +#dtmf_7=12,112 +#dtmf_8=58,112 +#dtmf_9=104,112 +#dtmf_star=12,157 +#dtmf_0=58,157 +#dtmf_pound=104,157 +#dtmf_close=141,5 +# +# EOF diff --git a/skins/gmetal/l1_green_off.png b/skins/gmetal/l1_green_off.png new file mode 100644 index 0000000000000000000000000000000000000000..54cd7f0995374c4f3d64595e0773dd1193c4d733 Binary files /dev/null and b/skins/gmetal/l1_green_off.png differ diff --git a/skins/gmetal/l1_green_on.png b/skins/gmetal/l1_green_on.png new file mode 100644 index 0000000000000000000000000000000000000000..34fb0f08423f75c3e614bd5f843c060f3f420d72 Binary files /dev/null and b/skins/gmetal/l1_green_on.png differ diff --git a/skins/gmetal/l2_green_off.png b/skins/gmetal/l2_green_off.png new file mode 100644 index 0000000000000000000000000000000000000000..43ea2a0e7c12e417fa1fa656ba9114206279af90 Binary files /dev/null and b/skins/gmetal/l2_green_off.png differ diff --git a/skins/gmetal/l2_green_on.png b/skins/gmetal/l2_green_on.png new file mode 100644 index 0000000000000000000000000000000000000000..fde8599b7b1acd1e68653bc1786bc183c9aa3423 Binary files /dev/null and b/skins/gmetal/l2_green_on.png differ diff --git a/skins/gmetal/l3_green_off.png b/skins/gmetal/l3_green_off.png new file mode 100644 index 0000000000000000000000000000000000000000..3a5d065fd455671ddbb7d1721f3d178bd1e43798 Binary files /dev/null and b/skins/gmetal/l3_green_off.png differ diff --git a/skins/gmetal/l3_green_on.png b/skins/gmetal/l3_green_on.png new file mode 100644 index 0000000000000000000000000000000000000000..dc27c9c1c91077496086b9c87fde9e3373614d30 Binary files /dev/null and b/skins/gmetal/l3_green_on.png differ diff --git a/skins/gmetal/l4_green_off.png b/skins/gmetal/l4_green_off.png new file mode 100644 index 0000000000000000000000000000000000000000..4405359ec5f9aceb883a5c4d7845d7502201fe38 Binary files /dev/null and b/skins/gmetal/l4_green_off.png differ diff --git a/skins/gmetal/l4_green_on.png b/skins/gmetal/l4_green_on.png new file mode 100644 index 0000000000000000000000000000000000000000..69897e42b5af89a5d04973ca727d21a926e0a6b4 Binary files /dev/null and b/skins/gmetal/l4_green_on.png differ diff --git a/skins/gmetal/l5_green_off.png b/skins/gmetal/l5_green_off.png new file mode 100644 index 0000000000000000000000000000000000000000..f32807ae93e8829ddefd56b0d92e40f7ab585f91 Binary files /dev/null and b/skins/gmetal/l5_green_off.png differ diff --git a/skins/gmetal/l5_green_on.png b/skins/gmetal/l5_green_on.png new file mode 100644 index 0000000000000000000000000000000000000000..b74bc4d26a6626c6faa7aa62c97eb431b2977058 Binary files /dev/null and b/skins/gmetal/l5_green_on.png differ diff --git a/skins/gmetal/l6_green_off.png b/skins/gmetal/l6_green_off.png new file mode 100644 index 0000000000000000000000000000000000000000..395a77476738ae47d89c6d3a8dabea718dd39a6f Binary files /dev/null and b/skins/gmetal/l6_green_off.png differ diff --git a/skins/gmetal/l6_green_on.png b/skins/gmetal/l6_green_on.png new file mode 100644 index 0000000000000000000000000000000000000000..06b19b4e4b483b9c22dd7ae93085102a0f7164e0 Binary files /dev/null and b/skins/gmetal/l6_green_on.png differ diff --git a/skins/metal.ini b/skins/metal.ini new file mode 100644 index 0000000000000000000000000000000000000000..4ef717499f2eb5167482457031312c89b21a5942 --- /dev/null +++ b/skins/metal.ini @@ -0,0 +1,186 @@ +[hold] +type=QButton +x=225 +y=68 +pressed=hold_on.png +released=hold_off.png +paint=1 + +[line0] +type=QButton +x=21 +y=151 +pressed=l1_on.png +released=l1_off.png +paint=1 + +[line1] +type=QButton +x=52 +y=151 +pressed=l2_on.png +released=l2_off.png +paint=1 + +[line2] +type=QButton +x=83 +y=151 +pressed=l3_on.png +released=l3_off.png +paint=1 + +[line3] +type=QButton +x=114 +y=151 +pressed=l4_on.png +released=l4_off.png +paint=1 + +[line4] +type=QButton +x=145 +y=151 +pressed=l5_on.png +released=l5_off.png +paint=1 + +[line5] +type=QButton +x=176 +y=151 +pressed=l6_on.png +released=l6_off.png +paint=1 + +[hangup] +type=QButton +x=225 +y=156 +pressed=hangup_on.png +released=hangup_off.png +paint=1 + +[ok] +type=QButton +x=225 +y=182 +pressed=ok_on.png +released=ok_off.png +paint=1 + + +[mute] +type=QButton +x=225 +y=94 +pressed=mute_on.png +released=mute_off.png +paint=1 + +[conference] +type=QButton +x=225 +y=69 +pressed=conference_on.png +released=conference_off.png +paint=1 + + +[transfer] +type=QButton +x=225 +y=42 +pressed=transfer_on.png +released=transfer_off.png +paint=1 + +[voicemail] +type=QButton +x=310 +y=43 +pressed=voicemail_on.png +released=voicemail_off.png +paint=1 + +[setup] +type=QButton +x=310 +y=68 +pressed=setup_on.png +released=setup_off.png +paint=1 + +[dtmf] +type=QButton +x=20 +y=181 +pressed=dtmf_on.png +released=dtmf_off.png +paint=1 + +[directory] +type=QButton +x=140 +y=181 +pressed=ok_on.png +released=ok_off.png +paint=1 + +[screen] +type=QButton +x=22 +y=44 +pressed=ok_on.png +released=ok_off.png +paint=1 + +[minimize] +type=QButton +x=353 +y=5 +pressed=minimize_on.png +released=minimize_off.png +paint=1 + +[clear] +type=QButton +x=225 +y=130 +pressed=clear_on.png +released=clear_off.png +paint=1 + +[close] +type=QButton +x=374 +y=5 +pressed=close_on.png +released=close_off.png +paint=1 + +[redial] +type=QButton +x=130 +y=181 +pressed=redial_on.png +released=redial_off.png +paint=1 + +# DTMF Keypad +#dtmf_1=12,22 +#dtmf_2=58,22 +#dtmf_3=104,22 +#dtmf_4=12,67 +#dtmf_5=58,67 +#dtmf_6=104,67 +#dtmf_7=12,112 +#dtmf_8=58,112 +#dtmf_9=104,112 +#dtmf_star=12,157 +#dtmf_0=58,157 +#dtmf_pound=104,157 +#dtmf_close=141,5 +# +# EOF diff --git a/skins/metal/clear_on.png b/skins/metal/clear_on.png new file mode 100644 index 0000000000000000000000000000000000000000..9605e89ae9d104ab2d627a27f7c4ddcffb42ff94 Binary files /dev/null and b/skins/metal/clear_on.png differ diff --git a/skins/metal/close_on.png b/skins/metal/close_on.png new file mode 100644 index 0000000000000000000000000000000000000000..747c7fb09c461bef92cb4fdf9af9cc03fa7e9731 Binary files /dev/null and b/skins/metal/close_on.png differ diff --git a/skins/metal/conference_on.png b/skins/metal/conference_on.png new file mode 100644 index 0000000000000000000000000000000000000000..a565e16d30e2a96b5a4b06f0767bc40dffbae0d8 Binary files /dev/null and b/skins/metal/conference_on.png differ diff --git a/skins/metal/directory_on.png b/skins/metal/directory_on.png new file mode 100644 index 0000000000000000000000000000000000000000..265075178051802e1195dfa022b596310b1caccf Binary files /dev/null and b/skins/metal/directory_on.png differ diff --git a/skins/metal/dtmf_0_on.png b/skins/metal/dtmf_0_on.png new file mode 100644 index 0000000000000000000000000000000000000000..57c0f4fcee858e98d94a5c8d0663622b33065366 Binary files /dev/null and b/skins/metal/dtmf_0_on.png differ diff --git a/skins/metal/dtmf_1_on.png b/skins/metal/dtmf_1_on.png new file mode 100644 index 0000000000000000000000000000000000000000..737e614cf153e1e6d2abdf6c2318bbefb54bd48b Binary files /dev/null and b/skins/metal/dtmf_1_on.png differ diff --git a/skins/metal/dtmf_2_on.png b/skins/metal/dtmf_2_on.png new file mode 100644 index 0000000000000000000000000000000000000000..978fe76f592f570279a9a7d267d9595b23e68f7e Binary files /dev/null and b/skins/metal/dtmf_2_on.png differ diff --git a/skins/metal/dtmf_3_on.png b/skins/metal/dtmf_3_on.png new file mode 100644 index 0000000000000000000000000000000000000000..28f1b655763540078018b971c8d8bad761e6bf57 Binary files /dev/null and b/skins/metal/dtmf_3_on.png differ diff --git a/skins/metal/dtmf_4_on.png b/skins/metal/dtmf_4_on.png new file mode 100644 index 0000000000000000000000000000000000000000..1ef21959008f13919df13d48e9695013a84816d7 Binary files /dev/null and b/skins/metal/dtmf_4_on.png differ diff --git a/skins/metal/dtmf_5_on.png b/skins/metal/dtmf_5_on.png new file mode 100644 index 0000000000000000000000000000000000000000..40b08cb37d6e9cab1002c29e963acf51ec0126d7 Binary files /dev/null and b/skins/metal/dtmf_5_on.png differ diff --git a/skins/metal/dtmf_6_on.png b/skins/metal/dtmf_6_on.png new file mode 100644 index 0000000000000000000000000000000000000000..cc36556546babec6de6da07db5e03e4af759a63c Binary files /dev/null and b/skins/metal/dtmf_6_on.png differ diff --git a/skins/metal/dtmf_7_on.png b/skins/metal/dtmf_7_on.png new file mode 100644 index 0000000000000000000000000000000000000000..e6adb35e516c38b24193ceb3c5a4f40c13d52778 Binary files /dev/null and b/skins/metal/dtmf_7_on.png differ diff --git a/skins/metal/dtmf_8_on.png b/skins/metal/dtmf_8_on.png new file mode 100644 index 0000000000000000000000000000000000000000..50f0bf36beacbe9a30246ad0c4dd1aedc95e4570 Binary files /dev/null and b/skins/metal/dtmf_8_on.png differ diff --git a/skins/metal/dtmf_9_on.png b/skins/metal/dtmf_9_on.png new file mode 100644 index 0000000000000000000000000000000000000000..12e4c1a11c756f793080a0ac7ae433376918fe91 Binary files /dev/null and b/skins/metal/dtmf_9_on.png differ diff --git a/skins/metal/dtmf_close_on.png b/skins/metal/dtmf_close_on.png new file mode 100644 index 0000000000000000000000000000000000000000..0a962cb18c1178e8012a8d859ad6489a8e6bd017 Binary files /dev/null and b/skins/metal/dtmf_close_on.png differ diff --git a/skins/metal/dtmf_on.png b/skins/metal/dtmf_on.png new file mode 100644 index 0000000000000000000000000000000000000000..a2eeddc4460f4f560a12bb532d7d9ae3686e8ea4 Binary files /dev/null and b/skins/metal/dtmf_on.png differ diff --git a/skins/metal/dtmf_pound_on.png b/skins/metal/dtmf_pound_on.png new file mode 100644 index 0000000000000000000000000000000000000000..1a1fa6e065782ea2b159df1668f9ea4eb581cae6 Binary files /dev/null and b/skins/metal/dtmf_pound_on.png differ diff --git a/skins/metal/dtmf_star_on.png b/skins/metal/dtmf_star_on.png new file mode 100644 index 0000000000000000000000000000000000000000..b77a5221bda7d438d51c3fefb6924fa602f1fcb5 Binary files /dev/null and b/skins/metal/dtmf_star_on.png differ diff --git a/skins/metal/hangup_on.png b/skins/metal/hangup_on.png new file mode 100644 index 0000000000000000000000000000000000000000..56313f6df102d7926a5b898a4c0126f7a5351219 Binary files /dev/null and b/skins/metal/hangup_on.png differ diff --git a/skins/metal/hold_on.png b/skins/metal/hold_on.png new file mode 100644 index 0000000000000000000000000000000000000000..c02be220b2e97a82f5387660fc81fe3d2548912a Binary files /dev/null and b/skins/metal/hold_on.png differ diff --git a/skins/metal/l1_green_on.png b/skins/metal/l1_green_on.png new file mode 100644 index 0000000000000000000000000000000000000000..34fb0f08423f75c3e614bd5f843c060f3f420d72 Binary files /dev/null and b/skins/metal/l1_green_on.png differ diff --git a/skins/metal/l1_on.png b/skins/metal/l1_on.png new file mode 100644 index 0000000000000000000000000000000000000000..b6bffb37d75b3ff1a0501e3e9fea45821ccb2a8f Binary files /dev/null and b/skins/metal/l1_on.png differ diff --git a/skins/metal/l2_green_on.png b/skins/metal/l2_green_on.png new file mode 100644 index 0000000000000000000000000000000000000000..fde8599b7b1acd1e68653bc1786bc183c9aa3423 Binary files /dev/null and b/skins/metal/l2_green_on.png differ diff --git a/skins/metal/l2_on.png b/skins/metal/l2_on.png new file mode 100644 index 0000000000000000000000000000000000000000..7fbc7cded84d6d659a5b0a7a311b37f3c0c0f25f Binary files /dev/null and b/skins/metal/l2_on.png differ diff --git a/skins/metal/l3_green_on.png b/skins/metal/l3_green_on.png new file mode 100644 index 0000000000000000000000000000000000000000..dc27c9c1c91077496086b9c87fde9e3373614d30 Binary files /dev/null and b/skins/metal/l3_green_on.png differ diff --git a/skins/metal/l3_on.png b/skins/metal/l3_on.png new file mode 100644 index 0000000000000000000000000000000000000000..d28d55755f9adbec98d7f0aed848055801dc09d0 Binary files /dev/null and b/skins/metal/l3_on.png differ diff --git a/skins/metal/l4_green_on.png b/skins/metal/l4_green_on.png new file mode 100644 index 0000000000000000000000000000000000000000..69897e42b5af89a5d04973ca727d21a926e0a6b4 Binary files /dev/null and b/skins/metal/l4_green_on.png differ diff --git a/skins/metal/l4_on.png b/skins/metal/l4_on.png new file mode 100644 index 0000000000000000000000000000000000000000..e63427d93bf11ca89fcc57cc79c1698ba0a7fa23 Binary files /dev/null and b/skins/metal/l4_on.png differ diff --git a/skins/metal/l5_green_on.png b/skins/metal/l5_green_on.png new file mode 100644 index 0000000000000000000000000000000000000000..b74bc4d26a6626c6faa7aa62c97eb431b2977058 Binary files /dev/null and b/skins/metal/l5_green_on.png differ diff --git a/skins/metal/l5_on.png b/skins/metal/l5_on.png new file mode 100644 index 0000000000000000000000000000000000000000..d77e64e18edd5db14005f0d060e352c59ba245c3 Binary files /dev/null and b/skins/metal/l5_on.png differ diff --git a/skins/metal/l6_green_on.png b/skins/metal/l6_green_on.png new file mode 100644 index 0000000000000000000000000000000000000000..06b19b4e4b483b9c22dd7ae93085102a0f7164e0 Binary files /dev/null and b/skins/metal/l6_green_on.png differ diff --git a/skins/metal/l6_on.png b/skins/metal/l6_on.png new file mode 100644 index 0000000000000000000000000000000000000000..383d3dd4197ef1661950535f79b3fb46de0dc4ec Binary files /dev/null and b/skins/metal/l6_on.png differ diff --git a/skins/metal/line_on.png b/skins/metal/line_on.png new file mode 100644 index 0000000000000000000000000000000000000000..b6bffb37d75b3ff1a0501e3e9fea45821ccb2a8f Binary files /dev/null and b/skins/metal/line_on.png differ diff --git a/skins/metal/minimize_on.png b/skins/metal/minimize_on.png new file mode 100644 index 0000000000000000000000000000000000000000..20bb4e175433a92bef6c12cac6ac849e574e4229 Binary files /dev/null and b/skins/metal/minimize_on.png differ diff --git a/skins/metal/mute_on.png b/skins/metal/mute_on.png new file mode 100644 index 0000000000000000000000000000000000000000..e46a9a8d663abb9b2fdec0b6bdd226cd1884962c Binary files /dev/null and b/skins/metal/mute_on.png differ diff --git a/skins/metal/ok_on.png b/skins/metal/ok_on.png new file mode 100644 index 0000000000000000000000000000000000000000..7c8327dba56f3702dd3d7e584028efef8cea7308 Binary files /dev/null and b/skins/metal/ok_on.png differ diff --git a/skins/metal/redial_on.png b/skins/metal/redial_on.png new file mode 100644 index 0000000000000000000000000000000000000000..6a71b707ee1d59d5bdf9450be1087716b20da832 Binary files /dev/null and b/skins/metal/redial_on.png differ diff --git a/skins/metal/setup_on.png b/skins/metal/setup_on.png new file mode 100644 index 0000000000000000000000000000000000000000..cba7b68c9fac21e5ec9c2c909d179361f3d35b65 Binary files /dev/null and b/skins/metal/setup_on.png differ diff --git a/skins/metal/transfer_on.png b/skins/metal/transfer_on.png new file mode 100644 index 0000000000000000000000000000000000000000..806f06de449184ef527220dae7b6228ace2d727f Binary files /dev/null and b/skins/metal/transfer_on.png differ diff --git a/skins/metal/voicemail_on.png b/skins/metal/voicemail_on.png new file mode 100644 index 0000000000000000000000000000000000000000..9c0f1666dd69251add93b7ecb1d8ec58be4c0ff4 Binary files /dev/null and b/skins/metal/voicemail_on.png differ diff --git a/skins/metal/volume_on.png b/skins/metal/volume_on.png new file mode 100644 index 0000000000000000000000000000000000000000..13189014b3b0c34c25dd7b65f1ce4900d4f86e1e Binary files /dev/null and b/skins/metal/volume_on.png differ diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index bcac34b03ec02e90c4a0eee16dcea2a9aed30d72..36fcd9ffc58e4996464ecc3e41574dec2d00a880 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -1,4 +1,4 @@ -serverdir = server +serverdir = server serverlib = server/libsflphoneguiserver.la #libexec_PROGRAMS = qt/sflphone-qt @@ -6,7 +6,7 @@ serverlib = server/libsflphoneguiserver.la #qt/sflphone-qt: # cd qt && make -SUBDIRS = $(serverdir) +SUBDIRS = $(serverdir) qt noinst_LTLIBRARIES = libguiframework.la