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

View File

@ -19,13 +19,9 @@ MessagesView::MessagesView(QWidget *parent)
m_sourceModel = m_proxyModel->sourceModel();
// Forward count changes to the view.
connect(m_sourceModel, SIGNAL(feedCountsChanged()),
this, SIGNAL(feedCountsChanged()));
createConnections();
setModel(m_proxyModel);
// NOTE: It is recommended to call this after the model is set
// due to sorting performance.
setupAppearance();
}
@ -33,6 +29,17 @@ MessagesView::~MessagesView() {
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() {
return m_sourceModel;
}
@ -84,6 +91,7 @@ void MessagesView::setupAppearance() {
#endif
// Hide columns.
// TODO: Make this changeable.
hideColumn(MSG_DB_ID_INDEX);
hideColumn(MSG_DB_DELETED_INDEX);
hideColumn(MSG_DB_FEED_INDEX);

View File

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