@@ -18,6 +18,10 @@ CParameterWebBrowser::CParameterWebBrowser(QObject *parent, const QString &szPre
1818 , m_ClearCookie(false )
1919 , m_bPromptPrintFinished(true )
2020 , m_bAutoFillUserAndPassword(false )
21+ , m_nDatabaseViewLimit(100 )
22+ , m_WindowSize(600 , 450 )
23+ , m_nCurrentBookmarkFolder(1 )
24+ , m_bBookmarkShowEditor(true )
2125{
2226 SetHomeUrl (" https://github.com/KangLin" );
2327 SetTabUrl (" https://github.com/KangLin/RabbitRemoteControl" );
@@ -52,6 +56,9 @@ int CParameterWebBrowser::OnLoad(QSettings &set)
5256 SetSearchEngineList (set.value (" SearchEngine/List" , GetSearchEngineList ()).toStringList ());
5357 SetAutoFillUserAndPassword (set.value (" AutoFillUserPassword" , GetAutoFillUserAndPassword ()).toBool ());
5458 SetPromptPrintFinished (set.value (" Print/Finished" , GetPromptPrintFinished ()).toBool ());
59+ SetDatabaseViewLimit (set.value (" Database/View/Limit" , GetDatabaseViewLimit ()).toInt ());
60+ SetWindowSize (set.value (" WindowSize" , GetWindowSize ()).toSize ());
61+ SetBookmarkShowEditor (set.value (" Bookmark/ShowEditor" , GetBookmarkShowEditor ()).toBool ());
5562 return nRet;
5663}
5764
@@ -71,6 +78,9 @@ int CParameterWebBrowser::OnSave(QSettings &set)
7178 set.setValue (" SearchEngine/List" , GetSearchEngineList ());
7279 set.setValue (" AutoFillUserPassword" , GetAutoFillUserAndPassword ());
7380 set.setValue (" Print/Finished" , GetPromptPrintFinished ());
81+ set.setValue (" Database/View/Limit" , GetDatabaseViewLimit ());
82+ set.setValue (" WindowSize" , GetWindowSize ());
83+ set.setValue (" Bookmark/ShowEditor" , GetBookmarkShowEditor ());
7484 return nRet;
7585}
7686
@@ -259,3 +269,55 @@ void CParameterWebBrowser::SetAutoFillUserAndPassword(bool newAutoFillUserAndPas
259269 m_bAutoFillUserAndPassword = newAutoFillUserAndPassword;
260270 SetModified (true );
261271}
272+
273+ int CParameterWebBrowser::GetDatabaseViewLimit () const
274+ {
275+ return m_nDatabaseViewLimit;
276+ }
277+
278+ void CParameterWebBrowser::SetDatabaseViewLimit (int newLimit)
279+ {
280+ if (m_nDatabaseViewLimit == newLimit)
281+ return ;
282+ m_nDatabaseViewLimit = newLimit;
283+ SetModified (true );
284+ }
285+
286+ QSize CParameterWebBrowser::GetWindowSize () const
287+ {
288+ return m_WindowSize;
289+ }
290+
291+ void CParameterWebBrowser::SetWindowSize (const QSize &newWindowSize)
292+ {
293+ if (m_WindowSize == newWindowSize)
294+ return ;
295+ m_WindowSize = newWindowSize;
296+ SetModified (true );
297+ }
298+
299+ int CParameterWebBrowser::GetCurrentBookmarkFolder () const
300+ {
301+ return m_nCurrentBookmarkFolder;
302+ }
303+
304+ void CParameterWebBrowser::SetCurrentBookmarkFolder (int newCurrentBookmarkFolder)
305+ {
306+ if (m_nCurrentBookmarkFolder == newCurrentBookmarkFolder)
307+ return ;
308+ m_nCurrentBookmarkFolder = newCurrentBookmarkFolder;
309+ SetModified (true );
310+ }
311+
312+ bool CParameterWebBrowser::GetBookmarkShowEditor () const
313+ {
314+ return m_bBookmarkShowEditor;
315+ }
316+
317+ void CParameterWebBrowser::SetBookmarkShowEditor (bool newBookmarkShowEditor)
318+ {
319+ if (m_bBookmarkShowEditor == newBookmarkShowEditor)
320+ return ;
321+ m_bBookmarkShowEditor = newBookmarkShowEditor;
322+ SetModified (true );
323+ }
0 commit comments