SVN commit 503699 by jahrens:
- ImageEditor restores its sidebar after program restart now CCMAIL: [hidden email] M +3 -2 digikam/digikamview.cpp M +3 -3 libs/imageproperties/imagepropertiessidebar.cpp M +2 -1 libs/imageproperties/imagepropertiessidebar.h M +2 -2 libs/imageproperties/imagepropertiessidebardb.cpp M +1 -1 libs/imageproperties/imagepropertiessidebardb.h M +4 -4 libs/widgets/sidebar.cpp M +2 -1 libs/widgets/sidebar.h M +4 -2 showfoto/showfoto.cpp M +3 -2 utilities/imageeditor/editor/imagewindow.cpp --- trunk/extragear/graphics/digikam/digikam/digikamview.cpp #503698:503699 @@ -72,13 +72,14 @@ { mParent = static_cast<DigikamApp *>(parent); mAlbumMan = AlbumManager::instance(); - mMainSidebar = new Digikam::Sidebar(this, Digikam::Sidebar::Left); + mMainSidebar = new Digikam::Sidebar(this, "Digikam Left Sidebar", Digikam::Sidebar::Left); mSplitter = new QSplitter(this); mMainSidebar->setSplitter(mSplitter); mIconView = new AlbumIconView(mSplitter); - mRightSidebar = new Digikam::ImagePropertiesSideBarDB(this, mSplitter, Digikam::Sidebar::Right, true, true); + mRightSidebar = new Digikam::ImagePropertiesSideBarDB(this, "Digikam Right Sidebar", mSplitter, + Digikam::Sidebar::Right, true, true); // To the left. mFolderView = new AlbumFolderView(this); --- trunk/extragear/graphics/digikam/libs/imageproperties/imagepropertiessidebar.cpp #503698:503699 @@ -43,9 +43,9 @@ namespace Digikam { -ImagePropertiesSideBar::ImagePropertiesSideBar(QWidget *parent, QSplitter *splitter, - Side side, bool mimimizedDefault) - : Digikam::Sidebar(parent, side, mimimizedDefault) +ImagePropertiesSideBar::ImagePropertiesSideBar(QWidget *parent, const char *name, + QSplitter *splitter, Side side, bool mimimizedDefault) + : Digikam::Sidebar(parent, name, side, mimimizedDefault) { m_image = 0; m_currentRect = 0; --- trunk/extragear/graphics/digikam/libs/imageproperties/imagepropertiessidebar.h #503698:503699 @@ -47,7 +47,8 @@ public: - ImagePropertiesSideBar(QWidget* parent, QSplitter *splitter, Side side=Left, bool mimimizedDefault=false); + ImagePropertiesSideBar(QWidget* parent, const char *name, QSplitter *splitter, + Side side=Left, bool mimimizedDefault=false); ~ImagePropertiesSideBar(); --- trunk/extragear/graphics/digikam/libs/imageproperties/imagepropertiessidebardb.cpp #503698:503699 @@ -68,9 +68,9 @@ ImageDescEditTab *desceditTab; }; -ImagePropertiesSideBarDB::ImagePropertiesSideBarDB(QWidget *parent, QSplitter *splitter, +ImagePropertiesSideBarDB::ImagePropertiesSideBarDB(QWidget *parent, const char *name, QSplitter *splitter, Side side, bool mimimizedDefault, bool navBar) - : Digikam::ImagePropertiesSideBar(parent, splitter, side, mimimizedDefault) + : Digikam::ImagePropertiesSideBar(parent, name, splitter, side, mimimizedDefault) { d = new ImagePropertiesSideBarDBPriv; d->desceditTab = new ImageDescEditTab(parent, navBar); --- trunk/extragear/graphics/digikam/libs/imageproperties/imagepropertiessidebardb.h #503698:503699 @@ -49,7 +49,7 @@ public: - ImagePropertiesSideBarDB(QWidget* parent, QSplitter *splitter, Side side=Left, + ImagePropertiesSideBarDB(QWidget* parent, const char *name, QSplitter *splitter, Side side=Left, bool mimimizedDefault=false, bool navBar=true); ~ImagePropertiesSideBarDB(); --- trunk/extragear/graphics/digikam/libs/widgets/sidebar.cpp #503698:503699 @@ -67,8 +67,8 @@ Sidebar::Side side; }; -Sidebar::Sidebar(QWidget *parent, Side side, bool minimizedDefault) - : KMultiTabBar(KMultiTabBar::Vertical, parent, "Sidebar") +Sidebar::Sidebar(QWidget *parent, const char *name, Side side, bool minimizedDefault) + : KMultiTabBar(KMultiTabBar::Vertical, parent, name) { d = new SidebarPriv; d->minimizedDefault = minimizedDefault; @@ -103,7 +103,7 @@ int minimized; KConfig *config = kapp->config(); - config->setGroup(QString("%1-%2").arg(name()).arg(d->side)); + config->setGroup(QString("%1").arg(name())); tab = config->readNumEntry("ActiveTab", 0); minimized = config->readNumEntry("Minimized", d->minimizedDefault); @@ -125,7 +125,7 @@ void Sidebar::saveViewState() { KConfig *config = kapp->config(); - config->setGroup(QString("%1-%2").arg(name()).arg(d->side)); + config->setGroup(QString("%1").arg(name())); config->writeEntry("ActiveTab", d->activeTab); config->writeEntry("Minimized", (int)d->minimized); --- trunk/extragear/graphics/digikam/libs/widgets/sidebar.h #503698:503699 @@ -61,10 +61,11 @@ /** * Creates a new sidebar * @param parent sidebar's parent + * @param name the name of the widget is used to store its state to config * @param side where the sidebar should be displayed. At the left or right border. * @param minimizedDefault hide the sidebar when the program is started the first time? */ - Sidebar(QWidget *parent, Side side=Left, bool mimimizedDefault=false); + Sidebar(QWidget *parent, const char *name, Side side=Left, bool mimimizedDefault=false); virtual ~Sidebar(); /** --- trunk/extragear/graphics/digikam/showfoto/showfoto.cpp #503698:503699 @@ -252,7 +252,8 @@ QHBoxLayout *hlay = new QHBoxLayout(widget); m_splitter = new QSplitter(widget); m_canvas = new Digikam::Canvas(m_splitter); - m_rightSidebar = new Digikam::ImagePropertiesSideBar(widget, m_splitter, Digikam::Sidebar::Right); + m_rightSidebar = new Digikam::ImagePropertiesSideBar(widget, "ShowFoto Sidebar Right", m_splitter, + Digikam::Sidebar::Right); m_bar = new Digikam::ThumbBarView(widget, Digikam::ThumbBarView::Vertical); hlay->addWidget(m_bar); @@ -271,7 +272,8 @@ vlay->addWidget(m_bar); QHBoxLayout *hlay = new QHBoxLayout(widget); - m_rightSidebar = new Digikam::ImagePropertiesSideBar(widget, m_splitter, Digikam::Sidebar::Right); + m_rightSidebar = new Digikam::ImagePropertiesSideBar(widget, "ShowFoto Sidebar Right", m_splitter, + Digikam::Sidebar::Right); hlay->addWidget(m_splitter); hlay->addWidget(m_rightSidebar); --- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/imagewindow.cpp #503698:503699 @@ -142,8 +142,9 @@ // This is just a bloody workaround until we have found the problem // which leads the imagewindow to open in a wrong size - //resize(640, 480); + resize(640, 480); + m_rightSidebar->loadViewState(); m_rightSidebar->populateTags(); } @@ -193,7 +194,7 @@ m_splitter = new QSplitter(widget); m_canvas = new Canvas(m_splitter); - m_rightSidebar = new ImagePropertiesSideBarDB(widget, m_splitter, + m_rightSidebar = new ImagePropertiesSideBarDB(widget, "ImageEditor Right Sidebar", m_splitter, Sidebar::Right, true, false); lay->addWidget(m_splitter); _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |