[Gui] remove iisTaskPanel
as discussed here, it can be removed: https://forum.freecadweb.org/viewtopic.php?p=577413#p577413
@@ -367,7 +367,6 @@ SET(Gui_UIC_SRCS
|
||||
SET(Gui_RES_SRCS
|
||||
Icons/resource.qrc
|
||||
Language/translation.qrc
|
||||
iisTaskPanel/src/iisTaskPanel.qrc
|
||||
QSint/actionpanel/schemes.qrc
|
||||
)
|
||||
|
||||
@@ -754,40 +753,6 @@ SET(Task_View_SRCS
|
||||
)
|
||||
SOURCE_GROUP("Task View" FILES ${Task_View_SRCS})
|
||||
|
||||
SET(iisTaskPanel_SRCS
|
||||
iisTaskPanel/src/iisfreecadscheme.cpp
|
||||
iisTaskPanel/src/iisfreecadscheme.h
|
||||
iisTaskPanel/src/iisiconlabel.cpp
|
||||
iisTaskPanel/src/iisiconlabel.h
|
||||
iisTaskPanel/src/iistaskbox.cpp
|
||||
iisTaskPanel/src/iistaskbox.h
|
||||
iisTaskPanel/src/iistaskgroup.cpp
|
||||
iisTaskPanel/src/iistaskgroup.h
|
||||
iisTaskPanel/src/iistaskheader.cpp
|
||||
iisTaskPanel/src/iistaskheader.h
|
||||
iisTaskPanel/src/iistaskpanel.cpp
|
||||
iisTaskPanel/src/iistaskpanel.h
|
||||
iisTaskPanel/src/iistaskpanelscheme.cpp
|
||||
iisTaskPanel/src/iistaskpanelscheme.h
|
||||
iisTaskPanel/src/iiswinxptaskpanelscheme.cpp
|
||||
iisTaskPanel/src/iiswinxptaskpanelscheme.h
|
||||
iisTaskPanel/src/iistaskpanel_global.h
|
||||
)
|
||||
SOURCE_GROUP("Widget\\iisTaskPanel" FILES ${iisTaskPanel_SRCS})
|
||||
set(iis_MOC_HDRS
|
||||
iisTaskPanel/src/iisiconlabel.h
|
||||
iisTaskPanel/src/iistaskbox.h
|
||||
iisTaskPanel/src/iistaskgroup.h
|
||||
iisTaskPanel/src/iistaskheader.h
|
||||
)
|
||||
|
||||
if (BUILD_QT5)
|
||||
qt5_wrap_cpp(iis_MOC_SRCS ${iis_MOC_HDRS})
|
||||
else()
|
||||
qt4_wrap_cpp(iis_MOC_SRCS ${iis_MOC_HDRS})
|
||||
endif()
|
||||
SOURCE_GROUP("Widget\\iisTaskPanel\\Mocs" FILES ${iis_MOC_SRCS})
|
||||
|
||||
SET(qsintActionPanel_SRCS
|
||||
QSint/actionpanel/actionbox.cpp
|
||||
QSint/actionpanel/actionbox.h
|
||||
|
||||
4
src/Gui/iisTaskPanel/.gitattributes
vendored
@@ -1,4 +0,0 @@
|
||||
tests export-ignore
|
||||
src.pro export-ignore
|
||||
config.pri export-ignore
|
||||
taskpanel.pro export-ignore
|
||||
@@ -1,60 +0,0 @@
|
||||
MAJOR_VERSION = 1
|
||||
VERSION = 1.0
|
||||
#SUFFIX = "snapshot"
|
||||
|
||||
# Do not change this line
|
||||
CONFIG += qt
|
||||
|
||||
# Choose one of the following two lines to configure the build
|
||||
|
||||
#CONFIG += release
|
||||
#CONFIG += debug
|
||||
CONFIG += debug_and_release
|
||||
|
||||
# Configuration for MacOS X
|
||||
macx {
|
||||
# Using gcc
|
||||
QMAKESPEC=macx-g++
|
||||
# uncomment this line if you want use xcode
|
||||
# QMAKESPEC=macx-xcode
|
||||
}
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
unix {
|
||||
TARGET = $$join(TARGET,,,_debug)
|
||||
}
|
||||
else: TARGET = $$join(TARGET,,,d)
|
||||
|
||||
MOC_DIR = ./debug
|
||||
OBJECTS_DIR = ./debug
|
||||
UI_DIR = ./debug
|
||||
RCC_DIR = ./debug
|
||||
}
|
||||
|
||||
CONFIG(release, debug|release) {
|
||||
MOC_DIR = ./release
|
||||
OBJECTS_DIR = ./release
|
||||
UI_DIR = ./release
|
||||
RCC_DIR = ./release
|
||||
}
|
||||
|
||||
# Choose one of the following two lines to configure the build
|
||||
#LIB_CONFIG = staticlib
|
||||
LIB_CONFIG = dll
|
||||
|
||||
QIISTASKPANELLIB = iistaskpanel
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
unix: QIISTASKPANELLIB = $$join(QIISTASKPANELLIB,,,_debug)
|
||||
else: QIISTASKPANELLIB = $$join(QIISTASKPANELLIB,,,d)
|
||||
}
|
||||
|
||||
contains(LIB_CONFIG, staticlib) {
|
||||
DEFINES += QIIS_STATICLIB
|
||||
} else {
|
||||
DEFINES += QIIS_SHAREDLIB
|
||||
win32 {
|
||||
QIISTASKPANELLIB = $$join(QIISTASKPANELLIB,,,$$MAJOR_VERSION)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#include "../src/iistaskpanel.h"
|
||||
#include "../src/iistaskpanelscheme.h"
|
||||
#include "../src/iiswinxptaskpanelscheme.h"
|
||||
#include "../src/iisfreecadscheme.h"
|
||||
#include "../src/iistaskbox.h"
|
||||
#include "../src/iistaskheader.h"
|
||||
#include "../src/iistaskgroup.h"
|
||||
#include "../src/iisiconlabel.h"
|
||||
|
Before Width: | Height: | Size: 762 B |
@@ -1,110 +0,0 @@
|
||||
/* XPM */
|
||||
static char * headerButtonFold_xpm[] = {
|
||||
"16 16 91 1",
|
||||
" c None",
|
||||
". c #00736A",
|
||||
"+ c #007269",
|
||||
"@ c #007268",
|
||||
"# c #007168",
|
||||
"$ c #006E65",
|
||||
"% c #117D74",
|
||||
"& c #7FB9B6",
|
||||
"* c #7BB8B4",
|
||||
"= c #75B4B0",
|
||||
"- c #7CB8B6",
|
||||
"; c #8EC3C1",
|
||||
"> c #91C5C3",
|
||||
", c #147F77",
|
||||
"' c #00675D",
|
||||
") c #00665C",
|
||||
"! c #006B62",
|
||||
"~ c #09776E",
|
||||
"{ c #429691",
|
||||
"] c #8ABCBA",
|
||||
"^ c #86BAB7",
|
||||
"/ c #98C6C4",
|
||||
"( c #ABD2D2",
|
||||
"_ c #4B9C96",
|
||||
": c #0A7269",
|
||||
"< c #84BFBC",
|
||||
"[ c #52A29D",
|
||||
"} c #00746B",
|
||||
"| c #007167",
|
||||
"1 c #006A60",
|
||||
"2 c #358982",
|
||||
"3 c #73AEAB",
|
||||
"4 c #7FB7B4",
|
||||
"5 c #489691",
|
||||
"6 c #00685E",
|
||||
"7 c #006055",
|
||||
"8 c #84BFBD",
|
||||
"9 c #F3FEFF",
|
||||
"0 c #97C9C7",
|
||||
"a c #006F66",
|
||||
"b c #0A7970",
|
||||
"c c #22867F",
|
||||
"d c #006358",
|
||||
"e c #55A19D",
|
||||
"f c #53A09B",
|
||||
"g c #006156",
|
||||
"h c #1E7D75",
|
||||
"i c #8AC2C0",
|
||||
"j c #D6EEEF",
|
||||
"k c #88C1BE",
|
||||
"l c #026A60",
|
||||
"m c #4C9E99",
|
||||
"n c #B3D9D9",
|
||||
"o c #097970",
|
||||
"p c #05736A",
|
||||
"q c #087970",
|
||||
"r c #A3D1D0",
|
||||
"s c #C4E3E4",
|
||||
"t c #C8E5E6",
|
||||
"u c #006960",
|
||||
"v c #55A29D",
|
||||
"w c #BBDEDF",
|
||||
"x c #BADDDD",
|
||||
"y c #A0CECD",
|
||||
"z c #B1D8D7",
|
||||
"A c #21867F",
|
||||
"B c #B7DCDC",
|
||||
"C c #BBDDDE",
|
||||
"D c #68AFAB",
|
||||
"E c #D4ECEE",
|
||||
"F c #B9DCDC",
|
||||
"G c #C2E2E2",
|
||||
"H c #CAE7E7",
|
||||
"I c #90C5C3",
|
||||
"J c #B9DDDD",
|
||||
"K c #B5DADA",
|
||||
"L c #92BFB7",
|
||||
"M c #97CBC9",
|
||||
"N c #6BB0AC",
|
||||
"O c #DEF2F4",
|
||||
"P c #C6E4E5",
|
||||
"Q c #D5EDEE",
|
||||
"R c #93BFB8",
|
||||
"S c #A1CFCE",
|
||||
"T c #499790",
|
||||
"U c #006B61",
|
||||
"V c #499C97",
|
||||
"W c #97CAC8",
|
||||
"X c #99CBCA",
|
||||
"Y c #3D9690",
|
||||
"Z c #006157",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
"................",
|
||||
".....++++@@.....",
|
||||
".....######.....",
|
||||
"...$%&*=-;>,')!.",
|
||||
"...#~{]^/(_:_<[.",
|
||||
"..}|11234567890.",
|
||||
"..abc#defg#hijk.",
|
||||
"..lmnop++pqrstk.",
|
||||
".uvwxyzAAzyBCtk.",
|
||||
".'DEFGHIIHGJKLM.",
|
||||
".'NOttPQQPttRST.",
|
||||
".UVWkkkkkkkkXYZ.",
|
||||
"................"};
|
||||
|
Before Width: | Height: | Size: 865 B |
|
Before Width: | Height: | Size: 823 B |
|
Before Width: | Height: | Size: 777 B |
|
Before Width: | Height: | Size: 808 B |
|
Before Width: | Height: | Size: 782 B |
|
Before Width: | Height: | Size: 789 B |
|
Before Width: | Height: | Size: 855 B |
|
Before Width: | Height: | Size: 804 B |
|
Before Width: | Height: | Size: 797 B |
|
Before Width: | Height: | Size: 792 B |
|
Before Width: | Height: | Size: 802 B |
@@ -1,16 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/" >
|
||||
<file>Resources/headerButtonFold.png</file>
|
||||
<file>Resources/headerButtonFoldOver.png</file>
|
||||
<file>Resources/headerButtonFoldOver_XPBlue1.png</file>
|
||||
<file>Resources/headerButtonFoldOver_XPBlue2.png</file>
|
||||
<file>Resources/headerButtonFold_XPBlue1.png</file>
|
||||
<file>Resources/headerButtonFold_XPBlue2.png</file>
|
||||
<file>Resources/headerButtonUnfold.png</file>
|
||||
<file>Resources/headerButtonUnfoldOver.png</file>
|
||||
<file>Resources/headerButtonUnfoldOver_XPBlue1.png</file>
|
||||
<file>Resources/headerButtonUnfoldOver_XPBlue2.png</file>
|
||||
<file>Resources/headerButtonUnfold_XPBlue1.png</file>
|
||||
<file>Resources/headerButtonUnfold_XPBlue2.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -1,136 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2009 Jürgen Riegel <juergen.riegel@web.de> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "iisfreecadscheme.h"
|
||||
#include <QApplication>
|
||||
|
||||
|
||||
iisFreeCADTaskPanelScheme* iisFreeCADTaskPanelScheme::myDefaultXPScheme = nullptr;
|
||||
|
||||
iisFreeCADTaskPanelScheme::iisFreeCADTaskPanelScheme(QObject *parent)
|
||||
: iisTaskPanelScheme(parent)
|
||||
{
|
||||
#ifdef Q_OS_WIN32
|
||||
QLinearGradient panelBackgroundGrd(0,0, 0,300);
|
||||
panelBackgroundGrd.setColorAt(1, QColor(51,51,101));
|
||||
panelBackgroundGrd.setColorAt(0, QColor(171,171,193));
|
||||
panelBackground = panelBackgroundGrd;
|
||||
|
||||
QLinearGradient headerBackgroundGrd(0,0, 300,0);
|
||||
headerBackgroundGrd.setColorAt(0, 0xffffff);
|
||||
headerBackgroundGrd.setColorAt(1, 0xc6d3f7);
|
||||
headerBackground = headerBackgroundGrd;
|
||||
|
||||
headerBorder = QPen(Qt::NoPen);
|
||||
headerSize = 25;
|
||||
headerAnimation = false;
|
||||
|
||||
headerLabelScheme.text = QColor(0x215dc6);
|
||||
headerLabelScheme.textOver = QColor(0x428eff);
|
||||
headerLabelScheme.iconSize = 22;
|
||||
|
||||
headerButtonFold = QPixmap(":/Resources/headerButtonFold_XPBlue2.png");
|
||||
headerButtonFoldOver = QPixmap(":/Resources/headerButtonFoldOver_XPBlue2.png");
|
||||
headerButtonUnfold = QPixmap(":/Resources/headerButtonUnfold_XPBlue2.png");
|
||||
headerButtonUnfoldOver = QPixmap(":/Resources/headerButtonUnfoldOver_XPBlue2.png");
|
||||
headerButtonSize = QSize(17,17);
|
||||
|
||||
groupBackground = QBrush(0xd6dff7);
|
||||
groupBorder = QColor(0xffffff);
|
||||
|
||||
taskLabelScheme.text = QColor(0x215dc6);
|
||||
taskLabelScheme.textOver = QColor(0x428eff);
|
||||
#else
|
||||
QPalette p = QApplication::palette();
|
||||
QLinearGradient panelBackgroundGrd(0,0, 0,300);
|
||||
panelBackgroundGrd.setColorAt(1, p.color(QPalette::Dark));
|
||||
panelBackgroundGrd.setColorAt(0, p.color(QPalette::Midlight));
|
||||
panelBackground = panelBackgroundGrd;
|
||||
|
||||
QLinearGradient headerBackgroundGrd(0,0,0,100);
|
||||
headerBackgroundGrd.setColorAt(0, p.color(QPalette::Highlight));
|
||||
headerBackgroundGrd.setColorAt(1, p.color(QPalette::Highlight).lighter());
|
||||
headerBackground = headerBackgroundGrd;
|
||||
|
||||
headerBorder = QPen(Qt::NoPen);
|
||||
headerSize = 25;
|
||||
headerAnimation = false;
|
||||
|
||||
headerLabelScheme.text = p.color(QPalette::HighlightedText);
|
||||
headerLabelScheme.textOver = p.color(QPalette::BrightText);
|
||||
headerLabelScheme.iconSize = 22;
|
||||
|
||||
headerButtonSize = QSize(17,17);
|
||||
QPalette p2 = p;
|
||||
p2.setColor(QPalette::Highlight,p2.color(QPalette::Highlight).lighter());
|
||||
QPixmap px1 = drawFoldIcon(p);
|
||||
QPixmap px2 = drawFoldIcon(p2);
|
||||
headerButtonFold = px1;
|
||||
headerButtonFoldOver = px2;
|
||||
QTransform mat;
|
||||
mat.rotate(180.0);
|
||||
headerButtonUnfold = px1.transformed(mat);
|
||||
headerButtonUnfoldOver = px2.transformed(mat);
|
||||
|
||||
groupBackground = p.window();
|
||||
groupBorder = p.color(QPalette::Window);
|
||||
|
||||
taskLabelScheme.text = p.color(QPalette::Text);
|
||||
taskLabelScheme.textOver = p.color(QPalette::Highlight);
|
||||
#endif
|
||||
}
|
||||
|
||||
iisFreeCADTaskPanelScheme::~iisFreeCADTaskPanelScheme()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
iisTaskPanelScheme* iisFreeCADTaskPanelScheme::defaultScheme()
|
||||
{
|
||||
if (!myDefaultXPScheme)
|
||||
myDefaultXPScheme = new iisFreeCADTaskPanelScheme();
|
||||
|
||||
return myDefaultXPScheme;
|
||||
}
|
||||
|
||||
QPixmap iisFreeCADTaskPanelScheme::drawFoldIcon(const QPalette& p) const
|
||||
{
|
||||
QImage img(17,17,QImage::Format_ARGB32_Premultiplied);
|
||||
img.fill(0x00000000);
|
||||
QPainter painter;
|
||||
painter.begin(&img);
|
||||
painter.setBrush(p.window());
|
||||
painter.drawEllipse(2,2,13,13);
|
||||
painter.setPen(p.color(QPalette::Base));
|
||||
painter.drawEllipse(2,2,13,13);
|
||||
painter.setPen(p.color(QPalette::Highlight));
|
||||
painter.drawLine(QLine(5,7,8,4));
|
||||
painter.drawLine(QLine(6,7,8,5));
|
||||
painter.drawLine(QLine(8,4,11,7));
|
||||
painter.drawLine(QLine(8,5,10,7));
|
||||
painter.drawLine(QLine(5,11,8,8));
|
||||
painter.drawLine(QLine(6,11,8,9));
|
||||
painter.drawLine(QLine(8,8,11,11));
|
||||
painter.drawLine(QLine(9,8,10,11));
|
||||
painter.end();
|
||||
return QPixmap::fromImage(img);
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2009 Jürgen Riegel <juergen.riegel@web.de> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef IISFREECADTASKPANELSCHEME_H
|
||||
#define IISFREECADTASKPANELSCHEME_H
|
||||
|
||||
#include "iistaskpanelscheme.h"
|
||||
|
||||
|
||||
class IISTASKPANEL_EXPORT iisFreeCADTaskPanelScheme : public iisTaskPanelScheme
|
||||
{
|
||||
public:
|
||||
iisFreeCADTaskPanelScheme(QObject *parent=nullptr);
|
||||
~iisFreeCADTaskPanelScheme();
|
||||
|
||||
static iisTaskPanelScheme* defaultScheme();
|
||||
|
||||
protected:
|
||||
static iisFreeCADTaskPanelScheme *myDefaultXPScheme;
|
||||
QPixmap drawFoldIcon(const QPalette&) const;
|
||||
};
|
||||
|
||||
#endif // IISFREECADTASKPANELSCHEME_H
|
||||
@@ -1,201 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Copyright: http://www.ii-system.com *
|
||||
* License: LGPL *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "iisiconlabel.h"
|
||||
#include "iistaskpanelscheme.h"
|
||||
|
||||
iisIconLabel::iisIconLabel(const QIcon &icon, const QString &title, QWidget *parent)
|
||||
: QWidget(parent),
|
||||
myPixmap(icon),
|
||||
myText(title),
|
||||
mySchemePointer(nullptr),
|
||||
m_over(false),
|
||||
m_pressed(false),
|
||||
m_changeCursorOver(true),
|
||||
m_underlineOver(true)
|
||||
{
|
||||
setFocusPolicy(Qt::StrongFocus);
|
||||
setCursor(Qt::PointingHandCursor);
|
||||
|
||||
myFont.setWeight(0);
|
||||
myPen.setStyle(Qt::NoPen);
|
||||
|
||||
myColor = myColorOver = myColorDisabled = QColor();
|
||||
}
|
||||
|
||||
iisIconLabel::~iisIconLabel()
|
||||
{
|
||||
//if (m_changeCursorOver)
|
||||
// QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
void iisIconLabel::setSchemePointer(iisIconLabelScheme **pointer)
|
||||
{
|
||||
mySchemePointer = pointer;
|
||||
update();
|
||||
}
|
||||
|
||||
void iisIconLabel::setColors(const QColor &color, const QColor &colorOver, const QColor &colorOff)
|
||||
{
|
||||
myColor = color;
|
||||
myColorOver = colorOver;
|
||||
myColorDisabled = colorOff;
|
||||
update();
|
||||
}
|
||||
|
||||
void iisIconLabel::setFont(const QFont &font)
|
||||
{
|
||||
myFont = font;
|
||||
update();
|
||||
}
|
||||
|
||||
void iisIconLabel::setFocusPen(const QPen &pen)
|
||||
{
|
||||
myPen = pen;
|
||||
update();
|
||||
}
|
||||
|
||||
QSize iisIconLabel::sizeHint() const
|
||||
{
|
||||
return minimumSize();
|
||||
}
|
||||
|
||||
QSize iisIconLabel::minimumSizeHint() const
|
||||
{
|
||||
int s = (mySchemePointer && *mySchemePointer) ? (*mySchemePointer)->iconSize : 16;
|
||||
QPixmap px = myPixmap.pixmap(s,s,
|
||||
isEnabled() ? QIcon::Normal : QIcon::Disabled);
|
||||
|
||||
int h = 4+px.height();
|
||||
int w = 8 + px.width();
|
||||
if (!myText.isEmpty()) {
|
||||
QFontMetrics fm(myFont);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
|
||||
w += fm.horizontalAdvance(myText);
|
||||
#else
|
||||
w += fm.width(myText);
|
||||
#endif
|
||||
h = qMax(h, 4+fm.height());
|
||||
}
|
||||
|
||||
return QSize(w+2,h+2);
|
||||
}
|
||||
|
||||
void iisIconLabel::paintEvent ( QPaintEvent * event )
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
QPainter p(this);
|
||||
|
||||
QRect textRect(rect().adjusted(0,0,-1,0));
|
||||
|
||||
int x = 2;
|
||||
|
||||
if (!myPixmap.isNull()) {
|
||||
int s = (mySchemePointer && *mySchemePointer) ? (*mySchemePointer)->iconSize : 16;
|
||||
QPixmap px = myPixmap.pixmap(s,s,
|
||||
isEnabled() ? QIcon::Normal : QIcon::Disabled);
|
||||
p.drawPixmap(x,0,px);
|
||||
x += px.width() + 4;
|
||||
}
|
||||
|
||||
if (!myText.isEmpty()) {
|
||||
QColor text = myColor, textOver = myColorOver, textOff = myColorDisabled;
|
||||
QFont fnt = myFont;
|
||||
QPen focusPen = myPen;
|
||||
bool underline = m_underlineOver/*, cursover = m_changeCursorOver*/;
|
||||
if (mySchemePointer && *mySchemePointer) {
|
||||
if (!text.isValid()) text = (*mySchemePointer)->text;
|
||||
if (!textOver.isValid()) textOver = (*mySchemePointer)->textOver;
|
||||
if (!textOff.isValid()) textOff = (*mySchemePointer)->textOff;
|
||||
if (!fnt.weight()) fnt = (*mySchemePointer)->font;
|
||||
if (focusPen.style() == Qt::NoPen) focusPen = (*mySchemePointer)->focusPen;
|
||||
underline = (*mySchemePointer)->underlineOver;
|
||||
//cursover = (*mySchemePointer)->cursorOver;
|
||||
}
|
||||
|
||||
p.setPen(isEnabled() ? m_over ? textOver : text : textOff);
|
||||
|
||||
if (isEnabled() && underline && m_over)
|
||||
fnt.setUnderline(true);
|
||||
p.setFont(fnt);
|
||||
|
||||
textRect.setLeft(x);
|
||||
QRect boundingRect;
|
||||
|
||||
QFontMetrics fm(fnt);
|
||||
QString txt(fm.elidedText(myText, Qt::ElideRight, textRect.width()));
|
||||
|
||||
p.drawText(textRect, Qt::AlignLeft | Qt::AlignVCenter, txt, &boundingRect);
|
||||
|
||||
if (hasFocus()) {
|
||||
p.setPen(focusPen);
|
||||
p.drawRect(boundingRect.adjusted(-2,-1,0,0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void iisIconLabel::enterEvent ( QEvent * /*event*/ )
|
||||
{
|
||||
m_over = true;
|
||||
|
||||
//if (m_changeCursorOver)
|
||||
// QApplication::setOverrideCursor(Qt::PointingHandCursor);
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void iisIconLabel::leaveEvent ( QEvent * /*event*/ )
|
||||
{
|
||||
m_over = false;
|
||||
update();
|
||||
|
||||
//if (m_changeCursorOver)
|
||||
// QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
void iisIconLabel::mousePressEvent ( QMouseEvent * event )
|
||||
{
|
||||
if (event->button() == Qt::LeftButton) {
|
||||
m_pressed = true;
|
||||
Q_EMIT pressed();
|
||||
} else
|
||||
if (event->button() == Qt::RightButton)
|
||||
Q_EMIT contextMenu();
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void iisIconLabel::mouseReleaseEvent ( QMouseEvent * event )
|
||||
{
|
||||
if (event->button() == Qt::LeftButton) {
|
||||
m_pressed = false;
|
||||
Q_EMIT released();
|
||||
|
||||
if (rect().contains( event->pos() )) {
|
||||
Q_EMIT clicked();
|
||||
Q_EMIT activated();
|
||||
}
|
||||
}
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void iisIconLabel::keyPressEvent ( QKeyEvent * event )
|
||||
{
|
||||
switch (event->key()) {
|
||||
case Qt::Key_Space:
|
||||
case Qt::Key_Return:
|
||||
Q_EMIT activated();
|
||||
break;
|
||||
|
||||
default:;
|
||||
}
|
||||
|
||||
QWidget::keyPressEvent(event);
|
||||
}
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Copyright: http://www.ii-system.com *
|
||||
* License: LGPL *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef IISICONLABEL_H
|
||||
#define IISICONLABEL_H
|
||||
|
||||
#include <QtGui>
|
||||
#include <QWidget>
|
||||
|
||||
#include "iistaskpanel_global.h"
|
||||
|
||||
struct iisIconLabelScheme;
|
||||
|
||||
class IISTASKPANEL_EXPORT iisIconLabel : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
iisIconLabel(const QIcon &icon, const QString &title, QWidget *parent = nullptr);
|
||||
virtual ~iisIconLabel();
|
||||
|
||||
void setColors(const QColor &color, const QColor &colorOver, const QColor &colorOff);
|
||||
void setFont(const QFont &font);
|
||||
void setFocusPen(const QPen &pen);
|
||||
|
||||
void setSchemePointer(iisIconLabelScheme **pointer);
|
||||
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
void pressed();
|
||||
void released();
|
||||
void clicked();
|
||||
void activated();
|
||||
void contextMenu();
|
||||
|
||||
protected:
|
||||
virtual void paintEvent ( QPaintEvent * event );
|
||||
virtual void enterEvent ( QEvent * event );
|
||||
virtual void leaveEvent ( QEvent * event );
|
||||
|
||||
virtual void mousePressEvent ( QMouseEvent * event );
|
||||
virtual void mouseReleaseEvent ( QMouseEvent * event );
|
||||
virtual void keyPressEvent ( QKeyEvent * event );
|
||||
|
||||
QIcon myPixmap;
|
||||
QString myText;
|
||||
|
||||
QColor myColor, myColorOver, myColorDisabled;
|
||||
QFont myFont;
|
||||
QPen myPen;
|
||||
|
||||
iisIconLabelScheme **mySchemePointer;
|
||||
|
||||
bool m_over, m_pressed;
|
||||
|
||||
bool m_changeCursorOver, m_underlineOver;
|
||||
};
|
||||
|
||||
#endif // IISICONLABEL_H
|
||||
@@ -1,167 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Copyright: http://www.ii-system.com *
|
||||
* License: LGPL *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "iistaskbox.h"
|
||||
#include "iistaskheader.h"
|
||||
#include "iistaskgroup.h"
|
||||
#include "iistaskpanelscheme.h"
|
||||
|
||||
|
||||
iisTaskBox::iisTaskBox(const QString &title, bool expandable, QWidget *parent)
|
||||
: QFrame(parent)
|
||||
{
|
||||
myHeader = new iisTaskHeader(QPixmap(), title, expandable, this);
|
||||
init();
|
||||
}
|
||||
|
||||
iisTaskBox::iisTaskBox(const QPixmap &icon, const QString &title, bool expandable, QWidget *parent)
|
||||
: QFrame(parent)
|
||||
{
|
||||
myHeader = new iisTaskHeader(icon, title, expandable, this);
|
||||
init();
|
||||
}
|
||||
|
||||
void iisTaskBox::init()
|
||||
{
|
||||
m_foldStep = 0;
|
||||
|
||||
myScheme = iisTaskPanelScheme::defaultScheme();
|
||||
|
||||
QVBoxLayout *vbl = new QVBoxLayout();
|
||||
vbl->setMargin(0);
|
||||
vbl->setSpacing(0);
|
||||
setLayout(vbl);
|
||||
|
||||
vbl->addWidget(myHeader);
|
||||
|
||||
myGroup = new iisTaskGroup(this, true);
|
||||
vbl->addWidget(myGroup);
|
||||
|
||||
myDummy = new QWidget(this);
|
||||
vbl->addWidget(myDummy);
|
||||
myDummy->hide();
|
||||
|
||||
connect(myHeader, SIGNAL(activated()), this, SLOT(showHide()));
|
||||
}
|
||||
|
||||
iisTaskBox::~iisTaskBox()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void iisTaskBox::setScheme(iisTaskPanelScheme *pointer)
|
||||
{
|
||||
myScheme = pointer;
|
||||
myHeader->setScheme(pointer);
|
||||
myGroup->setScheme(pointer);
|
||||
update();
|
||||
}
|
||||
|
||||
QBoxLayout* iisTaskBox::groupLayout()
|
||||
{
|
||||
return myGroup->groupLayout();
|
||||
}
|
||||
|
||||
void iisTaskBox::addIconLabel(iisIconLabel *label, bool addToLayout)
|
||||
{
|
||||
myGroup->addIconLabel(label, addToLayout);
|
||||
}
|
||||
|
||||
|
||||
void iisTaskBox::showHide()
|
||||
{
|
||||
if (m_foldStep)
|
||||
return;
|
||||
|
||||
m_foldPixmap = myGroup->grab(myGroup->rect());
|
||||
|
||||
if (myGroup->isVisible()) {
|
||||
m_tempHeight = m_fullHeight = myGroup->height();
|
||||
m_foldDelta = m_fullHeight / myScheme->groupFoldSteps;
|
||||
m_foldStep = myScheme->groupFoldSteps;
|
||||
m_foldDirection = -1;
|
||||
|
||||
myGroup->hide();
|
||||
myDummy->setFixedSize(myGroup->size());
|
||||
myDummy->show();
|
||||
|
||||
QTimer::singleShot(myScheme->groupFoldDelay, this, SLOT(processHide()));
|
||||
}
|
||||
else {
|
||||
m_foldStep = myScheme->groupFoldSteps;
|
||||
m_foldDirection = 1;
|
||||
m_tempHeight = 0;
|
||||
|
||||
QTimer::singleShot(myScheme->groupFoldDelay, this, SLOT(processShow()));
|
||||
}
|
||||
|
||||
myDummy->show();
|
||||
}
|
||||
|
||||
void iisTaskBox::processHide()
|
||||
{
|
||||
if (!--m_foldStep) {
|
||||
myDummy->setFixedHeight(0);
|
||||
myDummy->hide();
|
||||
m_foldPixmap = QPixmap();
|
||||
setFixedHeight(myHeader->height());
|
||||
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
|
||||
return;
|
||||
}
|
||||
|
||||
setUpdatesEnabled(false);
|
||||
|
||||
m_tempHeight -= m_foldDelta;
|
||||
myDummy->setFixedHeight(m_tempHeight);
|
||||
setFixedHeight(myDummy->height()+myHeader->height());
|
||||
|
||||
QTimer::singleShot(myScheme->groupFoldDelay, this, SLOT(processHide()));
|
||||
|
||||
setUpdatesEnabled(true);
|
||||
}
|
||||
|
||||
void iisTaskBox::processShow()
|
||||
{
|
||||
if (!--m_foldStep) {
|
||||
myDummy->hide();
|
||||
m_foldPixmap = QPixmap();
|
||||
myGroup->show();
|
||||
setFixedHeight(m_fullHeight+myHeader->height());
|
||||
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
|
||||
setMaximumHeight(QWIDGETSIZE_MAX);
|
||||
setMinimumHeight(0);
|
||||
return;
|
||||
}
|
||||
|
||||
setUpdatesEnabled(false);
|
||||
|
||||
m_tempHeight += m_foldDelta;
|
||||
myDummy->setFixedHeight(m_tempHeight);
|
||||
setFixedHeight(myDummy->height()+myHeader->height());
|
||||
|
||||
QTimer::singleShot(myScheme->groupFoldDelay, this, SLOT(processShow()));
|
||||
|
||||
setUpdatesEnabled(true);
|
||||
}
|
||||
|
||||
void iisTaskBox::paintEvent ( QPaintEvent * event )
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
QPainter p(this);
|
||||
|
||||
if (myDummy->isVisible()) {
|
||||
if (m_foldDirection < 0)
|
||||
p.setOpacity((double)m_foldStep / myScheme->groupFoldSteps);
|
||||
else
|
||||
p.setOpacity((double)(myScheme->groupFoldSteps-m_foldStep) / myScheme->groupFoldSteps);
|
||||
|
||||
p.drawPixmap(myDummy->x(),myDummy->y(),m_foldPixmap);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Copyright: http://www.ii-system.com *
|
||||
* License: LGPL *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef IISTASKBOX_H
|
||||
#define IISTASKBOX_H
|
||||
|
||||
#include <QBoxLayout>
|
||||
#include <QFrame>
|
||||
#include <QPaintEvent>
|
||||
#include <QPixmap>
|
||||
#include <QWidget>
|
||||
|
||||
#include "iistaskpanel_global.h"
|
||||
|
||||
|
||||
class iisTaskHeader;
|
||||
class iisTaskGroup;
|
||||
class iisTaskPanelScheme;
|
||||
class iisIconLabel;
|
||||
|
||||
class IISTASKPANEL_EXPORT iisTaskBox : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
iisTaskBox(const QString &title, bool expandable = true, QWidget *parent = nullptr);
|
||||
iisTaskBox(const QPixmap &icon, const QString &title, bool expandable = true, QWidget *parent = nullptr);
|
||||
virtual ~iisTaskBox();
|
||||
|
||||
void setScheme(iisTaskPanelScheme *pointer);
|
||||
|
||||
QBoxLayout* groupLayout();
|
||||
|
||||
void addIconLabel(iisIconLabel *label, bool addToLayout = true);
|
||||
|
||||
public Q_SLOTS:
|
||||
void showHide();
|
||||
|
||||
protected Q_SLOTS:
|
||||
void processHide();
|
||||
void processShow();
|
||||
|
||||
protected:
|
||||
void init();
|
||||
|
||||
virtual void paintEvent ( QPaintEvent * event );
|
||||
|
||||
|
||||
double m_foldStep, m_foldDelta, m_fullHeight, m_tempHeight;
|
||||
int m_foldDirection;
|
||||
|
||||
QPixmap m_foldPixmap;
|
||||
|
||||
iisTaskHeader *myHeader;
|
||||
iisTaskGroup *myGroup;
|
||||
QWidget *myDummy;
|
||||
|
||||
iisTaskPanelScheme *myScheme;
|
||||
};
|
||||
|
||||
#endif // IISTASKBOX_H
|
||||
@@ -1,62 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Copyright: http://www.ii-system.com *
|
||||
* License: LGPL *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "iistaskgroup.h"
|
||||
#include "iistaskpanelscheme.h"
|
||||
#include "iisiconlabel.h"
|
||||
|
||||
iisTaskGroup::iisTaskGroup(QWidget *parent, bool hasHeader)
|
||||
: QFrame(parent),
|
||||
myHasHeader(hasHeader)
|
||||
{
|
||||
//setMinimumHeight(32);
|
||||
|
||||
setScheme(iisTaskPanelScheme::defaultScheme());
|
||||
|
||||
QVBoxLayout *vbl = new QVBoxLayout();
|
||||
vbl->setMargin(4);
|
||||
vbl->setSpacing(0);
|
||||
setLayout(vbl);
|
||||
}
|
||||
|
||||
iisTaskGroup::~iisTaskGroup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void iisTaskGroup::setScheme(iisTaskPanelScheme *scheme)
|
||||
{
|
||||
if (scheme) {
|
||||
myScheme = scheme;
|
||||
myLabelScheme = &(scheme->taskLabelScheme);
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
void iisTaskGroup::addIconLabel(iisIconLabel *label, bool addToLayout)
|
||||
{
|
||||
if (!label) return;
|
||||
|
||||
if (addToLayout) {
|
||||
layout()->addWidget(label);
|
||||
}
|
||||
|
||||
label->setSchemePointer(&myLabelScheme);
|
||||
}
|
||||
|
||||
void iisTaskGroup::paintEvent ( QPaintEvent * event )
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
QPainter p(this);
|
||||
|
||||
//p.setOpacity(/*m_opacity+*/0.7);
|
||||
//p.fillRect(rect(), myScheme->groupBackground);
|
||||
|
||||
p.setBrush(myScheme->groupBackground);
|
||||
p.setPen(myScheme->groupBorder);
|
||||
p.drawRect(rect().adjusted(0,-(int)myHasHeader,-1,-1));
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Copyright: http://www.ii-system.com *
|
||||
* License: LGPL *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef IISTASKGROUP_H
|
||||
#define IISTASKGROUP_H
|
||||
|
||||
#include <QBoxLayout>
|
||||
#include <QFrame>
|
||||
#include <QPaintEvent>
|
||||
#include <QWidget>
|
||||
|
||||
#include "iistaskpanel_global.h"
|
||||
|
||||
|
||||
class iisTaskPanelScheme;
|
||||
struct iisIconLabelScheme;
|
||||
|
||||
class iisIconLabel;
|
||||
|
||||
class IISTASKPANEL_EXPORT iisTaskGroup : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
iisTaskGroup(QWidget *parent, bool hasHeader = false);
|
||||
virtual ~iisTaskGroup();
|
||||
|
||||
void setScheme(iisTaskPanelScheme *scheme);
|
||||
|
||||
inline QBoxLayout* groupLayout()
|
||||
{
|
||||
return (QBoxLayout*)layout();
|
||||
}
|
||||
|
||||
void addIconLabel(iisIconLabel *label, bool addToLayout = true);
|
||||
|
||||
protected:
|
||||
virtual void paintEvent ( QPaintEvent * event );
|
||||
|
||||
iisTaskPanelScheme *myScheme;
|
||||
iisIconLabelScheme *myLabelScheme;
|
||||
|
||||
bool myHasHeader;
|
||||
};
|
||||
|
||||
#endif // IISTASKGROUP_H
|
||||
@@ -1,200 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Copyright: http://www.ii-system.com *
|
||||
* License: LGPL *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QPainter>
|
||||
#include <QSizePolicy>
|
||||
#include <QTimer>
|
||||
|
||||
#include "iistaskheader.h"
|
||||
#include "iisiconlabel.h"
|
||||
#include "iistaskpanelscheme.h"
|
||||
|
||||
|
||||
iisTaskHeader::iisTaskHeader(const QIcon &icon, const QString &title, bool expandable, QWidget *parent)
|
||||
: QFrame(parent),
|
||||
myExpandable(expandable),
|
||||
m_over(false),
|
||||
m_buttonOver(false),
|
||||
m_fold(true),
|
||||
m_opacity(0.1),
|
||||
myButton(nullptr)
|
||||
{
|
||||
myTitle = new iisIconLabel(icon, title, this);
|
||||
myTitle->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
|
||||
|
||||
connect(myTitle, SIGNAL(activated()), this, SLOT(fold()));
|
||||
|
||||
QHBoxLayout *hbl = new QHBoxLayout();
|
||||
hbl->setMargin(2);
|
||||
setLayout(hbl);
|
||||
|
||||
hbl->addWidget(myTitle);
|
||||
|
||||
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
|
||||
|
||||
setScheme(iisTaskPanelScheme::defaultScheme());
|
||||
myTitle->setSchemePointer(&myLabelScheme);
|
||||
|
||||
|
||||
if (myExpandable) {
|
||||
myButton = new QLabel(this);
|
||||
hbl->addWidget(myButton);
|
||||
myButton->installEventFilter(this);
|
||||
myButton->setFixedWidth(myScheme->headerButtonSize.width());
|
||||
changeIcons();
|
||||
}
|
||||
}
|
||||
|
||||
iisTaskHeader::~iisTaskHeader()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool iisTaskHeader::eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
switch (event->type()) {
|
||||
case QEvent::MouseButtonPress:
|
||||
fold();
|
||||
return true;
|
||||
|
||||
case QEvent::Enter:
|
||||
m_buttonOver = true;
|
||||
changeIcons();
|
||||
return true;
|
||||
|
||||
case QEvent::Leave:
|
||||
m_buttonOver = false;
|
||||
changeIcons();
|
||||
return true;
|
||||
|
||||
default:;
|
||||
}
|
||||
|
||||
return QFrame::eventFilter(obj, event);
|
||||
}
|
||||
|
||||
void iisTaskHeader::setScheme(iisTaskPanelScheme *scheme)
|
||||
{
|
||||
if (scheme) {
|
||||
myScheme = scheme;
|
||||
myLabelScheme = &(scheme->headerLabelScheme);
|
||||
|
||||
if (myExpandable) {
|
||||
setCursor(myLabelScheme->cursorOver ? Qt::PointingHandCursor : cursor());
|
||||
changeIcons();
|
||||
}
|
||||
|
||||
setFixedHeight(scheme->headerSize);
|
||||
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
void iisTaskHeader::paintEvent ( QPaintEvent * event )
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
QPainter p(this);
|
||||
|
||||
if (myScheme->headerAnimation)
|
||||
p.setOpacity(m_opacity+0.7);
|
||||
|
||||
p.setPen(myScheme->headerBorder);
|
||||
p.setBrush(myScheme->headerBackground);
|
||||
if (myScheme->headerBorder.style() == Qt::NoPen)
|
||||
p.drawRect(rect());
|
||||
else
|
||||
p.drawRect(rect().adjusted(0,0,-1,-1));
|
||||
}
|
||||
|
||||
void iisTaskHeader::animate()
|
||||
{
|
||||
if (!myScheme->headerAnimation)
|
||||
return;
|
||||
|
||||
if (!isEnabled()) {
|
||||
m_opacity = 0.1;
|
||||
update();
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_over) {
|
||||
if (m_opacity >= 0.3) {
|
||||
m_opacity = 0.3;
|
||||
return;
|
||||
}
|
||||
m_opacity += 0.05;
|
||||
} else {
|
||||
if (m_opacity <= 0.1) {
|
||||
m_opacity = 0.1;
|
||||
return;
|
||||
}
|
||||
m_opacity = qMax(0.1, m_opacity-0.05);
|
||||
}
|
||||
|
||||
QTimer::singleShot(100, this, SLOT(animate()));
|
||||
update();
|
||||
}
|
||||
|
||||
void iisTaskHeader::enterEvent ( QEvent * /*event*/ )
|
||||
{
|
||||
m_over = true;
|
||||
|
||||
if (isEnabled())
|
||||
QTimer::singleShot(100, this, SLOT(animate()));
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void iisTaskHeader::leaveEvent ( QEvent * /*event*/ )
|
||||
{
|
||||
m_over = false;
|
||||
|
||||
if (isEnabled())
|
||||
QTimer::singleShot(100, this, SLOT(animate()));
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void iisTaskHeader::fold()
|
||||
{
|
||||
if (myExpandable) {
|
||||
Q_EMIT activated();
|
||||
|
||||
m_fold = !m_fold;
|
||||
changeIcons();
|
||||
}
|
||||
}
|
||||
|
||||
void iisTaskHeader::changeIcons()
|
||||
{
|
||||
if (!myButton)
|
||||
return;
|
||||
|
||||
if (m_buttonOver)
|
||||
{
|
||||
if (m_fold)
|
||||
myButton->setPixmap(myScheme->headerButtonFoldOver.pixmap(myScheme->headerButtonSize));
|
||||
else
|
||||
myButton->setPixmap(myScheme->headerButtonUnfoldOver.pixmap(myScheme->headerButtonSize));
|
||||
} else
|
||||
{
|
||||
if (m_fold)
|
||||
myButton->setPixmap(myScheme->headerButtonFold.pixmap(myScheme->headerButtonSize));
|
||||
else
|
||||
myButton->setPixmap(myScheme->headerButtonUnfold.pixmap(myScheme->headerButtonSize));
|
||||
}
|
||||
}
|
||||
|
||||
void iisTaskHeader::mouseReleaseEvent ( QMouseEvent * event )
|
||||
{
|
||||
if (event->button() == Qt::LeftButton) {
|
||||
Q_EMIT activated();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Copyright: http://www.ii-system.com *
|
||||
* License: LGPL *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef IISTASKHEADER_H
|
||||
#define IISTASKHEADER_H
|
||||
|
||||
#include <QEvent>
|
||||
#include <QFrame>
|
||||
#include <QLabel>
|
||||
#include <QMouseEvent>
|
||||
|
||||
#include "iistaskpanel_global.h"
|
||||
|
||||
|
||||
class iisTaskPanelScheme;
|
||||
struct iisIconLabelScheme;
|
||||
class iisIconLabel;
|
||||
|
||||
class IISTASKPANEL_EXPORT iisTaskHeader : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
iisTaskHeader(const QIcon &icon, const QString &title, bool expandable, QWidget *parent = nullptr);
|
||||
|
||||
void setScheme(iisTaskPanelScheme *scheme);
|
||||
virtual ~iisTaskHeader();
|
||||
|
||||
Q_SIGNALS:
|
||||
void activated();
|
||||
|
||||
public Q_SLOTS:
|
||||
void fold();
|
||||
|
||||
protected Q_SLOTS:
|
||||
void animate();
|
||||
|
||||
protected:
|
||||
virtual void paintEvent ( QPaintEvent * event );
|
||||
virtual void enterEvent ( QEvent * event );
|
||||
virtual void leaveEvent ( QEvent * event );
|
||||
virtual void mouseReleaseEvent ( QMouseEvent * event );
|
||||
|
||||
bool eventFilter(QObject *obj, QEvent *event);
|
||||
|
||||
void changeIcons();
|
||||
|
||||
iisTaskPanelScheme *myScheme;
|
||||
iisIconLabelScheme *myLabelScheme;
|
||||
|
||||
bool myExpandable;
|
||||
bool m_over, m_buttonOver, m_fold;
|
||||
double m_opacity;
|
||||
|
||||
iisIconLabel *myTitle;
|
||||
QLabel *myButton;
|
||||
};
|
||||
|
||||
#endif // IISTASKHEADER_H
|
||||
@@ -1,91 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Copyright: http://www.ii-system.com *
|
||||
* License: LGPL *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "iistaskpanel.h"
|
||||
#include "iistaskpanelscheme.h"
|
||||
#include "iistaskbox.h"
|
||||
#include "iistaskgroup.h"
|
||||
|
||||
|
||||
iisTaskPanel::iisTaskPanel(QWidget *parent) :
|
||||
QWidget(parent), mySpacer(nullptr)
|
||||
{
|
||||
myScheme = iisTaskPanelScheme::defaultScheme();
|
||||
|
||||
QVBoxLayout *vbl = new QVBoxLayout();
|
||||
vbl->setMargin(8);
|
||||
vbl->setSpacing(8);
|
||||
setLayout(vbl);
|
||||
}
|
||||
|
||||
iisTaskPanel::~iisTaskPanel()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void iisTaskPanel::setScheme(iisTaskPanelScheme *scheme)
|
||||
{
|
||||
if (scheme) {
|
||||
myScheme = scheme;
|
||||
|
||||
// set scheme for children
|
||||
QObjectList list(children());
|
||||
foreach(QObject *obj, list) {
|
||||
if (dynamic_cast<iisTaskBox*>(obj)) {
|
||||
((iisTaskBox*)obj)->setScheme(scheme);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (dynamic_cast<iisTaskGroup*>(obj)) {
|
||||
((iisTaskGroup*)obj)->setScheme(scheme);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
void iisTaskPanel::paintEvent ( QPaintEvent * event )
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
QPainter p(this);
|
||||
|
||||
//p.setOpacity(0.5);
|
||||
p.fillRect(rect(), myScheme->panelBackground);
|
||||
}
|
||||
|
||||
void iisTaskPanel::addWidget(QWidget *w)
|
||||
{
|
||||
if (w)
|
||||
layout()->addWidget(w);
|
||||
}
|
||||
|
||||
void iisTaskPanel::removeWidget(QWidget *w)
|
||||
{
|
||||
if (w)
|
||||
layout()->removeWidget(w);
|
||||
}
|
||||
|
||||
void iisTaskPanel::addStretch(int s)
|
||||
{
|
||||
Q_UNUSED(s);
|
||||
if (!mySpacer) {
|
||||
mySpacer = new QSpacerItem(0,0,QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||
layout()->addItem(mySpacer);
|
||||
}
|
||||
//((QVBoxLayout*)layout())->addStretch(s);
|
||||
}
|
||||
|
||||
void iisTaskPanel::removeStretch()
|
||||
{
|
||||
if (mySpacer) {
|
||||
layout()->removeItem(mySpacer);
|
||||
delete mySpacer; mySpacer = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Copyright: http://www.ii-system.com *
|
||||
* License: LGPL *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
Change log:
|
||||
* jriegel (03-01-2010)
|
||||
- add method removeWidget()
|
||||
* jriegel (05-01-2010)
|
||||
- add method removeStretch()
|
||||
- use QSpacerItem directly
|
||||
*/
|
||||
|
||||
#ifndef IISTASKPANEL_H
|
||||
#define IISTASKPANEL_H
|
||||
|
||||
#include <QPaintEvent>
|
||||
#include <QSpacerItem>
|
||||
#include <QWidget>
|
||||
|
||||
#include "iistaskpanel_global.h"
|
||||
|
||||
|
||||
class iisTaskPanelScheme;
|
||||
|
||||
class IISTASKPANEL_EXPORT iisTaskPanel : public QWidget
|
||||
{
|
||||
public:
|
||||
iisTaskPanel(QWidget *parent = nullptr);
|
||||
~iisTaskPanel();
|
||||
|
||||
void addWidget(QWidget *w);
|
||||
void removeWidget(QWidget *w);
|
||||
void addStretch(int s = 0);
|
||||
void removeStretch();
|
||||
|
||||
void setScheme(iisTaskPanelScheme *scheme);
|
||||
|
||||
protected:
|
||||
virtual void paintEvent ( QPaintEvent * event );
|
||||
|
||||
iisTaskPanelScheme *myScheme;
|
||||
QSpacerItem *mySpacer;
|
||||
};
|
||||
|
||||
#endif // IISTASKPANEL_H
|
||||
@@ -1,24 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Copyright: http://www.ii-system.com *
|
||||
* License: LGPL *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef IISTASKPANEL_GLOBAL_H
|
||||
#define IISTASKPANEL_GLOBAL_H
|
||||
|
||||
#include <qglobal.h>
|
||||
|
||||
#ifdef QIIS_STATICLIB
|
||||
# undef QIIS_SHAREDLIB
|
||||
# define IISTASKPANEL_EXPORT
|
||||
#else
|
||||
# ifdef QIIS_MAKEDLL
|
||||
# define IISTASKPANEL_EXPORT Q_DECL_EXPORT
|
||||
# else
|
||||
# define IISTASKPANEL_EXPORT Q_DECL_IMPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif // IISTASKPANEL_GLOBAL_H
|
||||
@@ -1,83 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Copyright: http://www.ii-system.com *
|
||||
* License: LGPL *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "iistaskpanelscheme.h"
|
||||
|
||||
iisTaskPanelScheme* iisTaskPanelScheme::myDefaultScheme = nullptr;
|
||||
|
||||
iisTaskPanelScheme::iisTaskPanelScheme(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
QLinearGradient panelBackgroundGrd(0,0, 0,300);
|
||||
panelBackgroundGrd.setColorAt(0, 0x006181);
|
||||
panelBackgroundGrd.setColorAt(1, 0x00A99D);
|
||||
panelBackground = panelBackgroundGrd;
|
||||
|
||||
QLinearGradient headerBackgroundGrd(0,0, 0,30);
|
||||
headerBackgroundGrd.setColorAt(0, 0xFAFDFD);
|
||||
headerBackgroundGrd.setColorAt(0.3, 0xC8EAE9);
|
||||
headerBackgroundGrd.setColorAt(0.31, 0x79A8A6);
|
||||
headerBackgroundGrd.setColorAt(1, 0x85DEA9);
|
||||
headerBackground = headerBackgroundGrd;
|
||||
|
||||
headerLabelScheme.text = QColor(0x00736A);
|
||||
headerLabelScheme.textOver = QColor(0x044F49);
|
||||
headerLabelScheme.textOff = QColor(0x4F4F4F);
|
||||
headerLabelScheme.focusPen = QPen(QColor(0x006181), 1, Qt::DotLine);
|
||||
QFont f;
|
||||
f.setWeight(QFont::Bold);
|
||||
headerLabelScheme.font = f;
|
||||
headerLabelScheme.iconSize = 24;
|
||||
headerLabelScheme.underlineOver = false;
|
||||
headerLabelScheme.cursorOver = true;
|
||||
|
||||
headerSize = 28;
|
||||
|
||||
headerAnimation = true;
|
||||
|
||||
headerBorder = QColor(0x79A8A6);
|
||||
|
||||
Q_INIT_RESOURCE ( iisTaskPanel ) ;
|
||||
|
||||
headerButtonFold = QPixmap(":/Resources/headerButtonFold.png");
|
||||
headerButtonFoldOver = QPixmap(":/Resources/headerButtonFoldOver.png");
|
||||
headerButtonUnfold = QPixmap(":/Resources/headerButtonUnfold.png");
|
||||
headerButtonUnfoldOver = QPixmap(":/Resources/headerButtonUnfoldOver.png");
|
||||
headerButtonSize = QSize(18,18);
|
||||
|
||||
|
||||
QLinearGradient groupBackgroundGrd(0,0, 300,0);
|
||||
groupBackgroundGrd.setColorAt(1, 0xB8FFD9);
|
||||
groupBackgroundGrd.setColorAt(0, 0xFAFDFD);
|
||||
groupBackground = groupBackgroundGrd;
|
||||
|
||||
groupBorder = QColor(0x79A8A6);
|
||||
|
||||
groupFoldSteps = 20; groupFoldDelay = 15;
|
||||
|
||||
taskLabelScheme.text = QColor(0x00736A);
|
||||
taskLabelScheme.textOver = QColor(0x044F49);
|
||||
taskLabelScheme.textOff = QColor(0xb0b0b0);
|
||||
taskLabelScheme.focusPen = QPen(QColor(0x006181), 1, Qt::DotLine);
|
||||
taskLabelScheme.iconSize = 16;
|
||||
taskLabelScheme.underlineOver = true;
|
||||
taskLabelScheme.cursorOver = true;
|
||||
}
|
||||
|
||||
iisTaskPanelScheme::~iisTaskPanelScheme()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
iisTaskPanelScheme* iisTaskPanelScheme::defaultScheme()
|
||||
{
|
||||
if (!myDefaultScheme)
|
||||
myDefaultScheme = new iisTaskPanelScheme();
|
||||
|
||||
return myDefaultScheme;
|
||||
}
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Copyright: http://www.ii-system.com *
|
||||
* License: LGPL *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef IISTASKPANELSCHEME_H
|
||||
#define IISTASKPANELSCHEME_H
|
||||
|
||||
#include <QtGui>
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
#include <QPen>
|
||||
#include <QSize>
|
||||
|
||||
#include "iistaskpanel_global.h"
|
||||
|
||||
|
||||
struct IISTASKPANEL_EXPORT iisIconLabelScheme
|
||||
{
|
||||
QColor text, textOver, textOff;
|
||||
QPen focusPen;
|
||||
QFont font;
|
||||
int iconSize;
|
||||
bool underlineOver, cursorOver;
|
||||
};
|
||||
|
||||
class IISTASKPANEL_EXPORT iisTaskPanelScheme : public QObject
|
||||
{
|
||||
public:
|
||||
iisTaskPanelScheme(QObject *parent = nullptr);
|
||||
~iisTaskPanelScheme();
|
||||
|
||||
static iisTaskPanelScheme* defaultScheme();
|
||||
|
||||
QBrush panelBackground;
|
||||
|
||||
QBrush headerBackground;
|
||||
iisIconLabelScheme headerLabelScheme;
|
||||
QPen headerBorder;
|
||||
|
||||
int headerSize;
|
||||
|
||||
bool headerAnimation;
|
||||
|
||||
QIcon headerButtonFold, headerButtonFoldOver, headerButtonUnfold, headerButtonUnfoldOver;
|
||||
QSize headerButtonSize;
|
||||
|
||||
QBrush groupBackground;
|
||||
QPen groupBorder;
|
||||
int groupFoldSteps, groupFoldDelay;
|
||||
iisIconLabelScheme taskLabelScheme;
|
||||
|
||||
protected:
|
||||
static iisTaskPanelScheme *myDefaultScheme;
|
||||
};
|
||||
|
||||
#endif // IISTASKPANELSCHEME_H
|
||||
@@ -1,106 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Copyright: http://www.ii-system.com *
|
||||
* License: LGPL *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "iiswinxptaskpanelscheme.h"
|
||||
|
||||
iisWinXPTaskPanelScheme* iisWinXPTaskPanelScheme::myDefaultXPScheme = nullptr;
|
||||
|
||||
iisWinXPTaskPanelScheme::iisWinXPTaskPanelScheme(QObject *parent)
|
||||
: iisTaskPanelScheme(parent)
|
||||
{
|
||||
QLinearGradient panelBackgroundGrd(0,0, 0,300);
|
||||
panelBackgroundGrd.setColorAt(0, 0x7ba2e7);
|
||||
panelBackgroundGrd.setColorAt(1, 0x6375d6);
|
||||
panelBackground = panelBackgroundGrd;
|
||||
|
||||
headerBackground = QBrush(0x225aca);
|
||||
|
||||
headerBorder = QColor(0x225aca);
|
||||
headerSize = 25;
|
||||
headerAnimation = false;
|
||||
|
||||
headerLabelScheme.text = QColor(0xffffff);
|
||||
headerLabelScheme.textOver = QColor(0x428eff);
|
||||
headerLabelScheme.iconSize = 22;
|
||||
|
||||
headerButtonFold = QPixmap(":/Resources/headerButtonFold_XPBlue1.png");
|
||||
headerButtonFoldOver = QPixmap(":/Resources/headerButtonFoldOver_XPBlue1.png");
|
||||
headerButtonUnfold = QPixmap(":/Resources/headerButtonUnfold_XPBlue1.png");
|
||||
headerButtonUnfoldOver = QPixmap(":/Resources/headerButtonUnfoldOver_XPBlue1.png");
|
||||
headerButtonSize = QSize(17,17);
|
||||
|
||||
groupBackground = QBrush(0xeff3ff);
|
||||
groupBorder = QColor(0xffffff);
|
||||
|
||||
taskLabelScheme.text = QColor(0x215dc6);
|
||||
taskLabelScheme.textOver = QColor(0x428eff);
|
||||
}
|
||||
|
||||
iisWinXPTaskPanelScheme::~iisWinXPTaskPanelScheme()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
iisTaskPanelScheme* iisWinXPTaskPanelScheme::defaultScheme()
|
||||
{
|
||||
if (!myDefaultXPScheme)
|
||||
myDefaultXPScheme = new iisWinXPTaskPanelScheme();
|
||||
|
||||
return myDefaultXPScheme;
|
||||
}
|
||||
|
||||
|
||||
|
||||
iisWinXPTaskPanelScheme2* iisWinXPTaskPanelScheme2::myDefaultXPScheme = nullptr;
|
||||
|
||||
iisWinXPTaskPanelScheme2::iisWinXPTaskPanelScheme2(QObject *parent)
|
||||
: iisTaskPanelScheme(parent)
|
||||
{
|
||||
QLinearGradient panelBackgroundGrd(0,0, 0,300);
|
||||
panelBackgroundGrd.setColorAt(0, 0x7ba2e7);
|
||||
panelBackgroundGrd.setColorAt(1, 0x6375d6);
|
||||
panelBackground = panelBackgroundGrd;
|
||||
|
||||
QLinearGradient headerBackgroundGrd(0,0, 300,0);
|
||||
headerBackgroundGrd.setColorAt(0, 0xffffff);
|
||||
headerBackgroundGrd.setColorAt(1, 0xc6d3f7);
|
||||
headerBackground = headerBackgroundGrd;
|
||||
|
||||
headerBorder = QPen(Qt::NoPen);
|
||||
headerSize = 25;
|
||||
headerAnimation = false;
|
||||
|
||||
headerLabelScheme.text = QColor(0x215dc6);
|
||||
headerLabelScheme.textOver = QColor(0x428eff);
|
||||
headerLabelScheme.iconSize = 22;
|
||||
|
||||
headerButtonFold = QPixmap(":/Resources/headerButtonFold_XPBlue2.png");
|
||||
headerButtonFoldOver = QPixmap(":/Resources/headerButtonFoldOver_XPBlue2.png");
|
||||
headerButtonUnfold = QPixmap(":/Resources/headerButtonUnfold_XPBlue2.png");
|
||||
headerButtonUnfoldOver = QPixmap(":/Resources/headerButtonUnfoldOver_XPBlue2.png");
|
||||
headerButtonSize = QSize(17,17);
|
||||
|
||||
groupBackground = QBrush(0xd6dff7);
|
||||
groupBorder = QColor(0xffffff);
|
||||
|
||||
taskLabelScheme.text = QColor(0x215dc6);
|
||||
taskLabelScheme.textOver = QColor(0x428eff);
|
||||
}
|
||||
|
||||
iisWinXPTaskPanelScheme2::~iisWinXPTaskPanelScheme2()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
iisTaskPanelScheme* iisWinXPTaskPanelScheme2::defaultScheme()
|
||||
{
|
||||
if (!myDefaultXPScheme)
|
||||
myDefaultXPScheme = new iisWinXPTaskPanelScheme2();
|
||||
|
||||
return myDefaultXPScheme;
|
||||
}
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Copyright: http://www.ii-system.com *
|
||||
* License: LGPL *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef IISWINXPTASKPANELSCHEME_H
|
||||
#define IISWINXPTASKPANELSCHEME_H
|
||||
|
||||
#include "iistaskpanelscheme.h"
|
||||
|
||||
|
||||
class IISTASKPANEL_EXPORT iisWinXPTaskPanelScheme : public iisTaskPanelScheme
|
||||
{
|
||||
public:
|
||||
iisWinXPTaskPanelScheme(QObject *parent=nullptr);
|
||||
~iisWinXPTaskPanelScheme();
|
||||
|
||||
static iisTaskPanelScheme* defaultScheme();
|
||||
|
||||
protected:
|
||||
static iisWinXPTaskPanelScheme *myDefaultXPScheme;
|
||||
};
|
||||
|
||||
|
||||
class IISTASKPANEL_EXPORT iisWinXPTaskPanelScheme2 : public iisTaskPanelScheme
|
||||
{
|
||||
public:
|
||||
iisWinXPTaskPanelScheme2(QObject *parent=nullptr);
|
||||
~iisWinXPTaskPanelScheme2();
|
||||
|
||||
static iisTaskPanelScheme* defaultScheme();
|
||||
|
||||
protected:
|
||||
static iisWinXPTaskPanelScheme2 *myDefaultXPScheme;
|
||||
};
|
||||
|
||||
#endif // IISWINXPTASKPANELSCHEME_H
|
||||
@@ -1,48 +0,0 @@
|
||||
######################################################################
|
||||
# Automatically generated by qmake (2.01a) ?? ???. 18 20:19:40 2008
|
||||
######################################################################
|
||||
|
||||
TEMPLATE = lib
|
||||
TARGET = iistaskpanel
|
||||
|
||||
include(../config.pri)
|
||||
|
||||
DESTDIR = ../lib
|
||||
|
||||
CONFIG += $$LIB_CONFIG
|
||||
|
||||
unix {
|
||||
CLEAN_FILES += $(DESTDIR)/lib$(QMAKE_TARGET)*
|
||||
}
|
||||
|
||||
win32 {
|
||||
DEFINES += QIIS_MAKEDLL
|
||||
CLEAN_FILES += $(DLLDESTDIR)/$(QMAKE_TARGET).lib $(DLLDESTDIR)/$(QMAKE_TARGET).dll
|
||||
}
|
||||
|
||||
CONFIG += warn-on
|
||||
|
||||
DEPENDPATH += .
|
||||
|
||||
INCLUDEPATH += . ../include
|
||||
|
||||
# Input
|
||||
HEADERS += iisiconlabel.h \
|
||||
iistaskbox.h \
|
||||
iistaskgroup.h \
|
||||
iistaskheader.h \
|
||||
iistaskpanel.h \
|
||||
iistaskpanel_global.h \
|
||||
iistaskpanelscheme.h \
|
||||
iiswinxptaskpanelscheme.h
|
||||
SOURCES += iisiconlabel.cpp \
|
||||
iistaskbox.cpp \
|
||||
iistaskgroup.cpp \
|
||||
iistaskheader.cpp \
|
||||
iistaskpanel.cpp \
|
||||
iistaskpanelscheme.cpp \
|
||||
iiswinxptaskpanelscheme.cpp
|
||||
|
||||
RESOURCES += iisTaskPanel.qrc
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
TEMPLATE = subdirs
|
||||
|
||||
CONFIG += ordered
|
||||
|
||||
SUBDIRS = src \
|
||||
tests
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 768 B |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 627 B |
|
Before Width: | Height: | Size: 829 B |
|
Before Width: | Height: | Size: 695 B |
|
Before Width: | Height: | Size: 673 B |
|
Before Width: | Height: | Size: 677 B |
|
Before Width: | Height: | Size: 971 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
@@ -1,18 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Copyright: http://www.ii-system.com *
|
||||
* License: LGPL *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include <QtGui/QApplication>
|
||||
#include "styles.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
test w;
|
||||
w.show();
|
||||
a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
|
||||
return a.exec();
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Copyright: http://www.ii-system.com *
|
||||
* License: LGPL *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "styles.h"
|
||||
|
||||
#include <iisTaskPanel>
|
||||
|
||||
test::test(QWidget *parent, Qt::WFlags flags)
|
||||
: QMainWindow(parent, flags)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
|
||||
tb1 = new iisTaskBox(QPixmap(":/images/win/filenew.png"), "Group of Tasks", true, this);
|
||||
ui.panel->addWidget(tb1);
|
||||
|
||||
iisIconLabel *i1 = new iisIconLabel(QPixmap(":/images/win/zoomin.png"), "Do Task 1", tb1);
|
||||
tb1->addIconLabel(i1);
|
||||
connect(i1, SIGNAL(activated()), this, SLOT(task1()));
|
||||
//tb1->groupLayout()->addWidget(i1);
|
||||
iisIconLabel *i2 = new iisIconLabel(QPixmap(":/images/win/zoomout.png"), "Do Task 2", tb1);
|
||||
tb1->addIconLabel(i2);
|
||||
//tb1->groupLayout()->addWidget(i2);
|
||||
|
||||
QHBoxLayout *hbl = new QHBoxLayout();
|
||||
tb1->groupLayout()->addLayout(hbl);
|
||||
|
||||
iisIconLabel *i3 = new iisIconLabel(QPixmap(":/images/win/editcopy.png"), "Do Task 3", tb1);
|
||||
tb1->addIconLabel(i3, false);
|
||||
hbl->addWidget(i3);
|
||||
//tb1->groupLayout()->addWidget(i3);
|
||||
iisIconLabel *i4 = new iisIconLabel(QPixmap(":/images/win/editcut.png"), "Do Task 4", tb1);
|
||||
tb1->addIconLabel(i4, false);
|
||||
hbl->addWidget(i4);
|
||||
i4->setColors(Qt::red, Qt::green, Qt::gray);
|
||||
i4->setFocusPen(QPen());
|
||||
//tb1->groupLayout()->addWidget(i4);
|
||||
iisIconLabel *i5 = new iisIconLabel(QPixmap(":/images/win/editpaste.png"), "Do Task 5", tb1);
|
||||
tb1->addIconLabel(i5);
|
||||
//tb1->groupLayout()->addWidget(i5);
|
||||
|
||||
tb2 = new iisTaskBox(QPixmap(":/images/win/fileprint.png"), "Non-expandable Group", false, this);
|
||||
ui.panel->addWidget(tb2);
|
||||
|
||||
iisIconLabel *i21 = new iisIconLabel(QPixmap(":/images/win/filenew.png"), "Do Task 2.1", tb2);
|
||||
tb2->addIconLabel(i21);
|
||||
//tb2->groupLayout()->addWidget(i21);
|
||||
iisIconLabel *i22 = new iisIconLabel(QPixmap(":/images/win/fileopen.png"), "Do Task 2.2", tb2);
|
||||
tb2->addIconLabel(i22);
|
||||
i22->setEnabled(false);
|
||||
//tb2->groupLayout()->addWidget(i22);
|
||||
iisIconLabel *i23 = new iisIconLabel(QPixmap(":/images/win/filesave.png"), "Do Task 2.3", tb2);
|
||||
tb2->addIconLabel(i23);
|
||||
//tb2->groupLayout()->addWidget(i23);
|
||||
|
||||
tb3 = new iisTaskBox(QPixmap(), "Group without Icons", true, this);
|
||||
ui.panel->addWidget(tb3);
|
||||
|
||||
iisIconLabel *i31 = new iisIconLabel(QPixmap(), "Do Task 3.1", tb3);
|
||||
tb3->addIconLabel(i31);
|
||||
|
||||
iisIconLabel *i32 = new iisIconLabel(QPixmap(), "Do Task 3.2", tb3);
|
||||
tb3->addIconLabel(i32);
|
||||
|
||||
tb3->groupLayout()->addWidget(new QLabel("Widgets also allowed:", this));
|
||||
tb3->groupLayout()->addWidget(new QPushButton("A Button", this));
|
||||
|
||||
|
||||
// Other widgets can be also added to the panel
|
||||
QLabel *l1 = new QLabel("A group without header", this);
|
||||
ui.panel->addWidget(l1);
|
||||
|
||||
|
||||
tb4 = new iisTaskGroup(this);
|
||||
ui.panel->addWidget(tb4);
|
||||
|
||||
iisIconLabel *i41 = new iisIconLabel(QPixmap(":/images/win/textbold.png"), "Do Task 4.1", tb4);
|
||||
tb4->addIconLabel(i41);
|
||||
|
||||
iisIconLabel *i42 = new iisIconLabel(QPixmap(), "Do Task 4.2", tb4);
|
||||
tb4->addIconLabel(i42);
|
||||
|
||||
ui.panel->addStretch();
|
||||
}
|
||||
|
||||
test::~test()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void test::on_rbDefault_clicked()
|
||||
{
|
||||
ui.panel->setScheme(iisTaskPanelScheme::defaultScheme());
|
||||
//tb1->setScheme(iisTaskPanelScheme::defaultScheme());
|
||||
//tb2->setScheme(iisTaskPanelScheme::defaultScheme());
|
||||
//tb3->setScheme(iisTaskPanelScheme::defaultScheme());
|
||||
//tb4->setScheme(iisTaskPanelScheme::defaultScheme());
|
||||
}
|
||||
|
||||
void test::on_rbXP_clicked()
|
||||
{
|
||||
ui.panel->setScheme(iisWinXPTaskPanelScheme::defaultScheme());
|
||||
//tb1->setScheme(iisWinXPTaskPanelScheme::defaultScheme());
|
||||
tb2->setScheme(iisWinXPTaskPanelScheme2::defaultScheme());
|
||||
tb3->setScheme(iisWinXPTaskPanelScheme2::defaultScheme());
|
||||
//tb4->setScheme(iisWinXPTaskPanelScheme::defaultScheme());
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* Copyright: http://www.ii-system.com *
|
||||
* License: LGPL *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef TEST_H
|
||||
#define TEST_H
|
||||
|
||||
#include <QtGui/QMainWindow>
|
||||
#include "ui_styles.h"
|
||||
|
||||
class iisTaskBox;
|
||||
class iisTaskGroup;
|
||||
|
||||
class test : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
test(QWidget *parent = 0, Qt::WFlags flags = 0);
|
||||
~test();
|
||||
|
||||
protected slots:
|
||||
void on_rbDefault_clicked();
|
||||
void on_rbXP_clicked();
|
||||
|
||||
private:
|
||||
Ui::testClass ui;
|
||||
|
||||
iisTaskBox *tb1, *tb2, *tb3;
|
||||
iisTaskGroup *tb4;
|
||||
};
|
||||
|
||||
#endif // TEST_H
|
||||
@@ -1,12 +0,0 @@
|
||||
TEMPLATE = app
|
||||
TARGET = styles
|
||||
|
||||
include(../tests.pri)
|
||||
|
||||
HEADERS += styles.h
|
||||
SOURCES += styles.cpp main.cpp
|
||||
|
||||
FORMS += styles.ui
|
||||
|
||||
RESOURCES += styles.qrc
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/" >
|
||||
<file>images/win/editcopy.png</file>
|
||||
<file>images/win/editcut.png</file>
|
||||
<file>images/win/editpaste.png</file>
|
||||
<file>images/win/editredo.png</file>
|
||||
<file>images/win/editundo.png</file>
|
||||
<file>images/win/exportpdf.png</file>
|
||||
<file>images/win/filenew.png</file>
|
||||
<file>images/win/fileopen.png</file>
|
||||
<file>images/win/fileprint.png</file>
|
||||
<file>images/win/filesave.png</file>
|
||||
<file>images/win/textbold.png</file>
|
||||
<file>images/win/textcenter.png</file>
|
||||
<file>images/win/textitalic.png</file>
|
||||
<file>images/win/textjustify.png</file>
|
||||
<file>images/win/textleft.png</file>
|
||||
<file>images/win/textright.png</file>
|
||||
<file>images/win/textunder.png</file>
|
||||
<file>images/win/zoomin.png</file>
|
||||
<file>images/win/zoomout.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -1,118 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>testClass</class>
|
||||
<widget class="QMainWindow" name="testClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>678</width>
|
||||
<height>467</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>test</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<layout class="QGridLayout">
|
||||
<item rowspan="2" row="0" column="0">
|
||||
<widget class="iisTaskPanel" native="1" name="panel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QTextBrowser" name="textBrowser">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="html">
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><span style=" font-size:20pt; font-weight:600;">iisTaskPanel</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:20pt; font-weight:600;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:20pt; font-weight:600;"><span style=" font-size:12pt;">Created for Qt 4.3.x</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; font-weight:600;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; font-weight:600;">www.ii-system.com</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Choose the style of the Task Panel</string>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QRadioButton" name="rbDefault">
|
||||
<property name="text">
|
||||
<string>Default</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QRadioButton" name="rbXP">
|
||||
<property name="text">
|
||||
<string>Windows XP</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>678</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>iisTaskPanel</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">iisTaskPanel</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |