cd mainapp && $(QMAKE) $(QMAKEFLAGS) && $(MAKE)
cd sessman && $(QMAKE) $(QMAKEFLAGS) && $(MAKE)
cd plugins && $(QMAKE) $(QMAKEFLAGS) && $(MAKE)
+ cd adminapp && $(QMAKE) $(QMAKEFLAGS) && $(MAKE)
taurus:
cd taurus && $(QMAKE) $(QMCFG) $(QMAKEFLAGS) && $(MAKE)
--- /dev/null
+#Project File for MagicSmoke
+# (c) Konrad Rosenbaum, 2016
+
+TEMPLATE = app
+TARGET = magicsmoke-admin
+
+
+#main source files
+SOURCES = main.cpp
+INCLUDEPATH += . ../src ../src/mwin
+LIBS+= -lmagicsmoke
+
+include (../basics.pri)
+
+include (../iface/iface.pri)
+include (../commonlib/commonlib.pri)
+include (../sesscli/sesscli.pri)
+
+#make sure dependencies are found
+DEPENDPATH += $$INCLUDEPATH
--- /dev/null
+//
+// C++ Implementation: main
+//
+// Description: Main Program
+//
+//
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2007-2016
+//
+// Copyright: See README/COPYING.GPL files that come with this distribution
+//
+//
+
+
+#include "aclwin.h"
+
+#include <scli.h>
+#include <mapplication.h>
+#include "msinterface.h"
+
+#include <WTransaction>
+#include "barcode-plugin.h"
+
+
+int main(int argc,char**argv)
+{
+ //create global app
+ MApplication app(argc,argv);
+
+ //init
+ app.initialize();
+
+ //get session
+ MSessionClient sc;
+ sc.connect(&sc,SIGNAL(sessionLost()),&app,SLOT(quit()));
+ sc.connect(&sc,SIGNAL(managerLost()),&app,SLOT(quit()));
+ if(sc.waitForSessionAvailable()){
+ WTransaction::setLogPrefix("Admin-T");
+ MSInterface*ms=new MSInterface(sc.currentProfileId());
+ ms->loginSession(sc.currentUsername(), sc.currentSessionId());
+ ms->initialize();
+ MAclWindow::showWindow(nullptr);
+ }else{
+ qDebug()<<"Unable to get session. Giving up.";
+ return 1;
+ }
+
+ return app.exec();
+}
void MLogin::initClients(MSessionManager*sm)
{
//was sman started by a slave? If so: do not allow selection.
- if(sm->connectionCount()>0){
+ if(sm->connectionCount()>0 || sm->haveSlave()){
clients->setEnabled(false);
return;
}
ls.write(mkey.toLatin1()+"\n");
ls.waitForBytesWritten(1000);
ls.close();
+ mhaveslave=true;
}
}
_("@@main",tr("Start &Expert Client"));
_("@wizard",tr("Start &Wizard"));
_("@statistic",tr("Start &Statistics Client"));
+ _("@admin",tr("Start &Admin Client"));
_("@print",tr("Start &Print@Home Daemon"));
_("quit",tr("&Quit Session"));
}
virtual QString profileName()const;
int connectionCount()const{return mconnections.count();}
+ bool haveSlave()const{return mhaveslave;}
virtual QList<QPair<QString,QString>> menuItems()const;
QList<QLocalSocket*>mconnections;
QString mkey;
QSystemTrayIcon*micon;
+ bool mhaveslave=false;
void sendMenu(QLocalSocket*);
void sendSessionInfo(QLocalSocket*);
<context>
<name>MSessionManager</name>
<message>
- <location filename="sman.cpp" line="77"/>
+ <location filename="sman.cpp" line="78"/>
<source>MagicSmoke Session Manager, waiting for login...</source>
<translation>MagicSmoke Session Manager, warte auf Login...</translation>
</message>
<message>
- <location filename="sman.cpp" line="268"/>
+ <location filename="sman.cpp" line="269"/>
<source>Warning</source>
<translation>Warnung</translation>
</message>
<message>
- <location filename="sman.cpp" line="268"/>
+ <location filename="sman.cpp" line="269"/>
<source>Cannot start a client while not logged in!</source>
<translation>Programm kann nicht gestartet werden wenn noch kein Login besteht!</translation>
</message>
<message>
- <location filename="sman.cpp" line="299"/>
+ <location filename="sman.cpp" line="300"/>
<source>MagicSmoke Session Manager, logged in as %1 at %2.</source>
<translation>MagicSmoke Session Manager, eingeloggt als %1 auf Profil %2.</translation>
</message>
<message>
- <location filename="sman.cpp" line="333"/>
+ <location filename="sman.cpp" line="334"/>
<source>&Configuration...</source>
<translation>&Konfigurieren...</translation>
</message>
<message>
- <location filename="sman.cpp" line="334"/>
+ <location filename="sman.cpp" line="335"/>
<source>Start &Expert Client</source>
<translation>Starte &Experten-Programm</translation>
</message>
<message>
- <location filename="sman.cpp" line="335"/>
+ <location filename="sman.cpp" line="336"/>
<source>Start &Wizard</source>
<translation>Starte &Wizard</translation>
</message>
<message>
- <location filename="sman.cpp" line="336"/>
+ <location filename="sman.cpp" line="337"/>
<source>Start &Statistics Client</source>
<translation>Starte &Statistik-Programm</translation>
</message>
<message>
- <location filename="sman.cpp" line="337"/>
+ <location filename="sman.cpp" line="338"/>
+ <source>Start &Admin Client</source>
+ <translation>Starte &Administrationsprogramm</translation>
+ </message>
+ <message>
+ <location filename="sman.cpp" line="339"/>
<source>Start &Print@Home Daemon</source>
<translation>Starte &Print@Home Hintergrundprogramm</translation>
</message>
<message>
- <location filename="sman.cpp" line="338"/>
+ <location filename="sman.cpp" line="340"/>
<source>&Quit Session</source>
<translation>Session &Beenden</translation>
</message>
<context>
<name>MSessionManager</name>
<message>
- <location filename="sman.cpp" line="77"/>
+ <location filename="sman.cpp" line="78"/>
<source>MagicSmoke Session Manager, waiting for login...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="sman.cpp" line="268"/>
+ <location filename="sman.cpp" line="269"/>
<source>Warning</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="sman.cpp" line="268"/>
+ <location filename="sman.cpp" line="269"/>
<source>Cannot start a client while not logged in!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="sman.cpp" line="299"/>
+ <location filename="sman.cpp" line="300"/>
<source>MagicSmoke Session Manager, logged in as %1 at %2.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="sman.cpp" line="333"/>
+ <location filename="sman.cpp" line="334"/>
<source>&Configuration...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="sman.cpp" line="334"/>
+ <location filename="sman.cpp" line="335"/>
<source>Start &Expert Client</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="sman.cpp" line="335"/>
+ <location filename="sman.cpp" line="336"/>
<source>Start &Wizard</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="sman.cpp" line="336"/>
+ <location filename="sman.cpp" line="337"/>
<source>Start &Statistics Client</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="sman.cpp" line="337"/>
+ <location filename="sman.cpp" line="338"/>
+ <source>Start &Admin Client</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="sman.cpp" line="339"/>
<source>Start &Print@Home Daemon</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="sman.cpp" line="338"/>
+ <location filename="sman.cpp" line="340"/>
<source>&Quit Session</source>
<translation type="unfinished"></translation>
</message>
#include <QtCore/QtGlobal>
-#ifdef MAGICSMOKE_LIB_BUILD
-#define MAGICSMOKE_EXPORT Q_DECL_EXPORT
-#else
-#define MAGICSMOKE_EXPORT Q_DECL_IMPORT
-#endif
+#include "smokeexport.h"
///shortcut: the main function
class MAGICSMOKE_EXPORT MagicSmokeMain
#include <QTimer>
#include "tabwin.h"
+#include "smokeexport.h"
class MUserTab;
class MHostTab;
class MRoleTab;
class MFlagTab;
-class MAclWindow:public MTabWin
+class MAGICSMOKE_EXPORT MAclWindow:public MTabWin
{
Q_OBJECT
public:
#include <QPointer>
#include <QTimer>
+#include "smokeexport.h"
+
class QTabWidget;
class QStackedWidget;
class MSInterface;
/**Main Overview Window*/
-class MTabWin:public QMainWindow
+class MAGICSMOKE_EXPORT MTabWin:public QMainWindow
{
Q_OBJECT
public:
--- /dev/null
+
+#ifndef MAGICSMOKE_EXPORT
+
+#ifdef MAGICSMOKE_LIB_BUILD
+#define MAGICSMOKE_EXPORT Q_DECL_EXPORT
+#else
+#define MAGICSMOKE_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif