countdown

Plasma 4 Widgets

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on git.opendesktop.org

1
Score 68%
Description:

Note: If you run the applet for the first time, it will ask you to configure it. DO NOT click the button in the widget, use right click or the side button, apparently libplasma has some issues with that and eats the widget.

Plasma Applet to countdown to a specific time. It allows you to set a target time and see a counter displaying how much time is left. The display adjusts itself in precision depending on how much time is left until the set time.

Last changelog:

10 years ago

0.2.2: Made scaling of fonts work again. Now the plasmoid will make better use of the available space.

0.2.1: Reworked the plasmoid to compile against KDE 4.1 and use the feedback. Now the plasmoid can show a label for the event. Due to the step to KDE 4.1 and the use of widgets on canvas, the font scaling currently does not work, though.

coloradolinux

9 years ago

I couldn't get the patch working so I made my own.

--- CMakeLists.txt.orig 2010-01-19 23:45:13.000000000 -0600
+++ CMakeLists.txt 2010-01-19 23:42:13.000000000 -0600
@@ -4,7 +4,6 @@
# Find the required Libaries
find_package( KDE4 REQUIRED )
include( KDE4Defaults )
-find_package( Plasma REQUIRED )

add_definitions ( ${QT_DEFINITIONS} ${KDE4_DEFINITIONS} )
include_directories(
@@ -14,4 +13,13 @@
)

add_subdirectory( src )
-add_subdirectory( misc )
+add_subdirectory( misc )
+
+set(countdown_SRCS src/countdown.cpp)
+kde4_add_ui_files(countdown_SRCS src/countdownConfig.ui)
+
+kde4_add_plugin(plasma_applet_countdown ${countdown_SRCS})
+target_link_libraries(plasma_applet_countdown ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS})
+
+install(TARGETS plasma_applet_countdown DESTINATION ${PLUGIN_INSTALL_DIR})
+install(FILES misc/plasma-applet-countdown.desktop DESTINATION ${SERVICES_INSTALL_DIR})


patch the CMakeLists.txt under the plasmoid-countdown-0.2.2 directory. patch CMakeLists.txt < patch then run the following commands.

cd plasmoid-countdown-0.2.2
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ../
make
make install

Report

cowb0y

9 years ago

I've put together a how-to to make it easier to get this working on KDE 4.3.2. These instructions are for Debian-based systems, tested on K/Ubuntu Karmic (9.10).

Install the build-essential, cmake and kdelibs5-dev packages:
sudo apt-get install build-essential cmake kdelibs5-dev

Download plasmoid source code from this page.

Untar the source file, ex.:
tar -xvf plasmoid-countdown_0.2.2.orig.tar.gz

Move into the directory created above, ex.:
cd plasmoid-countdown_0.2.2

Patch the CMakeList.txt files (see patches below; note that there should be spaces leading all lines that don't start with - or +).

Save the text below into separate files in the indicated directories (use kate or nano to create the files). Then, issue the commands indicated to patch the cmake config files to make the changes indicated.

patch1.txt (save to current directory (ex., plasmoid-countdown_0.2.2))
[code]
--- CMakeLists.txt.ORIG 2009-11-28 19:47:47.000000000 -0500
+++ CMakeLists.txt 2009-11-28 20:02:24.000000000 -0500
@@ -4,7 +4,6 @@
# Find the required Libaries
find_package( KDE4 REQUIRED )
include( KDE4Defaults )
-find_package( Plasma REQUIRED )

add_definitions ( ${QT_DEFINITIONS} ${KDE4_DEFINITIONS} )
include_directories(
[/code]

patch2.txt (save to src/CMakeLists.txt)
[code]
--- CMakeLists.txt.ORIG 2009-11-28 20:02:45.000000000 -0500
+++ CMakeLists.txt 2009-11-28 20:04:28.000000000 -0500
@@ -5,7 +5,7 @@
# Now make sure all files get to the right place
kde4_add_plugin(plasma_applet_countdown ${countdown_SRCS})
target_link_libraries(plasma_applet_countdown
- ${PLASMA_LIBS} ${KDE4_KDEUI_LIBS})
+ ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS})

install(TARGETS plasma_applet_countdown
DESTINATION ${PLUGIN_INSTALL_DIR})
[/code]

From the main working directory (ex., plasmoid-countdown_0.2.2):
patch CMakeLists.txt < patch1.txt

patch src/CMakeLists.txt < src/patch2.txt

Configure the build for your machine:
cmake .

Build the project:
make plasma_applet_countdown

Install the project:
sudo make install

Now the plasmoid should be found in the widgets list.

Report

ilpianista

9 years ago

--- plasmoid-countdown-0.2.2/CMakeLists.txt~ 2009-09-09 22:58:30.964556838 +0200
+++ plasmoid-countdown-0.2.2/CMakeLists.txt 2009-09-09 22:58:37.412060368 +0200
@@ -4,7 +4,6 @@
# Find the required Libaries
find_package( KDE4 REQUIRED )
include( KDE4Defaults )
-find_package( Plasma REQUIRED )

add_definitions ( ${QT_DEFINITIONS} ${KDE4_DEFINITIONS} )
include_directories(
--- plasmoid-countdown-0.2.2/src/CMakeLists.txt~ 2009-09-09 22:59:17.530134595 +0200
+++ plasmoid-countdown-0.2.2/src/CMakeLists.txt 2009-09-09 22:59:04.410671153 +0200
@@ -5,7 +5,7 @@
# Now make sure all files get to the right place
kde4_add_plugin(plasma_applet_countdown ${countdown_SRCS})
target_link_libraries(plasma_applet_countdown
- ${PLASMA_LIBS} ${KDE4_KDEUI_LIBS})
+ ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS})

install(TARGETS plasma_applet_countdown
DESTINATION ${PLUGIN_INSTALL_DIR})

Report

mkbiker

9 years ago

Yes, it work (on kde 4.2.4 also).
Thanks!

Report

grucha

9 years ago

What with KDE 4.2 ?

Report

illinux

10 years ago

...to see you have updated this cool plasmoid!

Thank you!

Report

kwinner

10 years ago

Nice dark colours¡¡

Report

dmears

10 years ago

This more or less makes it compile under ~4.1

57c57
< setDrawStandardBackground(true);
---
> setBackgroundHints(DefaultBackground);
87c87
< setNeedsConfiguring( true );
---
> setConfigurationRequired( true );
90c90
< setMinimumContentSize(40, 50);
---
> // setMinimumContentSize(40, 50);
281c281
< setNeedsConfiguring( false );
---
> setConfigurationRequired( false );

Report

DexterMagnific

10 years ago

Please can you upgrade to 4.1 API ? Thanks

Report

Kalidarn

10 years ago

I tried compiling this with:

cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RELEASE

and then make

I get this error:

[ 33%] Building CXX object src/CMakeFiles/plasma_applet_countdown.dir/countdown.o
cd /home/kalidarn/builds/kdemod-extragear-plasmoid-countdown/src/countdown-0.1/src && /usr/bin/c++ -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -Dplasma_applet_countdown_EXPORTS -march=i686 -mtune=generic -O2 -pipe -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden -O2 -DNDEBUG -DQT_NO_DEBUG -fPIC -I/home/kalidarn/builds/kdemod-extragear-plasmoid-countdown/src/countdown-0.1/src -I/home/kalidarn/builds/kdemod-extragear-plasmoid-countdown/src/countdown-0.1 -I/usr/include/KDE -I/usr/include/QtWebKit -I/usr/include/QtHelp -I/usr/include/QtAssistant -I/usr/include/QtDBus -I/usr/include/QtTest -I/usr/include/QtUiTools -I/usr/include/QtScript -I/usr/include/QtSvg -I/usr/include/QtXml -I/usr/include/QtSql -I/usr/include/QtOpenGL -I/usr/include/QtNetwork -I/usr/include/QtDesigner -I/usr/include/Qt3Support -I/usr/include/QtGui -I/usr/include/QtCore -I/usr/include/Qt -I/usr/share/qt/mkspecs/default -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o CMakeFiles/plasma_applet_countdown.dir/countdown.o -c /home/kalidarn/builds/kdemod-extragear-plasmoid-countdown/src/countdown-0.1/src/countdown.cpp
/home/kalidarn/builds/kdemod-extragear-plasmoid-countdown/src/countdown-0.1/src/countdown.cpp: In constructor ‘Countdown::Countdown(QObject*, const QVariantList&)’:
/home/kalidarn/builds/kdemod-extragear-plasmoid-countdown/src/countdown-0.1/src/countdown.cpp:57: error: ‘setDrawStandardBackground’ was not declared in this scope
/home/kalidarn/builds/kdemod-extragear-plasmoid-countdown/src/countdown-0.1/src/countdown.cpp: In member function ‘virtual void Countdown::init()’:
/home/kalidarn/builds/kdemod-extragear-plasmoid-countdown/src/countdown-0.1/src/countdown.cpp:87: error: ‘setNeedsConfiguring’ was not declared in this scope
/home/kalidarn/builds/kdemod-extragear-plasmoid-countdown/src/countdown-0.1/src/countdown.cpp:90: error: ‘setMinimumContentSize’ was not declared in this scope
/home/kalidarn/builds/kdemod-extragear-plasmoid-countdown/src/countdown-0.1/src/countdown.cpp: In member function ‘void Countdown::configAccepted()’:
/home/kalidarn/builds/kdemod-extragear-plasmoid-countdown/src/countdown-0.1/src/countdown.cpp:281: error: ‘setNeedsConfiguring’ was not declared in this scope
make[2]: *** [src/CMakeFiles/plasma_applet_countdown.dir/countdown.o] Error 1
make[2]: Leaving directory `/home/kalidarn/builds/kdemod-extragear-plasmoid-countdown/src/countdown-0.1'
make[1]: *** [src/CMakeFiles/plasma_applet_countdown.dir/all] Error 2
make[1]: Leaving directory `/home/kalidarn/builds/kdemod-extragear-plasmoid-countdown/src/countdown-0.1'
make: *** [all] Error 2

Also I'm compiling against KDE 4.1.1

Report

C

andersin

10 years ago

KDE 4.1 does not work yet, sorry. It is on my list of things, but unfortunately I had very little time.

Report

muflax

10 years ago

It'd be cool if you could update the widget to use the new 4.1 api. :)

Report

thompson

10 years ago

script

please update to 4.1

Report

Kenichi

10 years ago

I recommend you add a fuction where you can set where you do countdown for.

Example kde4.1

So you should have then: 4 months till kde4.1

Report

buschmann23

11 years ago

It would be nice to be able to define a string that displays the target of the countdown. Something like:
"time" till Release of KDE 4.1

So that one can see, for what the countdown is meant. Otionally with an image or so.

Report

C

andersin

11 years ago

Labels are on the Todo list. I still need to figure out a good way to adjust the label size and the size of the displayed time to the size of the applet.

Report

buschmann23

11 years ago

I have build packages for openSUSE 10.2 and newer, you can find them here:
http://software.opensuse.org/search?baseproject=ALL&p=1&q=kde4-plasmoid-countdown

Report

C

andersin

11 years ago

Thanks, I added this to the download options.

Report

10 years ago

0.2.2: Made scaling of fonts work again. Now the plasmoid will make better use of the available space.

0.2.1: Reworked the plasmoid to compile against KDE 4.1 and use the feedback. Now the plasmoid can show a label for the event. Due to the step to KDE 4.1 and the use of widgets on canvas, the font scaling currently does not work, though.

product-maker 11 29

File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
Details
license
version
0.2.1
updated Nov 27 2008
added Feb 08 2008
downloads today
0
page views today 76