summaryrefslogtreecommitdiffstats
path: root/kscreensaver/xsavers/helpers.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit8b2aa1b5301ab60368a03e36df4ff5216726e87d (patch)
tree36163d4ee667c23b5cf232df2f3004cd0a76202a /kscreensaver/xsavers/helpers.cpp
downloadtdeartwork-8b2aa1b5301ab60368a03e36df4ff5216726e87d.tar.gz
tdeartwork-8b2aa1b5301ab60368a03e36df4ff5216726e87d.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeartwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kscreensaver/xsavers/helpers.cpp')
-rw-r--r--kscreensaver/xsavers/helpers.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/kscreensaver/xsavers/helpers.cpp b/kscreensaver/xsavers/helpers.cpp
new file mode 100644
index 00000000..1ba67925
--- /dev/null
+++ b/kscreensaver/xsavers/helpers.cpp
@@ -0,0 +1,38 @@
+#include "helpers.h"
+
+#include <kapplication.h>
+
+void min_width(QWidget *w) {
+ w->setMinimumWidth(w->sizeHint().width());
+}
+
+void fixed_width(QWidget *w) {
+ w->setFixedWidth(w->sizeHint().width());
+}
+
+void min_height(QWidget *w) {
+ w->setMinimumHeight(w->sizeHint().height());
+}
+
+void fixed_height(QWidget *w) {
+ w->setFixedHeight(w->sizeHint().height());
+}
+
+void min_size(QWidget *w) {
+ w->setMinimumSize(w->sizeHint());
+}
+
+void fixed_size(QWidget *w) {
+ w->setFixedSize(w->sizeHint());
+}
+
+KConfig *klock_config()
+{
+ QString name( kapp->argv()[0] );
+ int slash = name.findRev( '/' );
+ if ( slash )
+ name = name.mid( slash+1 );
+
+ return new KConfig( name + "rc" );
+}
+