|
|
|
@ -603,20 +603,20 @@ void RSSImp::saveSlidersPosition()
@@ -603,20 +603,20 @@ void RSSImp::saveSlidersPosition()
|
|
|
|
|
{ |
|
|
|
|
// Remember sliders positions
|
|
|
|
|
Preferences* const pref = Preferences::instance(); |
|
|
|
|
pref->setRssHSplitterState(splitter_h->saveState()); |
|
|
|
|
pref->setRssVSplitterState(splitter_v->saveState()); |
|
|
|
|
pref->setRssSideSplitterState(splitterSide->saveState()); |
|
|
|
|
pref->setRssMainSplitterState(splitterMain->saveState()); |
|
|
|
|
qDebug("Splitters position saved"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void RSSImp::restoreSlidersPosition() |
|
|
|
|
{ |
|
|
|
|
const Preferences* const pref = Preferences::instance(); |
|
|
|
|
const QByteArray pos_h = pref->getRssHSplitterState(); |
|
|
|
|
if (!pos_h.isEmpty()) |
|
|
|
|
splitter_h->restoreState(pos_h); |
|
|
|
|
const QByteArray pos_v = pref->getRssVSplitterState(); |
|
|
|
|
if (!pos_v.isEmpty()) |
|
|
|
|
splitter_v->restoreState(pos_v); |
|
|
|
|
const QByteArray stateSide = pref->getRssSideSplitterState(); |
|
|
|
|
if (!stateSide.isEmpty()) |
|
|
|
|
splitterSide->restoreState(stateSide); |
|
|
|
|
const QByteArray stateMain = pref->getRssMainSplitterState(); |
|
|
|
|
if (!stateMain.isEmpty()) |
|
|
|
|
splitterMain->restoreState(stateMain); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void RSSImp::updateItemsInfos(const QList<QTreeWidgetItem*>& items) |
|
|
|
@ -704,8 +704,8 @@ RSSImp::RSSImp(QWidget *parent):
@@ -704,8 +704,8 @@ RSSImp::RSSImp(QWidget *parent):
|
|
|
|
|
rssDownloaderBtn->setIcon(GuiIconProvider::instance()->getIcon("download")); |
|
|
|
|
settingsButton->setIcon(GuiIconProvider::instance()->getIcon("preferences-system")); |
|
|
|
|
|
|
|
|
|
m_feedList = new FeedListWidget(splitter_h, m_rssManager); |
|
|
|
|
splitter_h->insertWidget(0, m_feedList); |
|
|
|
|
m_feedList = new FeedListWidget(splitterSide, m_rssManager); |
|
|
|
|
splitterSide->insertWidget(0, m_feedList); |
|
|
|
|
editHotkey = new QShortcut(QKeySequence("F2"), m_feedList, 0, 0, Qt::WidgetShortcut); |
|
|
|
|
connect(editHotkey, SIGNAL(activated()), SLOT(renameSelectedRssFile())); |
|
|
|
|
connect(m_feedList, SIGNAL(doubleClicked(QModelIndex)), SLOT(renameSelectedRssFile())); |
|
|
|
@ -747,8 +747,8 @@ RSSImp::RSSImp(QWidget *parent):
@@ -747,8 +747,8 @@ RSSImp::RSSImp(QWidget *parent):
|
|
|
|
|
// Restore sliders position
|
|
|
|
|
restoreSlidersPosition(); |
|
|
|
|
// Bind saveSliders slots
|
|
|
|
|
connect(splitter_v, SIGNAL(splitterMoved(int, int)), this, SLOT(saveSlidersPosition())); |
|
|
|
|
connect(splitter_h, SIGNAL(splitterMoved(int, int)), this, SLOT(saveSlidersPosition())); |
|
|
|
|
connect(splitterMain, SIGNAL(splitterMoved(int, int)), this, SLOT(saveSlidersPosition())); |
|
|
|
|
connect(splitterSide, SIGNAL(splitterMoved(int, int)), this, SLOT(saveSlidersPosition())); |
|
|
|
|
|
|
|
|
|
qDebug("RSSImp constructed"); |
|
|
|
|
} |
|
|
|
|