--- /dev/null
+######################################################################
+#
+# !!!!!!! IMPORTANT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+#
+# Edit only RegistrationWizard.pro.in -- RegistrationWizard.pro is built by the ./configure program
+#
+# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+#
+QT += core gui network widgets
+lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5")
+
+TARGET = RegistrationWizard
+TEMPLATE = app
+
+# The following define makes your compiler emit warnings if you use
+# any feature of Qt which has been marked as deprecated (the exact warnings
+# depend on your compiler). Please consult the documentation of the
+# deprecated API in order to know how to port your code away from it.
+DEFINES += QT_DEPRECATED_WARNINGS
+
+# You can also make your code fail to compile if you use deprecated APIs.
+# In order to do so, uncomment the following line.
+# You can also select to disable deprecated APIs only up to a certain version of Qt.
+#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
+
+
+SOURCES += \
+ main.cpp \
+ mainwindow.cpp
+
+HEADERS += \
+ mainwindow.h
+
+FORMS += \
+ mainwindow.ui \
+ authenticationdialog.ui
#endif
#define __CONFIG_H
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include <QtCore>
#include "bacula.h"
#
CONFIG += qt debug @QWT@
-datarootdir = @datarootdir@
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
bins.path = /$(DESTDIR)@sbindir@
bins.files = bat
* Kern Sibbald, January 2007
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "pages.h"
#include "ui_console.h"
#include <QObject>
* Dirk Bartley, March 2007
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_clients.h"
#include "console.h"
#include "pages.h"
* Kern Sibbald, January 2007
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "pages.h"
#include "ui_console.h"
#include "bcomm/dircomm.h"
* Dirk Bartley, March 2007
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_fileset.h"
#include "console.h"
#include "pages.h"
label_JobId->setText(fld.next());
label_Name->setText(fld.next());
- label_Level->setText(job_level_to_str(fld.next()[0].toAscii()));
+ label_Level->setText(job_level_to_str(fld.next()[0].toLatin1()));
m_client = fld.next();
label_Client->setText(m_client);
}
}
label_JobStatus->setPixmap(QPixmap(":/images/" + stat + ".png"));
- jobstatus_to_ascii_gui(stat[0].toAscii(), buf, sizeof(buf));
+ jobstatus_to_ascii_gui(stat[0].toLatin1(), buf, sizeof(buf));
stat = buf;
label_JobStatus->setToolTip(stat);
Bacula(R) is a registered trademark of Kern Sibbald.
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_job.h"
#include "console.h"
*/
#include "bat.h"
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "util/comboutil.h"
#include "jobgraphs/jobplot.h"
* Dirk Bartley, March 2007
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "pages.h"
#include "ui_jobplotcontrols.h"
#include <qwt_data.h>
* Dirk Bartley, March 2007
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_joblist.h"
#include "console.h"
#include "pages.h"
* Dirk Bartley, March 2007
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_joblog.h"
#include "console.h"
* Dirk Bartley, March 2007
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_jobs.h"
#include "console.h"
#include "pages.h"
#ifndef _LABEL_H_
#define _LABEL_H_
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_label.h"
#include "console.h"
#include "pages.h"
app = new QApplication(argc, argv);
- app->setStyle(new QPlastiqueStyle());
app->setQuitOnLastWindowClosed(true);
+#if QT_VERSION < 0x050000
+ app->setStyle(new QPlastiqueStyle());
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
+#endif
QTranslator qtTranslator;
qtTranslator.load(QString("qt_") + QLocale::system().name(),QLibraryInfo::location(QLibraryInfo::TranslationsPath));
#ifndef _MAINWIN_H_
#define _MAINWIN_H_
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include <QList>
#include "ui_main.h"
* Dirk Bartley, March 2007
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_mediaedit.h"
#include "console.h"
#include "pages.h"
label_VolRetention->setText(QString(buf));
if (LastWritten != "") {
- t = str_to_utime(LastWritten.toAscii().data());
+ t = str_to_utime(LastWritten.toLatin1().data());
t = t + stat.toULongLong();
ttime = t;
localtime_r(&ttime, &tm);
// stat=fld.next();
-// jobstatus_to_ascii_gui(stat[0].toAscii(), buf, sizeof(buf));
+// jobstatus_to_ascii_gui(stat[0].toLatin1(), buf, sizeof(buf));
// stat = buf;
//
}
*
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_mediainfo.h"
#include "console.h"
#include "pages.h"
* Dirk Bartley, March 2007
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_medialist.h"
#include "console.h"
#include <qstringlist.h>
} else {
stat = fieldlist.at(8);
- t = str_to_utime(LastWritten.toAscii().data());
+ t = str_to_utime(LastWritten.toLatin1().data());
t = t + stat.toULongLong();
if (t > now) {
list.removeAt(i);
buf[0] = 0;
if (LastWritten != "") {
stat = fld.next(); // VolUseDuration
- t = str_to_utime(LastWritten.toAscii().data());
+ t = str_to_utime(LastWritten.toLatin1().data());
t = t + stat.toULongLong();
ttime = t;
localtime_r(&ttime, &tm);
Bacula(R) is a registered trademark of Kern Sibbald.
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_mediaview.h"
#include "console.h"
#include <qstringlist.h>
#ifndef _MOUNT_H_
#define _MOUNT_H_
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_mount.h"
#include "console.h"
return false;
}
- bool toret = fullPath[1].toAscii() == ':' && fullPath[0].isLetter();
+ bool toret = fullPath[1].toLatin1() == ':' && fullPath[0].isLetter();
if (mainWin->m_miscDebug) {
if (toret)
Pmsg1(000, "returning from isWin32Path true %s\n", fullPath.toUtf8().data());
* Dirk Bartley, March 2007
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include <QList>
/*
#ifndef _RELABEL_H_
#define _RELABEL_H_
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_relabel.h"
#include "console.h"
#include <stdint.h>
#include <sys/types.h> /* Needed for some systems */
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "pages.h"
#include "ui_runrestore.h"
foreach (field, fieldlist) {
field = field.trimmed(); /* strip leading & trailing spaces */
if (column == 5 ) {
- QByteArray jtype(field.trimmed().toAscii());
+ QByteArray jtype(field.trimmed().toLatin1());
if (jtype.size()) {
field = job_type_to_str(jtype[0]);
}
field = field.trimmed(); /* strip leading & trailing spaces */
if (field != "") {
if (column == typeIndex) {
- QByteArray jtype(field.trimmed().toAscii());
+ QByteArray jtype(field.trimmed().toLatin1());
if (jtype.size()) {
field = job_type_to_str(jtype[0]);
}
* Kern Sibbald, February 2007
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "pages.h"
#include "ui_restoretree.h"
#ifndef _RUN_H_
#define _RUN_H_
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_run.h"
#include "ui_runcmd.h"
#include "ui_estimate.h"
#ifndef _SELECT_H_
#define _SELECT_H_
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_select.h"
#include "console.h"
#ifndef _TEXTENTRY_H_
#define _TEXTENTRY_H_
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_textinput.h"
#include "console.h"
* Dirk Bartley, March 2007
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_clientstat.h"
#include "console.h"
#include "pages.h"
* Dirk Bartley, March 2007
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_dirstat.h"
#include "console.h"
#include "pages.h"
* Dirk Bartley, March 2007
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_storstat.h"
#include "console.h"
#include "pages.h"
Bacula(R) is a registered trademark of Kern Sibbald.
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_content.h"
#include "console.h"
#include "pages.h"
* Dirk Bartley, March 2007
*/
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_storage.h"
#include "console.h"
#include "pages.h"
#ifndef _PUTZ_H_
#define _PUTZ_H_
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include "ui_putz.h"
class Putz : public QMainWindow, public Ui::MainWindow
#define __CONFIG_H
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
#include <QtGui>
+#endif
#include <QtCore>
#include "bacula.h"
#include "ui_run.h"
#include "tray_conf.h"
#include "task.h"
+#include <QDialog>
class RunJob: public QDialog
{
CONFIG += qt
#CONFIG += qt debug
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+
cross-win32 {
LIBS += -mwindows -L../../win32/release32 -lbacula
INCLUDEPATH += ../../win32/compat
CONFIG += qt cross-win32
#CONFIG += qt debug
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+
cross-win32 {
LIBS += -mwindows -L../../win32/release32 -lbacula -lpthread
INCLUDEPATH += ../../win32/compat
CONFIG += qt cross-win32
#CONFIG += qt debug
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+
cross-win32 {
LIBS += -mwindows -L../../win32/release64 -lbacula -lpthread
INCLUDEPATH += ../../win32/compat
tray = new QSystemTrayIcon(TrayMonitor);
QMenu* stmenu = new QMenu(TrayMonitor);
+#if QT_VERSION >= 0x050000
+ QAction *actShow = new QAction(QApplication::translate("TrayMonitor",
+ "Display", 0),TrayMonitor);
+ QAction* actQuit = new QAction(QApplication::translate("TrayMonitor",
+ "Quit", 0),TrayMonitor);
+ QAction* actAbout = new QAction(QApplication::translate("TrayMonitor",
+ "About", 0),TrayMonitor);
+ QAction* actRun = new QAction(QApplication::translate("TrayMonitor",
+ "Run...", 0),TrayMonitor);
+ QAction* actRes = new QAction(QApplication::translate("TrayMonitor",
+ "Restore...", 0),TrayMonitor);
+
+ QAction* actConf = new QAction(QApplication::translate("TrayMonitor",
+ "Configure...", 0),TrayMonitor);
+#else
QAction *actShow = new QAction(QApplication::translate("TrayMonitor",
"Display",
0, QApplication::UnicodeUTF8),TrayMonitor);
QAction* actConf = new QAction(QApplication::translate("TrayMonitor",
"Configure...",
0, QApplication::UnicodeUTF8),TrayMonitor);
+#endif
stmenu->addAction(actShow);
stmenu->addAction(actRun);
stmenu->addAction(actRes);
void retranslateUi(QMainWindow *TrayMonitor)
{
- TrayMonitor->setWindowTitle(QApplication::translate("TrayMonitor", "Bacula Tray Monitor", 0, QApplication::UnicodeUTF8));
+#if QT_VERSION >= 0x050000
+ TrayMonitor->setWindowTitle(QApplication::translate("TrayMonitor", "Bacula Tray Monitor", 0));
+#else
+ TrayMonitor->setWindowTitle(QApplication::translate("TrayMonitor", "Bacula Tray Monitor", 0, QApplication::UnicodeUTF8));
+#endif
+
} // retranslateUi
private slots:
#include <QBrush>
#include <QString>
#include <QStringList>
+#include <QLabel>
#include <math.h>
#include "fmtwidgetitem.h"
}
char buf[256];
- jobstatus_to_ascii_gui( code[0].toAscii(), buf, sizeof(buf));
+ jobstatus_to_ascii_gui( code[0].toLatin1(), buf, sizeof(buf));
return QString(buf);
}
void ItemFormatterBase::setJobTypeFld(int index, const QString &fld, bool center)
{
- QByteArray jtype(fld.trimmed().toAscii());
+ QByteArray jtype(fld.trimmed().toLatin1());
if (jtype.size()) {
setTextFld(index, job_type_to_str(jtype[0]), center);
} else {
void ItemFormatterBase::setJobLevelFld(int index, const QString &fld, bool center)
{
- QByteArray lvl(fld.trimmed().toAscii());
+ QByteArray lvl(fld.trimmed().toLatin1());
if (lvl.size()) {
setTextFld(index, job_level_to_str(lvl[0]), center);
} else {