summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate/tinykate.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/tinykate/tinykate.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/tinykate.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/apps/tinykate/tinykate.cpp b/noncore/apps/tinykate/tinykate.cpp
index 32c1eab..3c9a637 100644
--- a/noncore/apps/tinykate/tinykate.cpp
+++ b/noncore/apps/tinykate/tinykate.cpp
@@ -18,24 +18,25 @@
#include <qtoolbutton.h>
#include <qmenubar.h>
#include <qpe/resource.h>
#include <qpe/qpeapplication.h>
#include <opie2/ofiledialog.h>
#include "tinykate.h"
#include <katedocument.h>
#include <kglobal.h>
+using namespace Opie::Ui;
TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) :
QMainWindow( parent, name, f )
{
shutDown=false;
nextUnnamed=0;
currentView=0;
viewCount=0;
setCaption(tr("TinyKATE"));
KGlobal::setAppName("TinyKATE");
QMenuBar *mb = new QMenuBar( this );
mb->setMargin( 0 );
@@ -157,25 +158,25 @@ TinyKate::~TinyKate( )
while (currentView!=0) {
slotClose();
}
if( KGlobal::config() != 0 ) {
qWarning("deleting KateConfig object..\n");
delete KGlobal::config();
}
}
void TinyKate::slotOpen( )
{
- QString filename = Opie::OFileDialog::getOpenFileName( OFileSelector::EXTENDED_ALL,
+ QString filename = OFileDialog::getOpenFileName( OFileSelector::EXTENDED_ALL,
QString::null);
if (!filename.isEmpty()) {
open(filename);
}
}
void TinyKate::open(const QString & filename)
{
KateDocument *kd= new KateDocument(false, false, this,0,this);
KTextEditor::View *kv;
QFileInfo fi(filename);
QString filenamed = fi.fileName();
@@ -252,26 +253,26 @@ void TinyKate::slotSave() {
if( kd->docName().isEmpty())
slotSaveAs();
else
kd->saveFile();
// kv->save();
// kd->saveFile();
}
void TinyKate::slotSaveAs() {
if (currentView==0) return;
KateDocument *kd = (KateDocument*) currentView->document();
- QString filename= Opie::OFileDialog::getSaveFileName(OFileSelector::EXTENDED_ALL,
- QString::null);
+ QString filename= OFileDialog::getSaveFileName(OFileSelector::EXTENDED_ALL,
+ QString::null);
if (!filename.isEmpty()) {
qDebug("saving file "+filename);
QFileInfo fi(filename);
QString filenamed = fi.fileName();
kd->setDocFile( filename);
kd->setDocName( filenamed);
kd->saveFile();
// KTextEditor::View *dv = currentView;
// tabwidget->changeTab( dv, filenamed);
// need to change tab label here
}