Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Education
KmPlot
Commits
3595ecae
Commit
3595ecae
authored
Nov 04, 2004
by
Fredrik Edemar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the new function KmPlot::fileOpen(const KURL &url) which is accessible via DCOP.
svn path=/trunk/kdeedu/kmplot/; revision=360491
parent
43020386
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
3 deletions
+18
-3
kmplot/MainDlg.cpp
kmplot/MainDlg.cpp
+0
-1
kmplot/kmplot.cpp
kmplot/kmplot.cpp
+16
-0
kmplot/kmplot.h
kmplot/kmplot.h
+1
-0
kmplot/kmplotIface.h
kmplot/kmplotIface.h
+1
-2
No files found.
kmplot/MainDlg.cpp
View file @
3595ecae
...
...
@@ -350,7 +350,6 @@ bool MainDlg::openFile()
{
m_recentFiles
->
removeURL
(
m_url
);
//remove the file from the recent-opened-file-list
m_url
=
""
;
kdDebug
()
<<
"Hit2?"
<<
endl
;
return
false
;
}
m_currentfile
=
m_url
;
...
...
kmplot/kmplot.cpp
View file @
3595ecae
...
...
@@ -256,6 +256,22 @@ void KmPlot::fileOpen()
}
}
void
KmPlot
::
fileOpen
(
const
KURL
&
url
)
{
if
(
!
url
.
isEmpty
())
{
// About this function, the style guide (
// http://developer.kde.org/documentation/standards/kde/style/basics/index.html )
// says that it should open a new window if the document is _not_
// in its initial state. This is what we do here..
if
(
m_part
->
url
().
isEmpty
()
&&
!
isModified
()
)
load
(
KStandardDirs
::
realFilePath
(
url
.
url
())
);
// we open the file in this window...
else
openFileInNewWindow
(
url
);
// we open the file in a new window...
}
}
void
KmPlot
::
openFileInNewWindow
(
const
KURL
url
)
{
KApplication
::
startServiceByDesktopName
(
"kmplot"
,
url
.
url
());
...
...
kmplot/kmplot.h
View file @
3595ecae
...
...
@@ -85,6 +85,7 @@ protected:
private
slots
:
void
fileNew
();
void
fileOpen
();
void
fileOpen
(
const
KURL
&
url
);
void
optionsShowToolbar
();
void
optionsShowStatusbar
();
void
optionsConfigureKeys
();
...
...
kmplot/kmplotIface.h
View file @
3595ecae
...
...
@@ -38,13 +38,12 @@ class KmPlotIface : virtual public DCOPObject
{
K_DCOP
k_dcop:
virtual
void
fileOpen
(
const
KURL
&
url
)
=
0
;
virtual
void
fileOpen
()
=
0
;
virtual
void
setStatusBarText
(
const
QString
&
text
,
int
id
)
=
0
;
virtual
void
optionsConfigureKeys
()
=
0
;
virtual
void
optionsConfigureToolbars
()
=
0
;
virtual
void
openFileInNewWindow
(
const
KURL
url
)
=
0
;
virtual
bool
stopProgressBar
()
=
0
;
virtual
void
startProgressBar
(
int
)
=
0
;
virtual
void
increaseProgressBar
()
=
0
;
...
...
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