Commit 3cbd6fdb authored by Julien Wintz's avatar Julien Wintz
Browse files

Dark tags in tag scope.

parent 9aaed8e6
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Tue Jan 31 13:24:50 2012 (+0100)
* Version: $Id$
* Last-Updated: Tue Apr 17 14:08:25 2012 (+0200)
* Last-Updated: Tue May 15 14:15:24 2012 (+0200)
* By: Julien Wintz
* Update #: 146
* Update #: 150
*/
/* Commentary:
......@@ -88,3 +88,8 @@ void dtkComposerFactoryView::setFactory(dtkComposerFactory *factory)
d->controller->addItem("Note", "<p>Notes help to identify and annotate some parts of a composition.</p>", QStringList() << "note", "note", "");
}
void dtkComposerFactoryView::setDark(void)
{
d->scope->setDark();
}
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Tue Jan 31 13:22:54 2012 (+0100)
* Version: $Id$
* Last-Updated: Mon Apr 16 12:19:00 2012 (+0200)
* Last-Updated: Tue May 15 14:14:46 2012 (+0200)
* By: Julien Wintz
* Update #: 17
* Update #: 18
*/
/* Commentary:
......@@ -39,6 +39,9 @@ public:
public:
void setFactory(dtkComposerFactory *factory);
public:
void setDark(void);
private:
dtkComposerFactoryViewPrivate *d;
};
......
......@@ -4,9 +4,9 @@
## Copyright (C) 2008 - Julien Wintz, Inria.
## Created: Mon Jul 20 18:39:20 2009 (+0200)
## Version: $Id$
## Last-Updated: Sun May 6 16:03:35 2012 (+0200)
## By: tkloczko
## Update #: 286
## Last-Updated: Tue May 15 13:35:15 2012 (+0200)
## By: Julien Wintz
## Update #: 291
######################################################################
##
### Commentary:
......@@ -36,7 +36,6 @@ set(${PROJECT_NAME}_HEADERS
dtkAbstractDataConverter.h
dtkAbstractFactory.h
dtkAbstractObject.h
dtkPlugin.h
dtkAbstractProcess.h
dtkAbstractProcessFactory.h
dtkAbstractView.h
......@@ -50,6 +49,7 @@ set(${PROJECT_NAME}_HEADERS
dtkContainerVector.tpp
dtkCpuid.h
dtkGlobal.h
dtkPlugin.h
dtkPluginManager.h
dtkUpdater.h
dtkSignalBlocker.h
......@@ -69,7 +69,6 @@ set(${PROJECT_NAME}_HEADERS_MOC
dtkAbstractDataConverter.h
dtkAbstractFactory.h
dtkAbstractObject.h
dtkPlugin.h
dtkAbstractProcess.h
dtkAbstractProcessFactory.h
dtkAbstractView.h
......@@ -77,6 +76,7 @@ set(${PROJECT_NAME}_HEADERS_MOC
dtkAbstractViewFactory.h
dtkAbstractViewInteractor.h
dtkAbstractViewNavigator.h
dtkPlugin.h
dtkPluginManager.h
dtkUpdater_p.h)
......
......@@ -13,6 +13,7 @@
<file>pixmaps/dtk-item-list-delegate-tags.png</file>
<file>pixmaps/dtk-tag_bg.png</file>
<file>pixmaps/dtk-tag_fg.png</file>
<file>pixmaps/dtk-tag_fg_dark.png</file>
<file>pixmaps/dtk-view-tree.png</file>
<file>pixmaps/dtk-view-list.png</file>
<file>pixmaps/dtk.png</file>
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008 - Julien Wintz, Inria.
* Created: Wed Dec 23 09:56:30 2009 (+0100)
* Version: $Id$
* Last-Updated: Wed Nov 9 16:03:49 2011 (+0100)
* Last-Updated: Tue May 15 13:43:35 2012 (+0200)
* By: Julien Wintz
* Update #: 25
* Update #: 26
*/
/* Commentary:
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008 - Julien Wintz, Inria.
* Created: Sun May 3 10:42:27 2009 (+0200)
* Version: $Id$
* Last-Updated: Tue Apr 17 14:53:49 2012 (+0200)
* Last-Updated: Tue May 15 14:13:33 2012 (+0200)
* By: Julien Wintz
* Update #: 1551
* Update #: 1562
*/
/* Commentary:
......@@ -419,6 +419,16 @@ dtkTagScopeTag::~dtkTagScopeTag(void)
d = NULL;
}
void dtkTagScopeTag::setDark(void)
{
d->fg->setStyleSheet(
"border-image: url(:dtkGui/pixmaps/dtk-tag_fg_dark.png) 3 10 3 10;"
"border-top: 3px transparent;"
"border-bottom: 3px transparent;"
"border-right: 10px transparent;"
"border-left: 10px transparent;");
}
QSize dtkTagScopeTag::sizeHint(void) const
{
return QSize(d->width + d->offset_max, d->height);
......@@ -510,6 +520,9 @@ public:
public:
dtkFlowLayout *layout;
public:
bool light;
};
dtkTagScope::dtkTagScope(QWidget *parent) : QFrame(parent)
......@@ -518,6 +531,8 @@ dtkTagScope::dtkTagScope(QWidget *parent) : QFrame(parent)
d = new dtkTagScopePrivate;
d->light = true;
d->completer_model = new QStringListModel(this);
d->completer = new QCompleter(this);
......@@ -591,6 +606,10 @@ void dtkTagScope::clear(void)
d->edit->clear();
}
void dtkTagScope::setDark(void)
{
d->light = false;
}
void dtkTagScope::toggle(void)
{
......@@ -608,6 +627,8 @@ void dtkTagScope::render(void)
foreach(QString filter, d->filters) {
dtkTagScopeTag *tag = new dtkTagScopeTag;
if(!d->light)
tag->setDark();
tag->setText(filter);
if(d->counts.contains(filter))
tag->setCount(d->counts[filter]);
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008 - Julien Wintz, Inria.
* Created: Sun May 3 10:42:01 2009 (+0200)
* Version: $Id$
* Last-Updated: Mon Apr 16 12:11:27 2012 (+0200)
* Last-Updated: Tue May 15 14:12:19 2012 (+0200)
* By: Julien Wintz
* Update #: 213
* Update #: 216
*/
/* Commentary:
......@@ -128,6 +128,9 @@ public:
public:
QString text(void);
public:
void setDark(void);
public slots:
void setText(const QString& text);
void setCount(int count);
......@@ -166,6 +169,8 @@ public:
void setTags(const QStringList& tags);
void setDark(void);
signals:
void tagSet(QString tag);
void tagAdded(QString tag);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment