# HG changeset patch # User benoitrigolleau # Date 1195137671 0 # Node ID 685e31447355a29235dc175c78526c61482a1c0b # Parent 9441b45b1e7f13081d962ba0fdf7ba3c77fc8794 add videoIcon and new LNF for the advanced toolbox diff -r 9441b45b1e7f -r 685e31447355 sv/icons/videoIcon.png Binary file sv/icons/videoIcon.png has changed diff -r 9441b45b1e7f -r 685e31447355 widgets/AdvancedToolBox.cpp --- a/widgets/AdvancedToolBox.cpp Thu Nov 15 13:47:07 2007 +0000 +++ b/widgets/AdvancedToolBox.cpp Thu Nov 15 14:41:11 2007 +0000 @@ -41,7 +41,7 @@ m_layout = new QVBoxLayout; m_layout->setMargin(0); m_layout->setSpacing(0); - m_button = new QPushButton(QIcon(), text); + m_button = new RadialLNFButton(QIcon(), text); m_button->setMaximumHeight(m_btnHeight); m_button->setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Fixed); diff -r 9441b45b1e7f -r 685e31447355 widgets/AdvancedToolBox.h --- a/widgets/AdvancedToolBox.h Thu Nov 15 13:47:07 2007 +0000 +++ b/widgets/AdvancedToolBox.h Thu Nov 15 14:41:11 2007 +0000 @@ -21,6 +21,8 @@ #include #include #include +#include +#include "RadialLNFButton.h" class PrivateWidget : public QWidget @@ -37,7 +39,7 @@ private : void refreshButtonIcone(); - QPushButton *m_button; + RadialLNFButton *m_button; QWidget *m_widget; QLayout *m_layout; diff -r 9441b45b1e7f -r 685e31447355 widgets/RadialLNFButton.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/widgets/RadialLNFButton.cpp Thu Nov 15 14:41:11 2007 +0000 @@ -0,0 +1,81 @@ +/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ + +/* + Sound Access + EASAIER client application. + Silogic 2007. Benoit Rigolleau. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. See the file + COPYING included with this distribution for more information. +*/ + + +#include "RadialLNFButton.h" +#include +#include + +RadialLNFButton::RadialLNFButton(QWidget *parent):QPushButton(parent) +{ + this->setFlat(true); +} + +RadialLNFButton::RadialLNFButton (const QIcon & icon, const QString & text, QWidget * parent ):QPushButton(icon,text,parent) +{ + this->setFlat(true); +} + +void RadialLNFButton::paintEvent(QPaintEvent *event) +{ + + + QPainter painter(this); + painter.setRenderHint(QPainter::Antialiasing, false); + draw(&painter); + QPushButton::paintEvent(event); +} + +void RadialLNFButton::draw(QPainter *painter) +{ + + QPalette actualPalette; + QColor color1 = actualPalette.color(QPalette::Highlight); + QColor color2 = actualPalette.color(QPalette::Button); + //QColor color3(QRgb(0xffffcc15)); + + color1.setAlpha(90); + //color3.setAlpha(70) + //color2.setAlpha(80); + + //QColor color1(QRgb(0xffaaaaaa)); + + //QColor color2(QRgb(0xffdbf756)); + //color2.setAlpha(100); + + + painter->setPen(QPen(palette().foreground(),1,Qt::NoPen,Qt::RoundCap)); + + /* + int rectsize = this->width()/20; + for(int i=0;i<=20;i++){ + if((i+m_ind)%2){ + painter->setBrush(QBrush(color1, Qt::SolidPattern)); + } + else{ + painter->setBrush(QBrush(Qt::white, Qt::SolidPattern)); + } + painter->drawRect(i*rectsize,0,this->width(), this->height()); + } + */ + + QLinearGradient rectRadian(0,0,this->width(),0); + rectRadian.setColorAt(0,color1); + rectRadian.setColorAt(0.8,color2); + rectRadian.setColorAt(1,color2); + + painter->setPen(QPen(palette().foreground(),1,Qt::NoPen,Qt::RoundCap)); + painter->setBrush(rectRadian); + painter->drawRect(0,0,this->width(), this->height()); +} diff -r 9441b45b1e7f -r 685e31447355 widgets/RadialLNFButton.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/widgets/RadialLNFButton.h Thu Nov 15 14:41:11 2007 +0000 @@ -0,0 +1,45 @@ +/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ + +/* + Sound Access + EASAIER client application. + Silogic 2007. Benoit Rigolleau. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. See the file + COPYING included with this distribution for more information. +*/ + +#ifndef RADIAL_LNF_BUTTON +#define RADIAL_LNF_BUTTON + +#include +#include +#include + +class RadialLNFButton : public QPushButton{ + Q_OBJECT + +public: + RadialLNFButton(QWidget *parent=0); + RadialLNFButton ( const QIcon & icon, const QString & text, QWidget * parent = 0 ); +/*public slots: + void setAnimation(bool animate);*/ + +protected: + void paintEvent(QPaintEvent *event); + void draw(QPainter *painter); +// void timerEvent(QTimerEvent *e); + +private: +// int m_ind; +// QBasicTimer timer; + +}; + + + + +#endif \ No newline at end of file diff -r 9441b45b1e7f -r 685e31447355 widgets/SearchWidget.cpp --- a/widgets/SearchWidget.cpp Thu Nov 15 13:47:07 2007 +0000 +++ b/widgets/SearchWidget.cpp Thu Nov 15 14:41:11 2007 +0000 @@ -189,6 +189,7 @@ case PropertyContainer::ValueProperty: { QComboBox* box = new QComboBox(); + box->addItems(curTheme->getPropertyRange(name)); connect(box, SIGNAL(currentIndexChanged(int)), curTheme, SLOT(setProperty(int))); diff -r 9441b45b1e7f -r 685e31447355 widgets/svwidgets.vcproj --- a/widgets/svwidgets.vcproj Thu Nov 15 13:47:07 2007 +0000 +++ b/widgets/svwidgets.vcproj Thu Nov 15 14:41:11 2007 +0000 @@ -290,6 +290,10 @@ > + + @@ -1120,6 +1124,32 @@ + + + + + + + + + +