File: bannergraphic.cpp

package info (click to toggle)
aethera 0.9.3-7
  • links: PTS
  • area: main
  • in suites: woody
  • size: 8,588 kB
  • ctags: 7,282
  • sloc: cpp: 64,544; sh: 9,913; perl: 1,756; makefile: 1,680; python: 258
file content (40 lines) | stat: -rw-r--r-- 851 bytes parent folder | download
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
39
40

#include "bannergraphic.h"

#include <kiconloader.h>

BannerGraphic::BannerGraphic(QWidget *parent) : QLabel(parent)
{
	setMode("welcome");
}

BannerGraphic::~BannerGraphic()
{
	// nothing to do
}

void BannerGraphic::setMode(const QString &mode)
{
	QPixmap graphic;

	if(mode == "welcome") {
		graphic = BarIcon("aethera-banner-welcome");
	} else if(mode == "contacts") {
		graphic = BarIcon("aethera-banner-contacts");
	} else if(mode == "notes") {
		graphic = BarIcon("aethera-banner-notes");
	} else if(mode == "groups") {
		graphic = BarIcon("aethera-banner-groups");
	} else if(mode == "mail") {
		graphic = BarIcon("aethera-banner-mail");
	} else if(mode == "korganizer") {
		graphic = BarIcon("aethera-banner-calendar");
	} else {
		graphic = BarIcon("aethera-banner-welcome");
	}

	setPixmap(graphic);
	setFixedHeight(graphic.height());
}