Work on skins.
This commit is contained in:
parent
497be388dd
commit
e8c063d6e4
File diff suppressed because one or more lines are too long
BIN
resources/skins/base/images/checkbox.png
Normal file
BIN
resources/skins/base/images/checkbox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 343 B |
@ -150,22 +150,28 @@ bool FeedsModel::addItem(FeedsModelRootItem *item,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool FeedsModel::editItem(const QModelIndex &index) {
|
||||||
|
// TODO: pokračovat
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool FeedsModel::removeItem(const QModelIndex &index) {
|
bool FeedsModel::removeItem(const QModelIndex &index) {
|
||||||
if (index.isValid()) {
|
if (index.isValid()) {
|
||||||
QModelIndex parent_index = index.parent();
|
QModelIndex parent_index = index.parent();
|
||||||
FeedsModelRootItem *deleting_item = itemForIndex(index);
|
FeedsModelRootItem *deleting_item = itemForIndex(index);
|
||||||
FeedsModelRootItem *parent_item = itemForIndex(parent_index);
|
FeedsModelRootItem *parent_item = itemForIndex(parent_index);
|
||||||
|
|
||||||
beginRemoveRows(parent_index, index.row(), index.row());
|
if (deleting_item->removeItself()) {
|
||||||
|
beginRemoveRows(parent_index, index.row(), index.row());
|
||||||
|
|
||||||
if (deleting_item->removeItself() &&
|
if (parent_item->removeChild(deleting_item)) {
|
||||||
parent_item->removeChild(deleting_item)) {
|
// Free deleted item from the memory
|
||||||
// Free deleted item from the memory
|
delete deleting_item;
|
||||||
delete deleting_item;
|
}
|
||||||
|
|
||||||
|
endRemoveRows();
|
||||||
}
|
}
|
||||||
|
|
||||||
endRemoveRows();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@ class FeedsModel : public QAbstractItemModel {
|
|||||||
// Feed/category manipulators.
|
// Feed/category manipulators.
|
||||||
bool addItem(FeedsModelRootItem *item,
|
bool addItem(FeedsModelRootItem *item,
|
||||||
FeedsModelRootItem *parent);
|
FeedsModelRootItem *parent);
|
||||||
|
bool editItem(const QModelIndex &index);
|
||||||
bool removeItem(const QModelIndex &index);
|
bool removeItem(const QModelIndex &index);
|
||||||
|
|
||||||
// Returns (undeleted) messages for given feeds.
|
// Returns (undeleted) messages for given feeds.
|
||||||
|
@ -102,8 +102,8 @@ Authors of this application are NOT responsible for lost data.</string>
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>564</width>
|
<width>100</width>
|
||||||
<height>363</height>
|
<height>30</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
@ -180,8 +180,8 @@ Authors of this application are NOT responsible for lost data.</string>
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>558</width>
|
<width>167</width>
|
||||||
<height>337</height>
|
<height>219</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
@ -785,7 +785,7 @@ Authors of this application are NOT responsible for lost data.</string>
|
|||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="alternatingRowColors">
|
<property name="alternatingRowColors">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="movement">
|
<property name="movement">
|
||||||
<enum>QListView::Static</enum>
|
<enum>QListView::Static</enum>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user