Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Okular
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Andi Sardina Ramos
Okular
Commits
e7fadb9a
Commit
e7fadb9a
authored
Jun 24, 2005
by
Enrico Ros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merged patch_088 (tinyurl.com/8t5ec)
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=428593
parent
51b07b31
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
18 deletions
+40
-18
shell/main.cpp
shell/main.cpp
+1
-2
shell/shell.cpp
shell/shell.cpp
+21
-2
shell/shell.h
shell/shell.h
+18
-14
No files found.
shell/main.cpp
View file @
e7fadb9a
...
...
@@ -69,9 +69,8 @@ int main(int argc, char** argv)
{
for
(
int
i
=
0
;
i
<
args
->
count
();
++
i
)
{
KPDF
::
Shell
*
widget
=
new
KPDF
::
Shell
;
KPDF
::
Shell
*
widget
=
new
KPDF
::
Shell
(
args
->
url
(
i
))
;
widget
->
show
();
widget
->
openURL
(
args
->
url
(
i
));
}
}
args
->
clear
();
...
...
shell/shell.cpp
View file @
e7fadb9a
...
...
@@ -19,6 +19,7 @@
// qt/kde includes
#include <qcursor.h>
#include <qtimer.h>
#include <kaction.h>
#include <kapplication.h>
#include <kedittoolbar.h>
...
...
@@ -41,6 +42,18 @@ using namespace KPDF;
Shell
::
Shell
()
:
KParts
::
MainWindow
(
0
,
"KPDF::Shell"
),
m_menuBarWasShown
(
true
),
m_toolBarWasShown
(
true
)
{
init
();
}
Shell
::
Shell
(
const
KURL
&
url
)
:
KParts
::
MainWindow
(
0
,
"KPDF::Shell"
),
m_menuBarWasShown
(
true
),
m_toolBarWasShown
(
true
)
{
m_openUrl
=
url
;
init
();
}
void
Shell
::
init
()
{
// set the shell's ui resource file
setXMLFile
(
"shell.rc"
);
...
...
@@ -83,6 +96,14 @@ Shell::Shell()
KMainWindowInterface
kmwi
(
this
);
kmwi
.
maximize
();
}
setAutoSaveSettings
();
if
(
m_openUrl
.
isValid
())
QTimer
::
singleShot
(
0
,
this
,
SLOT
(
delayedOpen
()));
}
void
Shell
::
delayedOpen
()
{
openURL
(
m_openUrl
);
}
Shell
::~
Shell
()
...
...
@@ -140,7 +161,6 @@ void Shell::readSettings()
void
Shell
::
writeSettings
()
{
saveMainWindowSettings
(
KGlobal
::
config
(),
"MainWindow"
);
m_recent
->
saveEntries
(
KGlobal
::
config
()
);
KGlobal
::
config
()
->
setDesktopGroup
();
KGlobal
::
config
()
->
writeEntry
(
"FullScreen"
,
m_fullScreenAction
->
isChecked
());
...
...
@@ -200,7 +220,6 @@ Shell::fileOpen()
void
Shell
::
optionsConfigureToolbars
()
{
saveMainWindowSettings
(
KGlobal
::
config
(),
"MainWindow"
);
KEditToolbar
dlg
(
factory
());
connect
(
&
dlg
,
SIGNAL
(
newToolbarConfig
()),
this
,
SLOT
(
applyNewToolbarConfig
()));
dlg
.
exec
();
...
...
shell/shell.h
View file @
e7fadb9a
...
...
@@ -24,7 +24,6 @@
namespace
KPDF
{
class
Part
;
/**
* This is the application "Shell". It has a menubar and a toolbar
* but relies on the "Part" to do all the real work.
...
...
@@ -43,6 +42,11 @@ namespace KPDF
*/
Shell
();
/**
* Open an url
*/
Shell
(
const
KURL
&
url
);
/**
* Default Destructor
*/
...
...
@@ -67,7 +71,6 @@ namespace KPDF
private
slots
:
void
fileOpen
();
void
slotQuit
();
void
optionsConfigureToolbars
();
...
...
@@ -75,27 +78,28 @@ namespace KPDF
void
slotUpdateFullScreen
();
void
slotShowMenubar
();
public
slots
:
void
openURL
(
const
KURL
&
url
);
void
openURL
(
const
KURL
&
url
);
void
delayedOpen
(
);
signals:
void
restoreDocument
(
const
KURL
&
url
,
int
page
);
void
saveDocumentRestoreInfo
(
KConfig
*
config
);
void
restoreDocument
(
const
KURL
&
url
,
int
page
);
void
saveDocumentRestoreInfo
(
KConfig
*
config
);
private:
void
setupAccel
();
void
setupActions
();
void
init
();
private:
KParts
::
ReadOnlyPart
*
m_part
;
KRecentFilesAction
*
m_recent
;
KAction
*
m_printAction
;
KToggleAction
*
m_fullScreenAction
;
KToggleAction
*
m_showMenuBarAction
;
KToggleAction
*
m_showToolBarAction
;
bool
m_menuBarWasShown
,
m_toolBarWasShown
;
KParts
::
ReadOnlyPart
*
m_part
;
KRecentFilesAction
*
m_recent
;
KAction
*
m_printAction
;
KToggleAction
*
m_fullScreenAction
;
KToggleAction
*
m_showMenuBarAction
;
KToggleAction
*
m_showToolBarAction
;
bool
m_menuBarWasShown
,
m_toolBarWasShown
;
KURL
m_openUrl
;
};
}
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment