Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
QHyodaX11.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7#include "QHyoda.h"
8#include "QHyodaX11.h"
9#include "QHyodaX11Emacs.h"
10
11#include <QtWidgets>
12#include <QProcess>
13
14/*
15 * xwininfo
16 * xwininfo -root -tree|grep XMathematica
17 * xlsclients -l|tr -d \'|sed -ne 's/^ *Window *\‍(0x[0-9a-f]*\‍):$/\1/p'
18 * xlsclients -l|tr -d \'|sed -ne 's/^ *Instance\/Class: *\‍(.*\‍)\//\1/p'
19 * xlsclients -l|tr -d \'|sed -ne 's/^ *Name: *\‍(.*\‍)/\1/p'
20 * xlsclients -l|tr -d :\'|awk '/Window/ {winid=$2}; $1=="Name"{name=$2}; $1=="Instance/Class" && $2=="XMathematica/" && name!="" {printf winid "\n"}'
21 */
22
23
24/******************************************************************************
25 * QHyodaX11
26 *****************************************************************************/
27QHyodaX11::QHyodaX11(QWidget *tabWidgetParent,QString ttl):
28 QWidget(tabWidgetParent),
29 parentWidget(tabWidgetParent),
30 title(ttl),
31 layout(new QVBoxLayout),
32 //splitter(new QSplitter(Qt::Vertical,this)),
33 X11Process(QList<QProcess*>())
34 //X11Container(QList<QHyodaX11Embed*>())
35{
36 qDebug() << "[QHyodaX11::QHyodaX11] New";
37
38 //QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
39 //sizePolicy.setHorizontalStretch(1);
40 //sizePolicy.setVerticalStretch(1);
41 //sizePolicy.setHeightForWidth(splitter->sizePolicy().hasHeightForWidth());
42
43 //splitter->setSizePolicy(sizePolicy);
44 //layout->addWidget(splitter);
45 setLayout(layout);
46 show();
47}
48
49
50/***********************************************
51 * ~QHyodaX11
52 ***********************************************/
53QHyodaX11::~QHyodaX11(void){
54 qDebug() << "[QHyodaX11::~QHyodaX11]";
55 while (!X11Process.isEmpty())
56 X11Process.takeFirst()->close();
57}
58