qt 6.5.1 original

This commit is contained in:
kleuter
2023-10-29 23:33:08 +01:00
parent 71d22ab6b0
commit 85d238dfda
21202 changed files with 5499099 additions and 0 deletions

View File

@ -0,0 +1,365 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
## tst_GraphicsViewBenchmark Binary:
#####################################################################
qt_internal_add_benchmark(tst_GraphicsViewBenchmark
SOURCES
main.cpp
widgets/abstractitemcontainer.cpp widgets/abstractitemcontainer.h
widgets/abstractitemview.cpp widgets/abstractitemview.h
widgets/abstractscrollarea.cpp widgets/abstractscrollarea.h
widgets/abstractviewitem.cpp widgets/abstractviewitem.h
widgets/backgrounditem.cpp widgets/backgrounditem.h
widgets/button.cpp widgets/button.h
widgets/commandline.cpp widgets/commandline.h
widgets/dummydatagen.cpp widgets/dummydatagen.h
widgets/gvbwidget.cpp widgets/gvbwidget.h
widgets/iconitem.cpp widgets/iconitem.h
widgets/itemrecyclinglist.cpp widgets/itemrecyclinglist.h
widgets/itemrecyclinglistview.cpp widgets/itemrecyclinglistview.h
widgets/label.cpp widgets/label.h
widgets/listitem.cpp widgets/listitem.h
widgets/listitemcache.cpp widgets/listitemcache.h
widgets/listitemcontainer.cpp widgets/listitemcontainer.h
widgets/listmodel.cpp widgets/listmodel.h
widgets/listwidget.cpp widgets/listwidget.h
widgets/mainview.cpp widgets/mainview.h
widgets/menu.cpp widgets/menu.h
widgets/recycledlistitem.cpp widgets/recycledlistitem.h
widgets/scrollbar.cpp widgets/scrollbar.h
widgets/scroller.cpp widgets/scroller.h widgets/scroller_p.h
widgets/settings.cpp widgets/settings.h
widgets/simplelist.cpp widgets/simplelist.h
widgets/simplelistview.cpp widgets/simplelistview.h
widgets/theme.cpp widgets/theme.h
widgets/themeevent.cpp widgets/themeevent.h
widgets/topbar.cpp widgets/topbar.h
INCLUDE_DIRECTORIES
widgets
LIBRARIES
Qt::Gui
Qt::Svg
Qt::Test
)
# Resources:
set_source_files_properties("resources/blue_SVG/blue_background_360x640px.svg"
PROPERTIES QT_RESOURCE_ALIAS "background.svg"
)
set_source_files_properties("resources/blue_SVG/blue_background_horisontal_640x360px.svg"
PROPERTIES QT_RESOURCE_ALIAS "background_horisontal.svg"
)
set_source_files_properties("resources/blue_SVG/blue_contact_default_icon_52x52px.svg"
PROPERTIES QT_RESOURCE_ALIAS "contact_default_icon.svg"
)
set_source_files_properties("resources/blue_SVG/blue_contact_list_divider_360x76px.svg"
PROPERTIES QT_RESOURCE_ALIAS "contact_list_divider.svg"
)
set_source_files_properties("resources/blue_SVG/blue_contact_list_highlighter_360x76px.svg"
PROPERTIES QT_RESOURCE_ALIAS "contact_list_highlighter.svg"
)
set_source_files_properties("resources/blue_SVG/blue_contact_status_idle_33x33px.svg"
PROPERTIES QT_RESOURCE_ALIAS "contact_status_idle.svg"
)
set_source_files_properties("resources/blue_SVG/blue_contact_status_offline_33x33px.svg"
PROPERTIES QT_RESOURCE_ALIAS "contact_status_offline.svg"
)
set_source_files_properties("resources/blue_SVG/blue_contact_status_online_33x33px.svg"
PROPERTIES QT_RESOURCE_ALIAS "contact_status_online.svg"
)
set_source_files_properties("resources/blue_SVG/blue_scroll_16x80px.svg"
PROPERTIES QT_RESOURCE_ALIAS "scroll.svg"
)
set_source_files_properties("resources/blue_SVG/blue_scrollbar_7x14px.svg"
PROPERTIES QT_RESOURCE_ALIAS "scrollbar.svg"
)
set_source_files_properties("resources/blue_SVG/blue_status_field_left_14x24px.svg"
PROPERTIES QT_RESOURCE_ALIAS "status_field_left.svg"
)
set_source_files_properties("resources/blue_SVG/blue_status_field_middle_14x24px.svg"
PROPERTIES QT_RESOURCE_ALIAS "status_field_middle.svg"
)
set_source_files_properties("resources/blue_SVG/blue_status_field_right_14x24px.svg"
PROPERTIES QT_RESOURCE_ALIAS "status_field_right.svg"
)
set_source_files_properties("resources/blue_SVG/blue_topbar_356x96px.svg"
PROPERTIES QT_RESOURCE_ALIAS "topbar.svg"
)
set_source_files_properties("resources/blue_SVG/blue_topbar_horisontal_636x96px.svg"
PROPERTIES QT_RESOURCE_ALIAS "topbar_horisontal.svg"
)
set_source_files_properties("resources/blue_SVG/blue_user_default_icon_68x68px.svg"
PROPERTIES QT_RESOURCE_ALIAS "user_default_icon.svg"
)
set_source_files_properties("resources/blue_SVG/blue_user_status_idle_38x38px.svg"
PROPERTIES QT_RESOURCE_ALIAS "user_status_idle.svg"
)
set_source_files_properties("resources/blue_SVG/blue_user_status_offline_38x38px.svg"
PROPERTIES QT_RESOURCE_ALIAS "user_status_offline.svg"
)
set_source_files_properties("resources/blue_SVG/blue_user_status_online_38x38px.svg"
PROPERTIES QT_RESOURCE_ALIAS "user_status_online.svg"
)
set(GraphicsViewBenchmark_resource_files
"resources/blue_SVG/blue_background_360x640px.svg"
"resources/blue_SVG/blue_background_horisontal_640x360px.svg"
"resources/blue_SVG/blue_contact_default_icon_52x52px.svg"
"resources/blue_SVG/blue_contact_list_divider_360x76px.svg"
"resources/blue_SVG/blue_contact_list_highlighter_360x76px.svg"
"resources/blue_SVG/blue_contact_status_idle_33x33px.svg"
"resources/blue_SVG/blue_contact_status_offline_33x33px.svg"
"resources/blue_SVG/blue_contact_status_online_33x33px.svg"
"resources/blue_SVG/blue_scroll_16x80px.svg"
"resources/blue_SVG/blue_scrollbar_7x14px.svg"
"resources/blue_SVG/blue_status_field_left_14x24px.svg"
"resources/blue_SVG/blue_status_field_middle_14x24px.svg"
"resources/blue_SVG/blue_status_field_right_14x24px.svg"
"resources/blue_SVG/blue_topbar_356x96px.svg"
"resources/blue_SVG/blue_topbar_horisontal_636x96px.svg"
"resources/blue_SVG/blue_user_default_icon_68x68px.svg"
"resources/blue_SVG/blue_user_status_idle_38x38px.svg"
"resources/blue_SVG/blue_user_status_offline_38x38px.svg"
"resources/blue_SVG/blue_user_status_online_38x38px.svg"
)
qt_internal_add_resource(tst_GraphicsViewBenchmark "GraphicsViewBenchmark"
PREFIX
"/themes/blue"
FILES
${GraphicsViewBenchmark_resource_files}
)
set_source_files_properties("resources/blue_SVG/blue_contact_status_idle_33x33px.svg"
PROPERTIES QT_RESOURCE_ALIAS "contact_status_idle.svg"
)
set_source_files_properties("resources/blue_SVG/blue_contact_status_offline_33x33px.svg"
PROPERTIES QT_RESOURCE_ALIAS "contact_status_offline.svg"
)
set_source_files_properties("resources/blue_SVG/blue_contact_status_online_33x33px.svg"
PROPERTIES QT_RESOURCE_ALIAS "contact_status_online.svg"
)
set_source_files_properties("resources/lime_SVG/lime_background_360x640px.svg"
PROPERTIES QT_RESOURCE_ALIAS "background.svg"
)
set_source_files_properties("resources/lime_SVG/lime_background_horisontal_640x360px.svg"
PROPERTIES QT_RESOURCE_ALIAS "background_horisontal.svg"
)
set_source_files_properties("resources/lime_SVG/lime_contact_default_icon_53x53px.svg"
PROPERTIES QT_RESOURCE_ALIAS "contact_default_icon.svg"
)
set_source_files_properties("resources/lime_SVG/lime_contact_default_icon_highlight_53x53px.svg"
PROPERTIES QT_RESOURCE_ALIAS "contact_default_icon_highlight.svg"
)
set_source_files_properties("resources/lime_SVG/lime_contact_list_divider_360x76px.svg"
PROPERTIES QT_RESOURCE_ALIAS "contact_list_divider.svg"
)
set_source_files_properties("resources/lime_SVG/lime_contact_list_highlighter_357x80px.svg"
PROPERTIES QT_RESOURCE_ALIAS "contact_list_highlighter.svg"
)
set_source_files_properties("resources/lime_SVG/lime_scroll_5x80px.svg"
PROPERTIES QT_RESOURCE_ALIAS "scroll.svg"
)
set_source_files_properties("resources/lime_SVG/lime_scrollbar_5x14px.svg"
PROPERTIES QT_RESOURCE_ALIAS "scrollbar.svg"
)
set_source_files_properties("resources/lime_SVG/lime_status_field_left_14x24px.svg"
PROPERTIES QT_RESOURCE_ALIAS "status_field_left.svg"
)
set_source_files_properties("resources/lime_SVG/lime_status_field_middle_10x24px.svg"
PROPERTIES QT_RESOURCE_ALIAS "status_field_middle.svg"
)
set_source_files_properties("resources/lime_SVG/lime_status_field_right_14x24px.svg"
PROPERTIES QT_RESOURCE_ALIAS "status_field_right.svg"
)
set_source_files_properties("resources/lime_SVG/lime_topbar_356x96px.svg"
PROPERTIES QT_RESOURCE_ALIAS "topbar.svg"
)
set_source_files_properties("resources/lime_SVG/lime_topbar_horisontal_636x96px.svg"
PROPERTIES QT_RESOURCE_ALIAS "topbar_horisontal.svg"
)
set_source_files_properties("resources/lime_SVG/lime_user_default_icon_84x68px.svg"
PROPERTIES QT_RESOURCE_ALIAS "user_default_icon.svg"
)
set_source_files_properties("resources/lime_SVG/lime_user_status_idle_24x24px.svg"
PROPERTIES QT_RESOURCE_ALIAS "user_status_idle.svg"
)
set_source_files_properties("resources/lime_SVG/lime_user_status_offline_24x24px.svg"
PROPERTIES QT_RESOURCE_ALIAS "user_status_offline.svg"
)
set_source_files_properties("resources/lime_SVG/lime_user_status_online_24x24px.svg"
PROPERTIES QT_RESOURCE_ALIAS "user_status_online.svg"
)
set(GraphicsViewBenchmark1_resource_files
"resources/blue_SVG/blue_contact_status_idle_33x33px.svg"
"resources/blue_SVG/blue_contact_status_offline_33x33px.svg"
"resources/blue_SVG/blue_contact_status_online_33x33px.svg"
"resources/lime_SVG/lime_background_360x640px.svg"
"resources/lime_SVG/lime_background_horisontal_640x360px.svg"
"resources/lime_SVG/lime_contact_default_icon_53x53px.svg"
"resources/lime_SVG/lime_contact_default_icon_highlight_53x53px.svg"
"resources/lime_SVG/lime_contact_list_divider_360x76px.svg"
"resources/lime_SVG/lime_contact_list_highlighter_357x80px.svg"
"resources/lime_SVG/lime_scroll_5x80px.svg"
"resources/lime_SVG/lime_scrollbar_5x14px.svg"
"resources/lime_SVG/lime_status_field_left_14x24px.svg"
"resources/lime_SVG/lime_status_field_middle_10x24px.svg"
"resources/lime_SVG/lime_status_field_right_14x24px.svg"
"resources/lime_SVG/lime_topbar_356x96px.svg"
"resources/lime_SVG/lime_topbar_horisontal_636x96px.svg"
"resources/lime_SVG/lime_user_default_icon_84x68px.svg"
"resources/lime_SVG/lime_user_status_idle_24x24px.svg"
"resources/lime_SVG/lime_user_status_offline_24x24px.svg"
"resources/lime_SVG/lime_user_status_online_24x24px.svg"
)
qt_internal_add_resource(tst_GraphicsViewBenchmark "GraphicsViewBenchmark1"
PREFIX
"/themes/lime"
FILES
${GraphicsViewBenchmark1_resource_files}
)
set_source_files_properties("resources/avatars/avatar_man_001_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_001.png"
)
set_source_files_properties("resources/avatars/avatar_man_002_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_002.png"
)
set_source_files_properties("resources/avatars/avatar_man_003_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_003.png"
)
set_source_files_properties("resources/avatars/avatar_man_004_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_004.png"
)
set_source_files_properties("resources/avatars/avatar_man_005_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_005.png"
)
set_source_files_properties("resources/avatars/avatar_man_006_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_006.png"
)
set_source_files_properties("resources/avatars/avatar_man_007_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_007.png"
)
set_source_files_properties("resources/avatars/avatar_man_008_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_008.png"
)
set_source_files_properties("resources/avatars/avatar_man_009_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_009.png"
)
set_source_files_properties("resources/avatars/avatar_man_010_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_010.png"
)
set_source_files_properties("resources/avatars/avatar_picture_001_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_011.png"
)
set_source_files_properties("resources/avatars/avatar_picture_002_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_012.png"
)
set_source_files_properties("resources/avatars/avatar_picture_003_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_013.png"
)
set_source_files_properties("resources/avatars/avatar_picture_004_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_014.png"
)
set_source_files_properties("resources/avatars/avatar_picture_005_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_015.png"
)
set_source_files_properties("resources/avatars/avatar_woman_001_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_016.png"
)
set_source_files_properties("resources/avatars/avatar_woman_002_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_017.png"
)
set_source_files_properties("resources/avatars/avatar_woman_003_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_018.png"
)
set_source_files_properties("resources/avatars/avatar_woman_004_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_019.png"
)
set_source_files_properties("resources/avatars/avatar_woman_005_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_020.png"
)
set_source_files_properties("resources/avatars/avatar_woman_006_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_021.png"
)
set_source_files_properties("resources/avatars/avatar_woman_007_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_022.png"
)
set_source_files_properties("resources/avatars/avatar_woman_008_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_023.png"
)
set_source_files_properties("resources/avatars/avatar_woman_009_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_024.png"
)
set_source_files_properties("resources/avatars/avatar_woman_010_58x58.png"
PROPERTIES QT_RESOURCE_ALIAS "avatar_025.png"
)
set(GraphicsViewBenchmark2_resource_files
"resources/avatars/avatar_man_001_58x58.png"
"resources/avatars/avatar_man_002_58x58.png"
"resources/avatars/avatar_man_003_58x58.png"
"resources/avatars/avatar_man_004_58x58.png"
"resources/avatars/avatar_man_005_58x58.png"
"resources/avatars/avatar_man_006_58x58.png"
"resources/avatars/avatar_man_007_58x58.png"
"resources/avatars/avatar_man_008_58x58.png"
"resources/avatars/avatar_man_009_58x58.png"
"resources/avatars/avatar_man_010_58x58.png"
"resources/avatars/avatar_picture_001_58x58.png"
"resources/avatars/avatar_picture_002_58x58.png"
"resources/avatars/avatar_picture_003_58x58.png"
"resources/avatars/avatar_picture_004_58x58.png"
"resources/avatars/avatar_picture_005_58x58.png"
"resources/avatars/avatar_woman_001_58x58.png"
"resources/avatars/avatar_woman_002_58x58.png"
"resources/avatars/avatar_woman_003_58x58.png"
"resources/avatars/avatar_woman_004_58x58.png"
"resources/avatars/avatar_woman_005_58x58.png"
"resources/avatars/avatar_woman_006_58x58.png"
"resources/avatars/avatar_woman_007_58x58.png"
"resources/avatars/avatar_woman_008_58x58.png"
"resources/avatars/avatar_woman_009_58x58.png"
"resources/avatars/avatar_woman_010_58x58.png"
)
qt_internal_add_resource(tst_GraphicsViewBenchmark "GraphicsViewBenchmark2"
PREFIX
"/avatars"
FILES
${GraphicsViewBenchmark2_resource_files}
)
set_source_files_properties("resources/contacts/areacodes.txt"
PROPERTIES QT_RESOURCE_ALIAS "areacodes.txt"
)
set_source_files_properties("resources/contacts/firstnamesF.txt"
PROPERTIES QT_RESOURCE_ALIAS "firstnamesF.txt"
)
set_source_files_properties("resources/contacts/firstnamesM.txt"
PROPERTIES QT_RESOURCE_ALIAS "firstnamesM.txt"
)
set_source_files_properties("resources/contacts/lastnames.txt"
PROPERTIES QT_RESOURCE_ALIAS "lastnames.txt"
)
set(GraphicsViewBenchmark3_resource_files
"resources/contacts/areacodes.txt"
"resources/contacts/firstnamesF.txt"
"resources/contacts/firstnamesM.txt"
"resources/contacts/lastnames.txt"
)
qt_internal_add_resource(tst_GraphicsViewBenchmark "GraphicsViewBenchmark3"
PREFIX
"/contact"
FILES
${GraphicsViewBenchmark3_resource_files}
)
## Scopes:
#####################################################################
qt_internal_extend_target(tst_GraphicsViewBenchmark CONDITION TARGET Qt::OpenGL
LIBRARIES
Qt::OpenGL
Qt::OpenGLWidgets
)

View File

@ -0,0 +1,756 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QTest>
#include <QtGui/qpixmapcache.h>
#include <QtGui/QScreen>
#include "mainview.h"
#include "dummydatagen.h"
#include "simplelist.h"
#include "itemrecyclinglist.h"
#include "simplelist.h"
#include "theme.h"
#include "commandline.h"
class tst_GraphicsViewBenchmark : public QObject
{
Q_OBJECT
public:
enum ListType {
Simple,
Recycling,
None
};
enum ScrollStep {
Slow = 2,
Normal = 8,
Fast = 64
};
tst_GraphicsViewBenchmark(Settings *settings)
: mSettings(settings), mMainView(0), currentListSize(-1), currentListType(None) {}
~tst_GraphicsViewBenchmark() {}
public slots:
void initTestCase();
void cleanupTestCase();
void init();
private slots:
// Benchmarks:
void createAndFillList_data();
void createAndFillList();
void add100ItemsToBeginningOfList_data();
void add100ItemsToBeginningOfList();
void remove100ItemsFromBeginningOfList_data();
void remove100ItemsFromBeginningOfList();
void deleteList_data();
void deleteList();
void themeChange_data();
void themeChange();
void update_data();
void update();
void scroll_data();
void scroll();
private:
Settings *mSettings;
MainView *mMainView;
DummyDataGenerator mDataGenerator;
int currentListSize;
ListType currentListType;
void resetView();
void ensureListSizeAndType(int listSize, ListType listType);
void ensureTheme(Theme::Themes theme);
void ensureRotationAngle(int rotation);
void ensureSubtreeCache(bool enable);
void ensureImageBasedRendering(bool enable);
void insertListData();
inline void setTestWidget(QGraphicsWidget *widget, int listSize, ListType listType)
{
currentListSize = listSize;
currentListType = listType;
mMainView->setTestWidget(widget);
}
};
Q_DECLARE_METATYPE(tst_GraphicsViewBenchmark::ListType)
Q_DECLARE_METATYPE(Theme::Themes)
Q_DECLARE_METATYPE(tst_GraphicsViewBenchmark::ScrollStep)
const int AddRemoveCount = 100;
static ListItem *newSimpleListItem(DummyDataGenerator &dataGenerator, const int id)
{
ListItem *item = new ListItem();
item->setText(dataGenerator.randomName(), ListItem::FirstPos );
item->setText(dataGenerator.randomPhoneNumber(QString("%1").arg(id)), ListItem::SecondPos );
item->setIcon(new IconItem(dataGenerator.randomIconItem(), item), ListItem::LeftIcon );
item->setIcon(new IconItem(dataGenerator.randomStatusItem(), item), ListItem::RightIcon);
item->setFont(Theme::p()->font(Theme::ContactName), ListItem::FirstPos);
item->setFont(Theme::p()->font(Theme::ContactNumber), ListItem::SecondPos);
item->setBorderPen(Theme::p()->listItemBorderPen());
item->setRounding(Theme::p()->listItemRounding());
item->icon(ListItem::LeftIcon)->setRotation(Theme::p()->iconRotation(ListItem::LeftIcon));
item->icon(ListItem::RightIcon)->setRotation(Theme::p()->iconRotation(ListItem::RightIcon));
item->icon(ListItem::LeftIcon)->setSmoothTransformationEnabled(Theme::p()->isIconSmoothTransformationEnabled(ListItem::LeftIcon));
item->icon(ListItem::RightIcon)->setSmoothTransformationEnabled(Theme::p()->isIconSmoothTransformationEnabled(ListItem::RightIcon));
item->icon(ListItem::LeftIcon)->setOpacityEffectEnabled(Theme::p()->isIconOpacityEffectEnabled(ListItem::LeftIcon));
item->icon(ListItem::RightIcon)->setOpacityEffectEnabled(Theme::p()->isIconOpacityEffectEnabled(ListItem::RightIcon));
return item;
}
static RecycledListItem *newRecyclingListItem(DummyDataGenerator &dataGenerator, const int id)
{
RecycledListItem *item = new RecycledListItem();
item->item()->setText(dataGenerator.randomName(), ListItem::FirstPos );
item->item()->setText(dataGenerator.randomPhoneNumber(QString("%1").arg(id)), ListItem::SecondPos );
item->item()->setIcon(new IconItem(dataGenerator.randomIconItem()), ListItem::LeftIcon );
item->item()->setIcon(new IconItem(dataGenerator.randomStatusItem()), ListItem::RightIcon);
item->item()->setFont(Theme::p()->font(Theme::ContactName), ListItem::FirstPos);
item->item()->setFont(Theme::p()->font(Theme::ContactNumber), ListItem::SecondPos);
item->item()->setBorderPen(Theme::p()->listItemBorderPen());
item->item()->setRounding(Theme::p()->listItemRounding());
item->item()->icon(ListItem::LeftIcon)->setRotation(Theme::p()->iconRotation(ListItem::LeftIcon));
item->item()->icon(ListItem::RightIcon)->setRotation(Theme::p()->iconRotation(ListItem::RightIcon));
item->item()->icon(ListItem::LeftIcon)->setSmoothTransformationEnabled(Theme::p()->isIconSmoothTransformationEnabled(ListItem::LeftIcon));
item->item()->icon(ListItem::RightIcon)->setSmoothTransformationEnabled(Theme::p()->isIconSmoothTransformationEnabled(ListItem::RightIcon));
item->item()->icon(ListItem::LeftIcon)->setOpacityEffectEnabled(Theme::p()->isIconOpacityEffectEnabled(ListItem::LeftIcon));
item->item()->icon(ListItem::RightIcon)->setOpacityEffectEnabled(Theme::p()->isIconOpacityEffectEnabled(ListItem::RightIcon));
return item;
}
static void fillList(DummyDataGenerator &dataGenerator, int itemCount, QGraphicsWidget *list)
{
if (SimpleList *simpleList = qobject_cast<SimpleList *>(list)) {
for (int i = 0; i < itemCount; ++i)
simpleList->addItem(newSimpleListItem(dataGenerator, i));
} else if (ItemRecyclingList *recyclingList = qobject_cast<ItemRecyclingList *>(list)) {
for (int i = 0; i < itemCount; ++i)
recyclingList->addItem(newRecyclingListItem(dataGenerator, i));
} else {
qFatal("fillList: internal error");
}
}
void tst_GraphicsViewBenchmark::resetView()
{
if (QGraphicsWidget *widget = mMainView->takeTestWidget()) {
delete widget;
currentListSize = -1;
currentListType = None;
QTest::qWait(50);
} else {
if (currentListSize != -1)
qFatal("tst_GraphicsViewBenchmark::resetView: internal error: wrong list size");
if (currentListType != None)
qFatal("tst_GraphicsViewBenchmark::resetView: internal error: wrong list type");
}
ensureTheme(Theme::Blue);
ensureRotationAngle(0);
ensureSubtreeCache(false);
ensureImageBasedRendering(false);
}
void tst_GraphicsViewBenchmark::ensureListSizeAndType(int listSize, ListType listType)
{
if (currentListSize != listSize || currentListType != listType) {
resetView();
if (listType == Simple) {
SimpleList *list = new SimpleList;
fillList(mDataGenerator, listSize, list);
setTestWidget(list, listSize, listType);
} else if (listType == Recycling) {
ItemRecyclingList *list = new ItemRecyclingList;
fillList(mDataGenerator, listSize, list);
setTestWidget(list, listSize, listType);
}
QTest::qWait(50);
return;
}
// Okay, we're supposed to have the right list type and size. Make sure we actually have it.
QGraphicsWidget *widget = mMainView->testWidget();
if (!widget) {
if (currentListType != None || currentListSize != -1)
qFatal("tst_GraphicsViewBenchmark::ensureListSizeAndType: internal error: no test widget");
return;
}
if (listType == Simple) {
SimpleList *list = qobject_cast<SimpleList *>(widget);
if (!list)
qFatal("tst_GraphicsViewBenchmark::ensureListSizeAndType: internal error: wrong list type");
if (list->itemCount() != listSize)
qFatal("tst_GraphicsViewBenchmark::ensureListSizeAndType: internal error: wrong list size");
} else if (listType == Recycling){
ItemRecyclingList *list = qobject_cast<ItemRecyclingList *>(widget);
if (!list)
qFatal("tst_GraphicsViewBenchmark::ensureListSizeAndType: internal error: wrong list type");
if (list->rows() != listSize)
qFatal("tst_GraphicsViewBenchmark::ensureListSizeAndType: internal error: wrong list size");
}
}
void tst_GraphicsViewBenchmark::ensureTheme(Theme::Themes theme)
{
if (Theme::p()->theme() != theme) {
Theme::p()->setTheme(theme);
// The theme change itself can take a lot of time, so make
// sure we give it a little bit time to stabilize *after*
// the changes, hence sendPostedEvents(); qWait();
QApplication::sendPostedEvents();
QTest::qWait(50);
}
}
void tst_GraphicsViewBenchmark::ensureRotationAngle(int angle)
{
const bool useTwoColumns = angle != 0;
bool wait = false;
if (mMainView->rotationAngle() != angle) {
mMainView->rotateContent(-mMainView->rotationAngle() + angle);
wait = true;
}
if (QGraphicsWidget *widget = mMainView->testWidget()) {
if (SimpleList *list = qobject_cast<SimpleList *>(widget)) {
if (list->twoColumns() != useTwoColumns) {
list->setTwoColumns(useTwoColumns);
wait = true;
}
} else if (ItemRecyclingList *list = qobject_cast<ItemRecyclingList *>(widget)) {
if (list->twoColumns() != useTwoColumns) {
list->setTwoColumns(useTwoColumns);
wait = true;
}
}
}
if (wait)
QTest::qWait(50);
}
void tst_GraphicsViewBenchmark::ensureSubtreeCache(bool enable)
{
QGraphicsWidget *widget = mMainView->testWidget();
if (!widget)
return;
if (SimpleList *list = qobject_cast<SimpleList *>(widget)) {
if (list->listItemCaching() != enable) {
list->setListItemCaching(enable);
QTest::qWait(50);
}
} else if (ItemRecyclingList *list = qobject_cast<ItemRecyclingList *>(widget)) {
if (list->listItemCaching() != enable) {
list->setListItemCaching(enable);
QTest::qWait(50);
}
}
QPixmapCache::clear();
}
void tst_GraphicsViewBenchmark::ensureImageBasedRendering(bool enable)
{
if (mMainView->imageBasedRendering() != enable) {
mMainView->setImageBasedRendering(enable);
QTest::qWait(50);
}
}
void tst_GraphicsViewBenchmark::insertListData()
{
QTest::addColumn<int>("listSize");
QTest::addColumn<ListType>("listType");
QTest::newRow("Simple list containing 10 items") << 10 << Simple;
QTest::newRow("Recycling list containing 10 items") << 10 << Recycling;
QTest::newRow("Simple list containing 50 items") << 50 << Simple;
QTest::newRow("Recycling list containing 50 items") << 50 << Recycling;
QTest::newRow("Simple list containing 500 items") << 500 << Simple;
QTest::newRow("Recycling list containing 500 items") << 500 << Recycling;
}
void tst_GraphicsViewBenchmark::initTestCase()
{
mMainView = new MainView(mSettings->options() & Settings::UseOpenGL,
mSettings->options() & Settings::OutputFps);
if (mSettings->size().width() > 0 && mSettings->size().height() > 0) {
mMainView->resize(mSettings->size().width(), mSettings->size().height());
mMainView->show();
} else if (QGuiApplication::primaryScreen()->geometry().width() < 360
|| QGuiApplication::primaryScreen()->geometry().height() < 640) {
mMainView->showFullScreen();
} else {
mMainView->resize(360, 640);
mMainView->show();
}
mDataGenerator.Reset();
SimpleList *list = new SimpleList;
list->setListItemCaching(false);
mMainView->setTestWidget(list);
fillList(mDataGenerator, 5, list);
mMainView->takeTestWidget();
delete list;
currentListSize = -1;
currentListType = None;
QVERIFY(QTest::qWaitForWindowExposed(mMainView));
}
void tst_GraphicsViewBenchmark::cleanupTestCase()
{
delete mMainView;
mMainView = 0;
}
void tst_GraphicsViewBenchmark::init()
{
// Make sure we don't have pending events in the queue.
// Yes, each test run takes a little bit longer, but the results are more stable.
QTest::qWait(150);
}
void tst_GraphicsViewBenchmark::createAndFillList_data()
{
insertListData();
}
void tst_GraphicsViewBenchmark::createAndFillList()
{
QFETCH(int, listSize);
QFETCH(ListType, listType);
resetView();
if (listType == Simple) {
QBENCHMARK {
SimpleList *list = new SimpleList;
setTestWidget(list, listSize, listType);
fillList(mDataGenerator, listSize, list);
}
} else {
QBENCHMARK {
ItemRecyclingList *list = new ItemRecyclingList;
setTestWidget(list, listSize, listType);
fillList(mDataGenerator, listSize, list);
}
}
resetView();
}
void tst_GraphicsViewBenchmark::add100ItemsToBeginningOfList_data()
{
insertListData();
}
void tst_GraphicsViewBenchmark::add100ItemsToBeginningOfList()
{
QFETCH(int, listSize);
QFETCH(ListType, listType);
resetView();
if (listType == Simple) {
SimpleList *list = new SimpleList;
fillList(mDataGenerator, listSize, list);
setTestWidget(list, listSize, listType);
QTest::qWait(50);
QBENCHMARK {
for (int i = 0; i < AddRemoveCount; ++i)
list->insertItem(0, newSimpleListItem(mDataGenerator, i));
}
} else {
ItemRecyclingList *list = new ItemRecyclingList;
fillList(mDataGenerator, listSize, list);
setTestWidget(list, listSize, listType);
QTest::qWait(50);
QBENCHMARK {
for (int i = 0; i < AddRemoveCount; ++i)
list->insertItem(0, newRecyclingListItem(mDataGenerator, i));
}
}
resetView();
}
void tst_GraphicsViewBenchmark::remove100ItemsFromBeginningOfList_data()
{
insertListData();
}
void tst_GraphicsViewBenchmark::remove100ItemsFromBeginningOfList()
{
QFETCH(int, listSize);
QFETCH(ListType, listType);
resetView();
if (listType == Simple) {
SimpleList *list = new SimpleList;
fillList(mDataGenerator, listSize, list);
setTestWidget(list, listSize, listType);
QTest::qWait(50);
QBENCHMARK {
for (int i = 0; i < AddRemoveCount; ++i)
delete list->takeItem(0);
}
} else {
ItemRecyclingList *list = new ItemRecyclingList;
fillList(mDataGenerator, listSize, list);
setTestWidget(list, listSize, listType);
QTest::qWait(50);
QBENCHMARK {
for (int i = 0; i < AddRemoveCount; ++i)
delete list->takeItem(0);
}
}
resetView();
}
void tst_GraphicsViewBenchmark::deleteList_data()
{
insertListData();
QTest::newRow("Simple list containing 1000 items") << 1000 << Simple;
QTest::newRow("Recycling list containing 1000 items") << 1000 << Recycling;
}
void tst_GraphicsViewBenchmark::deleteList()
{
QFETCH(int, listSize);
QFETCH(ListType, listType);
if (listSize < 500)
return; // Too small to measure.
QGraphicsWidget *list = 0;
if (listType == Simple)
list = new SimpleList;
else
list = new ItemRecyclingList;
fillList(mDataGenerator, listSize, list);
QTest::qWait(20);
QBENCHMARK_ONCE {
delete list;
}
}
void tst_GraphicsViewBenchmark::themeChange_data()
{
QTest::addColumn<int>("listSize");
QTest::addColumn<ListType>("listType");
QTest::addColumn<Theme::Themes>("fromTheme");
QTest::addColumn<Theme::Themes>("toTheme");
QTest::newRow("From Blue to Lime, simple list containing 10 items") << 10 << Simple << Theme::Blue << Theme::Lime;
QTest::newRow("From Lime to Blue, simple list containing 10 items") << 10 << Simple << Theme::Lime << Theme::Blue;
QTest::newRow("From Blue to Lime, recycling list containing 10 items") << 10 << Recycling << Theme::Blue << Theme::Lime;
QTest::newRow("From Lime to Blue, recycling list containing 10 items") << 10 << Recycling << Theme::Lime << Theme::Blue;
QTest::newRow("From Blue to Lime, simple list containing 50 items") << 50 << Simple << Theme::Blue << Theme::Lime;
QTest::newRow("From Lime to Blue, simple list containing 50 items") << 50 << Simple << Theme::Lime << Theme::Blue;
QTest::newRow("From Blue to Lime, recycling list containing 50 items") << 50 << Recycling << Theme::Blue << Theme::Lime;
QTest::newRow("From Lime to Blue, recycling list containing 50 items") << 50 << Recycling << Theme::Lime << Theme::Blue;
QTest::newRow("From Blue to Lime, simple list containing 500 items") << 500 << Simple << Theme::Blue << Theme::Lime;
QTest::newRow("From Lime to Blue, simple list containing 500 items") << 500 << Simple << Theme::Lime << Theme::Blue;
QTest::newRow("From Blue to Lime, recycling list containing 500 items") << 500 << Recycling << Theme::Blue << Theme::Lime;
QTest::newRow("From Lime to Blue, recycling list containing 500 items") << 500 << Recycling << Theme::Lime << Theme::Blue;
}
void tst_GraphicsViewBenchmark::themeChange()
{
QFETCH(int, listSize);
QFETCH(ListType, listType);
QFETCH(Theme::Themes, fromTheme);
QFETCH(Theme::Themes, toTheme);
if (fromTheme == toTheme)
qFatal("tst_GraphicsViewBenchmark::themeChange: to and from theme is the same");
ensureListSizeAndType(listSize, listType);
ensureTheme(fromTheme);
QBENCHMARK {
Theme::p()->setTheme(toTheme);
}
}
static inline QLatin1String stringForTheme(Theme::Themes theme)
{
if (theme == Theme::Blue)
return QLatin1String("Blue");
return QLatin1String("Lime");
}
static inline QLatin1String stringForListType(tst_GraphicsViewBenchmark::ListType type)
{
if (type == tst_GraphicsViewBenchmark::Simple)
return QLatin1String("Simple");
if (type == tst_GraphicsViewBenchmark::Recycling)
return QLatin1String("Recycling");
return QLatin1String("None");
}
static inline QLatin1String stringForScrollStep(tst_GraphicsViewBenchmark::ScrollStep step)
{
if (step == tst_GraphicsViewBenchmark::Slow)
return QLatin1String("Slow");
if (step == tst_GraphicsViewBenchmark::Normal)
return QLatin1String("Normal");
return QLatin1String("Fast");
}
static inline QString rowString(int listSize, tst_GraphicsViewBenchmark::ListType listType,
Theme::Themes theme, int toImage, int cache, int angle)
{
return QString("Items=%1, List=%2, Theme=%3, RenderToImage=%4, Cache=%5, RotAngle=%6")
.arg(QString::number(listSize)).arg(stringForListType(listType))
.arg(stringForTheme(theme)).arg(QString::number(toImage))
.arg(QString::number(cache)).arg(QString::number(angle));
}
static inline QString rowString(int listSize, tst_GraphicsViewBenchmark::ListType listType,
Theme::Themes theme, int cache, int angle,
tst_GraphicsViewBenchmark::ScrollStep step)
{
return QString("Items=%1, List=%2, Theme=%3, Cache=%4, RotAngle=%5, Speed=%6")
.arg(QString::number(listSize)).arg(stringForListType(listType))
.arg(stringForTheme(theme)).arg(QString::number(cache))
.arg(QString::number(angle)).arg(stringForScrollStep(step));
}
void tst_GraphicsViewBenchmark::update_data()
{
QTest::addColumn<int>("listSize");
QTest::addColumn<ListType>("listType");
QTest::addColumn<Theme::Themes>("theme");
QTest::addColumn<bool>("renderToImage");
QTest::addColumn<bool>("subtreeCache");
QTest::addColumn<int>("rotationAngle");
QList<ListType> listTypes;
listTypes << Simple << Recycling;
QList<int> listSizes;
listSizes << 10 << 50 << 500;
QList<Theme::Themes> themes;
themes << Theme::Blue << Theme::Lime;
QList<int> rotationAngles;
rotationAngles << 0 << 90;
// Generate rows:
foreach (ListType listType, listTypes) {
foreach (int listSize, listSizes) {
foreach (int angle, rotationAngles) {
foreach (Theme::Themes theme, themes) {
for (int toImage = 0; toImage < 2; ++toImage) {
for (int cache = 0; cache < 2; ++cache) {
QString string = rowString(listSize, listType, theme, toImage, cache, angle);
QTest::newRow(string.toLatin1()) << listSize << listType << theme << bool(toImage)
<< bool(cache) << angle;
}
}
}
}
}
}
}
void tst_GraphicsViewBenchmark::update()
{
QFETCH(int, listSize);
QFETCH(ListType, listType);
QFETCH(Theme::Themes, theme);
QFETCH(bool, renderToImage);
QFETCH(bool, subtreeCache);
QFETCH(int, rotationAngle);
mMainView->viewport()->setUpdatesEnabled(false);
ensureListSizeAndType(listSize, listType);
ensureTheme(theme);
ensureRotationAngle(rotationAngle);
ensureSubtreeCache(subtreeCache);
ensureImageBasedRendering(renderToImage);
QEventLoop loop;
QObject::connect(mMainView, SIGNAL(repainted()), &loop, SLOT(quit()));
QTimer::singleShot(4000, &loop, SLOT(quit()));
// Dry run (especially important when cache is enabled).
// NB! setUpdatesEnabled triggers an update().
mMainView->viewport()->setUpdatesEnabled(true);
loop.exec(QEventLoop::AllEvents | QEventLoop::ExcludeUserInputEvents| QEventLoop::ExcludeSocketNotifiers);
QTest::qWait(50);
QTimer::singleShot(4000, &loop, SLOT(quit()));
QBENCHMARK {
mMainView->viewport()->update();
loop.exec(QEventLoop::AllEvents | QEventLoop::ExcludeUserInputEvents| QEventLoop::ExcludeSocketNotifiers);
}
}
void tst_GraphicsViewBenchmark::scroll_data()
{
QTest::addColumn<int>("listSize");
QTest::addColumn<ListType>("listType");
QTest::addColumn<Theme::Themes>("theme");
QTest::addColumn<bool>("subtreeCache");
QTest::addColumn<int>("rotationAngle");
QTest::addColumn<ScrollStep>("scrollStep");
QList<ListType> listTypes;
listTypes << Simple << Recycling;
QList<int> listSizes;
listSizes << 10 << 50 << 500;
QList<Theme::Themes> themes;
themes << Theme::Blue << Theme::Lime;
QList<int> rotationAngles;
rotationAngles << 0 << 90;
QList<ScrollStep> scrollSteps;
scrollSteps << Slow << Normal << Fast;
// Generate rows:
foreach (ListType listType, listTypes) {
foreach (int listSize, listSizes) {
foreach (int angle, rotationAngles) {
foreach (ScrollStep step, scrollSteps) {
foreach (Theme::Themes theme, themes) {
for (int cache = 0; cache < 2; ++cache) {
QString string = rowString(listSize, listType, theme, cache, angle, step);
QTest::newRow(string.toLatin1()) << listSize << listType << theme
<< bool(cache) << angle << step;
}
}
}
}
}
}
}
void tst_GraphicsViewBenchmark::scroll()
{
QFETCH(int, listSize);
QFETCH(ListType, listType);
QFETCH(Theme::Themes, theme);
QFETCH(bool, subtreeCache);
QFETCH(int, rotationAngle);
QFETCH(ScrollStep, scrollStep);
mMainView->viewport()->setUpdatesEnabled(false);
ensureListSizeAndType(listSize, listType);
ensureTheme(theme);
ensureRotationAngle(rotationAngle);
ensureSubtreeCache(subtreeCache);
ensureImageBasedRendering(false);
ScrollBar *sb = 0;
if (listType == Simple)
sb = static_cast<SimpleList *>(mMainView->testWidget())->verticalScrollBar();
else
sb = static_cast<ItemRecyclingList *>(mMainView->testWidget())->verticalScrollBar();
const qreal sliderStart = sb->sliderSize() / qreal(2.0);
const qreal sliderTarget = sliderStart + qreal(scrollStep);
sb->setSliderPosition(sliderStart);
QEventLoop loop;
QObject::connect(mMainView, SIGNAL(repainted()), &loop, SLOT(quit()));
QTimer::singleShot(4000, &loop, SLOT(quit()));
// Dry run (especially important when cache is enabled).
// NB! setUpdatesEnabled triggers an update().
mMainView->viewport()->setUpdatesEnabled(true);
loop.exec(QEventLoop::AllEvents | QEventLoop::ExcludeUserInputEvents| QEventLoop::ExcludeSocketNotifiers);
QTest::qWait(50);
QTimer::singleShot(4000, &loop, SLOT(quit()));
QBENCHMARK {
sb->setSliderPosition(sliderTarget);
loop.exec(QEventLoop::AllEvents | QEventLoop::ExcludeUserInputEvents| QEventLoop::ExcludeSocketNotifiers);
}
}
int main(int argc, char *argv[])
{
Settings settings;
if (!readSettingsFromCommandLine(argc, argv, settings))
return 1;
// Eat command line arguments.
int aargc = 0;
for (int i = 0; i < argc; ++i) {
if (argv[i])
++aargc;
}
char **aargv = new char*[aargc];
aargc = 0;
for (int i = 0; i < argc; ++i) {
if (argv[i])
aargv[aargc++] = argv[i];
}
QApplication app(aargc, aargv);
int returnValue = 0;
if (settings.options() & Settings::ManualTest) {
MainView view(settings.options() & Settings::UseOpenGL, settings.options() & Settings::OutputFps);
DummyDataGenerator dataGenerator;
dataGenerator.Reset();
SimpleList *list = new SimpleList;
if (settings.options() & Settings::UseListItemCache)
list->setListItemCaching(true);
else
list->setListItemCaching(false);
if (settings.listItemCount())
fillList(dataGenerator, settings.listItemCount(), list);
else
fillList(dataGenerator, 500, list);
view.setTestWidget(list);
if ((settings.angle() % 360) != 0)
view.rotateContent(settings.angle());
if (settings.size().width() > 0 && settings.size().height() > 0) {
view.resize(settings.size().width(), settings.size().height());
view.show();
} else if (QGuiApplication::primaryScreen()->geometry().width() < 360
|| QApplication::primaryScreen()->geometry().height() < 640) {
view.showFullScreen();
} else {
view.resize(360, 640);
view.show();
}
returnValue = app.exec();
} else {
QTEST_DISABLE_KEYPAD_NAVIGATION
tst_GraphicsViewBenchmark tc(&settings);
returnValue = QTest::qExec(&tc, aargc, aargv);
}
delete [] aargv;
return returnValue;
}
#include "main.moc"

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="360px" height="640px" viewBox="0 0 360 640" enable-background="new 0 0 360 640" xml:space="preserve">
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-3.5137" y1="2.1079" x2="363.6142" y2="637.9921">
<stop offset="0.1538" style="stop-color:#2BD5FF"/>
<stop offset="0.4396" style="stop-color:#80E6FF"/>
<stop offset="0.7253" style="stop-color:#29CAF2"/>
</linearGradient>
<rect x="0.05" y="0.05" fill="url(#SVGID_1_)" width="360" height="640"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 861 B

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="640px" height="360px" viewBox="0 0 640 360" enable-background="new 0 0 640 360" xml:space="preserve">
<g>
<rect x="-0.5" y="-0.5" fill="#FFFFFF" width="640" height="360"/>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="1580.5244" y1="-287.7886" x2="1038.1285" y2="-600.9408" gradientTransform="matrix(0 -1 -1 0 -124.8652 1488.8262)">
<stop offset="0.2527" style="stop-color:#2BD5FF"/>
<stop offset="0.5989" style="stop-color:#80E6FF"/>
<stop offset="0.9396" style="stop-color:#29CAF2"/>
</linearGradient>
<rect x="1.5" y="1.5" fill="url(#SVGID_1_)" width="636" height="356"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 994 B

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="52px" height="52px" viewBox="0 0 52 52" enable-background="new 0 0 52 52" xml:space="preserve">
<g>
<path fill="#29CAF2" d="M52.07,48.77c0,1.79-1.46,3.25-3.25,3.25H3.32c-1.79,0-3.25-1.46-3.25-3.25V3.27
c0-1.79,1.46-3.25,3.25-3.25h45.5c1.79,0,3.25,1.46,3.25,3.25V48.77z"/>
<g>
<rect x="3.37" y="3.69" fill="#2BD5FF" width="44.69" height="44.69"/>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="6.8594" y1="27.8086" x2="48.0244" y2="27.8086">
<stop offset="0.1538" style="stop-color:#27C0E6"/>
<stop offset="0.4396" style="stop-color:#25B7DB"/>
<stop offset="0.7253" style="stop-color:#22A5C4"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M47.95,48.31c0.12-3.35,0.15-8.17-0.43-9.12c-2.87-4.64-11.55-3.61-14.02-3.22
c0-1.17-0.01-2.19-0.01-2.96c0.5-0.52,0.96-1.11,1.39-1.76l0.06,0.19c3.57,0.51,4.02-11.16,4.02-11.16
C39.21,3.66,28.83,7.47,27.18,8.18c-3.05-0.78-10.3-1.3-10.09,11.2c0,0-0.53,11.06,3.52,11.38c0.5,0.85,1.07,1.6,1.69,2.25
c-0.01,0.72-0.04,1.65-0.08,2.71c-5.32-0.36-14.73-0.08-15.35,6.39c-0.06,0.62,0.12,3.69,0.28,6.2L47.95,48.31z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="360px" height="76px" viewBox="0 0 360 76" enable-background="new 0 0 360 76" xml:space="preserve">
<rect x="0.01" y="0.35" opacity="0.2" fill="#FFFFFF" width="360" height="76"/>
</svg>

After

Width:  |  Height:  |  Size: 557 B

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="360px" height="76px" viewBox="0 0 360 76" enable-background="new 0 0 360 76" xml:space="preserve">
<rect x="0.02" y="0.05" opacity="0.4" fill="#FFFFFF" fill-opacity="0.8" width="360" height="76"/>
<g>
<path fill="#FFFFFF" d="M360.02,0.05v76h-360v-76H360.02 M359.02,1.05h-358v74h358V1.05L359.02,1.05z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 688 B

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="33px" height="33px" viewBox="0 0 33 33" enable-background="new 0 0 33 33" xml:space="preserve">
<g>
<path fill="#29CAF2" d="M33.03,16.58c0,9.11-7.39,16.5-16.5,16.5c-9.12,0-16.5-7.39-16.5-16.5c0-9.11,7.38-16.5,16.5-16.5
C25.63,0.08,33.03,7.47,33.03,16.58z"/>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="16.5249" y1="29.1172" x2="16.5249" y2="4.0435">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.8407" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#D9D9D9"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M16.52,29.12c-6.91,0-12.54-5.62-12.54-12.54c0-6.91,5.62-12.54,12.54-12.54
s12.54,5.62,12.54,12.54C29.06,23.49,23.44,29.12,16.52,29.12L16.52,29.12z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="6.875" y1="9.8242" x2="26.1715" y2="23.3358">
<stop offset="0.1099" style="stop-color:#FFFFFF"/>
<stop offset="0.6978" style="stop-color:#E6E6E6"/>
</linearGradient>
<circle fill="url(#SVGID_2_)" cx="16.52" cy="16.58" r="11.78"/>
<g>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="8.6343" y1="11.1309" x2="24.2014" y2="22.0311">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M16.42,26.08c-5.24,0-9.51-4.26-9.51-9.5c0-5.24,4.26-9.51,9.51-9.51c5.24,0,9.5,4.26,9.5,9.51
C25.92,21.82,21.66,26.08,16.42,26.08L16.42,26.08z"/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="23.0186" y1="22.1201" x2="9.8155" y2="11.0414">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<circle fill="url(#SVGID_4_)" cx="16.42" cy="16.58" r="8.62"/>
<path fill="#FF901F" d="M16.42,24.06c-4.12,0-7.48-3.35-7.48-7.47c0-4.12,3.36-7.48,7.48-7.48c4.12,0,7.47,3.36,7.47,7.48
C23.89,20.7,20.54,24.06,16.42,24.06L16.42,24.06z"/>
<g>
<path fill="#FFD06B" d="M14.09,14.25c2.1-2.1,5.31-2.41,7.75-0.94c-0.26-0.43-0.57-0.84-0.94-1.21c-2.47-2.47-6.49-2.47-8.96,0
c-2.47,2.47-2.47,6.49,0,8.96c0.37,0.37,0.78,0.68,1.21,0.94C11.68,19.56,11.99,16.35,14.09,14.25z"/>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-122.4058" y1="66.873" x2="-127.2734" y2="58.442" gradientTransform="matrix(1 0 0 1 142.3301 -45.0029)">
<stop offset="0" style="stop-color:#FF901F"/>
<stop offset="1" style="stop-color:#FFB81F"/>
</linearGradient>
<path fill="url(#SVGID_5_)" d="M20.9,21.06c2.1-2.1,2.41-5.31,0.94-7.75c-2.43-1.47-5.65-1.16-7.75,0.94
c-2.1,2.1-2.41,5.31-0.94,7.75C15.58,23.47,18.8,23.16,20.9,21.06z"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="33px" height="33px" viewBox="0 0 33 33" enable-background="new 0 0 33 33" xml:space="preserve">
<g>
<circle fill="#29CAF2" cx="16.46" cy="16.52" r="16.5"/>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="16.4624" y1="29.0566" x2="16.4624" y2="3.9829">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.8407" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#D9D9D9"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M16.46,29.06c-6.91,0-12.54-5.62-12.54-12.54c0-6.91,5.62-12.54,12.54-12.54S29,9.61,29,16.52
C29,23.43,23.37,29.06,16.46,29.06L16.46,29.06z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="6.814" y1="9.7637" x2="26.1096" y2="23.2746">
<stop offset="0.1099" style="stop-color:#FFFFFF"/>
<stop offset="0.6978" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_2_)" d="M28.24,16.52c0,6.51-5.27,11.78-11.78,11.78c-6.5,0-11.78-5.27-11.78-11.78
c0-6.5,5.27-11.78,11.78-11.78C22.97,4.74,28.24,10.02,28.24,16.52z"/>
<g>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="8.5713" y1="11.0693" x2="24.1392" y2="21.9701">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M16.36,26.02c-5.24,0-9.51-4.26-9.51-9.5c0-5.24,4.26-9.51,9.51-9.51c5.24,0,9.5,4.27,9.5,9.51
C25.86,21.76,21.6,26.02,16.36,26.02L16.36,26.02z"/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="22.9561" y1="22.0576" x2="9.7545" y2="10.9802">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<circle fill="url(#SVGID_4_)" cx="16.36" cy="16.52" r="8.62"/>
<path fill="#BD0700" d="M16.36,24c-4.12,0-7.48-3.35-7.48-7.48c0-4.12,3.36-7.48,7.48-7.48c4.12,0,7.47,3.36,7.47,7.48
C23.83,20.64,20.48,24,16.36,24L16.36,24z"/>
<g>
<path fill="#F25757" d="M14.03,14.19c2.1-2.1,5.31-2.41,7.75-0.94c-0.26-0.43-0.57-0.84-0.94-1.21c-2.47-2.47-6.49-2.47-8.96,0
c-2.47,2.47-2.47,6.49,0,8.96c0.37,0.37,0.78,0.68,1.21,0.94C11.62,19.5,11.93,16.29,14.03,14.19z"/>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-122.4668" y1="66.8125" x2="-127.3345" y2="58.3814" gradientTransform="matrix(1 0 0 1 142.3301 -45.0029)">
<stop offset="0" style="stop-color:#BD0700"/>
<stop offset="1" style="stop-color:#E35D58"/>
</linearGradient>
<path fill="url(#SVGID_5_)" d="M20.83,21c2.1-2.1,2.41-5.31,0.94-7.75c-2.43-1.47-5.65-1.16-7.75,0.94
c-2.1,2.1-2.41,5.31-0.94,7.75C15.52,23.4,18.74,23.1,20.83,21z"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="33px" height="33px" viewBox="0 0 33 33" enable-background="new 0 0 33 33" xml:space="preserve">
<g>
<path fill="#29CAF2" d="M32.96,16.59c0,9.11-7.39,16.5-16.5,16.5c-9.12,0-16.5-7.39-16.5-16.5c0-9.11,7.38-16.5,16.5-16.5
C25.57,0.09,32.96,7.47,32.96,16.59z"/>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="16.4624" y1="29.123" x2="16.4624" y2="4.0493">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.8407" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#D9D9D9"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M16.46,29.12c-6.91,0-12.54-5.62-12.54-12.54c0-6.91,5.62-12.54,12.54-12.54S29,9.67,29,16.58
C29,23.5,23.37,29.12,16.46,29.12L16.46,29.12z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="6.813" y1="9.8301" x2="26.1095" y2="23.3416">
<stop offset="0.1099" style="stop-color:#FFFFFF"/>
<stop offset="0.6978" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_2_)" d="M28.24,16.58c0,6.51-5.27,11.78-11.78,11.78S4.68,23.09,4.68,16.58c0-6.5,5.27-11.78,11.78-11.78
S28.24,10.08,28.24,16.58z"/>
<g>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="8.5723" y1="11.1362" x2="24.1386" y2="22.0359">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M16.36,26.09c-5.24,0-9.51-4.26-9.51-9.5c0-5.24,4.26-9.51,9.51-9.51c5.24,0,9.5,4.27,9.5,9.51
C25.86,21.83,21.6,26.09,16.36,26.09L16.36,26.09z"/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="22.9561" y1="22.125" x2="9.753" y2="11.0463">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<circle fill="url(#SVGID_4_)" cx="16.35" cy="16.58" r="8.62"/>
<path fill="#09B300" d="M16.36,24.06c-4.12,0-7.48-3.35-7.48-7.48c0-4.12,3.36-7.48,7.48-7.48c4.12,0,7.47,3.36,7.47,7.48
C23.83,20.71,20.48,24.06,16.36,24.06L16.36,24.06z"/>
<g>
<path fill="#57EB51" d="M14.03,14.25c2.1-2.1,5.31-2.41,7.75-0.94c-0.26-0.43-0.57-0.84-0.94-1.21c-2.47-2.47-6.49-2.47-8.96,0
c-2.47,2.47-2.47,6.49,0,8.96c0.37,0.37,0.78,0.68,1.21,0.94C11.62,19.57,11.93,16.35,14.03,14.25z"/>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-122.4678" y1="66.8789" x2="-127.3354" y2="58.4478" gradientTransform="matrix(1 0 0 1 142.3301 -45.0029)">
<stop offset="0" style="stop-color:#09AA00"/>
<stop offset="1" style="stop-color:#4DCC46"/>
</linearGradient>
<path fill="url(#SVGID_5_)" d="M20.83,21.06c2.1-2.1,2.41-5.31,0.94-7.75c-2.43-1.47-5.65-1.16-7.75,0.94
c-2.1,2.1-2.41,5.31-0.94,7.75C15.52,23.47,18.73,23.16,20.83,21.06z"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="16px" height="80px" viewBox="0 0 16 80" enable-background="new 0 0 16 80" xml:space="preserve">
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="0.1045" y1="40.0293" x2="16.1045" y2="40.0293">
<stop offset="0.1099" style="stop-color:#FFFFFF"/>
<stop offset="0.6978" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M12.22,80.03c2.15,0,3.89-1.74,3.89-3.88V3.91c0-2.14-1.74-3.88-3.89-3.88H3.99
c-2.15,0-3.88,1.74-3.88,3.88c0,0,1.94,16.34,1.94,36.4c0,20.06-1.94,35.84-1.94,35.84c0,2.14,1.74,3.88,3.88,3.88H12.22z"/>
<path fill="#29CAF2" d="M12.22,78.09H3.99c-1.04,0-1.89-0.82-1.94-1.84c0.19-1.62,1.94-16.98,1.94-35.94
c0-18.96-1.75-34.84-1.94-36.49c0.05-1.03,0.9-1.85,1.94-1.85h8.23c1.04,0,1.89,0.82,1.94,1.84c-0.19,1.62-0.19,70.78,0,72.42
C14.11,77.27,13.26,78.09,12.22,78.09L12.22,78.09z"/>
<g>
<g>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="10.7334" y1="51.3867" x2="7.417" y2="45.6425">
<stop offset="0" style="stop-color:#E6E6E6"/>
<stop offset="0.6978" style="stop-color:#BFBFBF"/>
<stop offset="1" style="stop-color:#F2F2F2"/>
</linearGradient>
<polygon fill="url(#SVGID_2_)" points="7.42,51.39 5.76,48.52 7.42,45.64 10.73,45.64 12.39,48.52 10.73,51.39 "/>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="10.7344" y1="42.9014" x2="7.4175" y2="37.1563">
<stop offset="0" style="stop-color:#E6E6E6"/>
<stop offset="0.6978" style="stop-color:#BFBFBF"/>
<stop offset="1" style="stop-color:#F2F2F2"/>
</linearGradient>
<polygon fill="url(#SVGID_3_)" points="7.42,42.9 5.76,40.03 7.42,37.16 10.73,37.16 12.39,40.03 10.73,42.9 "/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="10.7334" y1="34.4131" x2="7.4175" y2="28.6697">
<stop offset="0" style="stop-color:#E6E6E6"/>
<stop offset="0.6978" style="stop-color:#BFBFBF"/>
<stop offset="1" style="stop-color:#F2F2F2"/>
</linearGradient>
<polygon fill="url(#SVGID_4_)" points="7.42,34.41 5.76,31.54 7.42,28.67 10.73,28.67 12.39,31.54 10.73,34.41 "/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="7px" height="14px" viewBox="0 0 7 14" enable-background="new 0 0 7 14" xml:space="preserve">
<rect x="0.01" y="0.01" fill="#2BD5FF" width="7" height="14"/>
</svg>

After

Width:  |  Height:  |  Size: 535 B

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="14px" height="24px" viewBox="0 0 14 24" enable-background="new 0 0 14 24" xml:space="preserve">
<g>
<path fill="none" d="M4.92,21.95c-0.28-0.33-0.53-0.67-0.77-1.03C4.39,21.28,4.64,21.63,4.92,21.95z"/>
<path fill="none" d="M2.11,15.42c-0.05-0.46-0.09-0.92-0.09-1.39C2.02,14.5,2.06,14.97,2.11,15.42z"/>
<path fill="none" d="M4.08,20.82c-0.23-0.35-0.45-0.71-0.64-1.08C3,18.9,2.65,18.01,2.41,17.07C2.76,18.43,3.33,19.7,4.08,20.82z"
/>
<path fill="none" d="M2.37,16.92c-0.09-0.38-0.16-0.77-0.22-1.17C2.21,16.14,2.28,16.54,2.37,16.92z"/>
<path fill="#29CAF2" d="M4.13,20.82c-0.74-1.13-1.3-2.39-1.64-3.75c-0.01-0.05-0.02-0.1-0.04-0.16c-0.09-0.38-0.16-0.77-0.22-1.17
c-0.01-0.11-0.03-0.22-0.04-0.33c-0.05-0.46-0.08-0.92-0.08-1.39c0-6.63,5.57-12,11.86-12l0,0v-2h-2.61
c-6.29,0-11.39,5.37-11.39,12c0,4.13,1.98,7.76,4.99,9.92c-0.27-0.33-0.52-0.67-0.76-1.03C4.17,20.89,4.15,20.86,4.13,20.82z"/>
<path fill="#80E6FF" d="M10.17,22.03c-2.5,0-4.8-0.86-6.68-2.29c0.19,0.37,0.41,0.73,0.63,1.08c0.02,0.03,0.04,0.07,0.07,0.1
c0.24,0.36,0.49,0.7,0.76,1.03c1.82,1.31,4.03,2.08,6.4,2.08h2.61v-2H10.17z"/>
<path fill="#80E6FF" d="M4.08,20.82c0.02,0.04,0.04,0.07,0.07,0.1C4.12,20.89,4.1,20.86,4.08,20.82z"/>
<path fill="#2BD5FF" d="M13.97,2.03c-6.29,0-11.86,5.37-11.86,12c0,0.47,0.03,0.93,0.08,1.39c0.01,0.11,0.03,0.22,0.04,0.33
c0.06,0.4,0.12,0.79,0.22,1.17c0.01,0.05,0.02,0.1,0.04,0.16c0.24,0.94,0.58,1.83,1.01,2.67c1.88,1.44,4.18,2.29,6.68,2.29h3.8
V2.03L13.97,2.03z"/>
<path fill="#2BD5FF" d="M2.41,17.07c-0.01-0.05-0.02-0.1-0.04-0.16C2.39,16.97,2.4,17.02,2.41,17.07z"/>
<path fill="#2BD5FF" d="M2.15,15.75c-0.01-0.11-0.03-0.22-0.04-0.33C2.12,15.53,2.14,15.64,2.15,15.75z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="10px" height="24px" viewBox="0 0 10 24" enable-background="new 0 0 10 24" xml:space="preserve">
<g>
<rect y="1" fill="#2BD5FF" width="10" height="22"/>
<rect fill="#29CAF2" width="10" height="2"/>
<rect y="22" fill="#80E6FF" width="10" height="2"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 636 B

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="14px" height="24px" viewBox="0 0 14 24" enable-background="new 0 0 14 24" xml:space="preserve">
<g>
<path fill="#29CAF2" d="M4.59,2C7,2,9.25,2.77,11.1,4.08C8.98,1.58,5.88,0,2.42,0H0v2H4.59z"/>
<path fill="#80E6FF" d="M11.6,4.71c0.76,1.6,1.2,3.39,1.2,5.29c0,6.63-5.19,12-11.59,12H0v2h2.41C8.82,24,14,18.63,14,12
C14,9.25,13.1,6.73,11.6,4.71z"/>
<path fill="#2BD5FF" d="M0,2v20h1.21c6.4,0,11.59-5.37,11.59-12c0-1.9-0.44-3.69-1.2-5.29c-0.16-0.22-0.32-0.43-0.5-0.64
C9.25,2.77,7,2,4.59,2H0z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 881 B

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 147 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 270 KiB

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="68px" height="68px" viewBox="0 0 68 68" enable-background="new 0 0 68 68" xml:space="preserve">
<g>
<path fill="#29CAF2" d="M68.03,63.85c0,2.35-1.9,4.25-4.25,4.25H4.28c-2.35,0-4.25-1.9-4.25-4.25V4.35C0.03,2,1.94,0.1,4.28,0.1
h59.5c2.35,0,4.25,1.9,4.25,4.25V63.85z"/>
<g>
<rect x="4.35" y="4.89" fill="#2BD5FF" width="58.44" height="58.44"/>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="8.9175" y1="36.4287" x2="62.7471" y2="36.4287">
<stop offset="0.1538" style="stop-color:#27C0E6"/>
<stop offset="0.4396" style="stop-color:#25B7DB"/>
<stop offset="0.7253" style="stop-color:#22A5C4"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M62.65,63.24c0.15-4.38,0.2-10.69-0.56-11.92c-3.75-6.06-15.11-4.72-18.33-4.21
c0-1.52-0.01-2.86-0.02-3.88c0.66-0.68,1.26-1.46,1.81-2.31l0.08,0.25c4.67,0.67,5.26-14.6,5.26-14.6
C51.22,4.85,37.65,9.83,35.49,10.76c-3.99-1.01-13.46-1.7-13.19,14.65c0,0-0.69,14.47,4.61,14.88c0.65,1.11,1.4,2.09,2.21,2.94
c-0.01,0.94-0.05,2.15-0.1,3.54c-6.95-0.48-19.27-0.11-20.08,8.36c-0.08,0.82,0.15,4.82,0.36,8.11L62.65,63.24z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="38px" height="38px" viewBox="0 0 38 38" enable-background="new 0 0 38 38" xml:space="preserve">
<g>
<circle fill="#29CAF2" cx="19.08" cy="19.08" r="19"/>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="19.0747" y1="31.4219" x2="19.0747" y2="6.7417">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.8407" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#D9D9D9"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M19.08,31.42c-6.8,0-12.34-5.54-12.34-12.34c0-6.8,5.54-12.34,12.34-12.34
c6.8,0,12.34,5.54,12.34,12.34C31.41,25.88,25.88,31.42,19.08,31.42L19.08,31.42z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="9.5791" y1="12.4316" x2="28.57" y2="25.7292">
<stop offset="0.1099" style="stop-color:#FFFFFF"/>
<stop offset="0.6978" style="stop-color:#E6E6E6"/>
</linearGradient>
<circle fill="url(#SVGID_2_)" cx="19.07" cy="19.08" r="11.59"/>
<g>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="11.3086" y1="13.7173" x2="26.6309" y2="24.4461">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M18.97,28.44c-5.16,0-9.36-4.19-9.36-9.35c0-5.16,4.2-9.36,9.36-9.36c5.16,0,9.35,4.2,9.35,9.36
C28.32,24.24,24.13,28.44,18.97,28.44L18.97,28.44z"/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="25.4668" y1="24.5332" x2="12.4717" y2="13.629">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<circle fill="url(#SVGID_4_)" cx="18.97" cy="19.08" r="8.48"/>
<path fill="#FF901F" d="M18.97,26.44c-4.06,0-7.36-3.3-7.36-7.36c0-4.06,3.3-7.36,7.36-7.36c4.06,0,7.36,3.3,7.36,7.36
C26.33,23.14,23.03,26.44,18.97,26.44L18.97,26.44z"/>
<g>
<path fill="#FFD06B" d="M16.68,16.79c2.07-2.07,5.23-2.37,7.63-0.92c-0.25-0.42-0.56-0.83-0.93-1.19
c-2.43-2.43-6.39-2.43-8.82,0c-2.43,2.43-2.43,6.39,0,8.82c0.37,0.37,0.77,0.67,1.19,0.92C14.3,22.02,14.61,18.85,16.68,16.79z"
/>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-119.9077" y1="69.291" x2="-124.6987" y2="60.9927" gradientTransform="matrix(1 0 0 1 142.3301 -45.0029)">
<stop offset="0" style="stop-color:#FF901F"/>
<stop offset="1" style="stop-color:#FFB81F"/>
</linearGradient>
<path fill="url(#SVGID_5_)" d="M23.38,23.49c2.07-2.07,2.37-5.23,0.93-7.63c-2.4-1.45-5.56-1.14-7.63,0.92
c-2.07,2.07-2.37,5.23-0.92,7.63C18.15,25.86,21.31,25.55,23.38,23.49z"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="38px" height="38px" viewBox="0 0 38 38" enable-background="new 0 0 38 38" xml:space="preserve">
<g>
<circle fill="#29CAF2" cx="19.08" cy="19.09" r="19"/>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="19.0757" y1="31.4287" x2="19.0757" y2="6.7485">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.8407" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#D9D9D9"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M19.08,31.43c-6.8,0-12.34-5.54-12.34-12.34c0-6.8,5.54-12.34,12.34-12.34s12.34,5.54,12.34,12.34
C31.42,25.89,25.88,31.43,19.08,31.43L19.08,31.43z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="9.5801" y1="12.439" x2="28.5702" y2="25.736">
<stop offset="0.1099" style="stop-color:#FFFFFF"/>
<stop offset="0.6978" style="stop-color:#E6E6E6"/>
</linearGradient>
<circle fill="url(#SVGID_2_)" cx="19.07" cy="19.09" r="11.59"/>
<g>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="11.3101" y1="13.7241" x2="26.6308" y2="24.4518">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M18.97,28.44c-5.16,0-9.36-4.2-9.36-9.35c0-5.16,4.2-9.36,9.36-9.36c5.16,0,9.35,4.2,9.35,9.36
C28.32,24.25,24.13,28.44,18.97,28.44L18.97,28.44z"/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="25.4678" y1="24.54" x2="12.4734" y2="13.6365">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<circle fill="url(#SVGID_4_)" cx="18.97" cy="19.09" r="8.48"/>
<path fill="#BD0700" d="M18.97,26.45c-4.06,0-7.36-3.3-7.36-7.36s3.3-7.36,7.36-7.36c4.06,0,7.36,3.3,7.36,7.36
S23.03,26.45,18.97,26.45L18.97,26.45z"/>
<g>
<path fill="#F25757" d="M16.68,16.79c2.07-2.07,5.23-2.37,7.63-0.92c-0.25-0.42-0.56-0.83-0.92-1.19
c-2.43-2.43-6.39-2.43-8.82,0c-2.43,2.43-2.43,6.39,0,8.82c0.37,0.37,0.77,0.67,1.19,0.92C14.3,22.02,14.61,18.86,16.68,16.79z"
/>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-119.9072" y1="69.2979" x2="-124.6982" y2="60.9996" gradientTransform="matrix(1 0 0 1 142.3301 -45.0029)">
<stop offset="0" style="stop-color:#BD0700"/>
<stop offset="1" style="stop-color:#E35D58"/>
</linearGradient>
<path fill="url(#SVGID_5_)" d="M23.38,23.5c2.07-2.07,2.37-5.23,0.92-7.63c-2.4-1.45-5.56-1.14-7.63,0.92
c-2.07,2.07-2.37,5.23-0.92,7.63C18.15,25.86,21.31,25.56,23.38,23.5z"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="38px" height="38px" viewBox="0 0 38 38" enable-background="new 0 0 38 38" xml:space="preserve">
<g>
<circle fill="#29CAF2" cx="19.07" cy="19.08" r="19"/>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="19.0737" y1="31.4219" x2="19.0737" y2="6.7417">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.8407" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#D9D9D9"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M19.07,31.42c-6.8,0-12.34-5.54-12.34-12.34c0-6.8,5.54-12.34,12.34-12.34s12.34,5.54,12.34,12.34
C31.41,25.88,25.88,31.42,19.07,31.42L19.07,31.42z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="9.5786" y1="12.4321" x2="28.5695" y2="25.7297">
<stop offset="0.1099" style="stop-color:#FFFFFF"/>
<stop offset="0.6978" style="stop-color:#E6E6E6"/>
</linearGradient>
<circle fill="url(#SVGID_2_)" cx="19.07" cy="19.08" r="11.59"/>
<g>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="11.3086" y1="13.7178" x2="26.6293" y2="24.4454">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M18.97,28.44c-5.16,0-9.36-4.19-9.36-9.35c0-5.16,4.2-9.36,9.36-9.36s9.35,4.2,9.35,9.36
C28.32,24.24,24.13,28.44,18.97,28.44L18.97,28.44z"/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="25.4648" y1="24.5322" x2="12.4713" y2="13.6293">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<circle fill="url(#SVGID_4_)" cx="18.97" cy="19.08" r="8.48"/>
<path fill="#09B300" d="M18.97,26.44c-4.06,0-7.36-3.3-7.36-7.36c0-4.06,3.3-7.36,7.36-7.36c4.06,0,7.36,3.3,7.36,7.36
C26.33,23.14,23.03,26.44,18.97,26.44L18.97,26.44z"/>
<g>
<path fill="#57EB51" d="M16.68,16.79c2.07-2.07,5.23-2.37,7.62-0.92c-0.25-0.42-0.56-0.83-0.92-1.19
c-2.43-2.43-6.39-2.43-8.82,0c-2.43,2.43-2.43,6.39,0,8.82c0.37,0.37,0.77,0.67,1.19,0.93C14.3,22.02,14.61,18.85,16.68,16.79z"
/>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-119.9087" y1="69.292" x2="-124.6997" y2="60.9937" gradientTransform="matrix(1 0 0 1 142.3301 -45.0029)">
<stop offset="0" style="stop-color:#09AA00"/>
<stop offset="1" style="stop-color:#4DCC46"/>
</linearGradient>
<path fill="url(#SVGID_5_)" d="M23.38,23.49c2.07-2.07,2.37-5.23,0.92-7.63c-2.39-1.45-5.56-1.14-7.62,0.92
c-2.07,2.07-2.37,5.23-0.93,7.63C18.15,25.86,21.31,25.55,23.38,23.49z"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,62 @@
+30
+31
+32
+33
+34
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+36
+3
+370
+371
+372
+373
+374
+375
+376
+377
+377 44
+378
+379
+38
+380
+381
+382
+383
+384
+385
+386
+386 49
+387
+388
+388 3
+389
+39
+40
+41
+42
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+43
+44
+45
+46
+47
+48
+49

View File

@ -0,0 +1,100 @@
Aida
Aija
Aila
Aili
Ailikki
Aimi
Aina
Alexia
Alice
Amanda
Amber
Amy
Angela
Angelica
Ann
Beth
Brenda
Brooke
Caitlin
Camilla
Camille
Carmen
Cassandra
Catherine
Edna
Eeva
Eeve
Eevi
Eija
Eila
Eimi
Eleanor
Eleonora
Elizabeth
Ellen
Enna
Enni
Erica
Erika
Erja
Essi
Essie
Heini
Heleena
Helen
Helena
Helene
Helga
Hilja
Hilkka
Hille
Hillervo
Hillevi
Hilma
Irene
Irina
Irja
Irma
Irmeli
Iro
Jacqueline
Jane
Jennifer
Jenny
Jessica
Jill
Kaire
Kaisa
Kaisla
Kaisu
Katarine
Kate
Kate
Kateriina
Katharina
Katharine
Katherine
Kathleen
Marge
Mary
May
Megan
Melinda
Morgan
Nellie
Nelly
Pauline
Peggy
Pepi
Scarlett
Sheila
Shirley
Sissy
Stephanie
Sylvia
Taylor
Terrie
Terry
Victoria
Violet

View File

@ -0,0 +1,100 @@
Aabraham
Aadam
Aadolf
Aake
Aaku
Aatu
Ahti
Ahvo
Aimo
Aki
Akseli
Aku
Bartholomew
Ben
Benjamin
Bill
Billie
Billy
Bob
Brendan
Brian
Bryan
Calvin
Carl
Charles
Chester
Chris
Christian
Christopher
Chuck
Dale
Dave
David
Dennis
Dick
Dominick
Donald
Dustin
Dusty
Harri
Heikki
Heimo
Heino
Helmer
Helmeri
Hemmi
Hemmo
Henri
Jeff
Jeffrey
Jermu
Jero
Jerri
Jerry
Jesper
Jesperi
Jesse
Jetro
Jim
Jimi
Jimmy
Joakim
Joe
John
Johnny
Jonah
Jonathan
Joseph
Leevi
Leimo
Leimu
Leino
Leivo
Lenne
Lennu
Mark
Martin
Matt
Matthew
Michael
Mike
Niko
Nooa
Nuutti
Nyyrikki
Okke
Okko
Olavi
Oliver
Olli
Onni
Pertti
Perttu
Walter
Warren
Wesley
William
Willie
Winston
Woodrow

View File

@ -0,0 +1,150 @@
Adams
Allen
Anderson
Bailey
Baker
Barnes
Bell
Bennett
Brooks
Brown
Butler
Campbell
Carter
Clark
Collins
Cook
Cooper
Cox
Cruz
Davis
D<EFBFBD>az
Edwards
Evans
Fisher
Flores
Foster
Garc<EFBFBD>a
G<EFBFBD>mez
Gonz<EFBFBD>lez
Gray
Green
Guti<EFBFBD>rrez
Hall
Harris
Heikkinen
Helenius
Helve
Hern<EFBFBD>ndez
Hill
Hiltunen
Hirvonen
Holm
Honkanen
Howard
Hughes
Huhtala
Huttunen
Hypp<EFBFBD>nen
Jackson
James
Jenkins
Johnson
Jones
Kauppinen
Kelly
Kemppainen
King
Klemetti
Kokkonen
Kolehmainen
Korhonen
Kurikka
Kuura
Kyr<EFBFBD>
K<EFBFBD>rkk<EFBFBD>inen
Lee
Lewis
Long
L<EFBFBD>pez
Martikainen
Martin
Mart<EFBFBD>nez
Mattila
Mikkola
Mikkonen
Miller
Mitchell
Moore
Morales
Morgan
Morris
Muje
Murphy
Mustonen
Myers
Myll<EFBFBD>rinen
M<EFBFBD>enp<EFBFBD><EFBFBD>
M<EFBFBD>kel<EFBFBD>
M<EFBFBD>kinen
Nelson
Nguyen
Ortiz
Parker
P<EFBFBD>rez
Perry
Peterson
Phillips
Powell
Price
Ram<EFBFBD>rez
Reed
Reyes
Richardson
Rivera
Roberts
Robinson
Rodr<EFBFBD>guez
Rogers
Ross
Russell
Saarinen
Saaristo
Salminen
Salo
Salonen
S<EFBFBD>nchez
Sanders
Scott
Sepp<EFBFBD>nen
Silvennoinen
Silvo
Smith
Sokura
Stewart
Sullivan
Suomalainen
Taylor
Thomas
Thompson
Torres
Turner
Valkeap<EFBFBD><EFBFBD>
Walker
Valo
Valtonen
Vanhanen
Ward
Watson
Ven<EFBFBD>l<EFBFBD>inen
Vesa
White
Vihavainen
Williams
Wilson
Virtanen
Wood
Voutilainen
Wright
Vuorela
Young

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="360px" height="640px" viewBox="0 0 360 640" enable-background="new 0 0 360 640" xml:space="preserve">
<g>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="180.5498" y1="640.4805" x2="180.5498" y2="0.4805">
<stop offset="0" style="stop-color:#9EFF78"/>
<stop offset="0.3626" style="stop-color:#46F200"/>
<stop offset="1" style="stop-color:#3AC900"/>
</linearGradient>
<rect x="0.55" y="0.48" fill="url(#SVGID_1_)" width="360" height="640"/>
</g>
</g>
<g>
<path opacity="0.5" fill="#3FD900" enable-background="new " d="M81.87,177.64c-26.04,112.67-2.73,201.9,36.7,294.07
c29.47,68.89,20.63,130.26,7.36,168.61H0.55V0.53h174.27C157.12,65.8,96.34,115.02,81.87,177.64z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="458.8857" y1="1985.248" x2="-180.46" y2="1985.248" gradientTransform="matrix(0 -1 0.7343 0 -1400.0699 459.4961)">
<stop offset="0" style="stop-color:#9EFF78"/>
<stop offset="0.3626" style="stop-color:#46F200"/>
<stop offset="1" style="stop-color:#3AC900"/>
</linearGradient>
<path opacity="0.5" fill="url(#SVGID_2_)" enable-background="new " d="M102.88,480.39c25.66,64.29,6.13,119.47-25.71,159.56
H0.69V536.03c32.62-1.35,73.55,32.06,82.03-30.04c6.33-46.35-59-157.3-41.01-287.49c6.61-47.82,9.32-133.33-6.81-217.89h72.92
C92.79,58.16,62.46,114.8,49.63,219.24C41.9,282.07,51.58,351.9,102.88,480.39z"/>
<path opacity="0.5" fill="#3FD900" enable-background="new " d="M279.23,463.41c26.04-112.67,2.74-201.9-36.7-294.07
c-29.47-68.89-20.63-130.26-7.36-168.61h125.38v639.81H186.27C215.23,586.79,264.76,526.04,279.23,463.41z"/>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="655.6582" y1="83.9292" x2="16.3125" y2="83.9291" gradientTransform="matrix(0 1 -0.7343 0 366.7535 -15.209)">
<stop offset="0" style="stop-color:#9EFF78"/>
<stop offset="0.3626" style="stop-color:#46F200"/>
<stop offset="1" style="stop-color:#3AC900"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M258.22,160.67C232.57,96.37,268.5-25.81,330.4,63.01l30-61.91V158.9
c0-79.74-73.55-85.93-82.03-23.82c-6.33,46.35,59,157.3,41.01,287.49c-6.61,47.82-9.32,133.33,6.81,217.89h-72.92
c15.02-57.56,45.35-114.2,58.18-218.63C319.2,358.99,309.51,289.15,258.22,160.67z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="640px" height="360px" viewBox="0 0 640 360" enable-background="new 0 0 640 360" xml:space="preserve">
<g>
<g>
<rect x="0.02" y="0.02" fill="#FFFFFF" width="640" height="360"/>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="320.0181" y1="358.0205" x2="320.018" y2="2.0205">
<stop offset="0" style="stop-color:#9EFF78"/>
<stop offset="0.3626" style="stop-color:#46F200"/>
<stop offset="1" style="stop-color:#3AC900"/>
</linearGradient>
<polygon fill="url(#SVGID_1_)" points="638.02,358.02 2.02,358.02 2.02,2.02 638.02,2.02 638.02,358.02 "/>
</g>
<path opacity="0.5" fill="#3FD900" d="M144.17,100.86c-45.53,62.62-4.77,112.21,64.16,163.44c51.53,38.29,36.07,72.4,12.87,93.71
H2.03V2.42h304.66C275.74,38.7,169.48,66.06,144.17,100.86z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="507.0713" y1="-1386.6294" x2="151.7412" y2="-1386.6294" gradientTransform="matrix(0 -1 -0.7343 0 -916.2726 509.4961)">
<stop offset="0" style="stop-color:#9EFF78"/>
<stop offset="0.3626" style="stop-color:#46F200"/>
<stop offset="1" style="stop-color:#3AC900"/>
</linearGradient>
<path opacity="0.5" fill="url(#SVGID_2_)" d="M180.9,269.08c44.86,35.73,10.73,66.4-44.95,88.68H2.28V300
c57.02-0.75,128.57,17.82,143.4-16.7c11.07-25.76-103.15-87.42-71.7-159.78C85.52,96.94,90.26,49.41,62.07,2.42h127.46
c-26.25,31.99-79.27,63.47-101.71,121.51C74.31,158.85,91.24,197.67,180.9,269.08z"/>
<path opacity="0.5" fill="#3FD900" d="M495.59,259.17c45.54-62.62,4.77-112.21-64.15-163.44c-51.53-38.29-36.07-72.4-12.87-93.71
h219.17l0,355.59H333.07C383.69,327.74,470.28,293.98,495.59,259.17z"/>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="499.5596" y1="193.2451" x2="144.2295" y2="193.2451" gradientTransform="matrix(0 1 0.7343 0 398.9562 -142.209)">
<stop offset="0" style="stop-color:#9EFF78"/>
<stop offset="0.3626" style="stop-color:#46F200"/>
<stop offset="1" style="stop-color:#3AC900"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M458.86,90.7C414,54.97,476.82-12.94,585.04,36.43l52.45-34.41v87.7
c0-44.32-128.57-47.76-143.4-13.24c-11.07,25.76,103.15,87.42,71.7,159.78c-11.55,26.57-16.29,74.11,11.91,121.09H450.24
c26.25-31.99,79.27-63.47,101.71-121.51C565.45,200.92,548.52,162.11,458.86,90.7z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="53px" height="53px" viewBox="0 0 53 53" enable-background="new 0 0 53 53" xml:space="preserve">
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="26.4878" y1="53.0156" x2="26.4878" y2="0.0156">
<stop offset="0" style="stop-color:#8BF261"/>
<stop offset="0.1255" style="stop-color:#7AE74D"/>
<stop offset="0.3699" style="stop-color:#5DD62C"/>
<stop offset="0.6034" style="stop-color:#49C914"/>
<stop offset="0.8191" style="stop-color:#3CC205"/>
<stop offset="1" style="stop-color:#38BF00"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M-0.01,49.7c0,1.83,1.48,3.31,3.31,3.31h46.38c1.83,0,3.31-1.48,3.31-3.31V3.33
c0-1.83-1.48-3.31-3.31-3.31H3.3c-1.83,0-3.31,1.48-3.31,3.31V49.7z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="26.4878" y1="50.6777" x2="26.4878" y2="2.354">
<stop offset="0" style="stop-color:#3ED900"/>
<stop offset="0.3899" style="stop-color:#3DD500"/>
<stop offset="0.7931" style="stop-color:#3AC800"/>
<stop offset="1" style="stop-color:#38BF00"/>
</linearGradient>
<path fill="url(#SVGID_2_)" d="M2.33,49.7c0,0.54,0.44,0.98,0.97,0.98h46.38l0,0c0.54,0,0.97-0.44,0.97-0.98V3.33
c0-0.54-0.44-0.97-0.97-0.97H3.3c-0.54,0-0.97,0.44-0.97,0.97V49.7z"/>
<path fill="#43EB00" d="M45.55,50.68c0.11-8.96,0.14-13.45-0.4-14.33c-2.67-4.31-10.75-3.36-13.04-2.99c0-1.08-0.01-2.04-0.01-2.76
c0.47-0.49,0.9-1.04,1.29-1.64l0.06,0.18c3.33,0.47,3.74-10.39,3.74-10.39C37.41,3.29,27.75,6.83,26.22,7.49
c-2.84-0.72-9.58-1.21-9.39,10.43c0,0-0.49,10.29,3.28,10.59c0.46,0.79,0.99,1.49,1.58,2.09c-0.01,0.67-0.04,1.53-0.07,2.52
c-4.95-0.34-13.71-0.08-14.29,5.95c-0.05,0.58,0.11,3.43,0.26,11.62H45.55z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="53px" height="53px" viewBox="0 0 53 53" enable-background="new 0 0 53 53" xml:space="preserve">
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="26.5083" y1="53.0332" x2="26.5083" y2="0.0342">
<stop offset="0" style="stop-color:#8BF261"/>
<stop offset="0.1471" style="stop-color:#A7F587"/>
<stop offset="0.3385" style="stop-color:#C6F9B2"/>
<stop offset="0.5243" style="stop-color:#DFFBD3"/>
<stop offset="0.7006" style="stop-color:#F1FDEB"/>
<stop offset="0.8635" style="stop-color:#FBFFFA"/>
<stop offset="1" style="stop-color:#FFFFFF"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M0.01,49.72c0,1.83,1.48,3.31,3.31,3.31H49.7c1.83,0,3.31-1.48,3.31-3.31V3.35
c0-1.83-1.48-3.31-3.31-3.31H3.32c-1.83,0-3.31,1.48-3.31,3.31V49.72z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="26.5083" y1="50.6963" x2="26.5083" y2="2.3726">
<stop offset="0" style="stop-color:#3ED900"/>
<stop offset="0.3899" style="stop-color:#3DD500"/>
<stop offset="0.7931" style="stop-color:#3AC800"/>
<stop offset="1" style="stop-color:#38BF00"/>
</linearGradient>
<path fill="url(#SVGID_2_)" d="M2.35,49.72c0,0.54,0.44,0.98,0.97,0.98H49.7l0,0c0.54,0,0.97-0.44,0.97-0.98V3.35
c0-0.54-0.44-0.97-0.97-0.97H3.32c-0.54,0-0.97,0.44-0.97,0.97V49.72z"/>
<path fill="#43EB00" d="M45.57,50.7c0.11-8.96,0.14-13.45-0.4-14.33c-2.67-4.31-10.75-3.36-13.04-2.99c0-1.09-0.01-2.04-0.01-2.76
c0.47-0.49,0.9-1.04,1.29-1.64l0.06,0.17c3.33,0.47,3.74-10.39,3.74-10.39C37.43,3.3,27.77,6.85,26.24,7.51
c-2.84-0.72-9.58-1.21-9.39,10.43c0,0-0.49,10.29,3.28,10.59c0.46,0.79,0.99,1.49,1.58,2.09c-0.01,0.67-0.04,1.53-0.07,2.52
c-4.95-0.34-13.71-0.08-14.29,5.95C7.29,39.66,7.45,42.51,7.6,50.7L45.57,50.7z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="360px" height="76px" viewBox="0 0 360 76" enable-background="new 0 0 360 76" xml:space="preserve">
<rect x="0.01" y="0.35" opacity="0.2" fill="#FFFFFF" width="360" height="76"/>
</svg>

After

Width:  |  Height:  |  Size: 557 B

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="357px" height="80px" viewBox="0 0 357 80" enable-background="new 0 0 357 80" xml:space="preserve">
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="8.300781e-03" y1="40.0156" x2="357.0078" y2="40.0156">
<stop offset="0" style="stop-color:#46F200"/>
<stop offset="1" style="stop-color:#94FF69"/>
</linearGradient>
<rect x="0.01" y="0.02" fill="url(#SVGID_1_)" width="357" height="80"/>
</svg>

After

Width:  |  Height:  |  Size: 784 B

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="27px" height="47px" viewBox="0 0 27 47" enable-background="new 0 0 27 47" xml:space="preserve">
<g>
<path opacity="0.2" fill="#FFFFFF" d="M0.04,0.04c15.51,0,27,10.52,27,23.5c0,12.98-11.49,23.5-27,23.5V0.04z"/>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-18.8911" y1="23.5415" x2="18.8759" y2="23.5415">
<stop offset="0" style="stop-color:#3ED900"/>
<stop offset="1" style="stop-color:#38BF00"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M18.88,23.54C18.88,13,10.45,4.45,0.04,4.43v6.7c6.74,0.03,12.22,5.58,12.22,12.41
S6.78,35.93,0.04,35.96v6.7C10.45,42.63,18.88,34.08,18.88,23.54z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="6.1475" y1="35.9551" x2="6.1475" y2="11.1284">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.8407" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#D9D9D9"/>
</linearGradient>
<path fill="url(#SVGID_2_)" d="M11.51,23.54c0,6.43-5.13,11.64-11.48,11.66v0.75c6.74-0.02,12.22-5.58,12.22-12.41
S6.78,11.15,0.04,11.13v0.75C6.38,11.91,11.51,17.12,11.51,23.54z"/>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="-8.9409" y1="16.0107" x2="10.0672" y2="29.3204">
<stop offset="0.1099" style="stop-color:#FFFFFF"/>
<stop offset="0.6978" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M11.51,23.54c0-6.43-5.13-11.64-11.48-11.66v2.25c5.06,0.08,9.15,4.27,9.15,9.41
c0,5.14-4.09,9.32-9.15,9.4v2.25C6.38,35.18,11.51,29.97,11.51,23.54z"/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="-7.3013" y1="17.4404" x2="8.0348" y2="28.1788">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_4_)" d="M8.32,23.54c0,4.66-3.7,8.44-8.28,8.53v0.88c5.06-0.08,9.15-4.26,9.15-9.4
c0-5.14-4.09-9.32-9.15-9.41v0.88C4.62,15.1,8.32,18.88,8.32,23.54z"/>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="7.0356" y1="28.2002" x2="-5.98" y2="17.2788">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_5_)" d="M8.32,23.54c0-4.66-3.7-8.44-8.28-8.52v1.13C4,16.23,7.2,19.51,7.2,23.54
c0,4.03-3.2,7.31-7.16,7.39v1.13C4.62,31.99,8.32,28.2,8.32,23.54z"/>
<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="0.0371" y1="23.542" x2="7.2012" y2="23.542">
<stop offset="0" style="stop-color:#FF901F"/>
<stop offset="1" style="stop-color:#FFB81F"/>
</linearGradient>
<path fill="url(#SVGID_6_)" d="M4.27,19.1c0.36,0.37,0.67,0.77,0.92,1.2c1.44,2.41,1.13,5.6-0.92,7.67
c-1.17,1.18-2.7,1.77-4.23,1.81v1.15C4,30.86,7.2,27.57,7.2,23.54c0-4.03-3.2-7.32-7.16-7.4v1.13C1.57,17.31,3.1,17.92,4.27,19.1z
"/>
<path fill="#FFD06B" d="M5.19,20.3c-0.25-0.43-0.56-0.83-0.92-1.2c-1.17-1.18-2.7-1.79-4.23-1.83v2.46
C1.74,19.17,3.62,19.35,5.19,20.3z"/>
<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="-137.9243" y1="73.1523" x2="-142.7352" y2="64.8197" gradientTransform="matrix(1 0 0 1 142.3301 -45.0029)">
<stop offset="0" style="stop-color:#FF901F"/>
<stop offset="1" style="stop-color:#FFB81F"/>
</linearGradient>
<path fill="url(#SVGID_7_)" d="M5.19,20.3c-1.56-0.96-3.45-1.14-5.15-0.57v10.05c1.54-0.04,3.06-0.62,4.23-1.81
C6.32,25.9,6.62,22.71,5.19,20.3z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="27px" height="47px" viewBox="0 0 27 47" enable-background="new 0 0 27 47" xml:space="preserve">
<g>
<path opacity="0.2" fill="#FFFFFF" d="M0.04,0.04c15.51,0,27,10.52,27,23.5c0,12.98-11.49,23.5-27,23.5V0.04z"/>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-18.8911" y1="23.542" x2="18.8759" y2="23.542">
<stop offset="0" style="stop-color:#3ED900"/>
<stop offset="1" style="stop-color:#38BF00"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M18.88,23.54C18.88,13,10.45,4.45,0.04,4.43v6.7c6.74,0.03,12.22,5.58,12.22,12.41
c0,6.83-5.48,12.39-12.22,12.41v6.7C10.45,42.63,18.88,34.08,18.88,23.54z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="6.1475" y1="35.9551" x2="6.1475" y2="11.1289">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.8407" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#D9D9D9"/>
</linearGradient>
<path fill="url(#SVGID_2_)" d="M11.51,23.54c0,6.43-5.13,11.64-11.48,11.66v0.75c6.74-0.03,12.22-5.58,12.22-12.41
c0-6.83-5.48-12.39-12.22-12.41v0.75C6.38,11.91,11.51,17.12,11.51,23.54z"/>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="-8.9409" y1="16.0107" x2="10.0672" y2="29.3204">
<stop offset="0.1099" style="stop-color:#FFFFFF"/>
<stop offset="0.6978" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M11.51,23.54c0-6.43-5.13-11.64-11.48-11.66v2.25c5.06,0.08,9.15,4.27,9.15,9.41
c0,5.14-4.09,9.32-9.15,9.4v2.25C6.38,35.18,11.51,29.97,11.51,23.54z"/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="-7.3013" y1="17.4409" x2="8.0348" y2="28.1793">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_4_)" d="M8.32,23.54c0,4.66-3.7,8.44-8.28,8.53v0.88c5.06-0.08,9.15-4.27,9.15-9.4
c0-5.14-4.09-9.32-9.15-9.41v0.88C4.62,15.1,8.32,18.88,8.32,23.54z"/>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="7.0361" y1="28.2012" x2="-5.9795" y2="17.2798">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_5_)" d="M8.32,23.54c0-4.66-3.7-8.44-8.28-8.52v1.13C4,16.23,7.2,19.51,7.2,23.54
c0,4.03-3.2,7.31-7.16,7.39v1.13C4.62,31.99,8.32,28.2,8.32,23.54z"/>
<path fill="#BD0700" d="M4.27,19.1c0.36,0.37,0.67,0.77,0.92,1.2c1.44,2.41,1.13,5.6-0.92,7.67c-1.17,1.19-2.7,1.77-4.23,1.81
v1.15C4,30.86,7.2,27.57,7.2,23.54c0-4.03-3.2-7.32-7.16-7.4v1.13C1.57,17.31,3.1,17.92,4.27,19.1z"/>
<path fill="#F25757" d="M5.19,20.3c-0.25-0.43-0.56-0.83-0.92-1.2c-1.17-1.18-2.7-1.79-4.23-1.83v2.46
C1.74,19.17,3.62,19.35,5.19,20.3z"/>
<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="-137.9243" y1="73.1533" x2="-142.7357" y2="64.8198" gradientTransform="matrix(1 0 0 1 142.3301 -45.0029)">
<stop offset="0" style="stop-color:#BD0700"/>
<stop offset="1" style="stop-color:#E35D58"/>
</linearGradient>
<path fill="url(#SVGID_6_)" d="M5.19,20.3c-1.56-0.96-3.45-1.14-5.15-0.57v10.05c1.54-0.04,3.06-0.62,4.23-1.81
C6.32,25.9,6.62,22.72,5.19,20.3z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="27px" height="47px" viewBox="0 0 27 47" enable-background="new 0 0 27 47" xml:space="preserve">
<g>
<path opacity="0.2" fill="#FFFFFF" d="M0.04,0.03c15.51,0,27,10.52,27,23.5c0,12.98-11.49,23.5-27,23.5V0.03z"/>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-18.8911" y1="23.5264" x2="18.8759" y2="23.5264">
<stop offset="0" style="stop-color:#3ED900"/>
<stop offset="1" style="stop-color:#38BF00"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M18.88,23.53c0-10.54-8.43-19.09-18.84-19.11v6.7c6.74,0.02,12.22,5.58,12.22,12.41
c0,6.83-5.48,12.39-12.22,12.41v6.7C10.45,42.62,18.88,34.07,18.88,23.53z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="6.1475" y1="35.9414" x2="6.1475" y2="11.1152">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.8407" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#D9D9D9"/>
</linearGradient>
<path fill="url(#SVGID_2_)" d="M11.51,23.53c0,6.43-5.13,11.64-11.48,11.66v0.75c6.74-0.03,12.22-5.58,12.22-12.41
c0-6.83-5.48-12.39-12.22-12.41v0.75C6.38,11.89,11.51,17.1,11.51,23.53z"/>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="-8.9414" y1="15.9961" x2="10.0667" y2="29.3057">
<stop offset="0.1099" style="stop-color:#FFFFFF"/>
<stop offset="0.6978" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M11.51,23.53c0-6.43-5.13-11.64-11.48-11.66v2.25c5.06,0.08,9.15,4.27,9.15,9.41
c0,5.14-4.09,9.32-9.15,9.4v2.25C6.38,35.16,11.51,29.95,11.51,23.53z"/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="-7.3013" y1="17.4268" x2="8.0348" y2="28.1652">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_4_)" d="M8.32,23.53c0,4.66-3.7,8.44-8.28,8.53v0.88c5.06-0.08,9.15-4.27,9.15-9.4
c0-5.14-4.09-9.33-9.15-9.41V15C4.62,15.08,8.32,18.87,8.32,23.53z"/>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="7.0356" y1="28.1865" x2="-5.98" y2="17.2651">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_5_)" d="M8.32,23.53c0-4.66-3.7-8.44-8.28-8.52v1.13C4,16.21,7.2,19.5,7.2,23.53c0,4.03-3.2,7.31-7.16,7.39
v1.13C4.62,31.97,8.32,28.19,8.32,23.53z"/>
<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="0.0371" y1="23.5283" x2="7.2012" y2="23.5283">
<stop offset="0" style="stop-color:#09AA00"/>
<stop offset="1" style="stop-color:#4DCC46"/>
</linearGradient>
<path fill="url(#SVGID_6_)" d="M4.27,19.09c0.36,0.37,0.67,0.77,0.92,1.2c1.44,2.41,1.13,5.6-0.92,7.67
c-1.17,1.19-2.7,1.77-4.23,1.81v1.15C4,30.84,7.2,27.56,7.2,23.53c0-4.03-3.2-7.32-7.16-7.4v1.13C1.57,17.3,3.1,17.91,4.27,19.09z
"/>
<path fill="#57EB51" d="M5.19,20.29c-0.25-0.43-0.56-0.83-0.92-1.2c-1.17-1.19-2.7-1.79-4.23-1.83v2.46
C1.74,19.15,3.62,19.33,5.19,20.29z"/>
<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="-137.9243" y1="73.1387" x2="-142.7352" y2="64.806" gradientTransform="matrix(1 0 0 1 142.3301 -45.0029)">
<stop offset="0" style="stop-color:#09AA00"/>
<stop offset="1" style="stop-color:#4DCC46"/>
</linearGradient>
<path fill="url(#SVGID_7_)" d="M5.19,20.29c-1.56-0.96-3.45-1.14-5.15-0.57v10.05c1.54-0.04,3.06-0.62,4.23-1.81
C6.32,25.88,6.62,22.7,5.19,20.29z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="5px" height="80px" viewBox="0 0 5 80" enable-background="new 0 0 5 80" xml:space="preserve">
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="2.4917" y1="0.0908" x2="2.4917" y2="80.0913">
<stop offset="0" style="stop-color:#46F200"/>
<stop offset="0.3516" style="stop-color:#94FF69"/>
<stop offset="0.9176" style="stop-color:#3FD900"/>
</linearGradient>
<rect x="-0.01" y="0.09" fill="url(#SVGID_1_)" width="5" height="80"/>
</svg>

After

Width:  |  Height:  |  Size: 826 B

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="5px" height="14px" viewBox="0 0 5 14" enable-background="new 0 0 5 14" xml:space="preserve">
<rect fill="#41E600" width="5" height="14"/>
</svg>

After

Width:  |  Height:  |  Size: 517 B

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="14px" height="24px" viewBox="0 0 14 24" enable-background="new 0 0 14 24" xml:space="preserve">
<g>
<path fill="none" d="M4.96,21.94c-0.28-0.33-0.53-0.67-0.77-1.03C4.43,21.27,4.68,21.62,4.96,21.94z"/>
<path fill="none" d="M2.15,15.41c-0.05-0.46-0.09-0.92-0.09-1.39C2.06,14.49,2.09,14.96,2.15,15.41z"/>
<path fill="none" d="M4.12,20.81c-0.23-0.35-0.45-0.71-0.64-1.09C3.03,18.89,2.69,18,2.45,17.06C2.79,18.42,3.36,19.69,4.12,20.81z
"/>
<path fill="none" d="M2.41,16.91c-0.09-0.38-0.16-0.77-0.22-1.17C2.25,16.13,2.32,16.52,2.41,16.91z"/>
<path fill="#38BF00" d="M4.17,20.81c-0.74-1.13-1.3-2.39-1.64-3.75c-0.01-0.05-0.02-0.1-0.04-0.16c-0.09-0.38-0.16-0.77-0.22-1.17
c-0.01-0.11-0.03-0.21-0.04-0.32c-0.05-0.46-0.08-0.92-0.08-1.39c0-6.63,5.57-12,11.86-12l0,0v-2H11.4c-6.29,0-11.39,5.37-11.39,12
c0,4.13,1.98,7.76,4.99,9.92c-0.27-0.33-0.52-0.67-0.76-1.03C4.21,20.88,4.19,20.85,4.17,20.81z"/>
<path fill="#8BF261" d="M10.21,22.02c-2.5,0-4.8-0.86-6.68-2.29c0.19,0.38,0.41,0.73,0.63,1.09c0.02,0.03,0.04,0.07,0.07,0.1
c0.24,0.36,0.49,0.7,0.76,1.03c1.82,1.31,4.03,2.08,6.4,2.08h2.61v-2H10.21z"/>
<path fill="#80E6FF" d="M4.12,20.81c0.02,0.04,0.04,0.07,0.07,0.1C4.16,20.88,4.14,20.85,4.12,20.81z"/>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="8.0742" y1="22.0195" x2="8.0742" y2="2.0205">
<stop offset="0" style="stop-color:#3ED900"/>
<stop offset="0.3899" style="stop-color:#3DD500"/>
<stop offset="0.7931" style="stop-color:#3AC800"/>
<stop offset="1" style="stop-color:#38BF00"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M14.01,2.02c-6.29,0-11.86,5.37-11.86,12c0,0.47,0.03,0.94,0.08,1.39c0.01,0.11,0.03,0.22,0.04,0.32
c0.06,0.4,0.12,0.79,0.22,1.17c0.01,0.05,0.02,0.1,0.04,0.16C2.76,18,3.1,18.89,3.53,19.73c1.88,1.44,4.18,2.29,6.68,2.29h3.8V2.02
L14.01,2.02z"/>
<path fill="#2BD5FF" d="M2.45,17.06c-0.01-0.05-0.02-0.1-0.04-0.16C2.42,16.96,2.43,17.01,2.45,17.06z"/>
<path fill="#2BD5FF" d="M2.19,15.74c-0.01-0.11-0.03-0.21-0.04-0.32C2.16,15.52,2.17,15.63,2.19,15.74z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="10px" height="24px" viewBox="0 0 10 24" enable-background="new 0 0 10 24" xml:space="preserve">
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="62.5" y1="-100.9995" x2="62.5" y2="-79" gradientTransform="matrix(1 0 0 -1 -57.5 -78)">
<stop offset="0" style="stop-color:#3ED900"/>
<stop offset="0.3899" style="stop-color:#3DD500"/>
<stop offset="0.7931" style="stop-color:#3AC800"/>
<stop offset="1" style="stop-color:#38BF00"/>
</linearGradient>
<rect y="1" fill="url(#SVGID_1_)" width="10" height="22"/>
<rect fill="#38BF00" width="10" height="2"/>
<rect y="22" fill="#8BF261" width="10" height="2"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="14px" height="24px" viewBox="0 0 14 24" enable-background="new 0 0 14 24" xml:space="preserve">
<g>
<path fill="#38BF00" d="M4.59,2.02c2.42,0,4.66,0.77,6.52,2.08C8.98,1.6,5.88,0.02,2.42,0.02H0.01v2H4.59z"/>
<path fill="#8BF261" d="M11.6,4.73c0.76,1.6,1.2,3.39,1.2,5.29c0,6.63-5.19,12-11.59,12H0.01v2h2.41c6.4,0,11.59-5.37,11.59-12
C14.01,9.27,13.1,6.75,11.6,4.73z"/>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="6.4028" y1="22.0205" x2="6.4028" y2="2.021">
<stop offset="0" style="stop-color:#3ED900"/>
<stop offset="0.3899" style="stop-color:#3DD500"/>
<stop offset="0.7931" style="stop-color:#3AC800"/>
<stop offset="1" style="stop-color:#38BF00"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M0.01,2.02v20h1.21c6.4,0,11.59-5.37,11.59-12c0-1.9-0.44-3.69-1.2-5.29
c-0.16-0.22-0.32-0.43-0.5-0.64c-1.86-1.31-4.1-2.08-6.52-2.08H0.01z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="356px" height="96px" viewBox="0 0 356 96" enable-background="new 0 0 356 96" xml:space="preserve">
<g>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-184.8071" y1="-51.2339" x2="-112.3086" y2="147.9543" gradientTransform="matrix(-1 0 0 1 29.2188 0)">
<stop offset="0" style="stop-color:#46F200"/>
<stop offset="0.3516" style="stop-color:#94FF69"/>
<stop offset="0.9176" style="stop-color:#3FD900"/>
</linearGradient>
<polygon fill="url(#SVGID_1_)" points="355.87,95.84 355.87,0.39 -0.14,0.39 -0.14,96.39 "/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-148.647" y1="96.3936" x2="-148.647" y2="58.96" gradientTransform="matrix(-1 0 0 1 29.2188 0)">
<stop offset="0" style="stop-color:#46F200"/>
<stop offset="0.9176" style="stop-color:#3FD900"/>
</linearGradient>
<polygon fill="url(#SVGID_2_)" points="355.87,96.18 355.87,58.96 -0.14,58.96 -0.14,96.39 "/>
<polygon fill="#38BF00" points="355.87,96.37 355.87,92.21 -0.14,92.21 -0.14,96.39 "/>
</g>
<polygon opacity="0.2" fill="#FFFFFF" points="266.5,92.09 167.84,92.09 272.84,0.77 326.5,0.77 "/>
<polygon opacity="0.2" fill="#FFFFFF" points="314.5,92.09 285.84,92.09 330.84,0.77 339.5,0.77 "/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="636px" height="96px" viewBox="0 0 636 96" enable-background="new 0 0 636 96" xml:space="preserve">
<g>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-61.3369" y1="-96.5996" x2="43.9144" y2="192.5761" gradientTransform="matrix(-1 0 0 1 309.2188 0)">
<stop offset="0" style="stop-color:#46F200"/>
<stop offset="0.3516" style="stop-color:#94FF69"/>
<stop offset="0.9176" style="stop-color:#3FD900"/>
</linearGradient>
<polygon fill="url(#SVGID_1_)" points="636.02,95.46 636.02,0.02 0.02,0.02 0.02,96.02 "/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-8.8003" y1="96.0205" x2="-8.8003" y2="58.5869" gradientTransform="matrix(-1 0 0 1 309.2188 0)">
<stop offset="0" style="stop-color:#46F200"/>
<stop offset="0.9176" style="stop-color:#3FD900"/>
</linearGradient>
<polygon fill="url(#SVGID_2_)" points="636.02,95.8 636.02,58.59 0.02,58.59 0.02,96.02 "/>
<polygon fill="#38BF00" points="636.02,95.99 636.02,91.84 0.02,91.84 0.02,96.02 "/>
</g>
<polygon opacity="0.2" fill="#FFFFFF" points="546.65,91.72 447.99,91.72 552.99,0.4 606.65,0.4 "/>
<polygon opacity="0.2" fill="#FFFFFF" points="594.65,91.72 565.99,91.72 610.99,0.4 619.65,0.4 "/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="84px" height="68px" viewBox="0 0 84 68" enable-background="new 0 0 84 68" xml:space="preserve">
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="42.1343" y1="68.0352" x2="42.1343" y2="0.0361">
<stop offset="0" style="stop-color:#8BF261"/>
<stop offset="0.1255" style="stop-color:#7AE74D"/>
<stop offset="0.3699" style="stop-color:#5DD62C"/>
<stop offset="0.6034" style="stop-color:#49C914"/>
<stop offset="0.8191" style="stop-color:#3CC205"/>
<stop offset="1" style="stop-color:#38BF00"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M80.01,0.04h-59.5c-2.35,0-4.25,1.9-4.25,4.25v25.78c-9,0.13-16.26,7.46-16.26,16.49
c0,9.03,7.26,16.36,16.26,16.49v0.75c0,2.35,1.9,4.25,4.25,4.25h59.5c2.35,0,4.25-1.9,4.25-4.25V4.29
C84.26,1.94,82.36,0.04,80.01,0.04z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="42.1333" y1="65.0371" x2="42.1333" y2="3.0366">
<stop offset="0" style="stop-color:#3ED900"/>
<stop offset="0.3899" style="stop-color:#3DD500"/>
<stop offset="0.7931" style="stop-color:#3AC800"/>
<stop offset="1" style="stop-color:#38BF00"/>
</linearGradient>
<path fill="url(#SVGID_2_)" d="M80.01,65.04h-59.5c-0.69,0-1.25-0.56-1.25-1.25v-0.75v-2.96l-2.96-0.04
c-7.33-0.11-13.3-6.16-13.3-13.49s5.97-13.38,13.3-13.49l2.96-0.04v-2.96V4.29c0-0.69,0.56-1.25,1.25-1.25h59.5
c0.69,0,1.25,0.56,1.25,1.25v59.5C81.26,64.47,80.7,65.04,80.01,65.04L80.01,65.04z"/>
<path fill="#43EB00" d="M74.71,65.04c0.14-11.5,0.19-17.26-0.51-18.38c-3.42-5.53-13.79-4.31-16.74-3.84
c0-1.39-0.01-2.61-0.02-3.54c0.6-0.62,1.15-1.33,1.65-2.11l0.08,0.22c4.27,0.61,4.8-13.33,4.8-13.33
C64.28,4.23,51.88,8.78,49.91,9.62C46.27,8.7,37.62,8.07,37.87,23c0,0-0.63,13.21,4.21,13.58c0.59,1.01,1.28,1.91,2.02,2.69
c-0.01,0.86-0.05,1.96-0.09,3.23c-6.35-0.43-17.59-0.1-18.33,7.63c-0.07,0.74,0.14,4.4,0.33,14.91L74.71,65.04z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="12.0337" y1="23.9922" x2="12.0337" y2="-7.812500e-03">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.8407" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#D9D9D9"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M12.03,23.99c-6.62,0-12-5.38-12-12c0-6.62,5.39-12,12-12s12,5.38,12,12
C24.03,18.61,18.65,23.99,12.03,23.99L12.03,23.99z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="2.7993" y1="5.5259" x2="21.267" y2="18.4571">
<stop offset="0.1099" style="stop-color:#FFFFFF"/>
<stop offset="0.6978" style="stop-color:#E6E6E6"/>
</linearGradient>
<circle fill="url(#SVGID_2_)" cx="12.03" cy="11.99" r="11.27"/>
<g>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="4.4814" y1="6.7754" x2="19.3806" y2="17.2079">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M11.93,21.09c-5.02,0-9.1-4.08-9.1-9.09c0-5.02,4.08-9.1,9.1-9.1s9.1,4.08,9.1,9.1
C21.03,17.01,16.95,21.09,11.93,21.09L11.93,21.09z"/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="18.249" y1="17.293" x2="5.613" y2="6.6901">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<circle fill="url(#SVGID_4_)" cx="11.93" cy="11.99" r="8.25"/>
<path fill="#FF901F" d="M11.93,19.15c-3.95,0-7.16-3.21-7.16-7.15c0-3.95,3.21-7.16,7.16-7.16c3.94,0,7.16,3.21,7.16,7.16
C19.09,15.94,15.88,19.15,11.93,19.15L11.93,19.15z"/>
<g>
<path fill="#FFD06B" d="M9.7,9.76c2.01-2.01,5.09-2.3,7.42-0.9c-0.25-0.41-0.54-0.8-0.9-1.16c-2.36-2.37-6.21-2.37-8.58,0
c-2.36,2.37-2.36,6.21,0,8.58c0.36,0.36,0.75,0.65,1.16,0.9C7.39,14.85,7.69,11.77,9.7,9.76z"/>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-127.042" y1="62.0576" x2="-131.7007" y2="53.9885" gradientTransform="matrix(1 0 0 1 142.3301 -45.0029)">
<stop offset="0" style="stop-color:#FF901F"/>
<stop offset="1" style="stop-color:#FFB81F"/>
</linearGradient>
<path fill="url(#SVGID_5_)" d="M16.22,16.28c2.01-2.01,2.3-5.09,0.9-7.42c-2.33-1.41-5.41-1.11-7.42,0.9
c-2.01,2.01-2.31,5.09-0.9,7.42C11.13,18.58,14.21,18.29,16.22,16.28z"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="12.0005" y1="24.0449" x2="12.0005" y2="0.0454">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.8407" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#D9D9D9"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M12,24.04c-6.62,0-12-5.38-12-12c0-6.62,5.39-12,12-12s12,5.38,12,12
C24,18.66,18.62,24.04,12,24.04L12,24.04z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="2.7661" y1="5.5786" x2="21.2346" y2="18.5104">
<stop offset="0.1099" style="stop-color:#FFFFFF"/>
<stop offset="0.6978" style="stop-color:#E6E6E6"/>
</linearGradient>
<circle fill="url(#SVGID_2_)" cx="12" cy="12.04" r="11.27"/>
<g>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="4.4487" y1="6.8286" x2="19.3479" y2="17.2611">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M11.9,21.14c-5.02,0-9.1-4.08-9.1-9.09c0-5.02,4.08-9.1,9.1-9.1c5.02,0,9.1,4.08,9.1,9.1
C20.99,17.06,16.92,21.14,11.9,21.14L11.9,21.14z"/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="18.2168" y1="17.3467" x2="5.5801" y2="6.7432">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<circle fill="url(#SVGID_4_)" cx="11.9" cy="12.04" r="8.25"/>
<path fill="#BD0700" d="M11.9,19.2c-3.95,0-7.16-3.21-7.16-7.15c0-3.95,3.21-7.16,7.16-7.16c3.95,0,7.16,3.21,7.16,7.16
C19.05,15.99,15.84,19.2,11.9,19.2L11.9,19.2z"/>
<g>
<path fill="#F25757" d="M9.67,9.81c2.01-2.01,5.09-2.3,7.42-0.9c-0.25-0.41-0.54-0.8-0.9-1.16c-2.36-2.37-6.21-2.37-8.58,0
c-2.36,2.37-2.36,6.21,0,8.58c0.36,0.36,0.75,0.65,1.16,0.9C7.36,14.9,7.66,11.82,9.67,9.81z"/>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-127.0752" y1="62.1104" x2="-131.7339" y2="54.0413" gradientTransform="matrix(1 0 0 1 142.3301 -45.0029)">
<stop offset="0" style="stop-color:#BD0700"/>
<stop offset="1" style="stop-color:#E35D58"/>
</linearGradient>
<path fill="url(#SVGID_5_)" d="M16.19,16.33c2.01-2.01,2.3-5.08,0.9-7.41c-2.33-1.41-5.41-1.11-7.42,0.9
c-2.01,2.01-2.31,5.09-0.9,7.42C11.1,18.63,14.18,18.34,16.19,16.33z"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="12.0337" y1="23.9502" x2="12.0337" y2="-0.0498">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.8407" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#D9D9D9"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M12.03,23.95c-6.62,0-12-5.38-12-12c0-6.62,5.38-12,12-12c6.62,0,12,5.38,12,12
C24.03,18.57,18.65,23.95,12.03,23.95L12.03,23.95z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="2.7988" y1="5.4839" x2="21.2673" y2="18.4157">
<stop offset="0.1099" style="stop-color:#FFFFFF"/>
<stop offset="0.6978" style="stop-color:#E6E6E6"/>
</linearGradient>
<circle fill="url(#SVGID_2_)" cx="12.03" cy="11.95" r="11.27"/>
<g>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="4.4819" y1="6.7339" x2="19.3803" y2="17.1658">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M11.93,21.05c-5.01,0-9.1-4.08-9.1-9.09c0-5.02,4.08-9.1,9.1-9.1c5.02,0,9.1,4.08,9.1,9.1
C21.03,16.97,16.95,21.05,11.93,21.05L11.93,21.05z"/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="18.248" y1="17.251" x2="5.6128" y2="6.6487">
<stop offset="0" style="stop-color:#A6A6A6"/>
<stop offset="0.4341" style="stop-color:#8C8C8C"/>
<stop offset="0.7308" style="stop-color:#999999"/>
<stop offset="1" style="stop-color:#E6E6E6"/>
</linearGradient>
<circle fill="url(#SVGID_4_)" cx="11.93" cy="11.95" r="8.25"/>
<path fill="#09B300" d="M11.93,19.11c-3.95,0-7.16-3.21-7.16-7.15c0-3.95,3.21-7.16,7.16-7.16c3.94,0,7.16,3.21,7.16,7.16
C19.09,15.9,15.88,19.11,11.93,19.11L11.93,19.11z"/>
<g>
<path fill="#57EB51" d="M9.7,9.72c2.01-2.01,5.09-2.3,7.42-0.9c-0.25-0.41-0.54-0.8-0.9-1.16c-2.36-2.37-6.21-2.37-8.57,0
c-2.36,2.37-2.36,6.21,0,8.58c0.36,0.36,0.75,0.65,1.16,0.9C7.39,14.8,7.69,11.73,9.7,9.72z"/>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-127.042" y1="62.0156" x2="-131.7007" y2="53.9465" gradientTransform="matrix(1 0 0 1 142.3301 -45.0029)">
<stop offset="0" style="stop-color:#09AA00"/>
<stop offset="1" style="stop-color:#4DCC46"/>
</linearGradient>
<path fill="url(#SVGID_5_)" d="M16.22,16.24c2.01-2.01,2.3-5.09,0.9-7.42c-2.33-1.41-5.41-1.11-7.42,0.9
c-2.01,2.01-2.31,5.09-0.9,7.42C11.13,18.54,14.21,18.25,16.22,16.24z"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -0,0 +1,357 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QDebug>
#include <QGraphicsLayout>
#include "abstractitemcontainer.h"
#include "abstractitemview.h"
#include "abstractviewitem.h"
#include "scrollbar.h"
AbstractItemContainer::AbstractItemContainer(int bufferSize, QGraphicsWidget *parent)
: GvbWidget(parent),
m_items(),
m_itemView(0),
m_prototype(0),
m_bufferSize(bufferSize),
m_twoColumns(false)
{
}
AbstractItemContainer::~AbstractItemContainer()
{
delete m_prototype;
m_prototype = 0;
}
AbstractViewItem *AbstractItemContainer::prototype()
{
return m_prototype;
}
int AbstractItemContainer::bufferSize() const
{
return m_bufferSize;
}
bool AbstractItemContainer::event(QEvent *e)
{
if (e->type() == QEvent::LayoutRequest)
updateItemBuffer();
return QGraphicsWidget::event(e);
}
bool AbstractItemContainer::eventFilter(QObject *obj, QEvent *event)
{
if (event->type()==QEvent::GraphicsSceneResize && m_itemView) {
const bool caching = m_itemView->listItemCaching();
m_itemView->setListItemCaching(false);
QSizeF s = m_itemView->size();
s.setWidth(s.width()-m_itemView->verticalScrollBar()->size().width());
adjustVisibleContainerSize(s);
m_itemView->updateViewContent();
updateItemBuffer();
m_itemView->setListItemCaching(caching);
}
return QGraphicsWidget::eventFilter(obj, event);
}
QVariant AbstractItemContainer::itemChange(GraphicsItemChange change, const QVariant &value)
{
QVariant ichange = QGraphicsWidget::itemChange(change,value);
if (change == ItemPositionChange) {
if (m_itemView && layout() && !layout()->isActivated())
m_itemView->refreshContainerGeometry();
}
return ichange;
}
/*virtual*/
void AbstractItemContainer::setItemView(AbstractItemView *view)
{
m_itemView = view;
if (m_itemView) {
setParentItem(m_itemView);
m_itemView->installEventFilter(this);
}
}
/*virtual*/
void AbstractItemContainer::setItemPrototype(AbstractViewItem *ptype)
{
m_prototype = ptype;
m_prototype->setParentItem(0);
m_prototype->hide();
}
/*virtual*/
void AbstractItemContainer::reset()
{
qDeleteAll(m_items);
m_items.clear();
updateItemBuffer();
}
/*virtual*/
void AbstractItemContainer::addItem(const QModelIndex &index)
{
if (m_items.count() < maxItemCountInItemBuffer() ||
(m_items.count() > 0 &&
m_items.first()->modelIndex().row()-1 <= index.row() &&
m_items.last()->modelIndex().row() >= index.row())) {
int itemPos = 0;
if (m_items.count() != 0)
itemPos = qMax(0, index.row() - m_items.first()->modelIndex().row());
if (itemPos >= m_items.count() || m_items.at(itemPos)->modelIndex() != index) {
AbstractViewItem *item = 0;
if (m_prototype)
item = m_prototype->newItemInstance();
if (item) {
item->setModel(m_itemView->model());
item->setTwoColumns(m_twoColumns);
m_items.insert(itemPos, item);
addItemToVisibleLayout(itemPos, item);
if (item->modelIndex() != index) {
item->setModelIndex(index);
}
}
}
updateItemBuffer();
}
}
void AbstractItemContainer::removeItem(const QModelIndex &index)
{
AbstractViewItem *item = findItemByIndex(index);
if (item) {
if (maxItemCountInItemBuffer() < m_items.count()) {
m_items.removeOne(item);
removeItemFromVisibleLayout(item);
delete item;
}
else {
m_items.removeOne(item);
removeItemFromVisibleLayout(item);
QModelIndex newIndex = m_itemView->nextIndex(m_items.last()->modelIndex());
if (newIndex.isValid()) {
// Item readded as last item in buffer.
m_items.append(item);
addItemToVisibleLayout(m_items.count() - 1, item);
item->setModelIndex(newIndex);
} else {
// Item readded as first item in buffer.
newIndex = m_itemView->previousIndex(m_items.first()->modelIndex());
m_items.prepend(item);
addItemToVisibleLayout(0, item);
item->setModelIndex(newIndex);
}
}
}
}
/*virtual*/
int AbstractItemContainer::itemCount() const
{
return m_items.count();
}
AbstractViewItem *AbstractItemContainer::firstItem()
{
return m_items.first();
}
/*virtual*/
AbstractViewItem* AbstractItemContainer::itemAt(const int row) const
{
if (row<0 || row >= m_items.count())
return 0;
return m_items.at(row);
}
AbstractViewItem* AbstractItemContainer::findItemByIndex(const QModelIndex &index) const
{
AbstractViewItem *item = 0;
for (int i = 0; i < m_items.count(); ++i) {
if (m_items.at(i)->modelIndex() == index) {
item = m_items.at(i);
break;
}
}
return item;
}
bool AbstractItemContainer::itemVisibleInView(AbstractViewItem* item, const QRectF &viewRect, bool fullyVisible) const
{
if (!item || !m_itemView)
return false;
QRectF itemRectBoundingRect = item->mapToItem(m_itemView, item->boundingRect()).boundingRect();
if (fullyVisible && viewRect.contains(itemRectBoundingRect))
return true;
else if (viewRect.intersects(itemRectBoundingRect))
return true;
return false;
}
void AbstractItemContainer::updateItemBuffer()
{
if (!m_itemView || (m_itemView && !m_itemView->boundingRect().isValid()))
return;
int maxCount = maxItemCountInItemBuffer();
if (m_items.count() < maxCount) {
// New items needs to be added.
QModelIndex index;
if (m_items.count() > 0)
index = m_items.last()->modelIndex();
while (m_items.count() < maxCount) {
index = m_itemView->nextIndex(index);
if (!index.isValid())
break;
insertItem(m_items.count(), index);
}
index = m_items.first()->modelIndex();
while (m_items.count() < maxCount) {
index = m_itemView->previousIndex(index);
if (!index.isValid())
break;
insertItem(0, index);
}
}
QRectF viewRect = boundingRect();
while (m_items.count() > maxCount) {
int firstVisible = 0;
int lastVisible = 0;
findFirstAndLastVisibleBufferIndex(firstVisible, lastVisible, viewRect, false);
AbstractViewItem* item = 0;
if (lastVisible != m_items.count() - 1) {
item = m_items.takeLast();
}
else if (firstVisible != 0 && m_items.first()->modelIndex().row() != firstVisible-1) {
item = m_items.takeFirst();
}
else {
// All the items are visible. Take the item at the end of the buffer.
item = m_items.takeLast();
}
m_items.removeOne(item);
removeItemFromVisibleLayout(item);
delete item;
}
}
void AbstractItemContainer::insertItem(int pos, const QModelIndex &index)
{
AbstractViewItem *item = 0;
if (m_prototype)
item = m_prototype->newItemInstance();
if (item) {
item->setModel(m_itemView->model());
item->setModelIndex(index);
item->setTwoColumns(m_twoColumns);
m_items.insert(pos, item);
addItemToVisibleLayout(pos, item);
item->updateItemContents();
if (pos == 0)
m_itemView->scrollContentsBy(qreal(0.0),
item->effectiveSizeHint(Qt::PreferredSize).height());
}
}
void AbstractItemContainer::findFirstAndLastVisibleBufferIndex(int &firstVisibleBufferIndex,
int &lastVisibleBufferIndex,
const QRectF &viewRect,
bool fullyVisible) const
{
if (layout() && !layout()->isActivated())
layout()->activate();
firstVisibleBufferIndex = -1;
lastVisibleBufferIndex = -1;
int count = m_items.count();
for (int i = 0; i < count; ++i) {
if (itemVisibleInView(m_items.at(i), viewRect, fullyVisible)) {
if (firstVisibleBufferIndex == -1)
firstVisibleBufferIndex = i;
lastVisibleBufferIndex = i;
}
else if ( lastVisibleBufferIndex != -1 )
break; // lastVisibleBufferIndex is already set
}
}
/*virtual*/
int AbstractItemContainer::maxItemCountInItemBuffer() const
{
if (m_itemView && !m_itemView->boundingRect().isEmpty())
{
return m_itemView->indexCount();
}
return 0;
}
void AbstractItemContainer::themeChange()
{
for (int i = 0; i <m_items.count(); ++i)
m_items.at(i)->themeChange();
}
void AbstractItemContainer::updateContent()
{
for (int i = 0; i <m_items.count(); ++i)
m_items.at(i)->updateItemContents();
}
void AbstractItemContainer::setSubtreeCacheEnabled(bool enabled)
{
for (int i = 0; i <m_items.count(); ++i)
m_items.at(i)->setSubtreeCacheEnabled(enabled);
if (m_prototype)
m_prototype->setSubtreeCacheEnabled(enabled);
}
void AbstractItemContainer::setTwoColumns(const bool enabled)
{
if (m_twoColumns == enabled)
return;
m_twoColumns = enabled;
for (int i = 0; i < m_items.count(); ++i)
m_items.at(i)->setTwoColumns(enabled);
}
bool AbstractItemContainer::twoColumns()
{
return m_twoColumns;
}

View File

@ -0,0 +1,71 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef ABSTRACTITEMCONTAINER_H
#define ABSTRACTITEMCONTAINER_H
#include <QModelIndex>
#include "gvbwidget.h"
class QGraphicsWidget;
class AbstractItemView;
class AbstractViewItem;
class AbstractItemContainer : public GvbWidget
{
Q_OBJECT
public:
AbstractItemContainer(int bufferSize, QGraphicsWidget *parent=0);
virtual ~AbstractItemContainer();
virtual void addItem(const QModelIndex &index);
virtual void removeItem(const QModelIndex &index);
virtual void setItemView(AbstractItemView *view);
virtual void setItemPrototype(AbstractViewItem *ptype);
virtual void reset();
virtual int itemCount() const;
virtual AbstractViewItem* itemAt(const int row) const;
AbstractViewItem* findItemByIndex(const QModelIndex &index) const;
AbstractViewItem *prototype();
AbstractViewItem *firstItem();
void updateContent();
void themeChange();
int bufferSize() const;
virtual void setTwoColumns(const bool enabled);
bool twoColumns();
void setSubtreeCacheEnabled(const bool enabled);
virtual void setListItemCaching(const bool enabled, const int index) = 0;
protected:
virtual void adjustVisibleContainerSize(const QSizeF &size) = 0;
virtual void addItemToVisibleLayout(int index, AbstractViewItem *item) = 0;
virtual void removeItemFromVisibleLayout(AbstractViewItem *item) = 0;
virtual bool event(QEvent *e);
virtual bool eventFilter(QObject *obj, QEvent *event);
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
virtual int maxItemCountInItemBuffer() const;
bool itemVisibleInView(AbstractViewItem* item, const QRectF &viewRect, bool fullyVisible = true) const;
protected:
void updateItemBuffer();
void findFirstAndLastVisibleBufferIndex(int &firstVisibleBufferIndex,
int &lastVisibleBufferIndex,
const QRectF &viewRect,
bool fullyVisible) const;
QList<AbstractViewItem*> m_items;
AbstractItemView *m_itemView;
AbstractViewItem *m_prototype;
int m_bufferSize;
private:
void insertItem(int pos, const QModelIndex &index);
bool m_twoColumns;
Q_DISABLE_COPY(AbstractItemContainer)
};
#endif // ABSTRACTITEMCONTAINER_H

View File

@ -0,0 +1,400 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QGraphicsLayout>
#include "abstractitemview.h"
#include "abstractviewitem.h"
#include "scrollbar.h"
AbstractItemView::AbstractItemView(QGraphicsWidget *parent)
: AbstractScrollArea(parent),
m_model(0),
m_rootIndex(),
m_container(0),
m_selectionModel(0),
m_currentIndex(),
m_scroller()
{
setRootIndex(QModelIndex());
}
/*virtual*/
AbstractItemView::~AbstractItemView()
{
}
/*virtual*/
void AbstractItemView::setModel(QAbstractItemModel *model, AbstractViewItem *prototype)
{
if (m_model == model || !model)
return;
if (m_model) {
disconnect(m_model, SIGNAL(destroyed()),
this, SLOT(_q_modelDestroyed()));
disconnect(m_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
this, SLOT(dataChanged(QModelIndex,QModelIndex)));
disconnect(m_model, SIGNAL(rowsInserted(QModelIndex,int,int)),
this, SLOT(rowsInserted(QModelIndex,int,int)));
disconnect(m_model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
this, SLOT(rowsRemoved(QModelIndex,int,int)));
disconnect(m_model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
this, SLOT(rowsAboutToBeRemoved(QModelIndex,int,int)));
disconnect(m_model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
this, SLOT(rowsAboutToBeInserted(QModelIndex,int,int)));
disconnect(m_model, SIGNAL(columnsInserted(QModelIndex,int,int)),
this, SLOT(columnsInserted(QModelIndex,int,int)));
disconnect(m_model, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)),
this, SLOT(columnsAboutToBeInserted(QModelIndex,int,int)));
disconnect(m_model, SIGNAL(columnsRemoved(QModelIndex,int,int)),
this, SLOT(columnsRemoved(QModelIndex,int,int)));
disconnect(m_model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)),
this, SLOT(columnsAboutToBeRemoved(QModelIndex,int,int)));
disconnect(m_model, SIGNAL(modelReset()), this, SLOT(reset()));
disconnect(m_model, SIGNAL(layoutChanged()), this, SLOT(_q_layoutChanged()));
m_model = 0;
}
setSelectionModel(0);
m_currentIndex = QModelIndex();
m_rootIndex = QModelIndex();
m_model = model;
Q_ASSERT_X(m_model->index(0,0) == m_model->index(0,0),
"AbstractItemView::setModel",
"A model should return the exact same index "
"(including its internal id/pointer) when asked for it twice in a row.");
Q_ASSERT_X(m_model->index(0,0).parent() == QModelIndex(),
"AbstractItemView::setModel",
"The parent of a top level index should be invalid");
connect(m_model, SIGNAL(destroyed()), this, SLOT(modelDestroyed()));
connect(m_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
this, SLOT(dataChanged(QModelIndex,QModelIndex)));
connect(m_model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
this, SLOT(rowsAboutToBeInserted(QModelIndex,int,int)));
connect(m_model, SIGNAL(rowsInserted(QModelIndex,int,int)),
this, SLOT(rowsInserted(QModelIndex,int,int)));
connect(m_model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
this, SLOT(rowsAboutToBeRemoved(QModelIndex,int,int)));
connect(m_model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
this, SLOT(rowsRemoved(QModelIndex,int,int)));
connect(m_model, SIGNAL(modelReset()), this, SLOT(reset()));
connect(m_model, SIGNAL(layoutChanged()), this, SLOT(layoutChanged()));
setSelectionModel(new QItemSelectionModel(m_model));
if (prototype && m_container) {
m_container->setItemPrototype(prototype);
m_container->reset();
}
}
/*virtual*/
void AbstractItemView::setContainer(AbstractItemContainer *container)
{
m_container = container;
m_container->setItemView(this);
m_container->setParentItem(viewport());
viewport()->setFlag(
QGraphicsItem::ItemClipsChildrenToShape, true);
m_scroller.setScrollable(this);
installEventFilter(&m_scroller);
}
/*virtual*/
void AbstractItemView::setRootIndex(const QModelIndex &index)
{
m_rootIndex = index;
// TODO fix this if we change index, container should be updated? Or do we need root index?
}
/*virtual*/
int AbstractItemView::indexCount() const
{
if (m_model)
return m_model->rowCount(m_rootIndex);
return 0;
}
/*virtual*/
QAbstractItemModel* AbstractItemView::model() const
{
return m_model;
}
/*virtual*/
QModelIndex AbstractItemView::nextIndex(const QModelIndex &index) const
{
if (!m_model)
return QModelIndex();
if (index.isValid())
return m_model->index(index.row() + 1, 0, m_rootIndex);
else
return m_model->index(0, 0, m_rootIndex);
}
/*virtual*/
QModelIndex AbstractItemView::previousIndex(const QModelIndex &index) const
{
if (!m_model)
return QModelIndex();
if (index.isValid())
return m_model->index(index.row() - 1, 0, m_rootIndex);
else
return m_model->index(m_model->rowCount(m_rootIndex) - 1, 0, m_rootIndex);
}
/*virtual*/
void AbstractItemView::setItemPrototype(AbstractViewItem* prototype)
{
if (prototype && m_container) {
m_container->setItemPrototype(prototype);
m_container->reset();
}
}
void AbstractItemView::setSelectionModel(QItemSelectionModel *smodel)
{
if (smodel && smodel->model() != m_model) {
return;
}
if (m_selectionModel) {
disconnect(m_selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
this, SLOT(currentSelectionChanged(QItemSelection,QItemSelection)));
disconnect(m_selectionModel, SIGNAL(currentChanged(QModelIndex,QModelIndex)),
this, SLOT(currentIndexChanged(QModelIndex,QModelIndex)));
delete m_selectionModel;
m_selectionModel = 0;
}
m_selectionModel = smodel;
if (m_selectionModel) {
connect(m_selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
this, SLOT(currentSelectionChanged(QItemSelection,QItemSelection)));
connect(m_selectionModel, SIGNAL(currentChanged(QModelIndex,QModelIndex)),
this, SLOT(currentIndexChanged(QModelIndex,QModelIndex)));
}
}
/*virtual*/
void AbstractItemView::currentIndexChanged(const QModelIndex &current, const QModelIndex &previous)
{
Q_UNUSED(previous);
if (current != m_currentIndex)
m_currentIndex = current;
}
/*virtual*/
void AbstractItemView::currentSelectionChanged(const QItemSelection &selected,
const QItemSelection &deselected)
{
Q_UNUSED(selected);
Q_UNUSED(deselected);
}
/*virtual*/
void AbstractItemView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
{
Q_UNUSED(topLeft);
Q_UNUSED(bottomRight);
// TODO implement if we like to edit view items.
}
/*virtual*/
void AbstractItemView::rowsAboutToBeInserted(const QModelIndex &index, int start, int end)
{
Q_UNUSED(index);
Q_UNUSED(start);
Q_UNUSED(end);
// TODO implement
}
/*virtual*/
void AbstractItemView::rowsAboutToBeRemoved(const QModelIndex &index,int start, int end)
{
Q_UNUSED(index);
Q_UNUSED(start);
Q_UNUSED(end);
}
/*virtual*/
void AbstractItemView::rowsRemoved(const QModelIndex &parent,int start, int end)
{
Q_UNUSED(parent);
Q_UNUSED(start);
Q_UNUSED(end);
if (start <= m_currentIndex.row() && m_currentIndex.row() <= end) {
QModelIndex newCurrentIndex = m_model->index(start, 0, m_rootIndex);
if (!newCurrentIndex.isValid()) {
newCurrentIndex = m_model->index(qMax(0,start - 1), 0, m_rootIndex);
}
if (m_selectionModel) {
m_selectionModel->setCurrentIndex(newCurrentIndex, QItemSelectionModel::NoUpdate);
}
}
for (int i = end; i >= start; --i) //The items are already removed from the model.
m_container->removeItem(QModelIndex()); // Indexes are already invalid.
}
/*virtual*/
void AbstractItemView::reset()
{
m_rootIndex = QModelIndex();
if (m_container)
m_container->reset();
setCurrentIndex(QModelIndex());
ScrollBar *sb = verticalScrollBar();
if (sb)
sb->setSliderSize(0);
}
/*virtual*/
void AbstractItemView::rowsInserted(const QModelIndex &parent, int start, int end)
{
if (!m_container)
return;
for (int i = start; i <= end; ++i)
m_container->addItem(m_model->index(i, 0, parent));
refreshContainerGeometry();
}
/*virtual*/
void AbstractItemView::modelDestroyed()
{
m_model = 0;
setSelectionModel(0);
reset();
}
/*virtual*/
void AbstractItemView::layoutChanged()
{
m_container->reset();
}
bool AbstractItemView::event(QEvent *e)
{
bool result = AbstractScrollArea::event(e);
if (e && e->type()==QEvent::LayoutRequest) {
refreshContainerGeometry();
result = true;
}
if (e && e->type()==QEvent::GraphicsSceneResize) {
m_scroller.stopScrolling();
refreshContainerGeometry();
m_container->resize(this->size().width()-verticalScrollBar()->size().width(),
m_container->preferredHeight());
if (verticalScrollBar()->sliderPosition() > verticalScrollBar()->sliderSize())
verticalScrollBar()->setSliderPosition(verticalScrollBar()->sliderSize());
result = true;
}
return result;
}
void AbstractItemView::setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags selectionFlag)
{
if (m_selectionModel)
m_selectionModel->setCurrentIndex(index, selectionFlag);
}
void AbstractItemView::refreshContainerGeometry()
{
if (!m_container || !m_model)
return;
if (m_container->layout() && !m_container->layout()->isActivated())
m_container->layout()->activate();
ScrollBar *sb = verticalScrollBar();
if (sb) {
AbstractViewItem *item = m_container->itemAt(0);
if (item) {
qreal oneItemH = item->size().height();
sb->setSliderSize(oneItemH*m_model->rowCount(m_rootIndex)-size().height());
}
if (!sb->isVisible() && verticalScrollBarPolicy() != Qt::ScrollBarAlwaysOff &&
contentsRect().height() < m_container->boundingRect().height())
sb->show();
}
}
void AbstractItemView::scrollContentsBy(qreal dx, qreal dy)
{
AbstractScrollArea::scrollContentsBy(dx, dy);
if (!viewport() || !m_container || (m_container && m_container->itemCount() <= 0) ||
!m_model || (m_model && m_model->rowCount() <= 0) ||
(viewport() && viewport()->boundingRect().height() < contentsRect().height()))
return;
qreal itemH = 1;
AbstractViewItem *item = m_container->itemAt(0);
if (item && item->size().height() > 1) {
itemH = item->size().height();
} else if (item && item->preferredHeight() > 1) {
itemH = item->preferredHeight();
}
qreal vpx = m_container->pos().x();
qreal vpy = m_container->pos().y();
if ((vpy+m_container->size().height()-dy > pos().y()+size().height()) &&
(qAbs(dy) < itemH) && (vpy-dy <= 0)) {
m_container->setPos(vpx, vpy-dy);
} else {
qreal vPos = verticalScrollBar()->sliderPosition();
int startRow = m_model->index(vPos/itemH, 0).row();
int itemsInContainer = m_container->itemCount();
for (int i = 0; i<itemsInContainer; ++i) {
AbstractViewItem *changedItem = m_container->itemAt(i);
changedItem->setModelIndex(m_model->index(startRow+i,0));
m_container->setListItemCaching(listItemCaching(), i);
}
qreal diff = vPos-startRow*itemH;
if (diff < 0)
m_container->setPos(vpx, diff);
else
m_container->setPos(vpx, -diff);
}
}
void AbstractItemView::changeTheme()
{
if (m_container)
m_container->themeChange();
}
void AbstractItemView::updateViewContent()
{
if (m_container)
m_container->updateContent();
}

View File

@ -0,0 +1,78 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef ABSTRACTITEMVIEW_H
#define ABSTRACTITEMVIEW_H
#include <QAbstractItemModel>
#include <QGraphicsSceneResizeEvent>
#include <QPersistentModelIndex>
#include <QItemSelection>
#include "listitemcontainer.h"
#include "abstractscrollarea.h"
#include "scroller.h"
class QItemSelectionModel;
class AbstractItemView : public AbstractScrollArea
{
Q_OBJECT
public:
AbstractItemView(QGraphicsWidget *parent = nullptr);
virtual ~AbstractItemView();
virtual void setContainer(AbstractItemContainer *container);
virtual void setModel(QAbstractItemModel *model, AbstractViewItem *prototype);
virtual QAbstractItemModel* model() const;
virtual void setItemPrototype(AbstractViewItem* prototype);
void setSelectionModel(QItemSelectionModel *smodel);
virtual QModelIndex nextIndex(const QModelIndex &index) const;
virtual QModelIndex previousIndex(const QModelIndex &index) const;
virtual int indexCount() const;
void refreshContainerGeometry(); // TODO Can this be moved to scroll area?
void updateViewContent();
virtual void scrollContentsBy(qreal dx, qreal dy);
virtual bool listItemCaching() const = 0;
virtual void setListItemCaching(bool enabled) = 0;
protected:
virtual bool event(QEvent *e);
void changeTheme();
public slots:
virtual void setRootIndex(const QModelIndex &index);
void setCurrentIndex(const QModelIndex &index,
QItemSelectionModel::SelectionFlags selectionFlag = QItemSelectionModel::NoUpdate);
protected slots:
virtual void currentIndexChanged(const QModelIndex &current, const QModelIndex &previous);
virtual void currentSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
virtual void rowsAboutToBeInserted(const QModelIndex &index, int start, int end);
virtual void rowsInserted(const QModelIndex &parent, int start, int end);
virtual void rowsAboutToBeRemoved(const QModelIndex &index,int start, int end);
virtual void rowsRemoved(const QModelIndex &parent,int start, int end);
virtual void modelDestroyed();
virtual void layoutChanged();
virtual void reset();
protected:
QAbstractItemModel *m_model;
QPersistentModelIndex m_rootIndex;
AbstractItemContainer *m_container;
QItemSelectionModel *m_selectionModel;
QPersistentModelIndex m_currentIndex;
private:
Q_DISABLE_COPY(AbstractItemView)
Scroller m_scroller;
};
#endif // ABSTRACTITEMVIEW_H

View File

@ -0,0 +1,211 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QGraphicsSceneResizeEvent>
#include <QGraphicsWidget>
#include <QDebug>
#include "abstractscrollarea.h"
#include "scrollbar.h"
AbstractScrollArea::AbstractScrollArea(QGraphicsWidget *parent)
: GvbWidget(parent)
, m_viewport(0)
, m_horizontalScrollBar(0)
, m_verticalScrollBar(0)
, m_prevHorizontalValue(0.0)
, m_prevVerticalValue(0.0)
{
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
setContentsMargins(0, 0, 0, 0);
m_horizontalScrollBar = new ScrollBar(Qt::Horizontal, this);
m_horizontalScrollBar->hide();
m_horizontalScrollBar->setContentsMargins(0, 0, 0, 0);
m_horizontalScrollBarPolicy = Qt::ScrollBarAsNeeded;
m_horizontalScrollBar->setZValue(zValue()+1); // Raise scroll bar to top
m_horizontalScrollBar->setVisible(false);
connect(m_horizontalScrollBar, SIGNAL(sliderPositionChange(qreal)),
this, SLOT(horizontalScroll(qreal)));
connect(m_horizontalScrollBar, SIGNAL(sliderPressed()),
this, SLOT(horizontalScrollStart()));
m_verticalScrollBar = new ScrollBar(Qt::Vertical, this);
m_verticalScrollBar->hide();
m_verticalScrollBar->setContentsMargins(0, 0, 0, 0);
m_verticalScrollBarPolicy = Qt::ScrollBarAsNeeded;
m_verticalScrollBar->setZValue(zValue()+1); // Raise scroll bar to top
m_verticalScrollBar->setVisible(false);
connect(m_verticalScrollBar, SIGNAL(sliderPositionChange(qreal)),
this, SLOT(verticalScroll(qreal)));
connect(m_verticalScrollBar, SIGNAL(sliderPressed()),
this, SLOT(verticalScrollStart()));
QGraphicsWidget *viewport = new QGraphicsWidget;
setViewport(viewport);
}
AbstractScrollArea::~AbstractScrollArea()
{
}
ScrollBar *AbstractScrollArea::verticalScrollBar() const
{
return m_verticalScrollBar;
}
ScrollBar *AbstractScrollArea::horizontalScrollBar() const
{
return m_horizontalScrollBar;
}
void AbstractScrollArea::setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy policy)
{
m_horizontalScrollBarPolicy = policy;
}
void AbstractScrollArea::setVerticalScrollBarPolicy(Qt::ScrollBarPolicy policy)
{
m_verticalScrollBarPolicy = policy;
}
Qt::ScrollBarPolicy AbstractScrollArea::verticalScrollBarPolicy() const
{
return m_verticalScrollBarPolicy;
}
Qt::ScrollBarPolicy AbstractScrollArea::horizontalScrollBarPolicy() const
{
return m_horizontalScrollBarPolicy;
}
QGraphicsWidget *AbstractScrollArea::viewport() const
{
return m_viewport;
}
void AbstractScrollArea::setViewport(QGraphicsWidget *viewport)
{
if (m_viewport) {
m_viewport->setParentItem(0);
QList<QGraphicsItem*> children = m_viewport->childItems();
foreach (QGraphicsItem *child, children)
child->setParentItem(0);
delete m_viewport;
}
m_viewport = viewport;
if (viewport) {
m_viewport->setParentItem(this);
m_viewport->setContentsMargins(0, 0, 0, 0);
adjustScrollBars();
}
emit viewportChanged(viewport);
}
bool AbstractScrollArea::event(QEvent *e)
{
if (e->type() == QEvent::ApplicationLayoutDirectionChange
|| e->type() == QEvent::LayoutDirectionChange) {
} else if (e->type() == QEvent::GraphicsSceneResize) {
QGraphicsSceneResizeEvent *event =
static_cast<QGraphicsSceneResizeEvent*>(e);
QSizeF newSize = event->newSize();
QRectF hrect = m_horizontalScrollBar->boundingRect();
QRectF vrect = m_verticalScrollBar->boundingRect();
QSizeF vpSize = newSize;
if (m_horizontalScrollBarPolicy != Qt::ScrollBarAlwaysOff)
vpSize.setHeight(newSize.height() - hrect.height());
if (m_verticalScrollBarPolicy != Qt::ScrollBarAlwaysOff)
vpSize.setWidth(newSize.width() - vrect.width());
m_viewport->resize(vpSize);
adjustScrollBars();
}
return QGraphicsWidget::event(e);
}
void AbstractScrollArea::scrollContentsBy(qreal dx, qreal dy)
{
Q_UNUSED(dx);
Q_UNUSED(dy);
prepareGeometryChange();
}
void AbstractScrollArea::verticalScrollStart()
{
m_prevVerticalValue = m_verticalScrollBar->sliderPosition();
}
void AbstractScrollArea::verticalScroll(qreal value)
{
qreal dy = value - m_prevVerticalValue;
if (!qFuzzyCompare(dy,qreal(0.0))) {
scrollContentsBy(0.0, dy);
m_prevVerticalValue = value;
}
}
void AbstractScrollArea::horizontalScrollStart()
{
m_prevHorizontalValue = m_horizontalScrollBar->sliderPosition();
}
void AbstractScrollArea::horizontalScroll(qreal value)
{
qreal dx = value - m_prevHorizontalValue;
if (!qFuzzyCompare(dx,qreal(0.0))) {
scrollContentsBy(dx, 0.0);
m_prevHorizontalValue = value;
}
}
void AbstractScrollArea::adjustScrollBars()
{
if (m_horizontalScrollBarPolicy == Qt::ScrollBarAlwaysOff) {
m_horizontalScrollBar->hide();
} else {
m_horizontalScrollBar->show();
QRectF sbgeom = boundingRect();
sbgeom.setTop(sbgeom.bottom() - m_horizontalScrollBar->boundingRect().height());
sbgeom.setRight(sbgeom.right() - m_verticalScrollBar->boundingRect().width());
m_horizontalScrollBar->setGeometry(sbgeom);
}
if (m_verticalScrollBarPolicy == Qt::ScrollBarAlwaysOff) {
m_verticalScrollBar->hide();
QRectF sbgeom = boundingRect();
sbgeom.setLeft(sbgeom.right());
sbgeom.setBottom(sbgeom.bottom());
m_verticalScrollBar->setGeometry(sbgeom);
} else {
m_verticalScrollBar->show();
QRectF sbgeom = boundingRect();
sbgeom.setLeft(sbgeom.right() - m_verticalScrollBar->boundingRect().width());
if (m_horizontalScrollBarPolicy != Qt::ScrollBarAlwaysOff)
sbgeom.setBottom(sbgeom.bottom() - m_horizontalScrollBar->boundingRect().height());
m_verticalScrollBar->setGeometry(sbgeom);
}
}

View File

@ -0,0 +1,63 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef ABSTRACTSCROLLAREA_H
#define ABSTRACTSCROLLAREA_H
#include "gvbwidget.h"
class ScrollBar;
class QGraphicsGridLayout;
class AbstractScrollArea : public GvbWidget
{
Q_OBJECT
public:
AbstractScrollArea(QGraphicsWidget *parent = nullptr);
~AbstractScrollArea();
public:
void setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy policy);
void setVerticalScrollBarPolicy(Qt::ScrollBarPolicy policy);
Qt::ScrollBarPolicy verticalScrollBarPolicy() const;
Qt::ScrollBarPolicy horizontalScrollBarPolicy() const;
QGraphicsWidget *viewport() const;
void setViewport(QGraphicsWidget *viewport);
ScrollBar *verticalScrollBar() const;
ScrollBar *horizontalScrollBar() const;
signals:
void viewportChanged(QGraphicsWidget *viewport);
protected:
virtual bool event(QEvent *e);
virtual void scrollContentsBy(qreal dx, qreal dy);
private slots:
void verticalScrollStart();
void verticalScroll(qreal);
void horizontalScrollStart();
void horizontalScroll(qreal);
private:
void adjustScrollBars();
QGraphicsWidget *m_viewport;
ScrollBar *m_horizontalScrollBar;
ScrollBar *m_verticalScrollBar;
Qt::ScrollBarPolicy m_verticalScrollBarPolicy;
Qt::ScrollBarPolicy m_horizontalScrollBarPolicy;
qreal m_prevHorizontalValue;
qreal m_prevVerticalValue;
};
#endif // ABSTRACTSCROLLAREA_H

View File

@ -0,0 +1,77 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "abstractviewitem.h"
AbstractViewItem::AbstractViewItem(QGraphicsWidget *parent)
: GvbWidget(parent),
m_index(),
m_itemView(0),
m_prototype(0)
{
}
/*virtual*/
AbstractViewItem::~AbstractViewItem()
{
}
QModelIndex AbstractViewItem::modelIndex() const
{
return m_index;
}
AbstractViewItem *AbstractViewItem::prototype() const
{
return m_prototype;
}
AbstractItemView *AbstractViewItem::itemView() const
{
return m_itemView;
}
void AbstractViewItem::setItemView(AbstractItemView *itemView)
{
m_itemView = itemView;
}
void AbstractViewItem::setModelIndex(const QModelIndex &index)
{
if (m_index != index) {
m_index = index;
updateItemContents();
}
}
/*virtual*/
QSizeF AbstractViewItem::effectiveSizeHint(Qt::SizeHint which, const QSizeF &constraint) const
{
return GvbWidget::effectiveSizeHint(which, constraint);
}
/*virtual*/
bool AbstractViewItem::event(QEvent *e)
{
return QGraphicsWidget::event(e);
}
/*virtual*/
void AbstractViewItem::updateItemContents()
{
; // No impl yet
}
/*virtual*/
void AbstractViewItem::themeChange()
{
; // No impl yet
}
/*virtual*/
void AbstractViewItem::setSubtreeCacheEnabled(bool enabled)
{
Q_UNUSED(enabled);
; // No impl
}

View File

@ -0,0 +1,56 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef ABSTRACTVIEWITEM_H
#define ABSTRACTVIEWITEM_H
#include <QModelIndex>
#include "gvbwidget.h"
#include "abstractitemview.h"
#include "listitem.h"
class QGraphicsWidget;
class AbstractViewItem : public GvbWidget
{
Q_OBJECT
public:
AbstractViewItem(QGraphicsWidget *parent = nullptr);
virtual ~AbstractViewItem();
virtual AbstractViewItem *newItemInstance() = 0;
QModelIndex modelIndex() const;
void setModelIndex(const QModelIndex &index);
AbstractViewItem *prototype() const;
AbstractItemView *itemView() const;
void setItemView(AbstractItemView *itemView) ;
virtual void updateItemContents();
virtual void themeChange();
virtual void setSubtreeCacheEnabled(bool enabled);
virtual QSizeF effectiveSizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
virtual void setModel(QAbstractItemModel *model) = 0;
virtual QVariant data(int role) const = 0;
virtual void setData(const QVariant &value, int role = Qt::DisplayRole) = 0;
virtual void setTwoColumns(const bool enabled) = 0;
protected:
virtual bool event(QEvent *e);
QPersistentModelIndex m_index;
private:
Q_DISABLE_COPY(AbstractViewItem)
AbstractItemView *m_itemView;
AbstractViewItem *m_prototype;
};
#endif // ABSTRACTVIEWITEM_H

View File

@ -0,0 +1,46 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QStyleOptionGraphicsItem>
#include <QGraphicsSceneResizeEvent>
#include <QPainter>
#include <QRectF>
#include "backgrounditem.h"
#include "theme.h"
BackgroundItem::BackgroundItem(const QString &filename, QGraphicsWidget *parent)
: GvbWidget(parent),
m_background(),
m_fileName(filename)
{
setContentsMargins(0,0,0,0);
connect(Theme::p(), SIGNAL(themeChanged()), this, SLOT(themeChange()));
}
BackgroundItem::~BackgroundItem()
{
}
void BackgroundItem::resizeEvent(QGraphicsSceneResizeEvent *event)
{
GvbWidget::resizeEvent(event);
m_background = Theme::p()->pixmap(m_fileName, size().toSize());
}
void BackgroundItem::paint(QPainter *painter,
const QStyleOptionGraphicsItem *option,
QWidget *widget)
{
Q_UNUSED(widget);
painter->setCompositionMode(QPainter::CompositionMode_Source);
painter->drawPixmap(option->exposedRect, m_background, option->exposedRect);
}
void BackgroundItem::themeChange()
{
m_background = Theme::p()->pixmap(m_fileName, size().toSize());
update();
}

View File

@ -0,0 +1,34 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef __BACKGROUNDITEM_H__
#define __BACKGROUNDITEM_H__
#include <QPixmap>
#include "gvbwidget.h"
class QGraphicsWidget;
class BackgroundItem : public GvbWidget
{
Q_OBJECT
public:
BackgroundItem(const QString &filename, QGraphicsWidget *parent=0);
~BackgroundItem();
void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option,
QWidget *widget = 0);
void resizeEvent(QGraphicsSceneResizeEvent *event);
public slots:
void themeChange();
private:
QPixmap m_background;
QString m_fileName;
};
#endif /* __BACKGROUNDITEM_H__ */

View File

@ -0,0 +1,173 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "button.h"
#include "theme.h"
#include <QtGui>
#include <QGraphicsSceneMouseEvent>
static const int MinTextWidthAsChars = 8;
class ButtonPrivate {
Q_DECLARE_PUBLIC(Button)
public:
ButtonPrivate(Button *button)
: down(false)
, q_ptr(button)
{
textItem = new QGraphicsSimpleTextItem(q_ptr);
}
QGraphicsSimpleTextItem *textItem;
bool down;
Button *q_ptr;
};
Button::Button(const QString &text, QGraphicsItem *parent, QSizeF minimumSize)
: QGraphicsWidget(parent)
, d_ptr(new ButtonPrivate(this)), m_background(), m_selected(false)
{
Q_D(Button);
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
//setCacheMode(QGraphicsItem::ItemCoordinateCache);
if(minimumSize.isValid())
setMinimumSize(minimumSize);
setContentsMargins(0, 0, 0, 0);
d->textItem->setText(text);
prepareGeometryChange();
m_font = Theme::p()->font(Theme::MenuItem);
d->textItem->setFont(m_font);
connect(Theme::p(), SIGNAL(themeChanged()), this, SLOT(themeChange()));
}
Button::~Button()
{
delete d_ptr;
}
bool Button::isDown()
{
Q_D(Button);
return d->down;
}
void Button::setText(const QString &text)
{
Q_D(Button);
d->textItem->setText(text);
update();
}
QString Button::text()
{
Q_D(Button);
return d->textItem->text();
}
void Button::paint(QPainter *painter,
const QStyleOptionGraphicsItem *option,
QWidget *widget)
{
Q_UNUSED(widget);
Q_UNUSED(option);
if(!m_background.isNull())
painter->drawPixmap(QPoint(), m_background);
if(m_selected) {
painter->setBrush(Qt::black);
painter->setOpacity(0.2);
painter->drawRect(boundingRect().toRect());
}
}
QSizeF Button::sizeHint(Qt::SizeHint which,
const QSizeF &constraint) const
{
Q_D(const Button);
switch (which)
{
case Qt::MinimumSize:
{
QFontMetricsF fm(d->textItem->font());
return QSizeF(MinTextWidthAsChars * fm.maxWidth(), fm.height());
}
case Qt::PreferredSize:
{
QFontMetricsF fm(d->textItem->font());
return QSizeF(fm.horizontalAdvance(d->textItem->text()), fm.height());
}
default:
return QGraphicsWidget::sizeHint(which, constraint);
}
}
void Button::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(Button);
if (event->button() != Qt::LeftButton ||
!sceneBoundingRect().contains(event->scenePos()))
return;
d->down = true;
prepareGeometryChange();
emit pressed();
}
void Button::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(Button);
if (!d->down || event->button() != Qt::LeftButton)
return;
d->down = false;
prepareGeometryChange();
emit released();
if (sceneBoundingRect().contains(event->scenePos()))
emit clicked();
}
void Button::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
Q_UNUSED(event);
}
void Button::resizeEvent(QGraphicsSceneResizeEvent *event)
{
Q_D(Button);
QGraphicsWidget::resizeEvent(event);
QRectF rect = d->textItem->boundingRect();
QRectF buttonrect = this->boundingRect();
d->textItem->setPos((buttonrect.width() - rect.width())/2, (buttonrect.height() - rect.height())/2 );
QSize currentSize = buttonrect.size().toSize();
if( m_background.size() != currentSize && (currentSize.width() > 0 && currentSize.height() > 0) ) {
m_background = Theme::p()->pixmap("status_field_middle.svg", buttonrect.size().toSize());
}
}
void Button::setBackground(QPixmap& background)
{
m_background = background;
}
void Button::themeChange()
{
Q_D(Button);
m_font = Theme::p()->font(Theme::MenuItem);
d->textItem->setFont(m_font);
}

View File

@ -0,0 +1,64 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef BUTTON_H
#define BUTTON_H
#include <QGraphicsWidget>
class ButtonPrivate;
class QTextDocument;
class QPixmap;
class QFont;
class Button : public QGraphicsWidget
{
Q_OBJECT
Q_DECLARE_PRIVATE(Button)
public:
Button(const QString &text, QGraphicsItem *parent=0, QSizeF minimumSize = QSizeF());
virtual ~Button();
signals:
void clicked(bool checked = false);
void pressed();
void released();
public slots:
void themeChange();
void setText(const QString &text);
QString text();
public:
void setBackground(QPixmap& background);
bool isDown();
void select(bool select){m_selected = select;}
void click() {emit clicked();}
private:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget = 0);
QSizeF sizeHint(Qt::SizeHint which,
const QSizeF &constraint = QSizeF()) const;
void mousePressEvent(QGraphicsSceneMouseEvent *event);
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
void resizeEvent(QGraphicsSceneResizeEvent *event);
private:
Q_DISABLE_COPY(Button)
ButtonPrivate *d_ptr;
QPixmap m_background;
QFont m_font;
bool m_selected;
};
#endif // BUTTON_H

View File

@ -0,0 +1,158 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QStringList>
#include <QDebug>
#include "commandline.h"
static void usage(const char *appname)
{
Q_UNUSED(appname);
printf(" GraphicsViewBenchmark related options:\n");
printf(" -h,-help,--help: This help\n");
printf(" -resolution : UI resolution in format WxH where width and height are positive values\n");
printf(" -opengl : Enables OpenGL usage. Building PRECONDITIONS: QT_NO_OPENGL is off.\n");
printf(" -manual : Run test manually \n");
printf("\n The following options are available in manual mode:\n");
printf(" -rotation : UI rotation in degrees\n");
printf(" -subtree-cache : Enables usage of subtree caching method\n");
printf(" -fps : Output FPS count to stdout during application execution\n");
printf(" -items : Count of items created to the list\n");
printf("\n");
}
static inline bool argumentOnlyAvailableInManualMode(const char *arg)
{
return (strcmp(arg, "-rotation") == 0)
|| (strcmp(arg, "-subtree-cache") == 0)
|| (strcmp(arg, "-fps") == 0)
|| (strcmp(arg, "-items") == 0);
}
bool readSettingsFromCommandLine(int argc, char *argv[],
Settings& config)
{
bool builtWithOpenGL = false;
Settings::Options options;
#ifndef QT_NO_OPENGL
builtWithOpenGL = true;
#endif
for (int i = 1; i < argc; ++i) {
if (strcmp(argv[i], "-manual") == 0) {
options |= Settings::ManualTest;
argv[i] = 0;
break;
}
}
for (int i = 1; i < argc; ++i) {
if (!argv[i])
continue;
if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-help") == 0 || strcmp(argv[i], "--help") == 0) {
usage(argv[0]);
return true;
}
if (strcmp(argv[i], "-opengl") == 0) {
if (builtWithOpenGL) {
options |= Settings::UseOpenGL;
argv[i] = 0;
} else {
printf("-opengl parameter can be used only with building PRECONDITIONS: QT_NO_OPENGL is off.\n");
usage(argv[0]);
return false;
}
} else if (strcmp(argv[i], "-resolution") == 0) {
if (i + 1 >= argc) {
printf("-resolution needs an extra parameter specifying the application UI resolution\n");
usage(argv[0]);
return false;
}
else {
QStringList res = QString(argv[i+1]).split(QLatin1Char('x'));
if (res.count() != 2) {
printf("-resolution parameter UI resolution should be set in format WxH where width and height are positive values\n");
usage(argv[0]);
return false;
}
int width = res.at(0).toInt();
int height = res.at(1).toInt();
config.setSize(QSize(width, height));
if (width <=0 || height <=0) {
printf("-resolution parameter UI resolution should be set in format WxH where width and height are positive values\n");
usage(argv[0]);
return false;
}
argv[i] = 0;
i++;
argv[i] = 0;
}
}
if (!argv[i])
continue;
if (!(options & Settings::ManualTest)) {
if (argumentOnlyAvailableInManualMode(argv[i])) {
printf("\nWrong option: '%s' is only available in manual mode\n\n", argv[i]);
usage(argv[0]);
return false;
}
continue;
}
if (strcmp(argv[i], "-rotation") == 0) {
if (i + 1 >= argc) {
printf("-rotation needs an extra parameter specifying the application UI rotation in degrees\n");
usage(argv[0]);
return false;
}
else {
bool ok;
int angle = QString(argv[i+1]).toInt(&ok);
if (!ok) {
printf("-rotation parameter should specify rotation angle in degrees\n");
usage(argv[0]);
return false;
}
config.setAngle(angle);
argv[i] = 0;
i++;
argv[i] = 0;
}
} else if (strcmp(argv[i], "-subtree-cache") == 0) {
options |= Settings::UseListItemCache;
argv[i] = 0;
} else if (strcmp(argv[i], "-fps") == 0) {
options |= Settings::OutputFps;
argv[i] = 0;
} else if (strcmp(argv[i], "-items") == 0) {
if (i + 1 >= argc) {
printf("-items needs an extra parameter specifying amount of list items\n");
usage(argv[0]);
return false;
}
else {
bool ok;
int amount = QString(argv[i+1]).toInt(&ok);
if (!ok) {
printf("-items needs an extra parameter specifying amount (integer) of list items\n");
usage(argv[0]);
return false;
}
config.setListItemCount(amount);
argv[i] = 0;
i++;
argv[i] = 0;
}
}
}
config.setOptions(options);
return true;
}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef COMMANDLINE_H
#define COMMANDLINE_H
#include "settings.h"
bool readSettingsFromCommandLine(int argc,
char *argv[],
Settings& settings);
#endif // COMMANDLINE_H

View File

@ -0,0 +1,102 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QFile>
#include <QRandomGenerator>
#include "theme.h"
#include "dummydatagen.h"
DummyDataGenerator::DummyDataGenerator() : m_isMale(false)
{
QFile countryCodeFile(":/contact/areacodes.txt");
countryCodeFile.open(QIODevice::ReadOnly);
while (!countryCodeFile.atEnd()) {
m_countryCodes << QString(countryCodeFile.readLine()).remove("\n");
}
QFile firstNameFFile(":/contact/firstnamesF.txt");
firstNameFFile.open(QIODevice::ReadOnly);
while (!firstNameFFile.atEnd()) {
m_firstNamesF << QString(firstNameFFile.readLine()).remove("\n");
}
QFile firstNameMFile(":/contact/firstnamesM.txt");
firstNameMFile.open(QIODevice::ReadOnly);
while (!firstNameMFile.atEnd()) {
m_firstNamesM << QString(firstNameMFile.readLine()).remove("\n");
}
QFile lastNameFile(":/contact/lastnames.txt");
lastNameFile.open(QIODevice::ReadOnly);
while (!lastNameFile.atEnd()) {
m_lastNames << QString(lastNameFile.readLine()).remove("\n");
}
Reset();
}
DummyDataGenerator::~DummyDataGenerator()
{
}
void DummyDataGenerator::Reset()
{
}
QString DummyDataGenerator::randomPhoneNumber(QString indexNumber)
{
int index = QRandomGenerator::global()->bounded(m_countryCodes.count());
QString countryCode = m_countryCodes.at(index);
QString areaCode = QString::number(index) + QString("0").repeated(2-QString::number(index).length());
QString beginNumber = QString::number(555-index*2);
QString endNumber = QString("0").repeated(4-indexNumber.length()) + indexNumber;
return countryCode + QLatin1Char(' ') + areaCode +QLatin1Char(' ') + beginNumber
+ QLatin1Char(' ') + endNumber;
}
QString DummyDataGenerator::randomFirstName()
{
m_isMale = !m_isMale;
if (m_isMale)
return m_firstNamesM.at(QRandomGenerator::global()->bounded(m_firstNamesM.count()));
return m_firstNamesF.at(QRandomGenerator::global()->bounded(m_firstNamesF.count()));
}
QString DummyDataGenerator::randomLastName()
{
return m_lastNames.at(QRandomGenerator::global()->bounded(m_lastNames.count()));
}
QString DummyDataGenerator::randomName()
{
return QString(randomFirstName()+QString(", ")+randomLastName());
}
QString DummyDataGenerator::randomIconItem()
{
QString avatar = Theme::p()->pixmapPath() + "contact_default_icon.svg";
if (QRandomGenerator::global()->bounded(4)) {
int randVal = 1+QRandomGenerator::global()->bounded(25);
if (m_isMale && randVal > 15) {
randVal -= 15;
}
if (!m_isMale && randVal <= 10) {
randVal += 10;
}
avatar = QString(":/avatars/avatar_%1.png").arg(randVal, 3, 10, QChar('0'));
}
return avatar;
}
QString DummyDataGenerator::randomStatusItem()
{
switch (QRandomGenerator::global()->bounded(3)) {
case 0: return Theme::p()->pixmapPath() + "contact_status_online.svg";
case 1: return Theme::p()->pixmapPath() + "contact_status_offline.svg";
case 2: return Theme::p()->pixmapPath() + "contact_status_idle.svg";
}
return {};
}

View File

@ -0,0 +1,34 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef __DUMMYDATAGEN_H__
#define __DUMMYDATAGEN_H__
#include <QObject>
#include <QStringList>
class DummyDataGenerator : public QObject
{
Q_OBJECT
public:
DummyDataGenerator();
~DummyDataGenerator();
public:
void Reset();
QString randomPhoneNumber(QString indexNumber);
QString randomFirstName();
QString randomLastName();
QString randomName();
QString randomIconItem();
QString randomStatusItem();
private:
QStringList m_countryCodes;
QStringList m_firstNamesF;
QStringList m_firstNamesM;
QStringList m_lastNames;
bool m_isMale;
};
#endif // __DUMMYDATAGEN_H__

View File

@ -0,0 +1,21 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QtGui>
#include "gvbwidget.h"
GvbWidget::GvbWidget(QGraphicsItem * parent, Qt::WindowFlags wFlags)
: QGraphicsWidget(parent, wFlags)
{
}
GvbWidget::~GvbWidget()
{
}
void GvbWidget::keyPressEvent(QKeyEvent *event)
{
Q_UNUSED(event);
}

View File

@ -0,0 +1,20 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef GVBWIDGET_H
#define GVBWIDGET_H
#include <QGraphicsWidget>
class GvbWidget : public QGraphicsWidget
{
Q_OBJECT
public:
GvbWidget(QGraphicsItem * parent = nullptr, Qt::WindowFlags wFlags = { });
~GvbWidget();
virtual void keyPressEvent(QKeyEvent *event);
};
#endif

View File

@ -0,0 +1,124 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QtGui>
#include <QSvgRenderer>
#include <QGraphicsEffect>
#include "iconitem.h"
IconItem::IconItem(const QString &filename, QGraphicsItem *parent)
: GvbWidget(parent)
, m_filename(filename)
, m_rotation(0.0)
, m_opacityEffect(0)
, m_smoothTransformation(false)
{
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
setContentsMargins(0,0,0,0);
setPreferredSize(58,58);
}
IconItem::~IconItem()
{
}
void IconItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
Q_UNUSED(option);
Q_UNUSED(widget);
reload();
const QPointF c = boundingRect().center();
painter->translate(c.x(), c.y());
painter->rotate(m_rotation);
painter->translate(-c.x(), -c.y());
if (m_smoothTransformation)
painter->setRenderHints(QPainter::SmoothPixmapTransform);
painter->drawPixmap(0,0, m_pixmap);
}
QSizeF IconItem::sizeHint(Qt::SizeHint which,
const QSizeF &constraint) const
{
switch (which)
{
case Qt::MinimumSize:
case Qt::PreferredSize:
case Qt::MaximumSize:
return m_pixmap.size();
default:
return GvbWidget::sizeHint(which, constraint);
}
}
void IconItem::reload()
{
const QSize iconSize = size().toSize();
if (iconSize.width() == 0 || iconSize.height() == 0)
return;
const QString key = m_filename+QString::number(iconSize.width())+QString::number(iconSize.height());
if (QPixmapCache::find(key, m_pixmap))
return;
if (m_filename.endsWith(".svg", Qt::CaseInsensitive))
{
m_pixmap = QPixmap(iconSize);
m_pixmap.fill(Qt::transparent);
QSvgRenderer doc(m_filename);
QPainter painter(&m_pixmap);
painter.setViewport(0, 0, iconSize.width(), iconSize.height());
doc.render(&painter);
}
else
{
m_pixmap = QPixmap(m_filename).scaled(iconSize);
}
QPixmapCache::insert(key, m_pixmap);
updateGeometry();
}
QString IconItem::fileName() const
{
return m_filename;
}
void IconItem::setFileName(const QString &filename)
{
if( m_filename != filename) {
m_filename = filename;
reload();
}
}
void IconItem::setOpacityEffectEnabled(const bool enable)
{
if (!m_opacityEffect)
{
QRadialGradient gradient(0.5, 0.5, 1.0);
gradient.setCoordinateMode(QGradient::ObjectBoundingMode);
gradient.setColorAt(0.0, QColor(0,0,0, 255));
gradient.setColorAt(0.46, QColor(0,0,0, 255));
gradient.setColorAt(0.62, QColor(0,0,0, 0));
m_opacityEffect = new QGraphicsOpacityEffect;
m_opacityEffect->setOpacityMask(gradient);
m_opacityEffect->setOpacity(1.0);
this->setGraphicsEffect(m_opacityEffect);
}
m_opacityEffect->setEnabled(enable);
}
bool IconItem::isOpacityEffectEnabled() const
{
if (m_opacityEffect)
return m_opacityEffect->isEnabled();
return false;
}

View File

@ -0,0 +1,53 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef ICONITEM_H
#define ICONITEM_H
#include <QPainter>
#include "gvbwidget.h"
class QGraphicsOpacityEffect;
class QPainter;
class IconItem : public GvbWidget
{
Q_OBJECT
public:
IconItem(const QString &filename = "", QGraphicsItem *parent = nullptr);
virtual ~IconItem();
QString fileName() const;
void setFileName(const QString &filename);
void setOpacityEffectEnabled(const bool enable);
bool isOpacityEffectEnabled() const;
void setRotation(const qreal rotation) { m_rotation = rotation; }
qreal rotation() const { return m_rotation; }
void setSmoothTransformationEnabled(const bool enable) { m_smoothTransformation = enable; }
bool isSmoothTransformationEnabled() const { return m_smoothTransformation; }
private:
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget */*widget = 0*/);
QSizeF sizeHint(Qt::SizeHint which,
const QSizeF &constraint = QSizeF()) const;
private:
Q_DISABLE_COPY(IconItem)
void reload();
QString m_filename;
QPixmap m_pixmap;
qreal m_rotation;
QGraphicsOpacityEffect *m_opacityEffect;
bool m_smoothTransformation;
};
#endif

View File

@ -0,0 +1,223 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QDebug>
#include <QElapsedTimer>
#include "itemrecyclinglist.h"
#include "listitemcontainer.h"
#include "abstractviewitem.h"
#include "recycledlistitem.h"
#include "theme.h"
#include "scrollbar.h"
ItemRecyclingList::ItemRecyclingList(const int itemBuffer, QGraphicsWidget * parent)
: ItemRecyclingListView(parent),
m_listModel(new ListModel(this))
{
ListItemContainer *container = new ListItemContainer(itemBuffer, this, this);
container->setParentItem(this);
ItemRecyclingListView::setContainer(container);
ItemRecyclingListView::setModel(m_listModel, new RecycledListItem(this));
setObjectName("ItemRecyclingList");
connect(Theme::p(), SIGNAL(themeChanged()), this, SLOT(themeChange()));
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
}
/* virtual */
ItemRecyclingList::~ItemRecyclingList()
{
}
/* virtual */
void ItemRecyclingList::insertItem(int index, RecycledListItem *item)
{
if (index<0)
index = 0;
if (index > m_listModel->rowCount())
index = m_listModel->rowCount();
if (m_listModel && item)
m_listModel->insert(index,item);
updateListItemBackgrounds(index);
}
/* virtual */
void ItemRecyclingList::addItem(RecycledListItem *item)
{
if (item)
m_listModel->appendRow(item);
const int index = m_listModel->rowCount()-1;
updateListItemBackgrounds(index);
}
/* virtual */
void ItemRecyclingList::clear()
{
m_listModel->clear();
}
/* virtual */
AbstractViewItem *ItemRecyclingList::takeItem(const int row)
{
if (row < 0 || row >= m_listModel->rowCount() || !m_listModel)
return 0;
return m_listModel->takeItem(row);
}
/*virtual*/
void ItemRecyclingList::setItemPrototype(AbstractViewItem* prototype)
{
ItemRecyclingListView::setItemPrototype(prototype);
}
void ItemRecyclingList::themeChange()
{
const bool caching = listItemCaching();
setListItemCaching(false);
const QString iconName = Theme::p()->pixmapPath()+"contact_default_icon.svg";
const int count = m_listModel->rowCount();
for (int i=0; i<count; ++i)
{
RecycledListItem *ritem = m_listModel->item(i);
if (ritem) {
ListItem *item = ritem->item();
// Update default icons
const QString filename = item->icon(ListItem::LeftIcon)->fileName();
if (filename.contains("contact_default_icon")) {
item->icon(ListItem::LeftIcon)->setFileName(iconName);
}
// Update status icons
QString statusIcon = item->icon(ListItem::RightIcon)->fileName();
const int index = statusIcon.indexOf("contact_status");
if (index != -1) {
statusIcon.remove(0, index);
item->icon(ListItem::RightIcon)->setFileName(Theme::p()->pixmapPath()+statusIcon);
}
// Update fonts
item->setFont(Theme::p()->font(Theme::ContactName), ListItem::FirstPos);
item->setFont(Theme::p()->font(Theme::ContactNumber), ListItem::SecondPos);
item->setFont(Theme::p()->font(Theme::ContactEmail), ListItem::ThirdPos);
// Update list dividers
if (i%2) {
item->setBackgroundBrush(Theme::p()->listItemBackgroundBrushOdd());
item->setBackgroundOpacity(Theme::p()->listItemBackgroundOpacityOdd());
}
else {
item->setBackgroundBrush(Theme::p()->listItemBackgroundBrushEven());
item->setBackgroundOpacity(Theme::p()->listItemBackgroundOpacityEven());
}
// Update borders
item->setBorderPen(Theme::p()->listItemBorderPen());
item->setRounding(Theme::p()->listItemRounding());
// Update icons
item->icon(ListItem::LeftIcon)->setRotation(Theme::p()->iconRotation(ListItem::LeftIcon));
item->icon(ListItem::RightIcon)->setRotation(Theme::p()->iconRotation(ListItem::RightIcon));
item->icon(ListItem::LeftIcon)->setOpacityEffectEnabled(Theme::p()->isIconOpacityEffectEnabled(ListItem::LeftIcon));
item->icon(ListItem::RightIcon)->setOpacityEffectEnabled(Theme::p()->isIconOpacityEffectEnabled(ListItem::RightIcon));
item->icon(ListItem::LeftIcon)->setSmoothTransformationEnabled(Theme::p()->isIconSmoothTransformationEnabled(ListItem::LeftIcon));
item->icon(ListItem::RightIcon)->setSmoothTransformationEnabled(Theme::p()->isIconSmoothTransformationEnabled(ListItem::RightIcon));
}
}
updateViewContent();
setListItemCaching(caching);
}
void ItemRecyclingList::keyPressEvent(QKeyEvent *event)
{
static QElapsedTimer keyPressInterval;
static qreal step = 0.0;
static bool repeat = false;
int interval = keyPressInterval.isValid() ? keyPressInterval.elapsed() : 0;
ScrollBar* sb = verticalScrollBar();
qreal currentValue = sb->sliderPosition();
if(interval < 250 ) {
if(!repeat) step = 0.0;
step = step + 2.0;
if(step > 100) step = 100;
repeat = true;
}
else {
step = 1.0;
if(m_listModel->item(0)) m_listModel->item(0)->size().height();
step = m_listModel->item(0)->size().height();
repeat = false;
}
if(event->key() == Qt::Key_Up ) { //Up Arrow
sb->setSliderPosition(currentValue - step);
}
if(event->key() == Qt::Key_Down ) { //Down Arrow
sb->setSliderPosition(currentValue + step);
}
keyPressInterval.start();
}
bool ItemRecyclingList::listItemCaching() const
{
ListItemContainer *container =
static_cast<ListItemContainer *>(m_container);
return container->listItemCaching();
}
void ItemRecyclingList::setListItemCaching(bool enabled)
{
ListItemContainer *container =
static_cast<ListItemContainer *>(m_container);
container->setListItemCaching(enabled);
}
void ItemRecyclingList::updateListItemBackgrounds(int index)
{
const int itemCount = m_listModel->rowCount();
for (int i=index; i<itemCount; ++i)
{
RecycledListItem *ritem = m_listModel->item(i);
if (ritem) {
ListItem *item = ritem->item();
if (i%2) {
item->setBackgroundBrush(Theme::p()->listItemBackgroundBrushOdd());
item->setBackgroundOpacity(Theme::p()->listItemBackgroundOpacityOdd());
}
else {
item->setBackgroundBrush(Theme::p()->listItemBackgroundBrushEven());
item->setBackgroundOpacity(Theme::p()->listItemBackgroundOpacityEven());
}
}
}
}
void ItemRecyclingList::setTwoColumns(const bool enabled)
{
if (twoColumns() == enabled)
return;
const bool caching = listItemCaching();
setListItemCaching(false);
m_container->setTwoColumns(enabled);
refreshContainerGeometry();
setListItemCaching(caching);
}
bool ItemRecyclingList::twoColumns()
{
return m_container->twoColumns();
}

View File

@ -0,0 +1,47 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef ITEMRECYCLINGLIST_H
#define ITEMRECYCLINGLIST_H
#include "listitem.h"
#include "abstractitemview.h"
#include "listmodel.h"
#include "itemrecyclinglistview.h"
#include "recycledlistitem.h"
class QGraphicsWidget;
class ItemRecyclingList : public ItemRecyclingListView
{
Q_OBJECT
public:
ItemRecyclingList(const int itemBuffer = 4, QGraphicsWidget * parent = nullptr);
virtual ~ItemRecyclingList();
virtual void insertItem(int index, RecycledListItem *item);
virtual void addItem(RecycledListItem *item);
virtual void clear();
virtual AbstractViewItem *takeItem(const int row);
virtual void setItemPrototype(AbstractViewItem* prototype);
virtual void keyPressEvent(QKeyEvent *event);
virtual bool listItemCaching() const;
virtual void setListItemCaching(bool enabled);
void setTwoColumns(const bool enabled);
bool twoColumns();
public slots:
void themeChange();
private:
void updateListItemBackgrounds(int index);
private:
Q_DISABLE_COPY(ItemRecyclingList)
ListModel *m_listModel;
};
#endif // ITEMRECYCLINGLIST_H

View File

@ -0,0 +1,41 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "itemrecyclinglistview.h"
ItemRecyclingListView::ItemRecyclingListView(QGraphicsWidget * parent)
: AbstractItemView(parent), m_rootIndex()
{
}
/*virtual*/
ItemRecyclingListView::~ItemRecyclingListView()
{
}
void ItemRecyclingListView::setCurrentRow(const int row)
{
setCurrentIndex(model()->index(row,0));
}
int ItemRecyclingListView::rows() const
{
if (m_model)
return m_model->rowCount();
return 0;
}
/*virtual*/
void ItemRecyclingListView::rowsInserted(const QModelIndex &parent, int start, int end)
{
if (parent == m_rootIndex) {
AbstractItemView::rowsInserted(parent, start, end);
}
}
/*virtual*/
void ItemRecyclingListView::rowsRemoved(const QModelIndex &parent, int start, int end)
{
if (parent == m_rootIndex) {
AbstractItemView::rowsRemoved(parent, start, end);
}
}

View File

@ -0,0 +1,27 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef ITEMRECYCLINGLISTVIEW_H
#define ITEMRECYCLINGLISTVIEW_H
#include "abstractitemview.h"
class ItemRecyclingListView : public AbstractItemView
{
public:
ItemRecyclingListView(QGraphicsWidget * parent = nullptr);
virtual ~ItemRecyclingListView();
void setCurrentRow(const int row);
int rows() const;
virtual bool listItemCaching() const = 0;
virtual void setListItemCaching(bool enabled) = 0;
protected:
void rowsInserted(const QModelIndex &parent, int start, int end);
void rowsRemoved(const QModelIndex &parent,int start,int end);
private:
QModelIndex m_rootIndex;
};
#endif // ITEMRECYCLINGLISTVIEW_H

View File

@ -0,0 +1,56 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QtGui>
#include "label.h"
Label::Label(const QString &text, QGraphicsItem *parent)
: GvbWidget(parent)
{
m_textItem = new QGraphicsSimpleTextItem(this);
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
setContentsMargins(0, 0, 0, 0);
setText(text);
// This flag was introduced in Qt 4.6.
setFlag(QGraphicsItem::ItemHasNoContents, true);
}
Label::~Label()
{
}
void Label::setText(const QString &text)
{
m_textItem->setText(text);
prepareGeometryChange();
}
QString Label::text() const
{
return m_textItem->text();
}
void Label::setFont(const QFont font)
{
m_textItem->setFont(font);
}
void Label::resizeEvent(QGraphicsSceneResizeEvent *event)
{
GvbWidget::resizeEvent(event);
}
QSizeF Label::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
{
switch (which) {
case Qt::MinimumSize:
// fall thru
case Qt::PreferredSize: {
QFontMetricsF fm(m_textItem->font());
return QSizeF(fm.horizontalAdvance(m_textItem->text()), fm.height());
}
default:
return GvbWidget::sizeHint(which, constraint);
}
}

View File

@ -0,0 +1,38 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef TEXTITEM_H
#define TEXTITEM_H
#include "gvbwidget.h"
class QPainter;
class QStyleOptionGraphicsItem;
class QGraphicsTextItem;
class Label : public GvbWidget
{
Q_OBJECT
public:
Label(const QString& text, QGraphicsItem *parent = nullptr);
~Label();
public:
void setText(const QString& text);
QString text() const;
void setFont(const QFont font);
private:
void resizeEvent(QGraphicsSceneResizeEvent *event);
QSizeF sizeHint(Qt::SizeHint which,
const QSizeF &constraint = QSizeF()) const;
private:
Q_DISABLE_COPY(Label)
QGraphicsSimpleTextItem *m_textItem;
};
#endif

View File

@ -0,0 +1,262 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QDebug>
#include <QGraphicsGridLayout>
#include <QGraphicsLinearLayout>
#include <QGraphicsSceneMouseEvent>
#include <QPainter>
#include <QStyleOptionGraphicsItem>
#include "listitem.h"
#include "theme.h"
struct ItemData
{
QHash<ListItem::TextPos, QString> texts;
QHash<ListItem::TextPos, QFont> fonts;
QHash<ListItem::IconItemPos, QString> icons;
QHash<ListItem::IconItemPos, qreal> iconRotations;
QHash<ListItem::IconItemPos, bool> iconSmoothTransformations;
QHash<ListItem::IconItemPos, bool> iconOpacityEffets;
QPen borderPen;
QBrush backgroundBrush;
qreal backgroundOpacity;
QSize rounding;
};
Q_DECLARE_METATYPE(ItemData);
ListItem::ListItem(QGraphicsWidget *parent)
: GvbWidget(parent)
, m_txtlayout(new QGraphicsGridLayout())
, m_layout(new QGraphicsLinearLayout(Qt::Horizontal))
, m_liconlayout(new QGraphicsLinearLayout(Qt::Horizontal))
, m_riconlayout(new QGraphicsLinearLayout(Qt::Horizontal))
, m_fonts()
, m_borderPen(Qt::NoPen)
, m_backgroundBrush(QBrush())
, m_backgroundOpacity(1.0)
, m_rounding(0.0, 0.0)
{
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
setContentsMargins(0,4,4,0);
m_layout->setContentsMargins(0,0,0,0);
m_txtlayout->setContentsMargins(0,8,0,8);
m_liconlayout->setContentsMargins(8,8,8,8);
m_riconlayout->setContentsMargins(0,8,4,8);
m_layout->insertItem(0, m_liconlayout);
m_layout->insertItem(1, m_txtlayout);
m_layout->insertItem(2, m_riconlayout);
m_layout->setStretchFactor(m_liconlayout, 1);
m_layout->setStretchFactor(m_txtlayout, 5);
m_layout->setStretchFactor(m_riconlayout, 1);
setFlag(QGraphicsItem::ItemClipsToShape);
setLayout(m_layout);
}
ListItem::~ListItem()
{
if (!m_liconlayout->parentLayoutItem())
delete m_liconlayout;
if (!m_riconlayout->parentLayoutItem())
delete m_riconlayout;
}
void ListItem::setIcon(IconItem *iconItem, const IconItemPos iconPos)
{
if (iconPos == LeftIcon) {
if (m_liconlayout->count() > 0 && m_liconlayout->itemAt(0)) {
delete m_liconlayout->itemAt(0);
m_liconlayout->addItem(iconItem);
} else {
m_liconlayout->addItem(iconItem);
}
m_liconlayout->itemAt(0)->setMaximumSize(58, 58);
} else if (iconPos == RightIcon) {
if (m_riconlayout->count() > 0 && m_riconlayout->itemAt(0)) {
delete m_riconlayout->itemAt(0);
m_riconlayout->addItem(iconItem);
} else {
m_riconlayout->addItem(iconItem);
}
m_riconlayout->itemAt(0)->setMaximumSize(22, 22);
}
m_layout->invalidate();
}
IconItem* ListItem::icon(const IconItemPos iconPos) const
{
QGraphicsLayoutItem* item = 0;
if (iconPos == LeftIcon && m_liconlayout->count() > 0) {
item = m_liconlayout->itemAt(0);
}
else if (iconPos == RightIcon && m_riconlayout->count() > 0) {
item = m_riconlayout->itemAt(0);
}
if (item) {
IconItem* titem = static_cast<IconItem *>(item);
return titem;
}
return 0;
}
QVariant ListItem::data(int role) const
{
if (role != Qt::DisplayRole)
return QVariant();
ItemData data;
if (text(ListItem::FirstPos).size() > 0) {
data.texts[ListItem::FirstPos] = text(ListItem::FirstPos);
data.fonts[ListItem::FirstPos] = m_fonts[ListItem::FirstPos];
}
if (text(ListItem::SecondPos).size() > 0) {
data.texts[ListItem::SecondPos] = text(ListItem::SecondPos);
data.fonts[ListItem::SecondPos] = m_fonts[ListItem::SecondPos];
}
if (text(ListItem::ThirdPos).size() > 0) {
data.texts[ListItem::ThirdPos] = text(ListItem::ThirdPos);
data.fonts[ListItem::ThirdPos] = m_fonts[ListItem::ThirdPos];
}
if (text(ListItem::LastPos).size() > 0) {
data.texts[ListItem::LastPos] = text(ListItem::LastPos);
data.fonts[ListItem::LastPos] = m_fonts[ListItem::LastPos];
}
if (icon(ListItem::LeftIcon)) {
data.icons[ListItem::LeftIcon] = icon(ListItem::LeftIcon)->fileName();
data.iconRotations[ListItem::LeftIcon] = icon(ListItem::LeftIcon)->rotation();
data.iconSmoothTransformations[ListItem::LeftIcon] = icon(ListItem::LeftIcon)->isSmoothTransformationEnabled();
data.iconOpacityEffets[ListItem::LeftIcon] = icon(ListItem::LeftIcon)->isOpacityEffectEnabled();
}
if (icon(ListItem::RightIcon)) {
data.icons[ListItem::RightIcon] = icon(ListItem::RightIcon)->fileName();
data.iconRotations[ListItem::RightIcon] = icon(ListItem::RightIcon)->rotation();
data.iconSmoothTransformations[ListItem::RightIcon] = icon(ListItem::RightIcon)->isSmoothTransformationEnabled();
data.iconOpacityEffets[ListItem::RightIcon] = icon(ListItem::RightIcon)->isOpacityEffectEnabled();
}
data.borderPen = m_borderPen;
data.backgroundBrush = m_backgroundBrush;
data.backgroundOpacity = m_backgroundOpacity;
data.rounding = m_rounding;
QVariant var;
var.setValue(data);
return var;
}
void ListItem::setData(const QVariant &value, int role)
{
if (role != Qt::DisplayRole)
return;
ItemData data = value.value<ItemData>();
QList<ListItem::TextPos> textkeys = data.texts.keys();
for (int i = 0; i<textkeys.count(); ++i) {
setText(data.texts[textkeys.at(i)], textkeys.at(i));
setFont(data.fonts[textkeys.at(i)], textkeys.at(i));
}
QList<ListItem::IconItemPos> iconkeys = data.icons.keys();
for (int i = 0; i<iconkeys.count(); ++i) {
IconItem *iconItem = icon(iconkeys.at(i));
if (iconItem)
iconItem->setFileName(data.icons[iconkeys.at(i)]);
else {
IconItem *iconItem = new IconItem(data.icons[iconkeys.at(i)], this);
setIcon(iconItem, iconkeys.at(i));
}
}
if (icon(ListItem::LeftIcon)) {
icon(ListItem::LeftIcon)->setRotation(data.iconRotations[ListItem::LeftIcon]);
icon(ListItem::LeftIcon)->setSmoothTransformationEnabled(data.iconSmoothTransformations[ListItem::LeftIcon]);
icon(ListItem::LeftIcon)->setOpacityEffectEnabled(data.iconOpacityEffets[ListItem::LeftIcon]);
}
if (icon(ListItem::RightIcon)) {
icon(ListItem::RightIcon)->setRotation(data.iconRotations[ListItem::RightIcon]);
icon(ListItem::RightIcon)->setSmoothTransformationEnabled(data.iconSmoothTransformations[ListItem::RightIcon]);
icon(ListItem::RightIcon)->setOpacityEffectEnabled(data.iconOpacityEffets[ListItem::RightIcon]);
}
m_borderPen = data.borderPen;
m_backgroundBrush = data.backgroundBrush;
m_backgroundOpacity = data.backgroundOpacity;
m_rounding = data.rounding;
}
void ListItem::setText(const QString str, const TextPos position)
{
QGraphicsLayoutItem * item = 0;
if (m_txtlayout->rowCount() > position && position >= 0)
item = m_txtlayout->itemAt(position, 0);
if (!item) {
Label *label = new Label(str,this);
m_txtlayout->addItem(label, position, 0);
if (m_fonts.contains(position))
label->setFont(m_fonts[position]);
} else {
Label *titem = static_cast<Label *>(item);
titem->setText(str);
}
}
void ListItem::setFont(const QFont font, const TextPos position)
{
m_fonts.insert(position, font);
QGraphicsLayoutItem * item = 0;
if (m_txtlayout->rowCount() > position && position >= 0)
item = m_txtlayout->itemAt(position, 0);
if (item) {
Label *titem = static_cast<Label *>(item);
titem->setFont(font);
}
}
QString ListItem::text(const TextPos position) const
{
QGraphicsLayoutItem * item = 0;
if (m_txtlayout->rowCount() > position && position >= 0)
item = m_txtlayout->itemAt(position, 0);
if (item) {
Label *titem = static_cast<Label *>(item);
return titem->text();
}
return "";
}
void ListItem::paint(QPainter *painter, const QStyleOptionGraphicsItem */*option*/, QWidget */*widget*/)
{
const int penWidth = m_borderPen.width();
QRectF r = rect();
r.adjust(penWidth, penWidth, -penWidth, -penWidth);
if (m_borderPen != Qt::NoPen) {
painter->setPen(m_borderPen);
painter->drawRoundedRect(r, m_rounding.width(), m_rounding.height());
}
if (m_backgroundBrush != Qt::NoBrush) {
painter->setPen(Qt::NoPen);
painter->setBrush(m_backgroundBrush);
painter->setOpacity(m_backgroundOpacity);
painter->drawRoundedRect(r, m_rounding.width(), m_rounding.height());
}
}

View File

@ -0,0 +1,71 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef LISTITEM_H
#define LISTITEM_H
#include <QPen>
#include "iconitem.h"
#include "label.h"
#include "gvbwidget.h"
class QGraphicsGridLayout;
class QGraphicsLinearLayout;
class QGraphicsSceneMouseEvent;
class QGraphicsItem;
class ListItem : public GvbWidget
{
Q_OBJECT
public:
enum TextPos {
FirstPos = 0,
SecondPos = 1,
ThirdPos = 2,
LastPos = 3
};
enum IconItemPos {
LeftIcon = 0,
RightIcon = 1
};
ListItem(QGraphicsWidget *parent = nullptr);
virtual ~ListItem();
void setIcon(IconItem *iconItem, const IconItemPos iconPos);
IconItem* icon(const IconItemPos position) const;
void setText(const QString str, const TextPos position);
QString text(const TextPos position) const;
void setFont(const QFont font, const TextPos position);
QVariant data(int role = Qt::DisplayRole) const;
void setData(const QVariant &value, int role = Qt::DisplayRole);
void setBorderPen(const QPen pen) { m_borderPen = pen; }
void setBackgroundBrush(const QBrush brush) { m_backgroundBrush = brush; }
void setBackgroundOpacity(const qreal opacity) { m_backgroundOpacity = opacity; }
void setRounding(const QSize rounding) { m_rounding = rounding; }
protected:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
private:
Q_DISABLE_COPY(ListItem)
QGraphicsGridLayout *m_txtlayout;
QGraphicsLinearLayout *m_layout;
QGraphicsLinearLayout *m_liconlayout;
QGraphicsLinearLayout *m_riconlayout;
QHash<TextPos, QFont> m_fonts;
QPen m_borderPen;
QBrush m_backgroundBrush;
qreal m_backgroundOpacity;
QSize m_rounding;
};
#endif // LISTITEM_H

View File

@ -0,0 +1,54 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QGraphicsItem>
#include <QPainter>
#include <QDebug>
#include "listitemcache.h"
ListItemCache::ListItemCache()
{
}
ListItemCache::~ListItemCache()
{
QPixmapCache::remove(m_cacheKey);
}
void ListItemCache::draw(QPainter * painter)
{
QRectF irect = sourceBoundingRect(Qt::LogicalCoordinates);
QRectF vrect = painter->clipPath().boundingRect();
if (vrect.intersects(irect)) {
QRectF newVisibleRect = irect.intersected(vrect);
QPixmap pixmap;
if (!QPixmapCache::find(m_cacheKey, &pixmap) ||
m_visibleRect.toRect() != newVisibleRect.toRect()) {
//qDebug() << "ListItemCache: caching" << m_visibleRect
// << "->" << newVisibleRect;
pixmap = QPixmap(sourceBoundingRect().toRect().size());
pixmap.fill(Qt::transparent);
QPainter pixmapPainter(&pixmap);
drawSource(&pixmapPainter);
pixmapPainter.end();
m_cacheKey = QPixmapCache::insert(pixmap);
m_visibleRect = newVisibleRect;
}
//qDebug() << "ListItemCache: blitting" << m_visibleRect;
painter->drawPixmap(0, 0, pixmap);
}
}
void ListItemCache::sourceChanged(ChangeFlags)
{
QPixmapCache::remove(m_cacheKey);
}

Some files were not shown because too many files have changed in this diff Show More