File: helpers.cpp

package info (click to toggle)
kdeartwork 4%3A15.08.3-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 182,500 kB
  • ctags: 3,298
  • sloc: cpp: 25,157; ansic: 6,762; xml: 610; python: 189; ruby: 54; sh: 30; makefile: 10
file content (38 lines) | stat: -rw-r--r-- 738 bytes parent folder | download | duplicates (3)
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 <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(QLatin1String( kapp->argv()[0] ) );
    int slash = name.lastIndexOf( QLatin1Char( '/' ) );
    if ( slash )
	name = name.mid( slash+1 );

    return new KConfig( name + QLatin1String( "rc" ) );
}