2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqtgui4 (>= 4.4.3-0)")

if(APPLE)
# We start from build/bin/kst2.app, all is build into the final bundle folder
# On the mac the pathes to needed shared libraries are hardcoded in the binary/library
# On the mac the paths to needed shared libraries are hardcoded in the binary/library
# which could be changed by the macro 'fixup_bundle'
# libs which are hardcoded are resolved automatically
# but the plugins must be passed as extra argument because they are not hardcoded in the binary
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.qmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Building without Xcode (out-of-source):
qmake ../kst/kst.pro -spec macx-g++ -config release
make

Fixing the link pathes (installs kst frameworks to /Library/Frameworks)
Fixing the link paths (installs kst frameworks to /Library/Frameworks)
../kst/misc/macdeploykst

Starting Kst from command line:
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/FindGsl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# * *
# ***************************************************************************

# use pkg to find the library name and pathes,
# use pkg to find the library name and paths,
# but use this iformation in find_* only
if(NOT GSL_INCLUDEDIR)

Expand Down
Binary file added src/images/edit-copy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/images/icons.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<file>document-save.png</file>
<file>edit-redo.png</file>
<file>edit-undo.png</file>
<file>edit-copy.png</file>
<file>draw-bezier-curves.png</file>
<file>document-save-as.png</file>
<file>kbugbuster.png</file>
Expand Down Expand Up @@ -99,6 +100,7 @@
<file>svg_icons/document-close.svgz</file>
<file>svg_icons/edit-undo.svgz</file>
<file>svg_icons/edit-redo.svgz</file>
<file>svg_icons/edit-copy.svgz</file>
<file>svg_icons/document-save-as.svgz</file>
<file>svg_icons/tab-close.svgz</file>
<file>svg_icons/tab-new.svgz</file>
Expand Down
Binary file added src/images/svg_icons/edit-copy.svgz
Binary file not shown.
13 changes: 6 additions & 7 deletions src/kst/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ if(UNIX AND NOT APPLE)
# ${k}/kstfilter.desktop
# ${k}/kstextension.desktop
# DESTINATION share/servicetypes/kst)
install(FILES ${k}/kst2.desktop DESTINATION share/applnk/Graphics)
install(FILES ${k}/x-kst2.desktop DESTINATION share/mimelink/application)
install(FILES ${k}/x-kst.xml DESTINATION share/mime/packages)
install(FILES ${k}/kst2.desktop DESTINATION share/applications)

# icons
Expand All @@ -60,11 +59,11 @@ if(UNIX AND NOT APPLE)
install(FILES ${kst_dir}/src/images/128x128/kst.png DESTINATION share/icons/hicolor/128x128/apps)
install(FILES ${kst_dir}/src/images/svg_icons/kst.svg DESTINATION share/icons/hicolor/scalable/apps)

install(FILES ${kst_dir}/src/images/32x32/application-x-kst.png DESTINATION share/icons/hicolor/32x32/apps)
install(FILES ${kst_dir}/src/images/48x48/application-x-kst.png DESTINATION share/icons/hicolor/48x48/apps)
install(FILES ${kst_dir}/src/images/64x64/application-x-kst.png DESTINATION share/icons/hicolor/64x64/apps)
install(FILES ${kst_dir}/src/images/128x128/application-x-kst.png DESTINATION share/icons/hicolor/128x128/apps)
install(FILES ${kst_dir}/src/images/svg_icons/application-x-kst.svg DESTINATION share/icons/hicolor/scalable/apps)
install(FILES ${kst_dir}/src/images/32x32/application-x-kst.png DESTINATION share/icons/hicolor/32x32/mimetypes)
install(FILES ${kst_dir}/src/images/48x48/application-x-kst.png DESTINATION share/icons/hicolor/48x48/mimetypes)
install(FILES ${kst_dir}/src/images/64x64/application-x-kst.png DESTINATION share/icons/hicolor/64x64/mimetypes)
install(FILES ${kst_dir}/src/images/128x128/application-x-kst.png DESTINATION share/icons/hicolor/128x128/mimetypes)
install(FILES ${kst_dir}/src/images/svg_icons/application-x-kst.svg DESTINATION share/icons/hicolor/scalable/mimetypes)

endif()

Expand Down
22 changes: 22 additions & 0 deletions src/kst/XmlMessages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
function get_files
{
echo x-kst.xml
}

function po_for_file
{
case "$1" in
x-kst.xml)
echo kst_xml_mimetypes.po
;;
esac
}

function tags_for_file
{
case "$1" in
x-kst.xml)
echo comment
;;
esac
}
28 changes: 14 additions & 14 deletions src/kst/kst.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ kst may be run entirely from within its GUI, in which case no
command line arguments are needed. kst has a powerful wizard for
easily setting up new plots.

In the second invocation, kst loads pre-saved plot specifications from the
In the second invocation, kst loads pre\-saved plot specifications from the
file
.I kstfile
and optionally may override some of the settings in that file.
Expand All @@ -64,7 +64,7 @@ plot all curves in separate plots
.TP
.B \-a\fR
average frames (simple mean) when plotting with
.B -s\fR.
.B \-s\fR.
.TP
.B \-\-A4\fR
use A4 sized paper for printing. Requires
Expand All @@ -90,7 +90,7 @@ and instead use
.B \-f\ STARTFRAME\fR
begin plotting at
.I STARTFRAME
frames into the data. Set to -1 to start at
frames into the data. Set to \-1 to start at
.I NUMFRAMES
from the end of the data.
.TP
Expand All @@ -112,7 +112,7 @@ use US Letter sized paper for printing. Requires
.B \-n\ NUMFRAMES\fR
plot at most
.I NUMFRAMES
frames of data. Set to -1 to indicate all of the data.
frames of data. Set to \-1 to indicate all of the data.
.TP
.B \-P\ PLOTNAME\fR
plot all plots in the plot named
Expand Down Expand Up @@ -145,7 +145,7 @@ frames when plotting.
.B \-x\ FIELD\fR
use
.I FIELD
as the X-axis vector.
as the X\-axis vector.
.TP
.B \-y\ FIELD\fR
plot
Expand All @@ -158,30 +158,30 @@ plot
as an image.
.SH EXAMPLES
Plot all data in column 2 from data.dat.
kst data.dat -y 2
kst data.dat \-y 2

Same as above, except only read 20 lines, starting at line 10.
kst data.dat -f 10 -n 20 -y 2
kst data.dat \-f 10 \-n 20 \-y 2

also read col 1. One plot per curve.
kst data.dat -f 10 -n 20 -y 1 -y 2
kst data.dat \-f 10 \-n 20 \-y 1 \-y 2

Read col 1 from data2.dat and col 1 from data.dat
kst data.dat -f 10 -n 20 -y 2 data2.dat -y 1
kst data.dat \-f 10 \-n 20 \-y 2 data2.dat \-y 1

Same as above, except read 40 lines starting at 30 in data2.dat
kst data.dat -f 10 -n 20 -y 2 data2.dat -f 30 -n 40 -y 1
kst data.dat \-f 10 \-n 20 \-y 2 data2.dat \-f 30 \-n 40 \-y 1

Specify the X vector and error bars:
Plot x = col 1 and Y = col 2 and error flags = col 3 from data.dat
kst data.dat -x 1 -e 3 -y 2
kst data.dat \-x 1 \-e 3 \-y 2

Get the X vector from data1.dat, and the Y vector from data2.dat.
kst data1.dat -x 1 data2.dat -y 1
kst data1.dat \-x 1 data2.dat \-y 1

Placement:
Plot column 2 and column 3 in plot P1 and column 4 in plot P2
kst data.dat -P P1 -y 2 -y 3 -P P2 -y 4
kst data.dat \-P P1 \-y 2 \-y 3 \-P P2 \-y 4
.SH BUGS
Please report bugs to either the kst mailing list at
.I kst@kde.org
Expand All @@ -198,6 +198,6 @@ Matthew Truch <matt@truch.net>
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Invariant Sections, with no Front\-Cover Texts, and with no Back\-Cover
Texts. A copy of the license is included in the `COPYING.DOC' file
as part of the kst distribution.
2 changes: 1 addition & 1 deletion src/kst/kst2.desktop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Exec=kst2
Exec=kst2 %f
Icon=kst
X-DocPath=kst2/index.html
MimeType=application/x-kst;
Expand Down
16 changes: 16 additions & 0 deletions src/kst/x-kst.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-kst">
<comment>Kst Session File</comment>
<comment xml:lang="ca">Fitxer de sessió del Kst</comment>
<comment xml:lang="ca@valencia">Fitxer de sessió del Kst</comment>
<comment xml:lang="cs">Soubor sezení Kst</comment>
<comment xml:lang="es">Archivo de sesión de Kst</comment>
<comment xml:lang="nl">Sessiebestand in Kst</comment>
<comment xml:lang="pt">Ficheiro de Sessão do Kst</comment>
<comment xml:lang="sk">Súbor sedenia Kst</comment>
<comment xml:lang="sv">Kst-sessionsfil</comment>
<comment xml:lang="uk">файл сеансу Kst</comment>
<glob pattern="*.kst"/>
</mime-type>
</mime-info>
49 changes: 0 additions & 49 deletions src/kst/x-kst2.desktop

This file was deleted.

8 changes: 5 additions & 3 deletions src/libkstapp/aboutdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ AboutDialog::AboutDialog(QWidget *parent)
authors.replaceInStrings(QRegExp("^(.*)"), "<li>\\1</li>");

QStringList msg = QStringList()
<< tr("<qt><h2>Kst %1 - A data viewing program.</h2>").arg(KSTVERSION)
<< tr("<qt><h2>Kst %1").arg(KSTVERSION)
#ifdef KST_REVISION
<< tr("Revision %1<br><hr>").arg(KST_REVISION)
<< tr(" Revision %1").arg(KST_REVISION)
#endif
<< tr("Copyright &copy; 2000-2014 Barth Netterfield<br><hr>")
<< tr("</h2>")
<< tr("<h2>A data viewing program.</h2>")
<< tr("Copyright &copy; 2000-2017 Barth Netterfield<br><hr>")
<< tr("Homepage: <a href=\"http://kst-plot.kde.org/\">http://kst-plot.kde.org/</a><br>")
<< tr("Please report bugs with the 'Bug Report Wizard' of the 'Help' menu.<br>")
<< tr("<br>Authors and contributors (sorted alphabetically):")
Expand Down
27 changes: 27 additions & 0 deletions src/libkstapp/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
#include <QDebug>
#include <QDesktopServices>
#include <QSignalMapper>
#include <QClipboard>

namespace Kst {

Expand Down Expand Up @@ -365,6 +366,25 @@ void MainWindow::updateRecentKstFiles(const QString& filename)
updateRecentFiles("recentKstFileList", _fileMenu, _bottomRecentKstActions, _recentKstFilesMenu, filename, SLOT(openRecentKstFile()));
}

void MainWindow::copyTab()
{
View *view = _tabWidget->currentView();
QClipboard *clipboard = QApplication::clipboard();

QPainter painter;
QPixmap pixmap(view->size());

painter.begin(&pixmap);

view->setPrinting(true);
view->render(&painter);
view->setPrinting(false);

painter.end();

clipboard->setPixmap(pixmap);
}


void MainWindow::updateRecentDataFiles(const QString& filename)
{
Expand Down Expand Up @@ -1137,6 +1157,11 @@ void MainWindow::createActions() {
_redoAct->setShortcuts(QKeySequence::Redo);
_redoAct->setIcon(KstGetIcon("edit-redo"));

_copyTabAct = new QAction(tr("Copy Current Tab"), this);
_copyTabAct->setStatusTip("Copy current tab to desktop clipboard");
_copyTabAct->setIcon(KstGetIcon("edit-copy"));
connect(_copyTabAct, SIGNAL(triggered()), this, SLOT(copyTab()));

// ********************* View Actions ********************************** //
_vectorEditorAct = new QAction(tr("&Vectors"), this);
_vectorEditorAct->setStatusTip(tr("Show all vectors in a spreadsheet"));
Expand Down Expand Up @@ -1497,6 +1522,7 @@ void MainWindow::createMenus() {
_editMenu = menuBar()->addMenu(tr("&Edit"));
_editMenu->addAction(_undoAct);
_editMenu->addAction(_redoAct);
_editMenu->addAction(_copyTabAct);
// Cut/Copy/Paste will come here

_viewMenu = menuBar()->addMenu(tr("&View"));
Expand Down Expand Up @@ -1640,6 +1666,7 @@ void MainWindow::createToolBars() {
_editToolBar->setObjectName("Edit Toolbar");
_editToolBar->addAction(_undoAct);
_editToolBar->addAction(_redoAct);
_editToolBar->addAction(_copyTabAct);

_toolsToolBar = addToolBar(tr("Tools"));
_toolsToolBar->setObjectName("Tools Toolbar");
Expand Down
2 changes: 2 additions & 0 deletions src/libkstapp/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class MainWindow : public QMainWindow


public Q_SLOTS:
void copyTab();
void showDataManager();
void showDebugDialog();
void showExportGraphicsDialog();
Expand Down Expand Up @@ -260,6 +261,7 @@ class MainWindow : public QMainWindow

QAction *_undoAct;
QAction *_redoAct;
QAction *_copyTabAct;

// FIXME: move these into each object, along with the creation slot?
QAction *_createLabelAct;
Expand Down
2 changes: 1 addition & 1 deletion src/libkstapp/sharedaxisboxitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ void SharedAxisBoxItem::addToMenuForContextEvent(QMenu &menu) {


void SharedAxisBoxItem::triggerContextEvent(QGraphicsSceneContextMenuEvent *event) {
contextMenuEvent(event);
ViewItem::contextMenuEvent(event);
}


Expand Down
Loading