Another hell with dates.
This commit is contained in:
parent
a20aebd7e4
commit
19414bdedc
@ -50,6 +50,7 @@ bool FeedsProxyModel::lessThan(const QModelIndex &left,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// In other cases, sort by title.
|
// In other cases, sort by title.
|
||||||
|
// TODO: mozna pouzit QString::localeAwareCompare tady.
|
||||||
return left_item->title() < right_item->title();
|
return left_item->title() < right_item->title();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ MessagesModel::MessagesModel(QObject *parent)
|
|||||||
|
|
||||||
// Set desired table and edit strategy.
|
// Set desired table and edit strategy.
|
||||||
// NOTE: Changes to the database are actually NOT submitted
|
// NOTE: Changes to the database are actually NOT submitted
|
||||||
// via model, but DIRECT SQL calls are used to do persistent messages.
|
// via model, but via DIRECT SQL calls are used to do persistent messages.
|
||||||
setEditStrategy(QSqlTableModel::OnManualSubmit);
|
setEditStrategy(QSqlTableModel::OnManualSubmit);
|
||||||
setTable("Messages");
|
setTable("Messages");
|
||||||
loadMessages(QList<int>());
|
loadMessages(QList<int>());
|
||||||
|
@ -26,6 +26,8 @@ MessagesModel *MessagesProxyModel::sourceModel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool MessagesProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const {
|
bool MessagesProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const {
|
||||||
|
// TODO: mozna pouzit QString::localeAwareCompare tady
|
||||||
|
// pro title a author.
|
||||||
return QSortFilterProxyModel::lessThan(left, right);
|
return QSortFilterProxyModel::lessThan(left, right);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,11 +187,14 @@ void FeedsView::setupAppearance() {
|
|||||||
setExpandsOnDoubleClick(true);
|
setExpandsOnDoubleClick(true);
|
||||||
setEditTriggers(QAbstractItemView::NoEditTriggers);
|
setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||||
setIndentation(10);
|
setIndentation(10);
|
||||||
sortByColumn(0, Qt::AscendingOrder);
|
|
||||||
setDragDropMode(QAbstractItemView::NoDragDrop);
|
setDragDropMode(QAbstractItemView::NoDragDrop);
|
||||||
setAllColumnsShowFocus(true);
|
setAllColumnsShowFocus(true);
|
||||||
setSelectionMode(QAbstractItemView::ExtendedSelection);
|
setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||||
setRootIsDecorated(false);
|
setRootIsDecorated(false);
|
||||||
|
|
||||||
|
// Sort in ascending order, that is categories are
|
||||||
|
// "bigger" than feeds.
|
||||||
|
sortByColumn(0, Qt::AscendingOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FeedsView::selectionChanged(const QItemSelection &selected,
|
void FeedsView::selectionChanged(const QItemSelection &selected,
|
||||||
@ -240,4 +243,6 @@ void FeedsView::drawBranches(QPainter *painter, const QRect &rect, const QModelI
|
|||||||
Q_UNUSED(rect)
|
Q_UNUSED(rect)
|
||||||
Q_UNUSED(index);
|
Q_UNUSED(index);
|
||||||
// NOTE: Don't draw branches at all.
|
// NOTE: Don't draw branches at all.
|
||||||
|
// TODO: tady mozna nakreslit proste ten rect s tim painterem
|
||||||
|
// aby tam aspon neco bylo (blbne pak skrz stylesheety)
|
||||||
}
|
}
|
||||||
|
@ -45,8 +45,6 @@ class FormMain : public QMainWindow {
|
|||||||
bool event(QEvent *event);
|
bool event(QEvent *event);
|
||||||
|
|
||||||
// Sets up proper icons for this widget.
|
// Sets up proper icons for this widget.
|
||||||
// NOTE: All permanent widgets should implement this
|
|
||||||
// kind of method and catch ThemeFactoryEvent::type() in its event handler.
|
|
||||||
void setupIcons();
|
void setupIcons();
|
||||||
|
|
||||||
// Loads/saves visual state of the application.
|
// Loads/saves visual state of the application.
|
||||||
|
@ -25,14 +25,11 @@ class IconThemeFactory : public QObject {
|
|||||||
void setupSearchPaths();
|
void setupSearchPaths();
|
||||||
|
|
||||||
// Returns list of installed themes, including "default" theme.
|
// Returns list of installed themes, including "default" theme.
|
||||||
// NOTE: "Default" theme is system theme on Linux and "no theme" on windows.
|
|
||||||
QStringList getInstalledIconThemes();
|
QStringList getInstalledIconThemes();
|
||||||
|
|
||||||
// Loads name of selected icon theme (from settings) for the application and
|
// Loads name of selected icon theme (from settings) for the application and
|
||||||
// activates it. If that particular theme is not installed, then
|
// activates it. If that particular theme is not installed, then
|
||||||
// "default" theme is loaded.
|
// "default" theme is loaded.
|
||||||
// NOTE: All existing widgets get a chance to repaint its icons if
|
|
||||||
// notify_widgets is true.
|
|
||||||
void loadCurrentIconTheme();
|
void loadCurrentIconTheme();
|
||||||
|
|
||||||
// Returns name of currently activated theme for the application.
|
// Returns name of currently activated theme for the application.
|
||||||
|
@ -23,9 +23,6 @@ Q_DECLARE_METATYPE(Skin)
|
|||||||
// NOTE: Skin "base/vergilius.xml" is now NEEDED for rssguard
|
// NOTE: Skin "base/vergilius.xml" is now NEEDED for rssguard
|
||||||
// to run. IT IS DEFAULT skin. It sets no styles and stylesheet.
|
// to run. IT IS DEFAULT skin. It sets no styles and stylesheet.
|
||||||
// It just contains markup for webbrowser.
|
// It just contains markup for webbrowser.
|
||||||
// NOTE: Check skins "base/vergilius.xml" and "luxuous.xml"
|
|
||||||
// for skin syntax reference. Note that <markup> and <data> tags
|
|
||||||
// have contents encoded in Base64.
|
|
||||||
|
|
||||||
class SkinFactory : public QObject {
|
class SkinFactory : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user