Initial commit

This commit is contained in:
Tobias Rundstrom 2006-02-14 23:12:46 -03:00
commit cc0faeee08
61 changed files with 1410 additions and 0 deletions

49
TitleBar.cpp Normal file
View file

@ -0,0 +1,49 @@
#include "TitleBar.h"
#include "MainWindow.h"
#include "Display.h"
TitleBar::TitleBar (QWidget *parent, bool shaded) : PixWidget (parent)
{
MainWindow *mw = (MainWindow *)((SkinDisplay *)parent)->getMW();
if (shaded) {
m_pixmap_active = mw->getSkin()->getItem(Skin::STATUSBAR_0);
m_pixmap_inactive = mw->getSkin()->getItem(Skin::STATUSBAR_1);
} else {
m_pixmap_active = mw->getSkin()->getItem(Skin::TITLEBAR_0);
m_pixmap_inactive = mw->getSkin()->getItem(Skin::TITLEBAR_1);
}
if (underMouse()) {
m_pixmap = m_pixmap_active;
} else {
m_pixmap = m_pixmap_inactive;
}
qDebug("%d %d", m_pixmap.width(), m_pixmap.height());
setMinimumSize(QSize(275, 14));
setMaximumSize(QSize(275, 14));
}
TitleBar::~TitleBar ()
{
}
void
TitleBar::setActive (bool active)
{
if (active) {
m_pixmap = m_pixmap_active;
update();
} else {
m_pixmap = m_pixmap_inactive;
update();
}
}
void
TitleBar::mouseDoubleClickEvent (QMouseEvent *event)
{
}