summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/tinykate/tinykate.cpp5
-rw-r--r--noncore/apps/tinykate/tinykate.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/noncore/apps/tinykate/tinykate.cpp b/noncore/apps/tinykate/tinykate.cpp
index 694efc6..ea7ea45 100644
--- a/noncore/apps/tinykate/tinykate.cpp
+++ b/noncore/apps/tinykate/tinykate.cpp
@@ -180,16 +180,21 @@ void TinyKate::open(const QString & filename)
tabwidget->addTab(kv=kd->createView(tabwidget,"bLAH"),"tinykate/tinykate", filenamed );
qDebug(filename);
kd->setDocName( filenamed);
kd->open( filename );
viewCount++;
}
+void TinyKate::setDocument(const QString& fileref)
+{
+ open( fileref );
+}
+
void TinyKate::slotCurrentChanged( QWidget * view)
{
if (currentView) {
disconnect(editCopy,SIGNAL(activated()),currentView,SLOT(copy()));
disconnect(editCut,SIGNAL(activated()),currentView,SLOT(cut()));
disconnect(editPaste,SIGNAL(activated()),currentView,SLOT(paste()));
disconnect(editUndo,SIGNAL(activated()),currentView,SLOT(undo()));
diff --git a/noncore/apps/tinykate/tinykate.h b/noncore/apps/tinykate/tinykate.h
index cdd8f43..2e8ca74 100644
--- a/noncore/apps/tinykate/tinykate.h
+++ b/noncore/apps/tinykate/tinykate.h
@@ -31,16 +31,17 @@ class TinyKate : public QMainWindow
{
Q_OBJECT
public:
TinyKate( QWidget *parent=0, const char *name=0, WFlags f = 0);
~TinyKate( );
public slots:
void slotNew();
+ void setDocument(const QString& fileref);
protected slots:
void slotOpen();
void slotClose();
void slotCurrentChanged(QWidget *);
void slotSave();
void slotSaveAs();
protected: