About dialog has no particular modality set. Messages are now opened in extra tab on mouse double click.

This commit is contained in:
Martin Rotter 2013-12-23 09:40:23 +01:00
parent 94bb790ee5
commit 733b4b5109
3 changed files with 22 additions and 34 deletions

View file

@ -2,9 +2,6 @@
<ui version="4.0"> <ui version="4.0">
<class>FormAbout</class> <class>FormAbout</class>
<widget class="QDialog" name="FormAbout"> <widget class="QDialog" name="FormAbout">
<property name="windowModality">
<enum>Qt::WindowModal</enum>
</property>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
@ -145,7 +142,7 @@ p, li { white-space: pre-wrap; }
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set> <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property> </property>
<property name="searchPaths"> <property name="searchPaths">
<stringlist notr="true"/> <stringlist/>
</property> </property>
<property name="openExternalLinks"> <property name="openExternalLinks">
<bool>true</bool> <bool>true</bool>
@ -169,12 +166,12 @@ p, li { white-space: pre-wrap; }
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>687</width> <width>693</width>
<height>180</height> <height>196</height>
</rect> </rect>
</property> </property>
<property name="autoFillBackground"> <property name="autoFillBackground">
<bool>true</bool> <bool>false</bool>
</property> </property>
<attribute name="label"> <attribute name="label">
<string>GNU GPL License (applies to RSS Guard source code)</string> <string>GNU GPL License (applies to RSS Guard source code)</string>
@ -183,16 +180,7 @@ p, li { white-space: pre-wrap; }
<string>GNU GPL License</string> <string>GNU GPL License</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<property name="leftMargin"> <property name="margin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
@ -245,24 +233,15 @@ p, li { white-space: pre-wrap; }
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>687</width> <width>85</width>
<height>180</height> <height>66</height>
</rect> </rect>
</property> </property>
<attribute name="label"> <attribute name="label">
<string>BSD License (applies to QtSingleApplication source code)</string> <string>BSD License (applies to QtSingleApplication source code)</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_5"> <layout class="QVBoxLayout" name="verticalLayout_5">
<property name="leftMargin"> <property name="margin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>

View file

@ -19,13 +19,9 @@ MessagesView::MessagesView(QWidget *parent)
m_sourceModel = m_proxyModel->sourceModel(); m_sourceModel = m_proxyModel->sourceModel();
// Forward count changes to the view. // Forward count changes to the view.
connect(m_sourceModel, SIGNAL(feedCountsChanged()), createConnections();
this, SIGNAL(feedCountsChanged()));
setModel(m_proxyModel); setModel(m_proxyModel);
// NOTE: It is recommended to call this after the model is set
// due to sorting performance.
setupAppearance(); setupAppearance();
} }
@ -33,6 +29,17 @@ MessagesView::~MessagesView() {
qDebug("Destroying MessagesView instance."); qDebug("Destroying MessagesView instance.");
} }
void MessagesView::createConnections() {
// Forward feed counts changes.
connect(m_sourceModel, SIGNAL(feedCountsChanged()),
this, SIGNAL(feedCountsChanged()));
// Make sure that source message is opened
// in new tab on double click.
connect(this, SIGNAL(doubleClicked(QModelIndex)),
this, SLOT(openSelectedSourceMessagesInternally()));
}
MessagesModel *MessagesView::sourceModel() { MessagesModel *MessagesView::sourceModel() {
return m_sourceModel; return m_sourceModel;
} }
@ -84,6 +91,7 @@ void MessagesView::setupAppearance() {
#endif #endif
// Hide columns. // Hide columns.
// TODO: Make this changeable.
hideColumn(MSG_DB_ID_INDEX); hideColumn(MSG_DB_ID_INDEX);
hideColumn(MSG_DB_DELETED_INDEX); hideColumn(MSG_DB_DELETED_INDEX);
hideColumn(MSG_DB_FEED_INDEX); hideColumn(MSG_DB_FEED_INDEX);

View file

@ -22,6 +22,7 @@ class MessagesView : public QTreeView {
MessagesProxyModel *model(); MessagesProxyModel *model();
MessagesModel *sourceModel(); MessagesModel *sourceModel();
void createConnections();
public slots: public slots:
// Loads un-deleted messages from selected feeds. // Loads un-deleted messages from selected feeds.
void loadFeeds(const QList<int> &feed_ids); void loadFeeds(const QList<int> &feed_ids);