• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

krfb

main.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                                    main.cpp
00003                              -------------------
00004     begin                : Sat Dec  8 03:23:02 CET 2001
00005     copyright            : (C) 2001-2003 by Tim Jansen
00006     email                : tim@tjansen.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #include "trayicon.h"
00019 //#include "configuration.h"
00020 #include "krfbserver.h"
00021 #include "manageinvitationsdialog.h"
00022 
00023 #include <QPixmap>
00024 #include <kaction.h>
00025 #include <kdebug.h>
00026 #include <KNotification>
00027 #include <ksystemtrayicon.h>
00028 #include <kcmdlineargs.h>
00029 #include <kaboutdata.h>
00030 #include <kaboutapplicationdialog.h>
00031 #include <klocale.h>
00032 #include <kapplication.h>
00033 #include <kmessagebox.h>
00034 #include <qwindowdefs.h>
00035 #include <KIcon>
00036 
00037 #include <signal.h>
00038 
00039 #define VERSION "1.0"
00040 
00041 static const char description[] = I18N_NOOP("VNC-compatible server to share "
00042                        "KDE desktops");
00043 
00044 
00045 int main(int argc, char *argv[])
00046 {
00047     KAboutData aboutData( "krfb", 0, ki18n("Desktop Sharing"),
00048         VERSION, ki18n(description), KAboutData::License_GPL,
00049         ki18n("(c) 2007, Alessandro Praduroux\n"
00050             "(c) 2001-2003, Tim Jansen\n"
00051         "(c) 2001, Johannes E. Schindelin\n"
00052         "(c) 2000, heXoNet Support GmbH, D-66424 Homburg\n"
00053         "(c) 2000-2001, Const Kaplinsky\n"
00054         "(c) 2000, Tridia Corporation\n"
00055         "(c) 1999, AT&T Laboratories Boston\n"));
00056     aboutData.addAuthor(ki18n("Alessandro Praduroux"), ki18n("KDE4 porting"), "pradu@pradu.it");
00057     aboutData.addAuthor(ki18n("Tim Jansen"), KLocalizedString(), "tim@tjansen.de");
00058     aboutData.addAuthor(ki18n("Ian Reinhart Geiser"), ki18n("DCOP interface"), "geiseri@kde.org");
00059     aboutData.addCredit(ki18n("Johannes E. Schindelin"),
00060                 ki18n("libvncserver"));
00061     aboutData.addCredit(ki18n("Const Kaplinsky"),
00062                 ki18n("TightVNC encoder"));
00063     aboutData.addCredit(ki18n("Tridia Corporation"),
00064                 ki18n("ZLib encoder"));
00065     aboutData.addCredit(ki18n("AT&T Laboratories Boston"),
00066                 ki18n("original VNC encoders and "
00067                       "protocol design"));
00068     aboutData.addCredit(ki18n("Jens Wagner (heXoNet Support GmbH)"),
00069                 ki18n("X11 update scanner, "
00070                       "original code base"));
00071     aboutData.addCredit(ki18n("Jason Spisak"),
00072                 ki18n("Connection side image"),
00073                 "kovalid@yahoo.com");
00074     aboutData.addCredit(ki18n("Karl Vogel"),
00075                 ki18n("KDesktop background deactivation"));
00076     KCmdLineArgs::init(argc, argv, &aboutData);
00077 
00078     KApplication app;
00079     QApplication::setWindowIcon(KIcon("krfb"));
00080     TrayIcon trayicon(new ManageInvitationsDialog);
00081 
00082     KrfbServer *server = KrfbServer::self(); // initialize the server manager
00083     if (!server->checkX11Capabilities()) {
00084         return 1;
00085     }
00086 
00087     QObject::connect(&trayicon, SIGNAL(enableDesktopControl(bool)),
00088              server, SLOT(enableDesktopControl(bool)));
00089     QObject::connect(server, SIGNAL(sessionEstablished(QString)),
00090              &trayicon, SLOT(showConnectedMessage(QString)));
00091     QObject::connect(server, SIGNAL(sessionFinished()),
00092              &trayicon, SLOT(showDisconnectedMessage()));
00093     QObject::connect(server, SIGNAL(desktopControlSettingChanged(bool)),
00094              &trayicon, SLOT(setDesktopControlSetting(bool)));
00095     QObject::connect(&trayicon, SIGNAL(quitSelected()),
00096              server, SLOT(disconnectAndQuit()));
00097     QObject::connect(server, SIGNAL(quitApp()),
00098                       &app, SLOT(quit()));
00099 
00100     sigset_t sigs;
00101     sigemptyset(&sigs);
00102     sigaddset(&sigs, SIGPIPE);
00103     sigprocmask(SIG_BLOCK, &sigs, 0);
00104 
00105     return app.exec();
00106 }
00107 

krfb

Skip menu "krfb"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal