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