[Kst] branches/work/kst/portto4/kst/src
George Staikos
staikos at kde.org
Wed May 30 19:22:16 CEST 2007
SVN commit 669876 by staikos:
Add in the memory free widget and a progress bar
M +4 -0 libkst/CMakeLists.txt
M +1 -1 libkst/psversion.h
M +1 -1 libkst/sysinfo.h
M +1 -0 libkstapp/CMakeLists.txt
M +11 -0 libkstapp/mainwindow.cpp
M +5 -0 libkstapp/mainwindow.h
A libkstapp/memorywidget.cpp [License: GPL (v2+)]
A libkstapp/memorywidget.h [License: GPL (v2+)]
--- branches/work/kst/portto4/kst/src/libkst/CMakeLists.txt #669875:669876
@@ -26,6 +26,10 @@
ksttimezones.cpp
kstscalar.cpp
# $(PROCPS_COPY)
+# FIXME: switch to a variable
+ sysinfo.c
+ psversion.c
+# END FIXME
kststring.cpp
kstmatrix.cpp
kstrmatrix.cpp
--- branches/work/kst/portto4/kst/src/libkst/psversion.h #669875:669876
@@ -1,5 +1,5 @@
#include "config.h"
-#ifdef HAVE_LINUX
+#ifdef __linux__
#ifndef PROC_VERSION_H
#define PROC_VERSION_H
--- branches/work/kst/portto4/kst/src/libkst/sysinfo.h #669875:669876
@@ -1,4 +1,4 @@
-#ifdef HAVE_LINUX
+#ifdef __linux__
#ifndef PROC_SYSINFO_H
#define PROC_SYSINFO_H
#include <sys/types.h>
--- branches/work/kst/portto4/kst/src/libkstapp/CMakeLists.txt #669875:669876
@@ -12,6 +12,7 @@
lineitem.cpp
mainwindow.cpp
matrixmodel.cpp
+ memorywidget.cpp
pictureitem.cpp
plotitem.cpp
sessionmodel.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.cpp #669875:669876
@@ -17,6 +17,7 @@
#include "kstapplication.h"
#include "labelitem.h"
#include "lineitem.h"
+#include "memorywidget.h"
#include "pictureitem.h"
#include "plotitem.h"
#include "tabwidget.h"
@@ -312,10 +313,20 @@
void MainWindow::createStatusBar() {
+ MemoryWidget *mw = new MemoryWidget(statusBar());
+ statusBar()->addPermanentWidget(mw);
+ _progressBar = new QProgressBar(statusBar());
+ _progressBar->hide();
+ statusBar()->addPermanentWidget(_progressBar);
statusBar()->showMessage(tr("Ready"));
}
+QProgressBar *MainWindow::progressBar() const {
+ return _progressBar;
+}
+
+
void MainWindow::showDataManager() {
if (!_dataManager) {
_dataManager = new DataManager(this, _doc);
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.h #669875:669876
@@ -13,9 +13,11 @@
#define MAINWINDOW_H
#include <QMainWindow>
+#include <QPointer>
class QMenu;
class QAction;
+class QProgressBar;
class QUndoGroup;
namespace Kst {
@@ -36,6 +38,7 @@
QUndoGroup *undoGroup() const;
TabWidget *tabWidget() const;
Document *document() const;
+ QProgressBar *progressBar() const;
public Q_SLOTS:
void showDataManager();
@@ -77,6 +80,8 @@
DataManager *_dataManager;
VectorEditorDialog *_vectorEditor;
+ QPointer<QProgressBar> _progressBar;
+
// Do we need these? I don't think so...
QMenu *_fileMenu;
QMenu *_dataMenu;
More information about the Kst
mailing list