Initial commit
This commit is contained in:
commit
cc0faeee08
61 changed files with 1410 additions and 0 deletions
49
TitleBar.cpp
Normal file
49
TitleBar.cpp
Normal 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)
|
||||
{
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue