summaryrefslogtreecommitdiffstats
path: root/tdescreensaver/xsavers/helpers.cpp
blob: 56c28d17183d061eca1eb2cb32dc0ab792452890 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "helpers.h"

#include <tdeapplication.h>

void min_width(TQWidget *w) {
  w->setMinimumWidth(w->sizeHint().width());
}

void fixed_width(TQWidget *w) {
  w->setFixedWidth(w->sizeHint().width());
}

void min_height(TQWidget *w) {
  w->setMinimumHeight(w->sizeHint().height());
}

void fixed_height(TQWidget *w) {
  w->setFixedHeight(w->sizeHint().height());
}

void min_size(TQWidget *w) {
  w->setMinimumSize(w->sizeHint());
}

void fixed_size(TQWidget *w) {
  w->setFixedSize(w->sizeHint());
}

TDEConfig *klock_config()
{
    TQString name( kapp->argv()[0] );
    int slash = name.findRev( '/' );
    if ( slash )
	name = name.mid( slash+1 );

    return new TDEConfig( name + "rc" );
}