Inheritance: QCoreApplication, IDisposable
Beispiel #1
0
 public static int Main(string[] args)
 {
     QApplication app = new QApplication(args,true);
     Window w = new Window();
     w.Show();
     return QApplication.Exec();
 }
Beispiel #2
0
Datei: t1.cs Projekt: KDE/qyoto
 public static int Main(String[] args)
 {
     QApplication app = new QApplication(args);
     QPushButton hello = new QPushButton("Hello world!");
     QLabel label = new QLabel(hello);
     hello.Resize(100, 30);
     hello.Show();
     return QApplication.Exec();
 }
Beispiel #3
0
 public static int Main(string[] args)
 {
     QApplication app = new QApplication(args,true);
                 QMainWindow window = new QMainWindow();
                 QPushButton button = new QPushButton("Quit",window);
                 window.SetCentralWidget(button);
                 window.Show();
                 Connect(button,SIGNAL("clicked()"),app,SLOT("quit()"));
                 return QApplication.Exec();
 }
Beispiel #4
0
Datei: p1.cs Projekt: KDE/kimono
    public static int Main(String[] args)
    {
        QApplication a = new QApplication(args);
        QMainWindow w = new QMainWindow();
        QPushButton hello = new QPushButton("Hello world!", null);
        hello.Resize(100, 30);
        QObject.Connect(hello, SIGNAL("clicked()"), a, SLOT("quit()"));

        hello.Show();
        return QApplication.Exec();
    }
Beispiel #5
0
        public QApplication(string[] argv, QApplication.TypeOf arg3)
            : this((Type) null)
        {
            CreateProxy();
            Qt.qApp = this;

            string[] args = GenerateArgs(argv);

            interceptor.Invoke(	"QApplication$?$", "QApplication(int&, char**, QApplication::Type)",
                                typeof(void), typeof(int), args.Length, typeof(string[]), args, typeof(QApplication.TypeOf), arg3 );
            SetupEventReceiver();
        }
Beispiel #6
0
Datei: t2.cs Projekt: KDE/qyoto
    public static int Main(String[] args)
    {
        QApplication app = new QApplication(args);

        QPushButton quit = new QPushButton( "Quit" );
        quit.Resize( 75, 30 );
        quit.Font = new QFont( "Times", 18, (int) QFont.Weight.Bold );

        QObject.Connect( quit, SIGNAL("clicked()"), app, SLOT("quit()") );

        quit.Show();
        return QApplication.Exec();
    }
Beispiel #7
0
Datei: t3.cs Projekt: KDE/qyoto
    public static int Main(String[] args)
    {
        QApplication app = new QApplication(args);

        QWidget window = new QWidget();
        window.Resize(200, 120);

        QPushButton quit = new QPushButton( "Quit", window );
        quit.Font = new QFont( "Times", 18, (int) QFont.Weight.Bold );
        quit.SetGeometry(10, 40, 180, 40);

        QObject.Connect( quit, SIGNAL("clicked()"), app, SLOT("quit()") );

        window.Show();
        return QApplication.Exec();
    }
Beispiel #8
0
        public Client(string[] args)
        {
            Log.Information ("Starting Synapse");

            try {
                PlatformHacks.SetProcessName("synapse");
            } catch (Exception ex) {
                Console.WriteLine("[WARNING] Failed to set process name: " + ex.Message);
            }

            GLib.Global.ProgramName = "Synapse";
            Gtk.Application.Init();

            m_App = new QApplication(args);
            m_App.QuitOnLastWindowClosed = false;
            m_App.ApplicationName = "Synapse";
            m_App.ApplicationVersion = "0.1";

            InitQtWebKit.InitSmoke();

            m_ResourceFileEngineHandler = new ResourceFileEngineHandler();
            m_AvatarFileEngineHandler = new AvatarFileEngineHandler();

            Application.Initialize(this);

            if (Application.Debugging) {
                QtTraceListener listener = new QtTraceListener();
                listener.TraceOutputOptions = TraceOptions.Callstack;
                Debug.Listeners.Add(listener);
                Debug.Listeners.Add(new ConsoleTraceListener());
                Debug.WriteLine("Debug Mode On");
            }

            AppDomain.CurrentDomain.UnhandledException += HandleUnhandledException;

            if (!Application.CommandLine.Contains("disable-dbus")) {
                try {
                    NDesk.DBus.BusG.Init();
                } catch (Exception ex) {
                    Console.Error.WriteLine("Failed to initialize DBUS: " + ex);
                }
            } else {
                Console.WriteLine("DBus disabled by request.");
            }

            // XXX: I dont like all of these being here.
            ServiceManager.RegisterService<Synapse.Xmpp.Services.XmppService>();
            ServiceManager.RegisterService<Synapse.Xmpp.Services.AccountService>();
            ServiceManager.RegisterService<Synapse.QtClient.OctyService>();
            ServiceManager.RegisterService<Synapse.Xmpp.Services.ShoutService>();
            ServiceManager.RegisterService<Synapse.Xmpp.Services.GeoService>();
            ServiceManager.RegisterService<GuiService>();

            QWebSettings.GlobalSettings().SetAttribute(QWebSettings.WebAttribute.DeveloperExtrasEnabled, true);
            QWebSettings.GlobalSettings().SetAttribute(QWebSettings.WebAttribute.PluginsEnabled, true);

            if (Application.CommandLine.Contains ("uninstalled"))
                ConversationWidget.ThemesDirectory = Path.Combine(Environment.CurrentDirectory, "themes");
            else
                ConversationWidget.ThemesDirectory = Path.Combine(Paths.InstalledApplicationData, "themes");

            Application.Run();

            QApplication.Invoke(delegate {
                /* Create the UI */
                Gui.MainWindow = new MainWindow();
                Gui.TrayIcon = new TrayIcon(m_App);
                Gui.TabbedChatsWindow = new TabbedChatsWindow();

                OnStarted();

                Gui.TrayIcon.Show();

                Gui.MainWindow.Show();
            });

            QApplication.Exec();
        }
Beispiel #9
0
 public virtual void Unpolish(QApplication arg1)
 {
     interceptor.Invoke("unpolish#", "unpolish(QApplication*)", typeof(void), typeof(QApplication), arg1);
 }
Beispiel #10
0
 public override void Unpolish(QApplication app)
 {
     interceptor.Invoke("unpolish#", "unpolish(QApplication*)", typeof(void), typeof(QApplication), app);
 }
Beispiel #11
0
 public override void Unpolish(QApplication arg1)
 {
     interceptor.Invoke("unpolish#", "unpolish(QApplication*)", typeof(void), typeof(QApplication), arg1);
 }
Beispiel #12
0
 public override void Polish(QApplication arg1)
 {
     interceptor.Invoke("polish#", "polish(QApplication*)", typeof(void), typeof(QApplication), arg1);
 }
Beispiel #13
0
 public override void Polish(QApplication app)
 {
     interceptor.Invoke("polish#", "polish(QApplication*)", typeof(void), typeof(QApplication), app);
 }
Beispiel #14
0
 public virtual void Polish(QApplication arg1)
 {
     interceptor.Invoke("polish#", "polish(QApplication*)", typeof(void), typeof(QApplication), arg1);
 }