added file system watcher
This commit is contained in:
parent
f7caf65251
commit
cb2f7822b7
@ -1,115 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
|
|
||||||
PFileWatcher.cpp
|
|
||||||
|
|
||||||
Author: Andreas Suter
|
|
||||||
e-mail: andreas.suter@psi.ch
|
|
||||||
|
|
||||||
$Id$
|
|
||||||
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
* Copyright (C) 2010 by Andreas Suter *
|
|
||||||
* andreas.suter@psi.ch *
|
|
||||||
* *
|
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
|
||||||
* it under the terms of the GNU General Public License as published by *
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or *
|
|
||||||
* (at your option) any later version. *
|
|
||||||
* *
|
|
||||||
* This program is distributed in the hope that it will be useful, *
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
||||||
* GNU General Public License for more details. *
|
|
||||||
* *
|
|
||||||
* You should have received a copy of the GNU General Public License *
|
|
||||||
* along with this program; if not, write to the *
|
|
||||||
* Free Software Foundation, Inc., *
|
|
||||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
#include <QMessageBox>
|
|
||||||
|
|
||||||
#include "PFileWatcher.h"
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
*/
|
|
||||||
PFileWatcher::PFileWatcher(const QString &fileName, const QDateTime &lastModified) : fFileName(fileName), fLastModified(lastModified)
|
|
||||||
{
|
|
||||||
fFileInfo = 0;
|
|
||||||
fFileInfo = new QFileInfo(fFileName);
|
|
||||||
if (!fFileInfo) {
|
|
||||||
fValid = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
*/
|
|
||||||
PFileWatcher::~PFileWatcher()
|
|
||||||
{
|
|
||||||
if (fFileInfo) {
|
|
||||||
delete fFileInfo;
|
|
||||||
fFileInfo = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
*/
|
|
||||||
bool PFileWatcher::modified()
|
|
||||||
{
|
|
||||||
bool result = false;
|
|
||||||
|
|
||||||
fFileInfo->refresh();
|
|
||||||
|
|
||||||
if (fFileInfo->lastModified() > fLastModified) {
|
|
||||||
fLastModified = fFileInfo->lastModified();
|
|
||||||
result = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
*/
|
|
||||||
void PFileWatcher::modified(int timeout)
|
|
||||||
{
|
|
||||||
fTimerCheck = new QTimer(this);
|
|
||||||
|
|
||||||
connect( fTimerCheck, SIGNAL(timeout()), this, SLOT(checkIfModified()) );
|
|
||||||
QTimer::singleShot(timeout * 1000, this, SLOT(stopFileCheck()));
|
|
||||||
|
|
||||||
fTimerCheck->start(1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
*/
|
|
||||||
void PFileWatcher::checkIfModified()
|
|
||||||
{
|
|
||||||
fFileInfo->refresh();
|
|
||||||
|
|
||||||
if (fFileInfo->lastModified() > fLastModified) {
|
|
||||||
fLastModified = fFileInfo->lastModified();
|
|
||||||
fTimerCheck->stop();
|
|
||||||
emit changed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
*/
|
|
||||||
void PFileWatcher::stopFileCheck()
|
|
||||||
{
|
|
||||||
fTimerCheck->stop();
|
|
||||||
}
|
|
@ -1,74 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
|
|
||||||
PFileWatcher.h
|
|
||||||
|
|
||||||
Author: Andreas Suter
|
|
||||||
e-mail: andreas.suter@psi.ch
|
|
||||||
|
|
||||||
$Id$
|
|
||||||
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
* Copyright (C) 2010 by Andreas Suter *
|
|
||||||
* andreas.suter@psi.ch *
|
|
||||||
* *
|
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
|
||||||
* it under the terms of the GNU General Public License as published by *
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or *
|
|
||||||
* (at your option) any later version. *
|
|
||||||
* *
|
|
||||||
* This program is distributed in the hope that it will be useful, *
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
||||||
* GNU General Public License for more details. *
|
|
||||||
* *
|
|
||||||
* You should have received a copy of the GNU General Public License *
|
|
||||||
* along with this program; if not, write to the *
|
|
||||||
* Free Software Foundation, Inc., *
|
|
||||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
/*
|
|
||||||
CHECK IF THIS IS STILL NEEDED!! AS FAR AS I KNOW, STARTING FROM Qt4.x THERE IS A PROPER Qt-WAY TO DO THIS!!
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _PFILEWATCHER_H_
|
|
||||||
#define _PFILEWATCHER_H_
|
|
||||||
|
|
||||||
#include <QObject>
|
|
||||||
#include <QFileInfo>
|
|
||||||
#include <QString>
|
|
||||||
#include <QDateTime>
|
|
||||||
#include <QTimer>
|
|
||||||
|
|
||||||
class PFileWatcher : public QObject
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
PFileWatcher(const QString &fileName, const QDateTime &lastModified);
|
|
||||||
virtual ~PFileWatcher();
|
|
||||||
|
|
||||||
virtual bool isValid() { return fValid; }
|
|
||||||
virtual bool modified();
|
|
||||||
virtual void modified(int timeout);
|
|
||||||
|
|
||||||
signals:
|
|
||||||
void changed();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void checkIfModified();
|
|
||||||
void stopFileCheck();
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool fValid;
|
|
||||||
QString fFileName;
|
|
||||||
QFileInfo *fFileInfo;
|
|
||||||
QDateTime fLastModified;
|
|
||||||
|
|
||||||
QTimer *fTimerCheck;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // _PFILEWATCHER_H_
|
|
@ -52,7 +52,7 @@ PGetTitleBlockDialog::PGetTitleBlockDialog(QWidget *parent, Qt::WindowFlags f) :
|
|||||||
void PGetTitleBlockDialog::helpContent()
|
void PGetTitleBlockDialog::helpContent()
|
||||||
{
|
{
|
||||||
PHelp *help = new PHelp("http://lmu.web.psi.ch/musrfit/title.html");
|
PHelp *help = new PHelp("http://lmu.web.psi.ch/musrfit/title.html");
|
||||||
help->show();
|
//help->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@ -45,8 +45,8 @@ class PSubTextEdit : public QPlainTextEdit
|
|||||||
PSubTextEdit(PAdmin *admin = 0, QWidget *parent = 0);
|
PSubTextEdit(PAdmin *admin = 0, QWidget *parent = 0);
|
||||||
virtual ~PSubTextEdit() {}
|
virtual ~PSubTextEdit() {}
|
||||||
|
|
||||||
void setLastModified(const QDateTime &lastModified) { fLastModified = lastModified; }
|
// void setLastModified(const QDateTime &lastModified) { fLastModified = lastModified; }
|
||||||
QDateTime getLastModified() const { return fLastModified; }
|
// QDateTime getLastModified() const { return fLastModified; }
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void insertTitle();
|
void insertTitle();
|
||||||
@ -67,7 +67,7 @@ class PSubTextEdit : public QPlainTextEdit
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
PAdmin *fAdmin;
|
PAdmin *fAdmin;
|
||||||
QDateTime fLastModified;
|
// QDateTime fLastModified;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _PSUBTEXTEDIT_H_
|
#endif // _PSUBTEXTEDIT_H_
|
||||||
|
@ -57,7 +57,6 @@ using namespace std;
|
|||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
|
|
||||||
#include "PTextEdit.h"
|
#include "PTextEdit.h"
|
||||||
//#include "PFileWatcher.h"
|
|
||||||
#include "PSubTextEdit.h"
|
#include "PSubTextEdit.h"
|
||||||
#include "PAdmin.h"
|
#include "PAdmin.h"
|
||||||
#include "PFindDialog.h"
|
#include "PFindDialog.h"
|
||||||
@ -78,6 +77,13 @@ PTextEdit::PTextEdit( QWidget *parent, Qt::WindowFlags f )
|
|||||||
{
|
{
|
||||||
fAdmin = new PAdmin();
|
fAdmin = new PAdmin();
|
||||||
|
|
||||||
|
fFileSystemWatcher = new QFileSystemWatcher();
|
||||||
|
if (fFileSystemWatcher == 0) {
|
||||||
|
QMessageBox::information(this, "**ERROR**", "Couldn't invoke QFileSystemWatcher!");
|
||||||
|
} else {
|
||||||
|
connect( fFileSystemWatcher, SIGNAL(fileChanged(const QString&)), this, SLOT(fileChanged(const QString&)));
|
||||||
|
}
|
||||||
|
|
||||||
fMusrT0Action = 0;
|
fMusrT0Action = 0;
|
||||||
|
|
||||||
fMsr2DataParam = 0;
|
fMsr2DataParam = 0;
|
||||||
@ -112,7 +118,6 @@ PTextEdit::PTextEdit( QWidget *parent, Qt::WindowFlags f )
|
|||||||
fileNew();
|
fileNew();
|
||||||
}
|
}
|
||||||
|
|
||||||
connect( fTabWidget, SIGNAL( currentChanged(QWidget*) ), this, SLOT( checkIfModified(QWidget*) ));
|
|
||||||
connect( fTabWidget, SIGNAL( currentChanged(QWidget*) ), this, SLOT( applyFontSettings(QWidget*) ));
|
connect( fTabWidget, SIGNAL( currentChanged(QWidget*) ), this, SLOT( applyFontSettings(QWidget*) ));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -408,7 +413,7 @@ void PTextEdit::setupTextActions()
|
|||||||
this, SLOT( textFamily( const QString & ) ) );
|
this, SLOT( textFamily( const QString & ) ) );
|
||||||
QLineEdit *edit = fComboFont->lineEdit();
|
QLineEdit *edit = fComboFont->lineEdit();
|
||||||
if (edit == 0) {
|
if (edit == 0) {
|
||||||
qDebug() << endl << "**ERROR** PTextEdit::setupTextActions(): cannot edit fComboFont" << endl;
|
// qDebug() << endl << "**ERROR** PTextEdit::setupTextActions(): cannot edit fComboFont" << endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
edit->setText( fAdmin->getFontName() );
|
edit->setText( fAdmin->getFontName() );
|
||||||
@ -424,7 +429,7 @@ void PTextEdit::setupTextActions()
|
|||||||
this, SLOT( textSize( const QString & ) ) );
|
this, SLOT( textSize( const QString & ) ) );
|
||||||
edit = fComboSize->lineEdit();
|
edit = fComboSize->lineEdit();
|
||||||
if (edit == 0) {
|
if (edit == 0) {
|
||||||
qDebug() << endl << "**ERROR** PTextEdit::setupTextActions(): cannot edit fComboSize" << endl;
|
// qDebug() << endl << "**ERROR** PTextEdit::setupTextActions(): cannot edit fComboSize" << endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
edit->setText( QString("%1").arg(fAdmin->getFontSize()) );
|
edit->setText( QString("%1").arg(fAdmin->getFontSize()) );
|
||||||
@ -554,10 +559,6 @@ void PTextEdit::load( const QString &f, const int index )
|
|||||||
QFileInfo info(f);
|
QFileInfo info(f);
|
||||||
|
|
||||||
PSubTextEdit *edit = new PSubTextEdit( fAdmin );
|
PSubTextEdit *edit = new PSubTextEdit( fAdmin );
|
||||||
edit->setLastModified(info.lastModified());
|
|
||||||
// edit->setAcceptRichText( false );
|
|
||||||
// edit->setFontFamily(fAdmin->getFontName());
|
|
||||||
// edit->setFontPointSize(fAdmin->getFontSize());
|
|
||||||
edit->setFont(QFont(fAdmin->getFontName(), fAdmin->getFontSize()));
|
edit->setFont(QFont(fAdmin->getFontName(), fAdmin->getFontSize()));
|
||||||
|
|
||||||
if (index == -1)
|
if (index == -1)
|
||||||
@ -568,6 +569,8 @@ void PTextEdit::load( const QString &f, const int index )
|
|||||||
if ( !file.open( QIODevice::ReadOnly ) )
|
if ( !file.open( QIODevice::ReadOnly ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
fFileSystemWatcher->addPath(f);
|
||||||
|
|
||||||
QTextStream ts( &file );
|
QTextStream ts( &file );
|
||||||
QString txt = ts.readAll();
|
QString txt = ts.readAll();
|
||||||
edit->setPlainText( txt );
|
edit->setPlainText( txt );
|
||||||
@ -713,8 +716,8 @@ void PTextEdit::insertCommandBlock()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
/**
|
|
||||||
* <p>
|
* <p>
|
||||||
|
/**
|
||||||
*/
|
*/
|
||||||
void PTextEdit::insertFourierBlock()
|
void PTextEdit::insertFourierBlock()
|
||||||
{
|
{
|
||||||
@ -746,9 +749,6 @@ void PTextEdit::insertStatisticBlock()
|
|||||||
void PTextEdit::fileNew()
|
void PTextEdit::fileNew()
|
||||||
{
|
{
|
||||||
PSubTextEdit *edit = new PSubTextEdit( fAdmin );
|
PSubTextEdit *edit = new PSubTextEdit( fAdmin );
|
||||||
// edit->setAcceptRichText( false );
|
|
||||||
// edit->setFontFamily(fAdmin->getFontName());
|
|
||||||
// edit->setFontPointSize(fAdmin->getFontSize());
|
|
||||||
edit->setFont(QFont(fAdmin->getFontName(), fAdmin->getFontSize()));
|
edit->setFont(QFont(fAdmin->getFontName(), fAdmin->getFontSize()));
|
||||||
doConnections( edit );
|
doConnections( edit );
|
||||||
fTabWidget->addTab( edit, tr( "noname" ) );
|
fTabWidget->addTab( edit, tr( "noname" ) );
|
||||||
@ -777,7 +777,7 @@ void PTextEdit::fileOpen()
|
|||||||
finfo1.setFile(*it);
|
finfo1.setFile(*it);
|
||||||
for (int i=0; i<fTabWidget->count(); i++) {
|
for (int i=0; i<fTabWidget->count(); i++) {
|
||||||
tabFln = *fFilenames.find( dynamic_cast<PSubTextEdit*>(fTabWidget->widget(i)));
|
tabFln = *fFilenames.find( dynamic_cast<PSubTextEdit*>(fTabWidget->widget(i)));
|
||||||
qDebug() << endl << "tabFln=" << tabFln;
|
// qDebug() << endl << "tabFln=" << tabFln;
|
||||||
finfo2.setFile(tabFln);
|
finfo2.setFile(tabFln);
|
||||||
if (finfo1.absoluteFilePath() == finfo2.absoluteFilePath()) {
|
if (finfo1.absoluteFilePath() == finfo2.absoluteFilePath()) {
|
||||||
alreadyOpen = true;
|
alreadyOpen = true;
|
||||||
@ -809,14 +809,6 @@ void PTextEdit::fileReload()
|
|||||||
fileClose(false);
|
fileClose(false);
|
||||||
load(fln, index);
|
load(fln, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
// clean up file watcher object if present
|
|
||||||
if (fFileWatcher) {
|
|
||||||
delete fFileWatcher;
|
|
||||||
fFileWatcher = 0;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
@ -928,7 +920,11 @@ void PTextEdit::fileClose(const bool check)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString str = *fFilenames.find(currentEditor());
|
||||||
|
fFileSystemWatcher->removePath(str);
|
||||||
|
|
||||||
delete currentEditor();
|
delete currentEditor();
|
||||||
|
|
||||||
if ( currentEditor() )
|
if ( currentEditor() )
|
||||||
currentEditor()->viewport()->setFocus();
|
currentEditor()->viewport()->setFocus();
|
||||||
}
|
}
|
||||||
@ -956,8 +952,14 @@ void PTextEdit::fileCloseAll()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// close all editor tabs
|
// close all editor tabs
|
||||||
|
QString str;
|
||||||
do {
|
do {
|
||||||
|
// remove file from file system watcher
|
||||||
|
str = *fFilenames.find(currentEditor());
|
||||||
|
fFileSystemWatcher->removePath(str);
|
||||||
|
|
||||||
delete currentEditor();
|
delete currentEditor();
|
||||||
|
|
||||||
if ( currentEditor() )
|
if ( currentEditor() )
|
||||||
currentEditor()->viewport()->setFocus();
|
currentEditor()->viewport()->setFocus();
|
||||||
} while ( currentEditor() );
|
} while ( currentEditor() );
|
||||||
@ -994,11 +996,17 @@ void PTextEdit::fileCloseAllOthers()
|
|||||||
|
|
||||||
// close all editor tabs
|
// close all editor tabs
|
||||||
int i=0;
|
int i=0;
|
||||||
|
QString str;
|
||||||
do {
|
do {
|
||||||
if (fTabWidget->tabText(i) != label)
|
if (fTabWidget->tabText(i) != label) {
|
||||||
|
// remove file from file system watcher
|
||||||
|
str = *fFilenames.find(dynamic_cast<PSubTextEdit*>(fTabWidget->widget(i)));
|
||||||
|
fFileSystemWatcher->removePath(str);
|
||||||
|
|
||||||
delete fTabWidget->widget(i);
|
delete fTabWidget->widget(i);
|
||||||
else
|
} else {
|
||||||
i++;
|
i++;
|
||||||
|
}
|
||||||
} while ( fTabWidget->count() > 1 );
|
} while ( fTabWidget->count() > 1 );
|
||||||
|
|
||||||
currentEditor()->viewport()->setFocus();
|
currentEditor()->viewport()->setFocus();
|
||||||
@ -1963,11 +1971,6 @@ void PTextEdit::musrT0()
|
|||||||
system(cmd.toLatin1());
|
system(cmd.toLatin1());
|
||||||
|
|
||||||
QString fln = *fFilenames.find( currentEditor() );
|
QString fln = *fFilenames.find( currentEditor() );
|
||||||
/*
|
|
||||||
fFileWatcher = new PFileWatcher(fln, currentEditor()->getLastModified());
|
|
||||||
fFileWatcher->modified(3600);
|
|
||||||
connect(fFileWatcher, SIGNAL( changed() ), this, SLOT( fileReload() ));
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
@ -2228,29 +2231,36 @@ void PTextEdit::applyFontSettings(QWidget*)
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>Called when an open file is changing outside the editor (SLOT).
|
||||||
|
*
|
||||||
|
* \param fileName file name of the changed file.
|
||||||
*/
|
*/
|
||||||
void PTextEdit::checkIfModified(QWidget*)
|
void PTextEdit::fileChanged(const QString &fileName)
|
||||||
{
|
{
|
||||||
/*
|
QString str = "File '" + fileName + "' changed on the system.\nDo you want to reload it?";
|
||||||
if ( fTabWidget->currentWidget() && fTabWidget->currentWidget()->inherits( "PSubTextEdit" ) ) {
|
int result = QMessageBox::question(this, "**INFO**", str, QMessageBox::Yes, QMessageBox::No);
|
||||||
QString fln = *fFilenames.find( currentEditor() );
|
|
||||||
PFileWatcher fw(fln, currentEditor()->getLastModified());
|
|
||||||
if (fw.isValid()) {
|
|
||||||
if (fw.modified()) {
|
|
||||||
int result = QMessageBox::information( this, "**INFO**",
|
|
||||||
"File modified on disk. Do you want to reload it?",
|
|
||||||
QMessageBox::Yes, QMessageBox::No);
|
|
||||||
if (result == QMessageBox::Yes) {
|
if (result == QMessageBox::Yes) {
|
||||||
fileReload();
|
// find correct file
|
||||||
} else {
|
int idx = -1;
|
||||||
textChanged(true);
|
for (int i=0; i<fTabWidget->count(); i++) {
|
||||||
|
if (fTabWidget->tabText(i) == QFileInfo(fileName).fileName()) {
|
||||||
|
idx = i;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (idx == -1)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// remove file from file system watcher
|
||||||
|
fFileSystemWatcher->removePath(fileName);
|
||||||
|
|
||||||
|
// close tab
|
||||||
|
fTabWidget->removeTab(idx);
|
||||||
|
// load it
|
||||||
|
load(fileName, idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
// END
|
// END
|
||||||
|
@ -36,10 +36,10 @@
|
|||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
|
||||||
#include "musredit.h"
|
#include "musredit.h"
|
||||||
//#include "PFileWatcher.h"
|
|
||||||
|
|
||||||
class PSubTextEdit;
|
class PSubTextEdit;
|
||||||
class PAdmin;
|
class PAdmin;
|
||||||
|
class QFileSystemWatcher;
|
||||||
class QAction;
|
class QAction;
|
||||||
class QComboBox;
|
class QComboBox;
|
||||||
class QTabWidget;
|
class QTabWidget;
|
||||||
@ -130,10 +130,11 @@ private slots:
|
|||||||
void replaceAll();
|
void replaceAll();
|
||||||
|
|
||||||
void applyFontSettings(QWidget*);
|
void applyFontSettings(QWidget*);
|
||||||
void checkIfModified(QWidget*);
|
void fileChanged(const QString &fileName);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PAdmin *fAdmin;
|
PAdmin *fAdmin;
|
||||||
|
QFileSystemWatcher *fFileSystemWatcher;
|
||||||
|
|
||||||
QAction *fMusrT0Action;
|
QAction *fMusrT0Action;
|
||||||
|
|
||||||
@ -151,8 +152,6 @@ private:
|
|||||||
|
|
||||||
QTabWidget *fTabWidget;
|
QTabWidget *fTabWidget;
|
||||||
QMap<PSubTextEdit*, QString> fFilenames;
|
QMap<PSubTextEdit*, QString> fFilenames;
|
||||||
|
|
||||||
// PFileWatcher *fFileWatcher;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user