forked from torinkwok/wxNote
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCategoriesTree.cpp
More file actions
117 lines (97 loc) · 6.33 KB
/
Copy pathCategoriesTree.cpp
File metadata and controls
117 lines (97 loc) · 6.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
///:
/*****************************************************************************
** **
** .======. **
** | INRI | **
** | | **
** | | **
** .========' '========. **
** | _ xxxx _ | **
** | /_;-.__ / _\ _.-;_\ | **
** | `-._`'`_/'`.-' | **
** '========.`\ /`========' **
** | | / | **
** |/-.( | **
** |\_._\ | **
** | \ \`;| **
** | > |/| **
** | / // | **
** | |// | **
** | \(\ | **
** | `` | **
** | | **
** | | **
** | | **
** | | **
** \\ _ _\\| \// |//_ _ \// _ **
** ^ `^`^ ^`` `^ ^` ``^^` `^^` `^ `^ **
** **
** Copyright © 1997-2013 by Tong G. **
** ALL RIGHTS RESERVED. **
** **
****************************************************************************/
#include "wxNote_Gui/wxNote_Tree/CategoriesTree.h"
#include "wxNote_Global.h"
#include <QTreeWidgetItem>
//.._CategoriesTree类实现
/* 构造函数实现 */
_CategoriesTree::_CategoriesTree(QWidget *_Parent)
: QTreeWidget(_Parent)
{
/* "评分" */
m_RatingRootItem = new QTreeWidgetItem(this, QStringList() << wxNote::g_RatingListName);
m_RatingRootItem->setIcon(0, QIcon(":/wxNote_Icons/rating.png"));
m_RatingRootItem->setExpanded(true);
m_ExcellentItem = new QTreeWidgetItem(
m_RatingRootItem, QStringList() << wxNote::g_ExcellentName);
m_ExcellentItem->setIcon(0, QIcon(":/wxNote_Icons/excellent.png"));
m_GoodItem = new QTreeWidgetItem(
m_RatingRootItem, QStringList() << wxNote::g_GoodName);
m_GoodItem->setIcon(0, QIcon(":/wxNote_Icons/good.png"));
m_AverageItem = new QTreeWidgetItem(
m_RatingRootItem, QStringList() << wxNote::g_AverageName);
m_AverageItem->setIcon(0, QIcon(":/wxNote_Icons/average.png"));
m_FairItem = new QTreeWidgetItem(
m_RatingRootItem, QStringList() << wxNote::g_FairName);
m_FairItem->setIcon(0, QIcon(":/wxNote_Icons/fair.png"));
m_PoorItem = new QTreeWidgetItem(
m_RatingRootItem, QStringList() << ("差"));
m_PoorItem->setIcon(0, QIcon(":/wxNote_Icons/poor.png"));
/* "颜色标签" */
m_ColorLabelRootItem = new QTreeWidgetItem(
this, QStringList() << wxNote::g_ColorLabelListName);
m_ColorLabelRootItem->setIcon(0, QIcon(":/wxNote_Icons/colorLabel.png"));
m_ColorLabelRootItem->setExpanded(true);
m_ImportantItem = new QTreeWidgetItem(m_ColorLabelRootItem,
QStringList() << wxNote::g_ImportantName);
m_ImportantItem->setIcon(0, QIcon(":/wxNote_Icons/important.png"));
m_WorkItem = new QTreeWidgetItem(m_ColorLabelRootItem,
QStringList() << wxNote::g_WorkName);
m_WorkItem->setIcon(0, QIcon(":/wxNote_Icons/work.png"));
m_PersonalItem = new QTreeWidgetItem(m_ColorLabelRootItem,
QStringList() << wxNote::g_PersonalName);
m_PersonalItem->setIcon(0, QIcon(":/wxNote_Icons/personal.png"));
m_ToDoItem = new QTreeWidgetItem(m_ColorLabelRootItem,
QStringList() << wxNote::g_ToDoName);
m_ToDoItem->setIcon(0, QIcon(":/wxNote_Icons/toDo.png"));
m_LaterItem = new QTreeWidgetItem(m_ColorLabelRootItem,
QStringList() << wxNote::g_LaterName);
m_LaterItem->setIcon(0, QIcon(":/wxNote_Icons/later.png"));
setCurrentItem(m_RatingRootItem);
setHeaderHidden(true);
}
////////////////////////////////////////////////////////////////////////////
/***************************************************************************
** **
** _________ _______ **
** |___ ___| / ______ \ **
** | | _______ _______ _______ | / |_| **
** | | || || || || || || | | _ __ **
** | | || || || || || || | | |__ \ **
** | | || || || || || || | \_ _ __| | _ **
** |_| ||_____|| || || ||_____|| \________/ |_| **
** || **
** ||_____|| **
** **
***************************************************************************/
///:~