code stringlengths 3 1.05M | repo_name stringlengths 4 116 | path stringlengths 4 991 | language stringclasses 9 values | license stringclasses 15 values | size int32 3 1.05M |
|---|---|---|---|---|---|
// The libMesh Finite Element Library.
// Copyright (C) 2002-2018 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// Local includes
#include "libmesh/side.h"
#include "libmesh/edge_edge3.h"
#include "libmesh/face_quad9.h"
#include "libmesh/enum_io_package.h"
#include "libmesh/enum_order.h"
namespace libMesh
{
// ------------------------------------------------------------
// Quad9 class static member initializations
const int Quad9::num_nodes;
const int Quad9::num_sides;
const int Quad9::num_children;
const int Quad9::nodes_per_side;
const unsigned int Quad9::side_nodes_map[Quad9::num_sides][Quad9::nodes_per_side] =
{
{0, 1, 4}, // Side 0
{1, 2, 5}, // Side 1
{2, 3, 6}, // Side 2
{3, 0, 7} // Side 3
};
#ifdef LIBMESH_ENABLE_AMR
const float Quad9::_embedding_matrix[Quad9::num_children][Quad9::num_nodes][Quad9::num_nodes] =
{
// embedding matrix for child 0
{
// 0 1 2 3 4 5 6 7 8
{ 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 0
{ 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 1
{ 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000 }, // 2
{ 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000 }, // 3
{ 0.375000, -0.125000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 4
{ 0.00000, 0.00000, 0.00000, 0.00000, 0.375000, 0.00000, -0.125000, 0.00000, 0.750000 }, // 5
{ 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, -0.125000, 0.00000, 0.375000, 0.750000 }, // 6
{ 0.375000, 0.00000, 0.00000, -0.125000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000 }, // 7
{ 0.140625, -0.0468750, 0.0156250, -0.0468750, 0.281250, -0.0937500, -0.0937500, 0.281250, 0.562500 } // 8
},
// embedding matrix for child 1
{
// 0 1 2 3 4 5 6 7 8
{ 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 0
{ 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 1
{ 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000 }, // 2
{ 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000 }, // 3
{ -0.125000, 0.375000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 4
{ 0.00000, 0.375000, -0.125000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000 }, // 5
{ 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.375000, 0.00000, -0.125000, 0.750000 }, // 6
{ 0.00000, 0.00000, 0.00000, 0.00000, 0.375000, 0.00000, -0.125000, 0.00000, 0.750000 }, // 7
{ -0.0468750, 0.140625, -0.0468750, 0.0156250, 0.281250, 0.281250, -0.0937500, -0.0937500, 0.562500 } // 8
},
// embedding matrix for child 2
{
// 0 1 2 3 4 5 6 7 8
{ 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000 }, // 0
{ 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000 }, // 1
{ 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000 }, // 2
{ 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 3
{ 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, -0.125000, 0.00000, 0.375000, 0.750000 }, // 4
{ 0.00000, 0.00000, 0.00000, 0.00000, -0.125000, 0.00000, 0.375000, 0.00000, 0.750000 }, // 5
{ 0.00000, 0.00000, -0.125000, 0.375000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000 }, // 6
{ -0.125000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000 }, // 7
{ -0.0468750, 0.0156250, -0.0468750, 0.140625, -0.0937500, -0.0937500, 0.281250, 0.281250, 0.562500 } // 8
},
// embedding matrix for child 3
{
// 0 1 2 3 4 5 6 7 8
{ 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000 }, // 0
{ 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000 }, // 1
{ 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 2
{ 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000 }, // 3
{ 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.375000, 0.00000, -0.125000, 0.750000 }, // 4
{ 0.00000, -0.125000, 0.375000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000 }, // 5
{ 0.00000, 0.00000, 0.375000, -0.125000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000 }, // 6
{ 0.00000, 0.00000, 0.00000, 0.00000, -0.125000, 0.00000, 0.375000, 0.00000, 0.750000 }, // 7
{ 0.0156250, -0.0468750, 0.140625, -0.0468750, -0.0937500, 0.281250, 0.281250, -0.0937500, 0.562500 } // 8
}
};
#endif
// ------------------------------------------------------------
// Quad9 class member functions
bool Quad9::is_vertex(const unsigned int i) const
{
if (i < 4)
return true;
return false;
}
bool Quad9::is_edge(const unsigned int i) const
{
if (i < 4)
return false;
if (i > 7)
return false;
return true;
}
bool Quad9::is_face(const unsigned int i) const
{
if (i > 7)
return true;
return false;
}
bool Quad9::is_node_on_side(const unsigned int n,
const unsigned int s) const
{
libmesh_assert_less (s, n_sides());
return std::find(std::begin(side_nodes_map[s]),
std::end(side_nodes_map[s]),
n) != std::end(side_nodes_map[s]);
}
std::vector<unsigned>
Quad9::nodes_on_side(const unsigned int s) const
{
libmesh_assert_less(s, n_sides());
return {std::begin(side_nodes_map[s]), std::end(side_nodes_map[s])};
}
bool Quad9::has_affine_map() const
{
// make sure corners form a parallelogram
Point v = this->point(1) - this->point(0);
if (!v.relative_fuzzy_equals(this->point(2) - this->point(3)))
return false;
// make sure "horizontal" sides are straight
v /= 2;
if (!v.relative_fuzzy_equals(this->point(4) - this->point(0)) ||
!v.relative_fuzzy_equals(this->point(6) - this->point(3)))
return false;
// make sure "vertical" sides are straight
// and the center node is centered
v = (this->point(3) - this->point(0))/2;
if (!v.relative_fuzzy_equals(this->point(7) - this->point(0)) ||
!v.relative_fuzzy_equals(this->point(5) - this->point(1)) ||
!v.relative_fuzzy_equals(this->point(8) - this->point(4)))
return false;
return true;
}
Order Quad9::default_order() const
{
return SECOND;
}
dof_id_type Quad9::key (const unsigned int s) const
{
libmesh_assert_less (s, this->n_sides());
switch (s)
{
case 0:
return
this->compute_key (this->node_id(4));
case 1:
return
this->compute_key (this->node_id(5));
case 2:
return
this->compute_key (this->node_id(6));
case 3:
return
this->compute_key (this->node_id(7));
default:
libmesh_error_msg("Invalid side s = " << s);
}
}
dof_id_type Quad9::key () const
{
return this->compute_key(this->node_id(8));
}
unsigned int Quad9::which_node_am_i(unsigned int side,
unsigned int side_node) const
{
libmesh_assert_less (side, this->n_sides());
libmesh_assert_less (side_node, Quad9::nodes_per_side);
return Quad9::side_nodes_map[side][side_node];
}
std::unique_ptr<Elem> Quad9::build_side_ptr (const unsigned int i,
bool proxy)
{
libmesh_assert_less (i, this->n_sides());
if (proxy)
return libmesh_make_unique<Side<Edge3,Quad9>>(this,i);
else
{
std::unique_ptr<Elem> edge = libmesh_make_unique<Edge3>();
edge->subdomain_id() = this->subdomain_id();
// Set the nodes
for (unsigned n=0; n<edge->n_nodes(); ++n)
edge->set_node(n) = this->node_ptr(Quad9::side_nodes_map[i][n]);
return edge;
}
}
void Quad9::connectivity(const unsigned int sf,
const IOPackage iop,
std::vector<dof_id_type> & conn) const
{
libmesh_assert_less (sf, this->n_sub_elem());
libmesh_assert_not_equal_to (iop, INVALID_IO_PACKAGE);
conn.resize(4);
switch (iop)
{
case TECPLOT:
{
switch(sf)
{
case 0:
// linear sub-quad 0
conn[0] = this->node_id(0)+1;
conn[1] = this->node_id(4)+1;
conn[2] = this->node_id(8)+1;
conn[3] = this->node_id(7)+1;
return;
case 1:
// linear sub-quad 1
conn[0] = this->node_id(4)+1;
conn[1] = this->node_id(1)+1;
conn[2] = this->node_id(5)+1;
conn[3] = this->node_id(8)+1;
return;
case 2:
// linear sub-quad 2
conn[0] = this->node_id(7)+1;
conn[1] = this->node_id(8)+1;
conn[2] = this->node_id(6)+1;
conn[3] = this->node_id(3)+1;
return;
case 3:
// linear sub-quad 3
conn[0] = this->node_id(8)+1;
conn[1] = this->node_id(5)+1;
conn[2] = this->node_id(2)+1;
conn[3] = this->node_id(6)+1;
return;
default:
libmesh_error_msg("Invalid sf = " << sf);
}
}
case VTK:
{
conn.resize(9);
conn[0] = this->node_id(0);
conn[1] = this->node_id(1);
conn[2] = this->node_id(2);
conn[3] = this->node_id(3);
conn[4] = this->node_id(4);
conn[5] = this->node_id(5);
conn[6] = this->node_id(6);
conn[7] = this->node_id(7);
conn[8] = this->node_id(8);
return;
/*
switch(sf)
{
case 0:
// linear sub-quad 0
conn[0] = this->node_id(0);
conn[1] = this->node_id(4);
conn[2] = this->node_id(8);
conn[3] = this->node_id(7);
return;
case 1:
// linear sub-quad 1
conn[0] = this->node_id(4);
conn[1] = this->node_id(1);
conn[2] = this->node_id(5);
conn[3] = this->node_id(8);
return;
case 2:
// linear sub-quad 2
conn[0] = this->node_id(7);
conn[1] = this->node_id(8);
conn[2] = this->node_id(6);
conn[3] = this->node_id(3);
return;
case 3:
// linear sub-quad 3
conn[0] = this->node_id(8);
conn[1] = this->node_id(5);
conn[2] = this->node_id(2);
conn[3] = this->node_id(6);
return;
default:
libmesh_error_msg("Invalid sf = " << sf);
}*/
}
default:
libmesh_error_msg("Unsupported IO package " << iop);
}
}
BoundingBox Quad9::loose_bounding_box () const
{
// This might have curved edges, or might be a curved surface in
// 3-space, in which case the full bounding box can be larger than
// the bounding box of just the nodes.
//
//
// FIXME - I haven't yet proven the formula below to be correct for
// biquadratics - RHS
Point pmin, pmax;
for (unsigned d=0; d<LIBMESH_DIM; ++d)
{
const Real center = this->point(8)(d);
Real hd = std::abs(center - this->point(0)(d));
for (unsigned int p=0; p != 8; ++p)
hd = std::max(hd, std::abs(center - this->point(p)(d)));
pmin(d) = center - hd;
pmax(d) = center + hd;
}
return BoundingBox(pmin, pmax);
}
Real Quad9::volume () const
{
// Make copies of our points. It makes the subsequent calculations a bit
// shorter and avoids dereferencing the same pointer multiple times.
Point
x0 = point(0), x1 = point(1), x2 = point(2),
x3 = point(3), x4 = point(4), x5 = point(5),
x6 = point(6), x7 = point(7), x8 = point(8);
// Construct constant data vectors.
// \vec{x}_{\xi} = \vec{a1}*xi*eta^2 + \vec{b1}*eta**2 + \vec{c1}*xi*eta + \vec{d1}*xi + \vec{e1}*eta + \vec{f1}
// \vec{x}_{\eta} = \vec{a2}*xi^2*eta + \vec{b2}*xi**2 + \vec{c2}*xi*eta + \vec{d2}*xi + \vec{e2}*eta + \vec{f2}
// This is copy-pasted directly from the output of a Python script.
Point
a1 = x0/2 + x1/2 + x2/2 + x3/2 - x4 - x5 - x6 - x7 + 2*x8,
b1 = -x0/4 + x1/4 + x2/4 - x3/4 - x5/2 + x7/2,
c1 = -x0/2 - x1/2 + x2/2 + x3/2 + x4 - x6,
d1 = x5 + x7 - 2*x8,
e1 = x0/4 - x1/4 + x2/4 - x3/4,
f1 = x5/2 - x7/2,
a2 = a1,
b2 = -x0/4 - x1/4 + x2/4 + x3/4 + x4/2 - x6/2,
c2 = -x0/2 + x1/2 + x2/2 - x3/2 - x5 + x7,
d2 = x0/4 - x1/4 + x2/4 - x3/4,
e2 = x4 + x6 - 2*x8,
f2 = -x4/2 + x6/2;
// 3x3 quadrature, exact for bi-quintics
const unsigned int N = 3;
const Real q[N] = {-std::sqrt(15)/5., 0., std::sqrt(15)/5.};
const Real w[N] = {5./9, 8./9, 5./9};
Real vol=0.;
for (unsigned int i=0; i<N; ++i)
for (unsigned int j=0; j<N; ++j)
vol += w[i] * w[j] *
cross_norm(q[i]*q[j]*q[j]*a1 + q[j]*q[j]*b1 + q[j]*q[i]*c1 + q[i]*d1 + q[j]*e1 + f1,
q[i]*q[i]*q[j]*a2 + q[i]*q[i]*b2 + q[j]*q[i]*c2 + q[i]*d2 + q[j]*e2 + f2);
return vol;
}
unsigned int Quad9::n_second_order_adjacent_vertices (const unsigned int n) const
{
switch (n)
{
case 4:
case 5:
case 6:
case 7:
return 2;
case 8:
return 4;
default:
libmesh_error_msg("Invalid n = " << n);
}
}
unsigned short int Quad9::second_order_adjacent_vertex (const unsigned int n,
const unsigned int v) const
{
libmesh_assert_greater_equal (n, this->n_vertices());
libmesh_assert_less (n, this->n_nodes());
switch (n)
{
case 8:
{
libmesh_assert_less (v, 4);
return static_cast<unsigned short int>(v);
}
default:
{
libmesh_assert_less (v, 2);
// use the matrix that we inherited from \p Quad
return _second_order_adjacent_vertices[n-this->n_vertices()][v];
}
}
}
std::pair<unsigned short int, unsigned short int>
Quad9::second_order_child_vertex (const unsigned int n) const
{
libmesh_assert_greater_equal (n, this->n_vertices());
libmesh_assert_less (n, this->n_nodes());
/*
* the _second_order_vertex_child_* vectors are
* stored in face_quad.C, since they are identical
* for Quad8 and Quad9 (for the first 4 higher-order nodes)
*/
return std::pair<unsigned short int, unsigned short int>
(_second_order_vertex_child_number[n],
_second_order_vertex_child_index[n]);
}
} // namespace libMesh
| giorgiobornia/libmesh | src/geom/face_quad9.C | C++ | lgpl-2.1 | 16,533 |
/***************************************************************************
* Copyright (C) 2011-2015 by Fabrizio Montesi <famontesi@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Library General Public License as *
* published by the Free Software Foundation; either version 2 of the *
* License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
* *
* For details about the authors of this software, see the AUTHORS file. *
***************************************************************************/
package jolie.runtime.typing;
import jolie.lang.Constants;
/**
*
* @author Fabrizio Montesi
*/
public class TypeCastingException extends Exception {
public final static long serialVersionUID = Constants.serialVersionUID();
public TypeCastingException() {
super();
}
public TypeCastingException( String message ) {
super( message );
}
/*
* @Override public Throwable fillInStackTrace() { return this; }
*/
}
| jolie/jolie | jolie/src/main/java/jolie/runtime/typing/TypeCastingException.java | Java | lgpl-2.1 | 1,972 |
/* optiondialog.hpp
*
* Copyright (C) 2010 Martin Skowronski
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef OPTIONDIALOG_HPP
#define OPTIONDIALOG_HPP
#include <QDialog>
namespace Ui {
class OptionDialog;
}
class OptionDialog : public QDialog
{
Q_OBJECT
public:
explicit OptionDialog(QWidget *parent = 0);
~OptionDialog();
private:
Ui::OptionDialog *ui;
};
#endif // OPTIONDIALOG_HPP
| skoma/shengci | src/optiondialog.hpp | C++ | lgpl-2.1 | 1,100 |
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
//$Id: $
package org.hibernate.test.join;
/**
* @author Chris Jones
*/
public class Thing {
private Employee salesperson;
private String comments;
/**
* @return Returns the salesperson.
*/
public Employee getSalesperson() {
return salesperson;
}
/**
* @param salesperson The salesperson to set.
*/
public void setSalesperson(Employee salesperson) {
this.salesperson = salesperson;
}
/**
* @return Returns the comments.
*/
public String getComments() {
return comments;
}
/**
* @param comments The comments to set.
*/
public void setComments(String comments) {
this.comments = comments;
}
Long id;
String name;
/**
* @return Returns the ID.
*/
public Long getId() {
return id;
}
/**
* @param id The ID to set.
*/
public void setId(Long id) {
this.id = id;
}
/**
* @return Returns the name.
*/
public String getName() {
return name;
}
/**
* @param name The name to set.
*/
public void setName(String name) {
this.name = name;
}
}
| 1fechner/FeatureExtractor | sources/FeatureExtractor/lib/hibernate-release-5.1.0.Final/project/hibernate-core/src/test/java/org/hibernate/test/join/Thing.java | Java | lgpl-2.1 | 1,249 |
<?php
/**
* @package copix
* @subpackage smarty_plugins
* @author Steevan BARBOYON
* @copyright 2001-2007 CopixTeam
* @link http://copix.org
* @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file
*/
/**
* Smarty {tabs}{/tabs} block plugin
*
* Type: block function
* Name: tabs
* Purpose: make tabs with ul / li and css styles
* @param ul_class: string -> class du tag ul
* @param li_class: string -> class du tag li, si non selectionne
* @param li_class_selected: string -> class du tag li, si selectionne
* @param values: string -> url*caption|url*caption, lien et texte de chaque onglet
* @param selected: string -> url de l'onglet selectionne
* @return string -> html du ul / li
*/
function smarty_block_tabs($params, $content, &$me)
{
if (is_null ($content)){
return;
}
if (isset ($params['assign'])){
$me->assign ($params['assign'], _tag ('tabs', $params, $content));
}
return _tag ('tabs', $params, $content);
}
| lilobase/ICONTO-EcoleNumerique | utils/copix/smarty_plugins/block.tabs.php | PHP | lgpl-2.1 | 1,040 |
/*
* Copyright (C) 2008 Trustin Heuiseung Lee
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA
*/
package net.gleamynode.netty.channel;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import net.gleamynode.netty.logging.Logger;
public class DefaultChannelFuture implements ChannelFuture {
private static final Logger logger =
Logger.getLogger(DefaultChannelFuture.class);
private static final int DEAD_LOCK_CHECK_INTERVAL = 5000;
private static final Throwable CANCELLED = new Throwable();
private final Channel channel;
private final boolean cancellable;
private ChannelFutureListener firstListener;
private List<ChannelFutureListener> otherListeners;
private boolean done;
private Throwable cause;
private int waiters;
public DefaultChannelFuture(Channel channel, boolean cancellable) {
this.channel = channel;
this.cancellable = cancellable;
}
public Channel getChannel() {
return channel;
}
public synchronized boolean isDone() {
return done;
}
public synchronized boolean isSuccess() {
return cause == null;
}
public synchronized Throwable getCause() {
if (cause != CANCELLED) {
return cause;
} else {
return null;
}
}
public synchronized boolean isCancelled() {
return cause == CANCELLED;
}
public void addListener(ChannelFutureListener listener) {
if (listener == null) {
throw new NullPointerException("listener");
}
boolean notifyNow = false;
synchronized (this) {
if (done) {
notifyNow = true;
} else {
if (firstListener == null) {
firstListener = listener;
} else {
if (otherListeners == null) {
otherListeners = new ArrayList<ChannelFutureListener>(1);
}
otherListeners.add(listener);
}
}
}
if (notifyNow) {
notifyListener(listener);
}
}
public void removeListener(ChannelFutureListener listener) {
if (listener == null) {
throw new NullPointerException("listener");
}
synchronized (this) {
if (!done) {
if (listener == firstListener) {
if (otherListeners != null && !otherListeners.isEmpty()) {
firstListener = otherListeners.remove(0);
} else {
firstListener = null;
}
} else if (otherListeners != null) {
otherListeners.remove(listener);
}
}
}
}
public ChannelFuture await() throws InterruptedException {
synchronized (this) {
while (!done) {
waiters++;
try {
this.wait(DEAD_LOCK_CHECK_INTERVAL);
checkDeadLock();
} finally {
waiters--;
}
}
}
return this;
}
public boolean await(long timeout, TimeUnit unit)
throws InterruptedException {
return await(unit.toMillis(timeout));
}
public boolean await(long timeoutMillis) throws InterruptedException {
return await0(timeoutMillis, true);
}
public ChannelFuture awaitUninterruptibly() {
synchronized (this) {
while (!done) {
waiters++;
try {
this.wait(DEAD_LOCK_CHECK_INTERVAL);
} catch (InterruptedException e) {
// Ignore.
} finally {
waiters--;
if (!done) {
checkDeadLock();
}
}
}
}
return this;
}
public boolean awaitUninterruptibly(long timeout, TimeUnit unit) {
return awaitUninterruptibly(unit.toMillis(timeout));
}
public boolean awaitUninterruptibly(long timeoutMillis) {
try {
return await0(timeoutMillis, false);
} catch (InterruptedException e) {
throw new InternalError();
}
}
private boolean await0(long timeoutMillis, boolean interruptable) throws InterruptedException {
long startTime = timeoutMillis <= 0 ? 0 : System.currentTimeMillis();
long waitTime = timeoutMillis;
synchronized (this) {
if (done) {
return done;
} else if (waitTime <= 0) {
return done;
}
waiters++;
try {
for (;;) {
try {
this.wait(Math.min(waitTime, DEAD_LOCK_CHECK_INTERVAL));
} catch (InterruptedException e) {
if (interruptable) {
throw e;
}
}
if (done) {
return true;
} else {
waitTime = timeoutMillis
- (System.currentTimeMillis() - startTime);
if (waitTime <= 0) {
return done;
}
}
}
} finally {
waiters--;
if (!done) {
checkDeadLock();
}
}
}
}
private void checkDeadLock() {
// IllegalStateException e = new IllegalStateException(
// "DEAD LOCK: " + ChannelFuture.class.getSimpleName() +
// ".await() was invoked from an I/O processor thread. " +
// "Please use " + ChannelFutureListener.class.getSimpleName() +
// " or configure a proper thread model alternatively.");
//
// StackTraceElement[] stackTrace = e.getStackTrace();
//
// // Simple and quick check.
// for (StackTraceElement s: stackTrace) {
// if (AbstractPollingIoProcessor.class.getName().equals(s.getClassName())) {
// throw e;
// }
// }
//
// // And then more precisely.
// for (StackTraceElement s: stackTrace) {
// try {
// Class<?> cls = DefaultChannelFuture.class.getClassLoader().loadClass(s.getClassName());
// if (IoProcessor.class.isAssignableFrom(cls)) {
// throw e;
// }
// } catch (Exception cnfe) {
// // Ignore
// }
// }
}
public void setSuccess() {
synchronized (this) {
// Allow only once.
if (done) {
return;
}
done = true;
if (waiters > 0) {
this.notifyAll();
}
}
notifyListeners();
}
public void setFailure(Throwable cause) {
synchronized (this) {
// Allow only once.
if (done) {
return;
}
this.cause = cause;
done = true;
if (waiters > 0) {
this.notifyAll();
}
}
notifyListeners();
}
public boolean cancel() {
if (!cancellable) {
return false;
}
synchronized (this) {
// Allow only once.
if (done) {
return false;
}
cause = CANCELLED;
done = true;
if (waiters > 0) {
this.notifyAll();
}
}
notifyListeners();
return true;
}
private void notifyListeners() {
// There won't be any visibility problem or concurrent modification
// because 'ready' flag will be checked against both addListener and
// removeListener calls.
if (firstListener != null) {
notifyListener(firstListener);
firstListener = null;
if (otherListeners != null) {
for (ChannelFutureListener l: otherListeners) {
notifyListener(l);
}
otherListeners = null;
}
}
}
private void notifyListener(ChannelFutureListener l) {
try {
l.operationComplete(this);
} catch (Throwable t) {
logger.warn(
"An exception was thrown by " +
ChannelFutureListener.class.getSimpleName() + ".", t);
}
}
}
| jiangbo212/netty-init | src/main/java/net/gleamynode/netty/channel/DefaultChannelFuture.java | Java | lgpl-2.1 | 9,495 |
/**
* Contains the service and the class filter required for this bundle.
*/
package org.awb.env.networkModel.classFilter; | EnFlexIT/AgentWorkbench | eclipseProjects/org.agentgui/bundles/org.awb.env.networkModel/src/org/awb/env/networkModel/classFilter/package-info.java | Java | lgpl-2.1 | 127 |
class CfmxCompat
class Version
MAJOR = 0
MINOR = 0
PATCH = 1
PRE = nil
class << self
def to_s
[MAJOR, MINOR, PATCH, PRE].compact.join(".")
end
end
end
end
| globaldev/cfmx_compat | lib/cfmx_compat/version.rb | Ruby | lgpl-2.1 | 204 |
# Orca
#
# Copyright 2005-2009 Sun Microsystems Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., Franklin Street, Fifth Floor,
# Boston MA 02110-1301 USA.
"""Displays a GUI for the user to set Orca preferences."""
__id__ = "$Id$"
__version__ = "$Revision$"
__date__ = "$Date$"
__copyright__ = "Copyright (c) 2005-2009 Sun Microsystems Inc."
__license__ = "LGPL"
import os
from gi.repository import Gdk
from gi.repository import GLib
from gi.repository import Gtk
from gi.repository import GObject
from gi.repository import Pango
import pyatspi
import time
from . import acss
from . import debug
from . import guilabels
from . import messages
from . import orca
from . import orca_gtkbuilder
from . import orca_gui_profile
from . import orca_state
from . import orca_platform
from . import settings
from . import settings_manager
from . import input_event
from . import keybindings
from . import pronunciation_dict
from . import braille
from . import speech
from . import speechserver
from . import text_attribute_names
_settingsManager = settings_manager.getManager()
try:
import louis
except ImportError:
louis = None
from .orca_platform import tablesdir
if louis and not tablesdir:
louis = None
(HANDLER, DESCRIP, MOD_MASK1, MOD_USED1, KEY1, CLICK_COUNT1, OLDTEXT1, \
TEXT1, MODIF, EDITABLE) = list(range(10))
(NAME, IS_SPOKEN, IS_BRAILLED, VALUE) = list(range(4))
(ACTUAL, REPLACEMENT) = list(range(2))
# Must match the order of voice types in the GtkBuilder file.
#
(DEFAULT, UPPERCASE, HYPERLINK, SYSTEM) = list(range(4))
# Must match the order that the timeFormatCombo is populated.
#
(TIME_FORMAT_LOCALE, TIME_FORMAT_12_HM, TIME_FORMAT_12_HMS, TIME_FORMAT_24_HMS,
TIME_FORMAT_24_HMS_WITH_WORDS, TIME_FORMAT_24_HM,
TIME_FORMAT_24_HM_WITH_WORDS) = list(range(7))
# Must match the order that the dateFormatCombo is populated.
#
(DATE_FORMAT_LOCALE, DATE_FORMAT_NUMBERS_DM, DATE_FORMAT_NUMBERS_MD,
DATE_FORMAT_NUMBERS_DMY, DATE_FORMAT_NUMBERS_MDY, DATE_FORMAT_NUMBERS_YMD,
DATE_FORMAT_FULL_DM, DATE_FORMAT_FULL_MD, DATE_FORMAT_FULL_DMY,
DATE_FORMAT_FULL_MDY, DATE_FORMAT_FULL_YMD, DATE_FORMAT_ABBREVIATED_DM,
DATE_FORMAT_ABBREVIATED_MD, DATE_FORMAT_ABBREVIATED_DMY,
DATE_FORMAT_ABBREVIATED_MDY, DATE_FORMAT_ABBREVIATED_YMD) = list(range(16))
class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
def __init__(self, fileName, windowName, prefsDict):
"""Initialize the Orca configuration GUI.
Arguments:
- fileName: name of the GtkBuilder file.
- windowName: name of the component to get from the GtkBuilder file.
- prefsDict: dictionary of preferences to use during initialization
"""
orca_gtkbuilder.GtkBuilderWrapper.__init__(self, fileName, windowName)
self.prefsDict = prefsDict
self._defaultProfile = ['Default', 'default']
# Initialize variables to None to keep pylint happy.
#
self.bbindings = None
self.cellRendererText = None
self.defaultVoice = None
self.disableKeyGrabPref = None
self.getTextAttributesView = None
self.hyperlinkVoice = None
self.initializingSpeech = None
self.kbindings = None
self.keyBindingsModel = None
self.keyBindView = None
self.newBinding = None
self.pendingKeyBindings = None
self.planeCellRendererText = None
self.pronunciationModel = None
self.pronunciationView = None
self.screenHeight = None
self.screenWidth = None
self.speechFamiliesChoice = None
self.speechFamiliesChoices = None
self.speechFamiliesModel = None
self.speechLanguagesChoice = None
self.speechLanguagesChoices = None
self.speechLanguagesModel = None
self.speechFamilies = []
self.speechServersChoice = None
self.speechServersChoices = None
self.speechServersModel = None
self.speechSystemsChoice = None
self.speechSystemsChoices = None
self.speechSystemsModel = None
self.systemVoice = None
self.uppercaseVoice = None
self.window = None
self.workingFactories = None
self.savedGain = None
self.savedPitch = None
self.savedRate = None
self._isInitialSetup = False
self.selectedFamilyChoices = {}
self.selectedLanguageChoices = {}
self.profilesCombo = None
self.profilesComboModel = None
self.startingProfileCombo = None
self._capturedKey = []
self.script = None
def init(self, script):
"""Initialize the Orca configuration GUI. Read the users current
set of preferences and set the GUI state to match. Setup speech
support and populate the combo box lists on the Speech Tab pane
accordingly.
"""
self.script = script
# Restore the default rate/pitch/gain,
# in case the user played with the sliders.
#
try:
voices = _settingsManager.getSetting('voices')
defaultVoice = voices[settings.DEFAULT_VOICE]
except KeyError:
defaultVoice = {}
try:
self.savedGain = defaultVoice[acss.ACSS.GAIN]
except KeyError:
self.savedGain = 10.0
try:
self.savedPitch = defaultVoice[acss.ACSS.AVERAGE_PITCH]
except KeyError:
self.savedPitch = 5.0
try:
self.savedRate = defaultVoice[acss.ACSS.RATE]
except KeyError:
self.savedRate = 50.0
# ***** Key Bindings treeview initialization *****
self.keyBindView = self.get_widget("keyBindingsTreeview")
if self.keyBindView.get_columns():
for column in self.keyBindView.get_columns():
self.keyBindView.remove_column(column)
self.keyBindingsModel = Gtk.TreeStore(
GObject.TYPE_STRING, # Handler name
GObject.TYPE_STRING, # Human Readable Description
GObject.TYPE_STRING, # Modifier mask 1
GObject.TYPE_STRING, # Used Modifiers 1
GObject.TYPE_STRING, # Modifier key name 1
GObject.TYPE_STRING, # Click count 1
GObject.TYPE_STRING, # Original Text of the Key Binding Shown 1
GObject.TYPE_STRING, # Text of the Key Binding Shown 1
GObject.TYPE_BOOLEAN, # Key Modified by User
GObject.TYPE_BOOLEAN) # Row with fields editable or not
self.planeCellRendererText = Gtk.CellRendererText()
self.cellRendererText = Gtk.CellRendererText()
self.cellRendererText.set_property("ellipsize", Pango.EllipsizeMode.END)
# HANDLER - invisble column
#
column = Gtk.TreeViewColumn("Handler",
self.planeCellRendererText,
text=HANDLER)
column.set_resizable(True)
column.set_visible(False)
column.set_sort_column_id(HANDLER)
self.keyBindView.append_column(column)
# DESCRIP
#
column = Gtk.TreeViewColumn(guilabels.KB_HEADER_FUNCTION,
self.cellRendererText,
text=DESCRIP)
column.set_resizable(True)
column.set_min_width(380)
column.set_sort_column_id(DESCRIP)
self.keyBindView.append_column(column)
# MOD_MASK1 - invisble column
#
column = Gtk.TreeViewColumn("Mod.Mask 1",
self.planeCellRendererText,
text=MOD_MASK1)
column.set_visible(False)
column.set_resizable(True)
column.set_sort_column_id(MOD_MASK1)
self.keyBindView.append_column(column)
# MOD_USED1 - invisble column
#
column = Gtk.TreeViewColumn("Use Mod.1",
self.planeCellRendererText,
text=MOD_USED1)
column.set_visible(False)
column.set_resizable(True)
column.set_sort_column_id(MOD_USED1)
self.keyBindView.append_column(column)
# KEY1 - invisble column
#
column = Gtk.TreeViewColumn("Key1",
self.planeCellRendererText,
text=KEY1)
column.set_resizable(True)
column.set_visible(False)
column.set_sort_column_id(KEY1)
self.keyBindView.append_column(column)
# CLICK_COUNT1 - invisble column
#
column = Gtk.TreeViewColumn("ClickCount1",
self.planeCellRendererText,
text=CLICK_COUNT1)
column.set_resizable(True)
column.set_visible(False)
column.set_sort_column_id(CLICK_COUNT1)
self.keyBindView.append_column(column)
# OLDTEXT1 - invisble column which will store a copy of the
# original keybinding in TEXT1 prior to the Apply or OK
# buttons being pressed. This will prevent automatic
# resorting each time a cell is edited.
#
column = Gtk.TreeViewColumn("OldText1",
self.planeCellRendererText,
text=OLDTEXT1)
column.set_resizable(True)
column.set_visible(False)
column.set_sort_column_id(OLDTEXT1)
self.keyBindView.append_column(column)
# TEXT1
#
rendererText = Gtk.CellRendererText()
rendererText.connect("editing-started",
self.editingKey,
self.keyBindingsModel)
rendererText.connect("editing-canceled",
self.editingCanceledKey)
rendererText.connect('edited',
self.editedKey,
self.keyBindingsModel,
MOD_MASK1, MOD_USED1, KEY1, CLICK_COUNT1, TEXT1)
column = Gtk.TreeViewColumn(guilabels.KB_HEADER_KEY_BINDING,
rendererText,
text=TEXT1,
editable=EDITABLE)
column.set_resizable(True)
column.set_sort_column_id(OLDTEXT1)
self.keyBindView.append_column(column)
# MODIF
#
rendererToggle = Gtk.CellRendererToggle()
rendererToggle.connect('toggled',
self.keyModifiedToggle,
self.keyBindingsModel,
MODIF)
column = Gtk.TreeViewColumn(guilabels.KB_MODIFIED,
rendererToggle,
active=MODIF,
activatable=EDITABLE)
#column.set_visible(False)
column.set_resizable(True)
column.set_sort_column_id(MODIF)
self.keyBindView.append_column(column)
# EDITABLE - invisble column
#
rendererToggle = Gtk.CellRendererToggle()
rendererToggle.set_property('activatable', False)
column = Gtk.TreeViewColumn("Modified",
rendererToggle,
active=EDITABLE)
column.set_visible(False)
column.set_resizable(True)
column.set_sort_column_id(EDITABLE)
self.keyBindView.append_column(column)
# Populates the treeview with all the keybindings:
#
self._populateKeyBindings()
self.window = self.get_widget("orcaSetupWindow")
self._setKeyEchoItems()
self.speechSystemsModel = \
self._initComboBox(self.get_widget("speechSystems"))
self.speechServersModel = \
self._initComboBox(self.get_widget("speechServers"))
self.speechLanguagesModel = \
self._initComboBox(self.get_widget("speechLanguages"))
self.speechFamiliesModel = \
self._initComboBox(self.get_widget("speechFamilies"))
self._initSpeechState()
# TODO - JD: Will this ever be the case??
self._isInitialSetup = \
not os.path.exists(_settingsManager.getPrefsDir())
appPage = self.script.getAppPreferencesGUI()
if appPage:
label = Gtk.Label(label=self.script.app.name)
self.get_widget("notebook").append_page(appPage, label)
self._initGUIState()
def _getACSSForVoiceType(self, voiceType):
"""Return the ACSS value for the given voice type.
Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM
Returns the voice dictionary for the given voice type.
"""
if voiceType == DEFAULT:
voiceACSS = self.defaultVoice
elif voiceType == UPPERCASE:
voiceACSS = self.uppercaseVoice
elif voiceType == HYPERLINK:
voiceACSS = self.hyperlinkVoice
elif voiceType == SYSTEM:
voiceACSS = self.systemVoice
else:
voiceACSS = self.defaultVoice
return voiceACSS
def writeUserPreferences(self):
"""Write out the user's generic Orca preferences.
"""
pronunciationDict = self.getModelDict(self.pronunciationModel)
keyBindingsDict = self.getKeyBindingsModelDict(self.keyBindingsModel)
self.prefsDict.update(self.script.getPreferencesFromGUI())
_settingsManager.saveSettings(self.script,
self.prefsDict,
pronunciationDict,
keyBindingsDict)
def _getKeyValueForVoiceType(self, voiceType, key, useDefault=True):
"""Look for the value of the given key in the voice dictionary
for the given voice type.
Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM
- key: the key to look for in the voice dictionary.
- useDefault: if True, and the key isn't found for the given voice
type, the look for it in the default voice dictionary
as well.
Returns the value of the given key, or None if it's not set.
"""
if voiceType == DEFAULT:
voice = self.defaultVoice
elif voiceType == UPPERCASE:
voice = self.uppercaseVoice
if key not in voice:
if not useDefault:
return None
voice = self.defaultVoice
elif voiceType == HYPERLINK:
voice = self.hyperlinkVoice
if key not in voice:
if not useDefault:
return None
voice = self.defaultVoice
elif voiceType == SYSTEM:
voice = self.systemVoice
if key not in voice:
if not useDefault:
return None
voice = self.defaultVoice
else:
voice = self.defaultVoice
if key in voice:
return voice[key]
else:
return None
def _getFamilyNameForVoiceType(self, voiceType):
"""Gets the name of the voice family for the given voice type.
Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM
Returns the name of the voice family for the given voice type,
or None if not set.
"""
familyName = None
family = self._getKeyValueForVoiceType(voiceType, acss.ACSS.FAMILY)
if family and speechserver.VoiceFamily.NAME in family:
familyName = family[speechserver.VoiceFamily.NAME]
return familyName
def _setFamilyNameForVoiceType(self, voiceType, name, language, dialect, variant):
"""Sets the name of the voice family for the given voice type.
Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM
- name: the name of the voice family to set.
- language: the locale of the voice family to set.
- dialect: the dialect of the voice family to set.
"""
family = self._getKeyValueForVoiceType(voiceType,
acss.ACSS.FAMILY,
False)
voiceACSS = self._getACSSForVoiceType(voiceType)
if family:
family[speechserver.VoiceFamily.NAME] = name
family[speechserver.VoiceFamily.LANG] = language
family[speechserver.VoiceFamily.DIALECT] = dialect
family[speechserver.VoiceFamily.VARIANT] = variant
else:
voiceACSS[acss.ACSS.FAMILY] = {}
voiceACSS[acss.ACSS.FAMILY][speechserver.VoiceFamily.NAME] = name
voiceACSS[acss.ACSS.FAMILY][speechserver.VoiceFamily.LANG] = language
voiceACSS[acss.ACSS.FAMILY][speechserver.VoiceFamily.DIALECT] = dialect
voiceACSS[acss.ACSS.FAMILY][speechserver.VoiceFamily.VARIANT] = variant
voiceACSS['established'] = True
#settings.voices[voiceType] = voiceACSS
def _getRateForVoiceType(self, voiceType):
"""Gets the speaking rate value for the given voice type.
Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM
Returns the rate value for the given voice type, or None if
not set.
"""
return self._getKeyValueForVoiceType(voiceType, acss.ACSS.RATE)
def _setRateForVoiceType(self, voiceType, value):
"""Sets the speaking rate value for the given voice type.
Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM
- value: the rate value to set.
"""
voiceACSS = self._getACSSForVoiceType(voiceType)
voiceACSS[acss.ACSS.RATE] = value
voiceACSS['established'] = True
#settings.voices[voiceType] = voiceACSS
def _getPitchForVoiceType(self, voiceType):
"""Gets the pitch value for the given voice type.
Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM
Returns the pitch value for the given voice type, or None if
not set.
"""
return self._getKeyValueForVoiceType(voiceType,
acss.ACSS.AVERAGE_PITCH)
def _setPitchForVoiceType(self, voiceType, value):
"""Sets the pitch value for the given voice type.
Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM
- value: the pitch value to set.
"""
voiceACSS = self._getACSSForVoiceType(voiceType)
voiceACSS[acss.ACSS.AVERAGE_PITCH] = value
voiceACSS['established'] = True
#settings.voices[voiceType] = voiceACSS
def _getVolumeForVoiceType(self, voiceType):
"""Gets the volume (gain) value for the given voice type.
Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM
Returns the volume (gain) value for the given voice type, or
None if not set.
"""
return self._getKeyValueForVoiceType(voiceType, acss.ACSS.GAIN)
def _setVolumeForVoiceType(self, voiceType, value):
"""Sets the volume (gain) value for the given voice type.
Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM
- value: the volume (gain) value to set.
"""
voiceACSS = self._getACSSForVoiceType(voiceType)
voiceACSS[acss.ACSS.GAIN] = value
voiceACSS['established'] = True
#settings.voices[voiceType] = voiceACSS
def _setVoiceSettingsForVoiceType(self, voiceType):
"""Sets the family, rate, pitch and volume GUI components based
on the given voice type.
Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM
"""
familyName = self._getFamilyNameForVoiceType(voiceType)
self._setSpeechFamiliesChoice(familyName)
rate = self._getRateForVoiceType(voiceType)
if rate is not None:
self.get_widget("rateScale").set_value(rate)
else:
self.get_widget("rateScale").set_value(50.0)
pitch = self._getPitchForVoiceType(voiceType)
if pitch is not None:
self.get_widget("pitchScale").set_value(pitch)
else:
self.get_widget("pitchScale").set_value(5.0)
volume = self._getVolumeForVoiceType(voiceType)
if volume is not None:
self.get_widget("volumeScale").set_value(volume)
else:
self.get_widget("volumeScale").set_value(10.0)
def _setSpeechFamiliesChoice(self, familyName):
"""Sets the active item in the families ("Person:") combo box
to the given family name.
Arguments:
- familyName: the family name to use to set the active combo box item.
"""
if len(self.speechFamilies) == 0:
return
languageSet = False
familySet = False
for family in self.speechFamilies:
name = family[speechserver.VoiceFamily.NAME]
if name == familyName:
lang = family[speechserver.VoiceFamily.LANG]
dialect = family[speechserver.VoiceFamily.DIALECT]
if dialect:
language = lang + '-' + dialect
else:
language = lang
i = 0
for languageChoice in self.speechLanguagesChoices:
if languageChoice == language:
self.get_widget("speechLanguages").set_active(i)
self.speechLanguagesChoice = self.speechLanguagesChoices[i]
languageSet = True
self._setupFamilies()
i = 0
for familyChoice in self.speechFamiliesChoices:
name = familyChoice[speechserver.VoiceFamily.NAME]
if name == familyName:
self.get_widget("speechFamilies").set_active(i)
self.speechFamiliesChoice = self.speechFamiliesChoices[i]
familySet = True
break
i += 1
break
i += 1
break
if not languageSet:
debug.println(debug.LEVEL_FINEST,
"Could not find speech language match for %s" \
% familyName)
self.get_widget("speechLanguages").set_active(0)
self.speechLanguagesChoice = self.speechLanguagesChoices[0]
if languageSet:
self.selectedLanguageChoices[self.speechServersChoice] = i
if not familySet:
debug.println(debug.LEVEL_FINEST,
"Could not find speech family match for %s" \
% familyName)
self.get_widget("speechFamilies").set_active(0)
self.speechFamiliesChoice = self.speechFamiliesChoices[0]
if familySet:
self.selectedFamilyChoices[self.speechServersChoice,
self.speechLanguagesChoice] = i
def _setupFamilies(self):
"""Gets the list of voice variants for the current speech server and
current language.
If there are variants, get the information associated with
each voice variant and add an entry for it to the variants
GtkComboBox list.
"""
self.speechFamiliesModel.clear()
currentLanguage = self.speechLanguagesChoice
i = 0
self.speechFamiliesChoices = []
for family in self.speechFamilies:
lang = family[speechserver.VoiceFamily.LANG]
dialect = family[speechserver.VoiceFamily.DIALECT]
if dialect:
language = lang + '-' + dialect
else:
language = lang
if language != currentLanguage:
continue
name = family[speechserver.VoiceFamily.NAME]
self.speechFamiliesChoices.append(family)
self.speechFamiliesModel.append((i, name))
i += 1
if i == 0:
debug.println(debug.LEVEL_SEVERE, "No speech family was available for %s." % str(currentLanguage))
debug.printStack(debug.LEVEL_FINEST)
self.speechFamiliesChoice = None
return
# If user manually selected a family for the current speech server
# this choice it's restored. In other case the first family
# (usually the default one) is selected
#
selectedIndex = 0
if (self.speechServersChoice, self.speechLanguagesChoice) \
in self.selectedFamilyChoices:
selectedIndex = self.selectedFamilyChoices[self.speechServersChoice,
self.speechLanguagesChoice]
self.get_widget("speechFamilies").set_active(selectedIndex)
def _setSpeechLanguagesChoice(self, languageName):
"""Sets the active item in the languages ("Language:") combo box
to the given language name.
Arguments:
- languageName: the language name to use to set the active combo box item.
"""
print("setSpeechLanguagesChoice")
if len(self.speechLanguagesChoices) == 0:
return
valueSet = False
i = 0
for language in self.speechLanguagesChoices:
if language == languageName:
self.get_widget("speechLanguages").set_active(i)
self.speechLanguagesChoice = self.speechLanguagesChoices[i]
valueSet = True
break
i += 1
if not valueSet:
debug.println(debug.LEVEL_FINEST,
"Could not find speech language match for %s" \
% languageName)
self.get_widget("speechLanguages").set_active(0)
self.speechLanguagesChoice = self.speechLanguagesChoices[0]
if valueSet:
self.selectedLanguageChoices[self.speechServersChoice] = i
self._setupFamilies()
def _setupVoices(self):
"""Gets the list of voices for the current speech server.
If there are families, get the information associated with
each voice family and add an entry for it to the families
GtkComboBox list.
"""
self.speechLanguagesModel.clear()
self.speechFamilies = self.speechServersChoice.getVoiceFamilies()
self.speechLanguagesChoices = []
if len(self.speechFamilies) == 0:
debug.println(debug.LEVEL_SEVERE, "No speech voice was available.")
debug.printStack(debug.LEVEL_FINEST)
self.speechLanguagesChoice = None
return
done = {}
i = 0
for family in self.speechFamilies:
lang = family[speechserver.VoiceFamily.LANG]
dialect = family[speechserver.VoiceFamily.DIALECT]
if (lang,dialect) in done:
continue
done[lang,dialect] = True
if dialect:
language = lang + '-' + dialect
else:
language = lang
# TODO: get translated language name from CLDR or such
msg = language
if msg == "":
# Unsupported locale
msg = "default language"
self.speechLanguagesChoices.append(language)
self.speechLanguagesModel.append((i, msg))
i += 1
# If user manually selected a language for the current speech server
# this choice it's restored. In other case the first language
# (usually the default one) is selected
#
selectedIndex = 0
if self.speechServersChoice in self.selectedLanguageChoices:
selectedIndex = self.selectedLanguageChoices[self.speechServersChoice]
self.get_widget("speechLanguages").set_active(selectedIndex)
if self.initializingSpeech:
self.speechLanguagesChoice = self.speechLanguagesChoices[selectedIndex]
self._setupFamilies()
# The family name will be selected as part of selecting the
# voice type. Whenever the families change, we'll reset the
# voice type selection to the first one ("Default").
#
comboBox = self.get_widget("voiceTypesCombo")
types = [guilabels.SPEECH_VOICE_TYPE_DEFAULT,
guilabels.SPEECH_VOICE_TYPE_UPPERCASE,
guilabels.SPEECH_VOICE_TYPE_HYPERLINK,
guilabels.SPEECH_VOICE_TYPE_SYSTEM]
self.populateComboBox(comboBox, types)
comboBox.set_active(DEFAULT)
voiceType = comboBox.get_active()
self._setVoiceSettingsForVoiceType(voiceType)
def _setSpeechServersChoice(self, serverInfo):
"""Sets the active item in the speech servers combo box to the
given server.
Arguments:
- serversChoices: the list of available speech servers.
- serverInfo: the speech server to use to set the active combo
box item.
"""
if len(self.speechServersChoices) == 0:
return
# We'll fallback to whatever we happen to be using in the event
# that this preference has never been set.
#
if not serverInfo:
serverInfo = speech.getInfo()
valueSet = False
i = 0
for server in self.speechServersChoices:
if serverInfo == server.getInfo():
self.get_widget("speechServers").set_active(i)
self.speechServersChoice = server
valueSet = True
break
i += 1
if not valueSet:
debug.println(debug.LEVEL_FINEST,
"Could not find speech server match for %s" \
% repr(serverInfo))
self.get_widget("speechServers").set_active(0)
self.speechServersChoice = self.speechServersChoices[0]
self._setupVoices()
def _setupSpeechServers(self):
"""Gets the list of speech servers for the current speech factory.
If there are servers, get the information associated with each
speech server and add an entry for it to the speechServers
GtkComboBox list. Set the current choice to be the first item.
"""
self.speechServersModel.clear()
self.speechServersChoices = \
self.speechSystemsChoice.SpeechServer.getSpeechServers()
if len(self.speechServersChoices) == 0:
debug.println(debug.LEVEL_SEVERE, "Speech not available.")
debug.printStack(debug.LEVEL_FINEST)
self.speechServersChoice = None
self.speechLanguagesChoices = []
self.speechLanguagesChoice = None
self.speechFamiliesChoices = []
self.speechFamiliesChoice = None
return
i = 0
for server in self.speechServersChoices:
name = server.getInfo()[0]
self.speechServersModel.append((i, name))
i += 1
self._setSpeechServersChoice(self.prefsDict["speechServerInfo"])
debug.println(
debug.LEVEL_FINEST,
"orca_gui_prefs._setupSpeechServers: speechServersChoice: %s" \
% self.speechServersChoice.getInfo())
def _setSpeechSystemsChoice(self, systemName):
"""Set the active item in the speech systems combo box to the
given system name.
Arguments:
- factoryChoices: the list of available speech factories (systems).
- systemName: the speech system name to use to set the active combo
box item.
"""
systemName = systemName.strip("'")
if len(self.speechSystemsChoices) == 0:
self.speechSystemsChoice = None
return
valueSet = False
i = 0
for speechSystem in self.speechSystemsChoices:
name = speechSystem.__name__
if name.endswith(systemName):
self.get_widget("speechSystems").set_active(i)
self.speechSystemsChoice = self.speechSystemsChoices[i]
valueSet = True
break
i += 1
if not valueSet:
debug.println(debug.LEVEL_FINEST,
"Could not find speech system match for %s" \
% systemName)
self.get_widget("speechSystems").set_active(0)
self.speechSystemsChoice = self.speechSystemsChoices[0]
self._setupSpeechServers()
def _setupSpeechSystems(self, factories):
"""Sets up the speech systems combo box and sets the selection
to the preferred speech system.
Arguments:
-factories: the list of known speech factories (working or not)
"""
self.speechSystemsModel.clear()
self.workingFactories = []
for factory in factories:
try:
servers = factory.SpeechServer.getSpeechServers()
if len(servers):
self.workingFactories.append(factory)
except:
debug.printException(debug.LEVEL_FINEST)
self.speechSystemsChoices = []
if len(self.workingFactories) == 0:
debug.println(debug.LEVEL_SEVERE, "Speech not available.")
debug.printStack(debug.LEVEL_FINEST)
self.speechSystemsChoice = None
self.speechServersChoices = []
self.speechServersChoice = None
self.speechLanguagesChoices = []
self.speechLanguagesChoice = None
self.speechFamiliesChoices = []
self.speechFamiliesChoice = None
return
i = 0
for workingFactory in self.workingFactories:
self.speechSystemsChoices.append(workingFactory)
name = workingFactory.SpeechServer.getFactoryName()
self.speechSystemsModel.append((i, name))
i += 1
if self.prefsDict["speechServerFactory"]:
self._setSpeechSystemsChoice(self.prefsDict["speechServerFactory"])
else:
self.speechSystemsChoice = None
debug.println(
debug.LEVEL_FINEST,
"orca_gui_prefs._setupSpeechSystems: speechSystemsChoice: %s" \
% self.speechSystemsChoice)
def _initSpeechState(self):
"""Initialize the various speech components.
"""
voices = self.prefsDict["voices"]
self.defaultVoice = acss.ACSS(voices.get(settings.DEFAULT_VOICE))
self.uppercaseVoice = acss.ACSS(voices.get(settings.UPPERCASE_VOICE))
self.hyperlinkVoice = acss.ACSS(voices.get(settings.HYPERLINK_VOICE))
self.systemVoice = acss.ACSS(voices.get(settings.SYSTEM_VOICE))
# Just a note on general naming pattern:
#
# * = The name of the combobox
# *Model = the name of the comobox model
# *Choices = the Orca/speech python objects
# *Choice = a value from *Choices
#
# Where * = speechSystems, speechServers, speechLanguages, speechFamilies
#
factories = _settingsManager.getSpeechServerFactories()
if len(factories) == 0 or not self.prefsDict.get('enableSpeech', True):
self.workingFactories = []
self.speechSystemsChoice = None
self.speechServersChoices = []
self.speechServersChoice = None
self.speechLanguagesChoices = []
self.speechLanguagesChoice = None
self.speechFamiliesChoices = []
self.speechFamiliesChoice = None
return
try:
speech.init()
except:
self.workingFactories = []
self.speechSystemsChoice = None
self.speechServersChoices = []
self.speechServersChoice = None
self.speechLanguagesChoices = []
self.speechLanguagesChoice = None
self.speechFamiliesChoices = []
self.speechFamiliesChoice = None
return
# This cascades into systems->servers->voice_type->families...
#
self.initializingSpeech = True
self._setupSpeechSystems(factories)
self.initializingSpeech = False
def _setSpokenTextAttributes(self, view, setAttributes,
state, moveToTop=False):
"""Given a set of spoken text attributes, update the model used by the
text attribute tree view.
Arguments:
- view: the text attribute tree view.
- setAttributes: the list of spoken text attributes to update.
- state: the state (True or False) that they all should be set to.
- moveToTop: if True, move these attributes to the top of the list.
"""
model = view.get_model()
view.set_model(None)
[attrList, attrDict] = \
self.script.utilities.stringToKeysAndDict(setAttributes)
[allAttrList, allAttrDict] = self.script.utilities.stringToKeysAndDict(
_settingsManager.getSetting('allTextAttributes'))
for i in range(0, len(attrList)):
for path in range(0, len(allAttrList)):
localizedKey = text_attribute_names.getTextAttributeName(
attrList[i], self.script)
localizedValue = text_attribute_names.getTextAttributeName(
attrDict[attrList[i]], self.script)
if localizedKey == model[path][NAME]:
thisIter = model.get_iter(path)
model.set_value(thisIter, NAME, localizedKey)
model.set_value(thisIter, IS_SPOKEN, state)
model.set_value(thisIter, VALUE, localizedValue)
if moveToTop:
thisIter = model.get_iter(path)
otherIter = model.get_iter(i)
model.move_before(thisIter, otherIter)
break
view.set_model(model)
def _setBrailledTextAttributes(self, view, setAttributes, state):
"""Given a set of brailled text attributes, update the model used
by the text attribute tree view.
Arguments:
- view: the text attribute tree view.
- setAttributes: the list of brailled text attributes to update.
- state: the state (True or False) that they all should be set to.
"""
model = view.get_model()
view.set_model(None)
[attrList, attrDict] = \
self.script.utilities.stringToKeysAndDict(setAttributes)
[allAttrList, allAttrDict] = self.script.utilities.stringToKeysAndDict(
_settingsManager.getSetting('allTextAttributes'))
for i in range(0, len(attrList)):
for path in range(0, len(allAttrList)):
localizedKey = text_attribute_names.getTextAttributeName(
attrList[i], self.script)
if localizedKey == model[path][NAME]:
thisIter = model.get_iter(path)
model.set_value(thisIter, IS_BRAILLED, state)
break
view.set_model(model)
def _getAppNameForAttribute(self, attributeName):
"""Converts the given Atk attribute name into the application's
equivalent. This is necessary because an application or toolkit
(e.g. Gecko) might invent entirely new names for the same text
attributes.
Arguments:
- attribName: The name of the text attribute
Returns the application's equivalent name if found or attribName
otherwise.
"""
return self.script.utilities.getAppNameForAttribute(attributeName)
def _updateTextDictEntry(self):
"""The user has updated the text attribute list in some way. Update
the "enabledSpokenTextAttributes" and "enabledBrailledTextAttributes"
preference strings to reflect the current state of the corresponding
text attribute lists.
"""
model = self.getTextAttributesView.get_model()
spokenAttrStr = ""
brailledAttrStr = ""
noRows = model.iter_n_children(None)
for path in range(0, noRows):
localizedKey = model[path][NAME]
key = text_attribute_names.getTextAttributeKey(localizedKey)
# Convert the normalized, Atk attribute name back into what
# the app/toolkit uses.
#
key = self._getAppNameForAttribute(key)
localizedValue = model[path][VALUE]
value = text_attribute_names.getTextAttributeKey(localizedValue)
if model[path][IS_SPOKEN]:
spokenAttrStr += key + ":" + value + "; "
if model[path][IS_BRAILLED]:
brailledAttrStr += key + ":" + value + "; "
self.prefsDict["enabledSpokenTextAttributes"] = spokenAttrStr
self.prefsDict["enabledBrailledTextAttributes"] = brailledAttrStr
def contractedBrailleToggled(self, checkbox):
grid = self.get_widget('contractionTableGrid')
grid.set_sensitive(checkbox.get_active())
self.prefsDict["enableContractedBraille"] = checkbox.get_active()
def contractionTableComboChanged(self, combobox):
model = combobox.get_model()
myIter = combobox.get_active_iter()
self.prefsDict["brailleContractionTable"] = model[myIter][1]
def flashPersistenceToggled(self, checkbox):
grid = self.get_widget('flashMessageDurationGrid')
grid.set_sensitive(not checkbox.get_active())
self.prefsDict["flashIsPersistent"] = checkbox.get_active()
def textAttributeSpokenToggled(self, cell, path, model):
"""The user has toggled the state of one of the text attribute
checkboxes to be spoken. Update our model to reflect this, then
update the "enabledSpokenTextAttributes" preference string.
Arguments:
- cell: the cell that changed.
- path: the path of that cell.
- model: the model that the cell is part of.
"""
thisIter = model.get_iter(path)
model.set(thisIter, IS_SPOKEN, not model[path][IS_SPOKEN])
self._updateTextDictEntry()
def textAttributeBrailledToggled(self, cell, path, model):
"""The user has toggled the state of one of the text attribute
checkboxes to be brailled. Update our model to reflect this,
then update the "enabledBrailledTextAttributes" preference string.
Arguments:
- cell: the cell that changed.
- path: the path of that cell.
- model: the model that the cell is part of.
"""
thisIter = model.get_iter(path)
model.set(thisIter, IS_BRAILLED, not model[path][IS_BRAILLED])
self._updateTextDictEntry()
def textAttrValueEdited(self, cell, path, new_text, model):
"""The user has edited the value of one of the text attributes.
Update our model to reflect this, then update the
"enabledSpokenTextAttributes" and "enabledBrailledTextAttributes"
preference strings.
Arguments:
- cell: the cell that changed.
- path: the path of that cell.
- new_text: the new text attribute value string.
- model: the model that the cell is part of.
"""
thisIter = model.get_iter(path)
model.set(thisIter, VALUE, new_text)
self._updateTextDictEntry()
def textAttrCursorChanged(self, widget):
"""Set the search column in the text attribute tree view
depending upon which column the user currently has the cursor in.
"""
[path, focusColumn] = self.getTextAttributesView.get_cursor()
if focusColumn:
noColumns = len(self.getTextAttributesView.get_columns())
for i in range(0, noColumns):
col = self.getTextAttributesView.get_column(i)
if focusColumn == col:
self.getTextAttributesView.set_search_column(i)
break
def _createTextAttributesTreeView(self):
"""Create the text attributes tree view. The view is the
textAttributesTreeView GtkTreeView widget. The view will consist
of a list containing three columns:
IS_SPOKEN - a checkbox whose state indicates whether this text
attribute will be spoken or not.
NAME - the text attribute name.
VALUE - if set, (and this attributes is enabled for speaking),
then this attribute will be spoken unless it equals
this value.
"""
self.getTextAttributesView = self.get_widget("textAttributesTreeView")
if self.getTextAttributesView.get_columns():
for column in self.getTextAttributesView.get_columns():
self.getTextAttributesView.remove_column(column)
model = Gtk.ListStore(GObject.TYPE_STRING,
GObject.TYPE_BOOLEAN,
GObject.TYPE_BOOLEAN,
GObject.TYPE_STRING)
# Initially setup the list store model based on the values of all
# the known text attributes.
#
[allAttrList, allAttrDict] = self.script.utilities.stringToKeysAndDict(
_settingsManager.getSetting('allTextAttributes'))
for i in range(0, len(allAttrList)):
thisIter = model.append()
localizedKey = text_attribute_names.getTextAttributeName(
allAttrList[i], self.script)
localizedValue = text_attribute_names.getTextAttributeName(
allAttrDict[allAttrList[i]], self.script)
model.set_value(thisIter, NAME, localizedKey)
model.set_value(thisIter, IS_SPOKEN, False)
model.set_value(thisIter, IS_BRAILLED, False)
model.set_value(thisIter, VALUE, localizedValue)
self.getTextAttributesView.set_model(model)
# Attribute Name column (NAME).
column = Gtk.TreeViewColumn(guilabels.TEXT_ATTRIBUTE_NAME)
column.set_min_width(250)
column.set_resizable(True)
renderer = Gtk.CellRendererText()
column.pack_end(renderer, True)
column.add_attribute(renderer, 'text', NAME)
self.getTextAttributesView.insert_column(column, 0)
# Attribute Speak column (IS_SPOKEN).
speakAttrColumnLabel = guilabels.PRESENTATION_SPEAK
column = Gtk.TreeViewColumn(speakAttrColumnLabel)
renderer = Gtk.CellRendererToggle()
column.pack_start(renderer, False)
column.add_attribute(renderer, 'active', IS_SPOKEN)
renderer.connect("toggled",
self.textAttributeSpokenToggled,
model)
self.getTextAttributesView.insert_column(column, 1)
column.clicked()
# Attribute Mark in Braille column (IS_BRAILLED).
markAttrColumnLabel = guilabels.PRESENTATION_MARK_IN_BRAILLE
column = Gtk.TreeViewColumn(markAttrColumnLabel)
renderer = Gtk.CellRendererToggle()
column.pack_start(renderer, False)
column.add_attribute(renderer, 'active', IS_BRAILLED)
renderer.connect("toggled",
self.textAttributeBrailledToggled,
model)
self.getTextAttributesView.insert_column(column, 2)
column.clicked()
# Attribute Value column (VALUE)
column = Gtk.TreeViewColumn(guilabels.PRESENTATION_PRESENT_UNLESS)
renderer = Gtk.CellRendererText()
renderer.set_property('editable', True)
column.pack_end(renderer, True)
column.add_attribute(renderer, 'text', VALUE)
renderer.connect("edited", self.textAttrValueEdited, model)
self.getTextAttributesView.insert_column(column, 4)
# Check all the enabled (spoken) text attributes.
#
self._setSpokenTextAttributes(
self.getTextAttributesView,
_settingsManager.getSetting('enabledSpokenTextAttributes'),
True, True)
# Check all the enabled (brailled) text attributes.
#
self._setBrailledTextAttributes(
self.getTextAttributesView,
_settingsManager.getSetting('enabledBrailledTextAttributes'),
True)
# Connect a handler for when the user changes columns within the
# view, so that we can adjust the search column for item lookups.
#
self.getTextAttributesView.connect("cursor_changed",
self.textAttrCursorChanged)
def pronActualValueEdited(self, cell, path, new_text, model):
"""The user has edited the value of one of the actual strings in
the pronunciation dictionary. Update our model to reflect this.
Arguments:
- cell: the cell that changed.
- path: the path of that cell.
- new_text: the new pronunciation dictionary actual string.
- model: the model that the cell is part of.
"""
thisIter = model.get_iter(path)
model.set(thisIter, ACTUAL, new_text)
def pronReplacementValueEdited(self, cell, path, new_text, model):
"""The user has edited the value of one of the replacement strings
in the pronunciation dictionary. Update our model to reflect this.
Arguments:
- cell: the cell that changed.
- path: the path of that cell.
- new_text: the new pronunciation dictionary replacement string.
- model: the model that the cell is part of.
"""
thisIter = model.get_iter(path)
model.set(thisIter, REPLACEMENT, new_text)
def pronunciationFocusChange(self, widget, event, isFocused):
"""Callback for the pronunciation tree's focus-{in,out}-event signal."""
_settingsManager.setSetting('usePronunciationDictionary', not isFocused)
def pronunciationCursorChanged(self, widget):
"""Set the search column in the pronunciation dictionary tree view
depending upon which column the user currently has the cursor in.
"""
[path, focusColumn] = self.pronunciationView.get_cursor()
if focusColumn:
noColumns = len(self.pronunciationView.get_columns())
for i in range(0, noColumns):
col = self.pronunciationView.get_column(i)
if focusColumn == col:
self.pronunciationView.set_search_column(i)
break
def _createPronunciationTreeView(self):
"""Create the pronunciation dictionary tree view. The view is the
pronunciationTreeView GtkTreeView widget. The view will consist
of a list containing two columns:
ACTUAL - the actual text string (word).
REPLACEMENT - the string that is used to pronounce that word.
"""
self.pronunciationView = self.get_widget("pronunciationTreeView")
if self.pronunciationView.get_columns():
for column in self.pronunciationView.get_columns():
self.pronunciationView.remove_column(column)
model = Gtk.ListStore(GObject.TYPE_STRING,
GObject.TYPE_STRING)
# Initially setup the list store model based on the values of all
# existing entries in the pronunciation dictionary -- unless it's
# the default script.
#
if not self.script.app:
_profile = self.prefsDict.get('activeProfile')[1]
pronDict = _settingsManager.getPronunciations(_profile)
else:
pronDict = pronunciation_dict.pronunciation_dict
for pronKey in sorted(pronDict.keys()):
thisIter = model.append()
try:
actual, replacement = pronDict[pronKey]
except:
# Try to do something sensible for the previous format of
# pronunciation dictionary entries. See bug #464754 for
# more details.
#
actual = pronKey
replacement = pronDict[pronKey]
model.set(thisIter,
ACTUAL, actual,
REPLACEMENT, replacement)
self.pronunciationView.set_model(model)
# Pronunciation Dictionary actual string (word) column (ACTUAL).
column = Gtk.TreeViewColumn(guilabels.DICTIONARY_ACTUAL_STRING)
column.set_min_width(250)
column.set_resizable(True)
renderer = Gtk.CellRendererText()
renderer.set_property('editable', True)
column.pack_end(renderer, True)
column.add_attribute(renderer, 'text', ACTUAL)
renderer.connect("edited", self.pronActualValueEdited, model)
self.pronunciationView.insert_column(column, 0)
# Pronunciation Dictionary replacement string column (REPLACEMENT)
column = Gtk.TreeViewColumn(guilabels.DICTIONARY_REPLACEMENT_STRING)
renderer = Gtk.CellRendererText()
renderer.set_property('editable', True)
column.pack_end(renderer, True)
column.add_attribute(renderer, 'text', REPLACEMENT)
renderer.connect("edited", self.pronReplacementValueEdited, model)
self.pronunciationView.insert_column(column, 1)
self.pronunciationModel = model
# Connect a handler for when the user changes columns within the
# view, so that we can adjust the search column for item lookups.
#
self.pronunciationView.connect("cursor_changed",
self.pronunciationCursorChanged)
self.pronunciationView.connect(
"focus_in_event", self.pronunciationFocusChange, True)
self.pronunciationView.connect(
"focus_out_event", self.pronunciationFocusChange, False)
def _initGUIState(self):
"""Adjust the settings of the various components on the
configuration GUI depending upon the users preferences.
"""
prefs = self.prefsDict
# Speech pane.
#
enable = prefs["enableSpeech"]
self.get_widget("speechSupportCheckButton").set_active(enable)
self.get_widget("speechOptionsGrid").set_sensitive(enable)
enable = prefs["onlySpeakDisplayedText"]
self.get_widget("onlySpeakDisplayedTextCheckButton").set_active(enable)
self.get_widget("contextOptionsGrid").set_sensitive(not enable)
if prefs["verbalizePunctuationStyle"] == \
settings.PUNCTUATION_STYLE_NONE:
self.get_widget("noneButton").set_active(True)
elif prefs["verbalizePunctuationStyle"] == \
settings.PUNCTUATION_STYLE_SOME:
self.get_widget("someButton").set_active(True)
elif prefs["verbalizePunctuationStyle"] == \
settings.PUNCTUATION_STYLE_MOST:
self.get_widget("mostButton").set_active(True)
else:
self.get_widget("allButton").set_active(True)
if prefs["speechVerbosityLevel"] == settings.VERBOSITY_LEVEL_BRIEF:
self.get_widget("speechBriefButton").set_active(True)
else:
self.get_widget("speechVerboseButton").set_active(True)
self.get_widget("onlySpeakDisplayedTextCheckButton").set_active(
prefs["onlySpeakDisplayedText"])
self.get_widget("enableSpeechIndentationCheckButton").set_active(\
prefs["enableSpeechIndentation"])
self.get_widget("speakBlankLinesCheckButton").set_active(\
prefs["speakBlankLines"])
self.get_widget("speakMultiCaseStringsAsWordsCheckButton").set_active(\
prefs["speakMultiCaseStringsAsWords"])
self.get_widget("speakNumbersAsDigitsCheckButton").set_active(
prefs.get("speakNumbersAsDigits", settings.speakNumbersAsDigits))
self.get_widget("enableTutorialMessagesCheckButton").set_active(\
prefs["enableTutorialMessages"])
self.get_widget("enablePauseBreaksCheckButton").set_active(\
prefs["enablePauseBreaks"])
self.get_widget("enablePositionSpeakingCheckButton").set_active(\
prefs["enablePositionSpeaking"])
self.get_widget("enableMnemonicSpeakingCheckButton").set_active(\
prefs["enableMnemonicSpeaking"])
self.get_widget("speakMisspelledIndicatorCheckButton").set_active(
prefs.get("speakMisspelledIndicator", settings.speakMisspelledIndicator))
self.get_widget("speakDescriptionCheckButton").set_active(
prefs.get("speakDescription", settings.speakDescription))
self.get_widget("speakContextBlockquoteCheckButton").set_active(
prefs.get("speakContextBlockquote", settings.speakContextList))
self.get_widget("speakContextLandmarkCheckButton").set_active(
prefs.get("speakContextLandmark", settings.speakContextLandmark))
self.get_widget("speakContextNonLandmarkFormCheckButton").set_active(
prefs.get("speakContextNonLandmarkForm", settings.speakContextNonLandmarkForm))
self.get_widget("speakContextListCheckButton").set_active(
prefs.get("speakContextList", settings.speakContextList))
self.get_widget("speakContextPanelCheckButton").set_active(
prefs.get("speakContextPanel", settings.speakContextPanel))
self.get_widget("speakContextTableCheckButton").set_active(
prefs.get("speakContextTable", settings.speakContextTable))
enable = prefs.get("messagesAreDetailed", settings.messagesAreDetailed)
self.get_widget("messagesAreDetailedCheckButton").set_active(enable)
enable = prefs.get("useColorNames", settings.useColorNames)
self.get_widget("useColorNamesCheckButton").set_active(enable)
enable = prefs.get("readFullRowInGUITable", settings.readFullRowInGUITable)
self.get_widget("readFullRowInGUITableCheckButton").set_active(enable)
enable = prefs.get("readFullRowInDocumentTable", settings.readFullRowInDocumentTable)
self.get_widget("readFullRowInDocumentTableCheckButton").set_active(enable)
enable = prefs.get("readFullRowInSpreadSheet", settings.readFullRowInSpreadSheet)
self.get_widget("readFullRowInSpreadSheetCheckButton").set_active(enable)
style = prefs.get("capitalizationStyle", settings.capitalizationStyle)
combobox = self.get_widget("capitalizationStyle")
options = [guilabels.CAPITALIZATION_STYLE_NONE,
guilabels.CAPITALIZATION_STYLE_ICON,
guilabels.CAPITALIZATION_STYLE_SPELL]
self.populateComboBox(combobox, options)
if style == settings.CAPITALIZATION_STYLE_ICON:
value = guilabels.CAPITALIZATION_STYLE_ICON
elif style == settings.CAPITALIZATION_STYLE_SPELL:
value = guilabels.CAPITALIZATION_STYLE_SPELL
else:
value = guilabels.CAPITALIZATION_STYLE_NONE
combobox.set_active(options.index(value))
combobox2 = self.get_widget("dateFormatCombo")
sdtime = time.strftime
ltime = time.localtime
self.populateComboBox(combobox2,
[sdtime(messages.DATE_FORMAT_LOCALE, ltime()),
sdtime(messages.DATE_FORMAT_NUMBERS_DM, ltime()),
sdtime(messages.DATE_FORMAT_NUMBERS_MD, ltime()),
sdtime(messages.DATE_FORMAT_NUMBERS_DMY, ltime()),
sdtime(messages.DATE_FORMAT_NUMBERS_MDY, ltime()),
sdtime(messages.DATE_FORMAT_NUMBERS_YMD, ltime()),
sdtime(messages.DATE_FORMAT_FULL_DM, ltime()),
sdtime(messages.DATE_FORMAT_FULL_MD, ltime()),
sdtime(messages.DATE_FORMAT_FULL_DMY, ltime()),
sdtime(messages.DATE_FORMAT_FULL_MDY, ltime()),
sdtime(messages.DATE_FORMAT_FULL_YMD, ltime()),
sdtime(messages.DATE_FORMAT_ABBREVIATED_DM, ltime()),
sdtime(messages.DATE_FORMAT_ABBREVIATED_MD, ltime()),
sdtime(messages.DATE_FORMAT_ABBREVIATED_DMY, ltime()),
sdtime(messages.DATE_FORMAT_ABBREVIATED_MDY, ltime()),
sdtime(messages.DATE_FORMAT_ABBREVIATED_YMD, ltime())
])
indexdate = DATE_FORMAT_LOCALE
dateFormat = self.prefsDict["presentDateFormat"]
if dateFormat == messages.DATE_FORMAT_LOCALE:
indexdate = DATE_FORMAT_LOCALE
elif dateFormat == messages.DATE_FORMAT_NUMBERS_DM:
indexdate = DATE_FORMAT_NUMBERS_DM
elif dateFormat == messages.DATE_FORMAT_NUMBERS_MD:
indexdate = DATE_FORMAT_NUMBERS_MD
elif dateFormat == messages.DATE_FORMAT_NUMBERS_DMY:
indexdate = DATE_FORMAT_NUMBERS_DMY
elif dateFormat == messages.DATE_FORMAT_NUMBERS_MDY:
indexdate = DATE_FORMAT_NUMBERS_MDY
elif dateFormat == messages.DATE_FORMAT_NUMBERS_YMD:
indexdate = DATE_FORMAT_NUMBERS_YMD
elif dateFormat == messages.DATE_FORMAT_FULL_DM:
indexdate = DATE_FORMAT_FULL_DM
elif dateFormat == messages.DATE_FORMAT_FULL_MD:
indexdate = DATE_FORMAT_FULL_MD
elif dateFormat == messages.DATE_FORMAT_FULL_DMY:
indexdate = DATE_FORMAT_FULL_DMY
elif dateFormat == messages.DATE_FORMAT_FULL_MDY:
indexdate = DATE_FORMAT_FULL_MDY
elif dateFormat == messages.DATE_FORMAT_FULL_YMD:
indexdate = DATE_FORMAT_FULL_YMD
elif dateFormat == messages.DATE_FORMAT_ABBREVIATED_DM:
indexdate = DATE_FORMAT_ABBREVIATED_DM
elif dateFormat == messages.DATE_FORMAT_ABBREVIATED_MD:
indexdate = DATE_FORMAT_ABBREVIATED_MD
elif dateFormat == messages.DATE_FORMAT_ABBREVIATED_DMY:
indexdate = DATE_FORMAT_ABBREVIATED_DMY
elif dateFormat == messages.DATE_FORMAT_ABBREVIATED_MDY:
indexdate = DATE_FORMAT_ABBREVIATED_MDY
elif dateFormat == messages.DATE_FORMAT_ABBREVIATED_YMD:
indexdate = DATE_FORMAT_ABBREVIATED_YMD
combobox2.set_active (indexdate)
combobox3 = self.get_widget("timeFormatCombo")
self.populateComboBox(combobox3,
[sdtime(messages.TIME_FORMAT_LOCALE, ltime()),
sdtime(messages.TIME_FORMAT_12_HM, ltime()),
sdtime(messages.TIME_FORMAT_12_HMS, ltime()),
sdtime(messages.TIME_FORMAT_24_HMS, ltime()),
sdtime(messages.TIME_FORMAT_24_HMS_WITH_WORDS, ltime()),
sdtime(messages.TIME_FORMAT_24_HM, ltime()),
sdtime(messages.TIME_FORMAT_24_HM_WITH_WORDS, ltime())])
indextime = TIME_FORMAT_LOCALE
timeFormat = self.prefsDict["presentTimeFormat"]
if timeFormat == messages.TIME_FORMAT_LOCALE:
indextime = TIME_FORMAT_LOCALE
elif timeFormat == messages.TIME_FORMAT_12_HM:
indextime = TIME_FORMAT_12_HM
elif timeFormat == messages.TIME_FORMAT_12_HMS:
indextime = TIME_FORMAT_12_HMS
elif timeFormat == messages.TIME_FORMAT_24_HMS:
indextime = TIME_FORMAT_24_HMS
elif timeFormat == messages.TIME_FORMAT_24_HMS_WITH_WORDS:
indextime = TIME_FORMAT_24_HMS_WITH_WORDS
elif timeFormat == messages.TIME_FORMAT_24_HM:
indextime = TIME_FORMAT_24_HM
elif timeFormat == messages.TIME_FORMAT_24_HM_WITH_WORDS:
indextime = TIME_FORMAT_24_HM_WITH_WORDS
combobox3.set_active (indextime)
self.get_widget("speakProgressBarUpdatesCheckButton").set_active(
prefs.get("speakProgressBarUpdates", settings.speakProgressBarUpdates))
self.get_widget("brailleProgressBarUpdatesCheckButton").set_active(
prefs.get("brailleProgressBarUpdates", settings.brailleProgressBarUpdates))
self.get_widget("beepProgressBarUpdatesCheckButton").set_active(
prefs.get("beepProgressBarUpdates", settings.beepProgressBarUpdates))
interval = prefs["progressBarUpdateInterval"]
self.get_widget("progressBarUpdateIntervalSpinButton").set_value(interval)
comboBox = self.get_widget("progressBarVerbosity")
levels = [guilabels.PROGRESS_BAR_ALL,
guilabels.PROGRESS_BAR_APPLICATION,
guilabels.PROGRESS_BAR_WINDOW]
self.populateComboBox(comboBox, levels)
comboBox.set_active(prefs["progressBarVerbosity"])
enable = prefs["enableMouseReview"]
self.get_widget("enableMouseReviewCheckButton").set_active(enable)
# Braille pane.
#
self.get_widget("enableBrailleCheckButton").set_active( \
prefs["enableBraille"])
state = prefs["brailleRolenameStyle"] == \
settings.BRAILLE_ROLENAME_STYLE_SHORT
self.get_widget("abbrevRolenames").set_active(state)
self.get_widget("disableBrailleEOLCheckButton").set_active(
prefs["disableBrailleEOL"])
if louis is None:
self.get_widget( \
"contractedBrailleCheckButton").set_sensitive(False)
else:
self.get_widget("contractedBrailleCheckButton").set_active( \
prefs["enableContractedBraille"])
# Set up contraction table combo box and set it to the
# currently used one.
#
tablesCombo = self.get_widget("contractionTableCombo")
tableDict = braille.listTables()
selectedTableIter = None
selectedTable = prefs["brailleContractionTable"] or \
braille.getDefaultTable()
if tableDict:
tablesModel = Gtk.ListStore(str, str)
names = sorted(tableDict.keys())
for name in names:
fname = tableDict[name]
it = tablesModel.append([name, fname])
if os.path.join(braille.tablesdir, fname) == \
selectedTable:
selectedTableIter = it
cell = self.planeCellRendererText
tablesCombo.clear()
tablesCombo.pack_start(cell, True)
tablesCombo.add_attribute(cell, 'text', 0)
tablesCombo.set_model(tablesModel)
if selectedTableIter:
tablesCombo.set_active_iter(selectedTableIter)
else:
tablesCombo.set_active(0)
else:
tablesCombo.set_sensitive(False)
if prefs["brailleVerbosityLevel"] == settings.VERBOSITY_LEVEL_BRIEF:
self.get_widget("brailleBriefButton").set_active(True)
else:
self.get_widget("brailleVerboseButton").set_active(True)
self.get_widget("enableBrailleWordWrapCheckButton").set_active(
prefs.get("enableBrailleWordWrap", settings.enableBrailleWordWrap))
selectionIndicator = prefs["brailleSelectorIndicator"]
if selectionIndicator == settings.BRAILLE_UNDERLINE_7:
self.get_widget("brailleSelection7Button").set_active(True)
elif selectionIndicator == settings.BRAILLE_UNDERLINE_8:
self.get_widget("brailleSelection8Button").set_active(True)
elif selectionIndicator == settings.BRAILLE_UNDERLINE_BOTH:
self.get_widget("brailleSelectionBothButton").set_active(True)
else:
self.get_widget("brailleSelectionNoneButton").set_active(True)
linkIndicator = prefs["brailleLinkIndicator"]
if linkIndicator == settings.BRAILLE_UNDERLINE_7:
self.get_widget("brailleLink7Button").set_active(True)
elif linkIndicator == settings.BRAILLE_UNDERLINE_8:
self.get_widget("brailleLink8Button").set_active(True)
elif linkIndicator == settings.BRAILLE_UNDERLINE_BOTH:
self.get_widget("brailleLinkBothButton").set_active(True)
else:
self.get_widget("brailleLinkNoneButton").set_active(True)
enable = prefs.get("enableFlashMessages", settings.enableFlashMessages)
self.get_widget("enableFlashMessagesCheckButton").set_active(enable)
enable = prefs.get("flashIsPersistent", settings.flashIsPersistent)
self.get_widget("flashIsPersistentCheckButton").set_active(enable)
enable = prefs.get("flashIsDetailed", settings.flashIsDetailed)
self.get_widget("flashIsDetailedCheckButton").set_active(enable)
duration = prefs["brailleFlashTime"]
self.get_widget("brailleFlashTimeSpinButton").set_value(duration / 1000)
# Key Echo pane.
#
self.get_widget("keyEchoCheckButton").set_active( \
prefs["enableKeyEcho"])
self.get_widget("enableAlphabeticKeysCheckButton").set_active(
prefs.get("enableAlphabeticKeys", settings.enableAlphabeticKeys))
self.get_widget("enableNumericKeysCheckButton").set_active(
prefs.get("enableNumericKeys", settings.enableNumericKeys))
self.get_widget("enablePunctuationKeysCheckButton").set_active(
prefs.get("enablePunctuationKeys", settings.enablePunctuationKeys))
self.get_widget("enableSpaceCheckButton").set_active(
prefs.get("enableSpace", settings.enableSpace))
self.get_widget("enableModifierKeysCheckButton").set_active( \
prefs["enableModifierKeys"])
self.get_widget("enableFunctionKeysCheckButton").set_active( \
prefs["enableFunctionKeys"])
self.get_widget("enableActionKeysCheckButton").set_active( \
prefs["enableActionKeys"])
self.get_widget("enableNavigationKeysCheckButton").set_active( \
prefs["enableNavigationKeys"])
self.get_widget("enableDiacriticalKeysCheckButton").set_active( \
prefs["enableDiacriticalKeys"])
self.get_widget("enableEchoByCharacterCheckButton").set_active( \
prefs["enableEchoByCharacter"])
self.get_widget("enableEchoByWordCheckButton").set_active( \
prefs["enableEchoByWord"])
self.get_widget("enableEchoBySentenceCheckButton").set_active( \
prefs["enableEchoBySentence"])
# Text attributes pane.
#
self._createTextAttributesTreeView()
brailleIndicator = prefs["textAttributesBrailleIndicator"]
if brailleIndicator == settings.BRAILLE_UNDERLINE_7:
self.get_widget("textBraille7Button").set_active(True)
elif brailleIndicator == settings.BRAILLE_UNDERLINE_8:
self.get_widget("textBraille8Button").set_active(True)
elif brailleIndicator == settings.BRAILLE_UNDERLINE_BOTH:
self.get_widget("textBrailleBothButton").set_active(True)
else:
self.get_widget("textBrailleNoneButton").set_active(True)
# Pronunciation dictionary pane.
#
self._createPronunciationTreeView()
# General pane.
#
self.get_widget("presentToolTipsCheckButton").set_active(
prefs["presentToolTips"])
if prefs["keyboardLayout"] == settings.GENERAL_KEYBOARD_LAYOUT_DESKTOP:
self.get_widget("generalDesktopButton").set_active(True)
else:
self.get_widget("generalLaptopButton").set_active(True)
combobox = self.get_widget("sayAllStyle")
self.populateComboBox(combobox, [guilabels.SAY_ALL_STYLE_LINE,
guilabels.SAY_ALL_STYLE_SENTENCE])
combobox.set_active(prefs["sayAllStyle"])
self.get_widget("rewindAndFastForwardInSayAllCheckButton").set_active(
prefs.get("rewindAndFastForwardInSayAll", settings.rewindAndFastForwardInSayAll))
self.get_widget("structNavInSayAllCheckButton").set_active(
prefs.get("structNavInSayAll", settings.structNavInSayAll))
self.get_widget("sayAllContextBlockquoteCheckButton").set_active(
prefs.get("sayAllContextBlockquote", settings.sayAllContextBlockquote))
self.get_widget("sayAllContextLandmarkCheckButton").set_active(
prefs.get("sayAllContextLandmark", settings.sayAllContextLandmark))
self.get_widget("sayAllContextNonLandmarkFormCheckButton").set_active(
prefs.get("sayAllContextNonLandmarkForm", settings.sayAllContextNonLandmarkForm))
self.get_widget("sayAllContextListCheckButton").set_active(
prefs.get("sayAllContextList", settings.sayAllContextList))
self.get_widget("sayAllContextPanelCheckButton").set_active(
prefs.get("sayAllContextPanel", settings.sayAllContextPanel))
self.get_widget("sayAllContextTableCheckButton").set_active(
prefs.get("sayAllContextTable", settings.sayAllContextTable))
# Orca User Profiles
#
self.profilesCombo = self.get_widget('availableProfilesComboBox1')
self.startingProfileCombo = self.get_widget('availableProfilesComboBox2')
self.profilesComboModel = self.get_widget('model9')
self.__initProfileCombo()
if self.script.app:
self.get_widget('profilesFrame').set_sensitive(False)
def __initProfileCombo(self):
"""Adding available profiles and setting active as the active one"""
availableProfiles = self.__getAvailableProfiles()
self.profilesComboModel.clear()
if not len(availableProfiles):
self.profilesComboModel.append(self._defaultProfile)
else:
for profile in availableProfiles:
self.profilesComboModel.append(profile)
activeProfile = self.prefsDict.get('activeProfile') or self._defaultProfile
startingProfile = self.prefsDict.get('startingProfile') or self._defaultProfile
activeProfileIter = self.getComboBoxIndex(self.profilesCombo,
activeProfile[0])
startingProfileIter = self.getComboBoxIndex(self.startingProfileCombo,
startingProfile[0])
self.profilesCombo.set_active(activeProfileIter)
self.startingProfileCombo.set_active(startingProfileIter)
def __getAvailableProfiles(self):
"""Get available user profiles."""
return _settingsManager.availableProfiles()
def _updateOrcaModifier(self):
combobox = self.get_widget("orcaModifierComboBox")
keystring = ", ".join(self.prefsDict["orcaModifierKeys"])
combobox.set_active(self.getComboBoxIndex(combobox, keystring))
def populateComboBox(self, combobox, items):
"""Populates the combobox with the items provided.
Arguments:
- combobox: the GtkComboBox to populate
- items: the list of strings with which to populate it
"""
model = Gtk.ListStore(str)
for item in items:
model.append([item])
combobox.set_model(model)
def getComboBoxIndex(self, combobox, searchStr, col=0):
""" For each of the entries in the given combo box, look for searchStr.
Return the index of the entry if searchStr is found.
Arguments:
- combobox: the GtkComboBox to search.
- searchStr: the string to search for.
Returns the index of the first entry in combobox with searchStr, or
0 if not found.
"""
model = combobox.get_model()
myiter = model.get_iter_first()
for i in range(0, len(model)):
name = model.get_value(myiter, col)
if name == searchStr:
return i
myiter = model.iter_next(myiter)
return 0
def getComboBoxList(self, combobox):
"""Get the list of values from the active combox
"""
active = combobox.get_active()
model = combobox.get_model()
activeIter = model.get_iter(active)
activeLabel = model.get_value(activeIter, 0)
activeName = model.get_value(activeIter, 1)
return [activeLabel, activeName]
def getKeyBindingsModelDict(self, model, modifiedOnly=True):
modelDict = {}
node = model.get_iter_first()
while node:
child = model.iter_children(node)
while child:
key, modified = model.get(child, HANDLER, MODIF)
if modified or not modifiedOnly:
value = []
value.append(list(model.get(
child, KEY1, MOD_MASK1, MOD_USED1, CLICK_COUNT1)))
modelDict[key] = value
child = model.iter_next(child)
node = model.iter_next(node)
return modelDict
def getModelDict(self, model):
"""Get the list of values from a list[str,str] model
"""
pronunciation_dict.pronunciation_dict = {}
currentIter = model.get_iter_first()
while currentIter is not None:
key, value = model.get(currentIter, ACTUAL, REPLACEMENT)
if key and value:
pronunciation_dict.setPronunciation(key, value)
currentIter = model.iter_next(currentIter)
modelDict = pronunciation_dict.pronunciation_dict
return modelDict
def showGUI(self):
"""Show the Orca configuration GUI window. This assumes that
the GUI has already been created.
"""
orcaSetupWindow = self.get_widget("orcaSetupWindow")
accelGroup = Gtk.AccelGroup()
orcaSetupWindow.add_accel_group(accelGroup)
helpButton = self.get_widget("helpButton")
(keyVal, modifierMask) = Gtk.accelerator_parse("F1")
helpButton.add_accelerator("clicked",
accelGroup,
keyVal,
modifierMask,
0)
try:
ts = orca_state.lastInputEvent.timestamp
except:
ts = 0
if ts == 0:
ts = Gtk.get_current_event_time()
orcaSetupWindow.present_with_time(ts)
# We always want to re-order the text attributes page so that enabled
# items are consistently at the top.
#
self._setSpokenTextAttributes(
self.getTextAttributesView,
_settingsManager.getSetting('enabledSpokenTextAttributes'),
True, True)
if self.script.app:
title = guilabels.PREFERENCES_APPLICATION_TITLE % self.script.app.name
orcaSetupWindow.set_title(title)
orcaSetupWindow.show()
def _initComboBox(self, combobox):
"""Initialize the given combo box to take a list of int/str pairs.
Arguments:
- combobox: the GtkComboBox to initialize.
"""
cell = Gtk.CellRendererText()
combobox.pack_start(cell, True)
# We only want to display one column; not two.
#
try:
columnToDisplay = combobox.get_cells()[0]
combobox.add_attribute(columnToDisplay, 'text', 1)
except:
combobox.add_attribute(cell, 'text', 1)
model = Gtk.ListStore(int, str)
combobox.set_model(model)
# Force the display comboboxes to be left aligned.
#
if isinstance(combobox, Gtk.ComboBoxText):
size = combobox.size_request()
cell.set_fixed_size(size[0] - 29, -1)
return model
def _setKeyEchoItems(self):
"""[In]sensitize the checkboxes for the various types of key echo,
depending upon whether the value of the key echo check button is set.
"""
enable = self.get_widget("keyEchoCheckButton").get_active()
self.get_widget("enableAlphabeticKeysCheckButton").set_sensitive(enable)
self.get_widget("enableNumericKeysCheckButton").set_sensitive(enable)
self.get_widget("enablePunctuationKeysCheckButton").set_sensitive(enable)
self.get_widget("enableSpaceCheckButton").set_sensitive(enable)
self.get_widget("enableModifierKeysCheckButton").set_sensitive(enable)
self.get_widget("enableFunctionKeysCheckButton").set_sensitive(enable)
self.get_widget("enableActionKeysCheckButton").set_sensitive(enable)
self.get_widget("enableNavigationKeysCheckButton").set_sensitive(enable)
self.get_widget("enableDiacriticalKeysCheckButton").set_sensitive( \
enable)
def _presentMessage(self, text, interrupt=False):
"""If the text field is not None, presents the given text, optionally
interrupting anything currently being spoken.
Arguments:
- text: the text to present
- interrupt: if True, interrupt any speech currently being spoken
"""
self.script.speakMessage(text, interrupt=interrupt)
try:
self.script.displayBrailleMessage(text, flashTime=-1)
except:
pass
def _createNode(self, appName):
"""Create a new root node in the TreeStore model with the name of the
application.
Arguments:
- appName: the name of the TreeStore Node (the same of the application)
"""
model = self.keyBindingsModel
myiter = model.append(None)
model.set_value(myiter, DESCRIP, appName)
model.set_value(myiter, MODIF, False)
return myiter
def _getIterOf(self, appName):
"""Returns the Gtk.TreeIter of the TreeStore model
that matches the application name passed as argument
Arguments:
- appName: a string with the name of the application of the node wanted
it's the same that the field DESCRIP of the model treeStore
"""
model = self.keyBindingsModel
for row in model:
if ((model.iter_depth(row.iter) == 0) \
and (row[DESCRIP] == appName)):
return row.iter
return None
def _clickCountToString(self, clickCount):
"""Given a numeric clickCount, returns a string for inclusion
in the list of keybindings.
Argument:
- clickCount: the number of clicks associated with the keybinding.
"""
clickCountString = ""
if clickCount == 2:
clickCountString = " (%s)" % guilabels.CLICK_COUNT_DOUBLE
elif clickCount == 3:
clickCountString = " (%s)" % guilabels.CLICK_COUNT_TRIPLE
return clickCountString
def _insertRow(self, handl, kb, parent=None, modif=False):
"""Appends a new row with the new keybinding data to the treeview
Arguments:
- handl: the name of the handler associated to the keyBinding
- kb: the new keybinding.
- parent: the parent node of the treeview, where to append the kb
- modif: whether to check the modified field or not.
Returns a Gtk.TreeIter pointing at the new row.
"""
model = self.keyBindingsModel
if parent is None:
parent = self._getIterOf(guilabels.KB_GROUP_DEFAULT)
if parent is not None:
myiter = model.append(parent)
if not kb.keysymstring:
text = None
else:
clickCount = self._clickCountToString(kb.click_count)
modifierNames = keybindings.getModifierNames(kb.modifiers)
keysymstring = kb.keysymstring
text = keybindings.getModifierNames(kb.modifiers) \
+ keysymstring \
+ clickCount
model.set_value(myiter, HANDLER, handl)
model.set_value(myiter, DESCRIP, kb.handler.description)
model.set_value(myiter, MOD_MASK1, str(kb.modifier_mask))
model.set_value(myiter, MOD_USED1, str(kb.modifiers))
model.set_value(myiter, KEY1, kb.keysymstring)
model.set_value(myiter, CLICK_COUNT1, str(kb.click_count))
if text is not None:
model.set_value(myiter, OLDTEXT1, text)
model.set_value(myiter, TEXT1, text)
model.set_value(myiter, MODIF, modif)
model.set_value(myiter, EDITABLE, True)
return myiter
else:
return None
def _insertRowBraille(self, handl, com, inputEvHand,
parent=None, modif=False):
"""Appends a new row with the new braille binding data to the treeview
Arguments:
- handl: the name of the handler associated to the brailleBinding
- com: the BrlTTY command
- inputEvHand: the inputEventHandler with the new brailleBinding
- parent: the parent node of the treeview, where to append the kb
- modif: whether to check the modified field or not.
Returns a Gtk.TreeIter pointing at the new row.
"""
model = self.keyBindingsModel
if parent is None:
parent = self._getIterOf(guilabels.KB_GROUP_BRAILLE)
if parent is not None:
myiter = model.append(parent)
model.set_value(myiter, HANDLER, handl)
model.set_value(myiter, DESCRIP, inputEvHand.description)
model.set_value(myiter, KEY1, str(com))
model.set_value(myiter, TEXT1, braille.command_name[com])
model.set_value(myiter, MODIF, modif)
model.set_value(myiter, EDITABLE, False)
return myiter
else:
return None
def _markModified(self):
""" Mark as modified the user custom key bindings:
"""
try:
self.script.setupInputEventHandlers()
keyBinds = keybindings.KeyBindings()
keyBinds = _settingsManager.overrideKeyBindings(self.script, keyBinds)
keyBind = keybindings.KeyBinding(None, None, None, None)
treeModel = self.keyBindingsModel
myiter = treeModel.get_iter_first()
while myiter is not None:
iterChild = treeModel.iter_children(myiter)
while iterChild is not None:
descrip = treeModel.get_value(iterChild, DESCRIP)
keyBind.handler = \
input_event.InputEventHandler(None, descrip)
if keyBinds.hasKeyBinding(keyBind,
typeOfSearch="description"):
treeModel.set_value(iterChild, MODIF, True)
iterChild = treeModel.iter_next(iterChild)
myiter = treeModel.iter_next(myiter)
except:
debug.printException(debug.LEVEL_SEVERE)
def _populateKeyBindings(self, clearModel=True):
"""Fills the TreeView with the list of Orca keybindings
Arguments:
- clearModel: if True, initially clear out the key bindings model.
"""
self.keyBindView.set_model(None)
self.keyBindView.set_headers_visible(False)
self.keyBindView.hide()
if clearModel:
self.keyBindingsModel.clear()
self.kbindings = None
try:
appName = self.script.app.name
except:
appName = ""
iterApp = self._createNode(appName)
iterOrca = self._createNode(guilabels.KB_GROUP_DEFAULT)
iterUnbound = self._createNode(guilabels.KB_GROUP_UNBOUND)
if not self.kbindings:
self.kbindings = keybindings.KeyBindings()
self.script.setupInputEventHandlers()
allKeyBindings = self.script.getKeyBindings()
defKeyBindings = self.script.getDefaultKeyBindings()
for kb in allKeyBindings.keyBindings:
if not self.kbindings.hasKeyBinding(kb, "strict"):
handl = self.script.getInputEventHandlerKey(kb.handler)
if not defKeyBindings.hasKeyBinding(kb, "description"):
self._insertRow(handl, kb, iterApp)
elif kb.keysymstring:
self._insertRow(handl, kb, iterOrca)
else:
self._insertRow(handl, kb, iterUnbound)
self.kbindings.add(kb)
if not self.keyBindingsModel.iter_has_child(iterApp):
self.keyBindingsModel.remove(iterApp)
if not self.keyBindingsModel.iter_has_child(iterUnbound):
self.keyBindingsModel.remove(iterUnbound)
self._updateOrcaModifier()
self._markModified()
iterBB = self._createNode(guilabels.KB_GROUP_BRAILLE)
self.bbindings = self.script.getBrailleBindings()
for com, inputEvHand in self.bbindings.items():
handl = self.script.getInputEventHandlerKey(inputEvHand)
self._insertRowBraille(handl, com, inputEvHand, iterBB)
self.keyBindView.set_model(self.keyBindingsModel)
self.keyBindView.set_headers_visible(True)
self.keyBindView.expand_all()
self.keyBindingsModel.set_sort_column_id(OLDTEXT1, Gtk.SortType.ASCENDING)
self.keyBindView.show()
# Keep track of new/unbound keybindings that have yet to be applied.
#
self.pendingKeyBindings = {}
def _cleanupSpeechServers(self):
"""Remove unwanted factories and drivers for the current active
factory, when the user dismisses the Orca Preferences dialog."""
for workingFactory in self.workingFactories:
if not (workingFactory == self.speechSystemsChoice):
workingFactory.SpeechServer.shutdownActiveServers()
else:
servers = workingFactory.SpeechServer.getSpeechServers()
for server in servers:
if not (server == self.speechServersChoice):
server.shutdown()
def speechSupportChecked(self, widget):
"""Signal handler for the "toggled" signal for the
speechSupportCheckButton GtkCheckButton widget. The user has
[un]checked the 'Enable Speech' checkbox. Set the 'enableSpeech'
preference to the new value. Set the rest of the speech pane items
[in]sensensitive depending upon whether this checkbox is checked.
Arguments:
- widget: the component that generated the signal.
"""
enable = widget.get_active()
self.prefsDict["enableSpeech"] = enable
self.get_widget("speechOptionsGrid").set_sensitive(enable)
def onlySpeakDisplayedTextToggled(self, widget):
"""Signal handler for the "toggled" signal for the GtkCheckButton
onlySpeakDisplayedText. In addition to updating the preferences,
set the sensitivity of the contextOptionsGrid.
Arguments:
- widget: the component that generated the signal.
"""
enable = widget.get_active()
self.prefsDict["onlySpeakDisplayedText"] = enable
self.get_widget("contextOptionsGrid").set_sensitive(not enable)
def speechSystemsChanged(self, widget):
"""Signal handler for the "changed" signal for the speechSystems
GtkComboBox widget. The user has selected a different speech
system. Clear the existing list of speech servers, and setup
a new list of speech servers based on the new choice. Setup a
new list of voices for the first speech server in the list.
Arguments:
- widget: the component that generated the signal.
"""
if self.initializingSpeech:
return
selectedIndex = widget.get_active()
self.speechSystemsChoice = self.speechSystemsChoices[selectedIndex]
self._setupSpeechServers()
def speechServersChanged(self, widget):
"""Signal handler for the "changed" signal for the speechServers
GtkComboBox widget. The user has selected a different speech
server. Clear the existing list of voices, and setup a new
list of voices based on the new choice.
Arguments:
- widget: the component that generated the signal.
"""
if self.initializingSpeech:
return
selectedIndex = widget.get_active()
self.speechServersChoice = self.speechServersChoices[selectedIndex]
# Whenever the speech servers change, we need to make sure we
# clear whatever family was in use by the current voice types.
# Otherwise, we can end up with family names from one server
# bleeding over (e.g., "Paul" from Fonix ends up getting in
# the "Default" voice type after we switch to eSpeak).
#
try:
del self.defaultVoice[acss.ACSS.FAMILY]
del self.uppercaseVoice[acss.ACSS.FAMILY]
del self.hyperlinkVoice[acss.ACSS.FAMILY]
del self.systemVoice[acss.ACSS.FAMILY]
except:
pass
self._setupVoices()
def speechLanguagesChanged(self, widget):
"""Signal handler for the "value_changed" signal for the languages
GtkComboBox widget. The user has selected a different voice
language. Save the new voice language name based on the new choice.
Arguments:
- widget: the component that generated the signal.
"""
if self.initializingSpeech:
return
selectedIndex = widget.get_active()
try:
self.speechLanguagesChoice = self.speechLanguagesChoices[selectedIndex]
if (self.speechServersChoice, self.speechLanguagesChoice) in \
self.selectedFamilyChoices:
i = self.selectedFamilyChoices[self.speechServersChoice, \
self.speechLanguagesChoice]
family = self.speechFamiliesChoices[i]
name = family[speechserver.VoiceFamily.NAME]
language = family[speechserver.VoiceFamily.LANG]
dialect = family[speechserver.VoiceFamily.DIALECT]
variant = family[speechserver.VoiceFamily.VARIANT]
voiceType = self.get_widget("voiceTypesCombo").get_active()
self._setFamilyNameForVoiceType(voiceType, name, language, dialect, variant)
except:
debug.printException(debug.LEVEL_SEVERE)
# Remember the last family manually selected by the user for the
# current speech server.
#
if not selectedIndex == -1:
self.selectedLanguageChoices[self.speechServersChoice] = selectedIndex
self._setupFamilies()
def speechFamiliesChanged(self, widget):
"""Signal handler for the "value_changed" signal for the families
GtkComboBox widget. The user has selected a different voice
family. Save the new voice family name based on the new choice.
Arguments:
- widget: the component that generated the signal.
"""
if self.initializingSpeech:
return
selectedIndex = widget.get_active()
try:
family = self.speechFamiliesChoices[selectedIndex]
name = family[speechserver.VoiceFamily.NAME]
language = family[speechserver.VoiceFamily.LANG]
dialect = family[speechserver.VoiceFamily.DIALECT]
variant = family[speechserver.VoiceFamily.VARIANT]
voiceType = self.get_widget("voiceTypesCombo").get_active()
self._setFamilyNameForVoiceType(voiceType, name, language, dialect, variant)
except:
debug.printException(debug.LEVEL_SEVERE)
# Remember the last family manually selected by the user for the
# current speech server.
#
if not selectedIndex == -1:
self.selectedFamilyChoices[self.speechServersChoice, \
self.speechLanguagesChoice] = selectedIndex
def voiceTypesChanged(self, widget):
"""Signal handler for the "changed" signal for the voiceTypes
GtkComboBox widget. The user has selected a different voice
type. Setup the new family, rate, pitch and volume component
values based on the new choice.
Arguments:
- widget: the component that generated the signal.
"""
if self.initializingSpeech:
return
voiceType = widget.get_active()
self._setVoiceSettingsForVoiceType(voiceType)
def rateValueChanged(self, widget):
"""Signal handler for the "value_changed" signal for the rateScale
GtkScale widget. The user has changed the current rate value.
Save the new rate value based on the currently selected voice
type.
Arguments:
- widget: the component that generated the signal.
"""
rate = widget.get_value()
voiceType = self.get_widget("voiceTypesCombo").get_active()
self._setRateForVoiceType(voiceType, rate)
voices = _settingsManager.getSetting('voices')
voices[settings.DEFAULT_VOICE][acss.ACSS.RATE] = rate
_settingsManager.setSetting('voices', voices)
def pitchValueChanged(self, widget):
"""Signal handler for the "value_changed" signal for the pitchScale
GtkScale widget. The user has changed the current pitch value.
Save the new pitch value based on the currently selected voice
type.
Arguments:
- widget: the component that generated the signal.
"""
pitch = widget.get_value()
voiceType = self.get_widget("voiceTypesCombo").get_active()
self._setPitchForVoiceType(voiceType, pitch)
voices = _settingsManager.getSetting('voices')
voices[settings.DEFAULT_VOICE][acss.ACSS.AVERAGE_PITCH] = pitch
_settingsManager.setSetting('voices', voices)
def volumeValueChanged(self, widget):
"""Signal handler for the "value_changed" signal for the voiceScale
GtkScale widget. The user has changed the current volume value.
Save the new volume value based on the currently selected voice
type.
Arguments:
- widget: the component that generated the signal.
"""
volume = widget.get_value()
voiceType = self.get_widget("voiceTypesCombo").get_active()
self._setVolumeForVoiceType(voiceType, volume)
voices = _settingsManager.getSetting('voices')
voices[settings.DEFAULT_VOICE][acss.ACSS.GAIN] = volume
_settingsManager.setSetting('voices', voices)
def checkButtonToggled(self, widget):
"""Signal handler for "toggled" signal for basic GtkCheckButton
widgets. The user has altered the state of the checkbox.
Set the preference to the new value.
Arguments:
- widget: the component that generated the signal.
"""
# To use this default handler please make sure:
# The name of the setting that will be changed is: settingName
# The id of the widget in the ui should be: settingNameCheckButton
#
settingName = Gtk.Buildable.get_name(widget)
# strip "CheckButton" from the end.
settingName = settingName[:-11]
self.prefsDict[settingName] = widget.get_active()
def keyEchoChecked(self, widget):
"""Signal handler for the "toggled" signal for the
keyEchoCheckbutton GtkCheckButton widget. The user has
[un]checked the 'Enable Key Echo' checkbox. Set the
'enableKeyEcho' preference to the new value. [In]sensitize
the checkboxes for the various types of key echo, depending
upon whether this value is checked or unchecked.
Arguments:
- widget: the component that generated the signal.
"""
self.prefsDict["enableKeyEcho"] = widget.get_active()
self._setKeyEchoItems()
def brailleSelectionChanged(self, widget):
"""Signal handler for the "toggled" signal for the
brailleSelectionNoneButton, brailleSelection7Button,
brailleSelection8Button or brailleSelectionBothButton
GtkRadioButton widgets. The user has toggled the braille
selection indicator value. If this signal was generated
as the result of a radio button getting selected (as
opposed to a radio button losing the selection), set the
'brailleSelectorIndicator' preference to the new value.
Arguments:
- widget: the component that generated the signal.
"""
if widget.get_active():
if widget.get_label() == guilabels.BRAILLE_DOT_7:
self.prefsDict["brailleSelectorIndicator"] = \
settings.BRAILLE_UNDERLINE_7
elif widget.get_label() == guilabels.BRAILLE_DOT_8:
self.prefsDict["brailleSelectorIndicator"] = \
settings.BRAILLE_UNDERLINE_8
elif widget.get_label() == guilabels.BRAILLE_DOT_7_8:
self.prefsDict["brailleSelectorIndicator"] = \
settings.BRAILLE_UNDERLINE_BOTH
else:
self.prefsDict["brailleSelectorIndicator"] = \
settings.BRAILLE_UNDERLINE_NONE
def brailleLinkChanged(self, widget):
"""Signal handler for the "toggled" signal for the
brailleLinkNoneButton, brailleLink7Button,
brailleLink8Button or brailleLinkBothButton
GtkRadioButton widgets. The user has toggled the braille
link indicator value. If this signal was generated
as the result of a radio button getting selected (as
opposed to a radio button losing the selection), set the
'brailleLinkIndicator' preference to the new value.
Arguments:
- widget: the component that generated the signal.
"""
if widget.get_active():
if widget.get_label() == guilabels.BRAILLE_DOT_7:
self.prefsDict["brailleLinkIndicator"] = \
settings.BRAILLE_UNDERLINE_7
elif widget.get_label() == guilabels.BRAILLE_DOT_8:
self.prefsDict["brailleLinkIndicator"] = \
settings.BRAILLE_UNDERLINE_8
elif widget.get_label() == guilabels.BRAILLE_DOT_7_8:
self.prefsDict["brailleLinkIndicator"] = \
settings.BRAILLE_UNDERLINE_BOTH
else:
self.prefsDict["brailleLinkIndicator"] = \
settings.BRAILLE_UNDERLINE_NONE
def brailleIndicatorChanged(self, widget):
"""Signal handler for the "toggled" signal for the
textBrailleNoneButton, textBraille7Button, textBraille8Button
or textBrailleBothButton GtkRadioButton widgets. The user has
toggled the text attributes braille indicator value. If this signal
was generated as the result of a radio button getting selected
(as opposed to a radio button losing the selection), set the
'textAttributesBrailleIndicator' preference to the new value.
Arguments:
- widget: the component that generated the signal.
"""
if widget.get_active():
if widget.get_label() == guilabels.BRAILLE_DOT_7:
self.prefsDict["textAttributesBrailleIndicator"] = \
settings.BRAILLE_UNDERLINE_7
elif widget.get_label() == guilabels.BRAILLE_DOT_8:
self.prefsDict["textAttributesBrailleIndicator"] = \
settings.BRAILLE_UNDERLINE_8
elif widget.get_label() == guilabels.BRAILLE_DOT_7_8:
self.prefsDict["textAttributesBrailleIndicator"] = \
settings.BRAILLE_UNDERLINE_BOTH
else:
self.prefsDict["textAttributesBrailleIndicator"] = \
settings.BRAILLE_UNDERLINE_NONE
def punctuationLevelChanged(self, widget):
"""Signal handler for the "toggled" signal for the noneButton,
someButton or allButton GtkRadioButton widgets. The user has
toggled the speech punctuation level value. If this signal
was generated as the result of a radio button getting selected
(as opposed to a radio button losing the selection), set the
'verbalizePunctuationStyle' preference to the new value.
Arguments:
- widget: the component that generated the signal.
"""
if widget.get_active():
if widget.get_label() == guilabels.PUNCTUATION_STYLE_NONE:
self.prefsDict["verbalizePunctuationStyle"] = \
settings.PUNCTUATION_STYLE_NONE
elif widget.get_label() == guilabels.PUNCTUATION_STYLE_SOME:
self.prefsDict["verbalizePunctuationStyle"] = \
settings.PUNCTUATION_STYLE_SOME
elif widget.get_label() == guilabels.PUNCTUATION_STYLE_MOST:
self.prefsDict["verbalizePunctuationStyle"] = \
settings.PUNCTUATION_STYLE_MOST
else:
self.prefsDict["verbalizePunctuationStyle"] = \
settings.PUNCTUATION_STYLE_ALL
def orcaModifierChanged(self, widget):
"""Signal handler for the changed signal for the orcaModifierComboBox
Set the 'orcaModifierKeys' preference to the new value.
Arguments:
- widget: the component that generated the signal.
"""
model = widget.get_model()
myIter = widget.get_active_iter()
orcaModifier = model[myIter][0]
self.prefsDict["orcaModifierKeys"] = orcaModifier.split(', ')
def progressBarVerbosityChanged(self, widget):
"""Signal handler for the changed signal for the progressBarVerbosity
GtkComboBox widget. Set the 'progressBarVerbosity' preference to
the new value.
Arguments:
- widget: the component that generated the signal.
"""
model = widget.get_model()
myIter = widget.get_active_iter()
progressBarVerbosity = model[myIter][0]
if progressBarVerbosity == guilabels.PROGRESS_BAR_ALL:
self.prefsDict["progressBarVerbosity"] = \
settings.PROGRESS_BAR_ALL
elif progressBarVerbosity == guilabels.PROGRESS_BAR_WINDOW:
self.prefsDict["progressBarVerbosity"] = \
settings.PROGRESS_BAR_WINDOW
else:
self.prefsDict["progressBarVerbosity"] = \
settings.PROGRESS_BAR_APPLICATION
def capitalizationStyleChanged(self, widget):
model = widget.get_model()
myIter = widget.get_active_iter()
capitalizationStyle = model[myIter][0]
if capitalizationStyle == guilabels.CAPITALIZATION_STYLE_ICON:
self.prefsDict["capitalizationStyle"] = settings.CAPITALIZATION_STYLE_ICON
elif capitalizationStyle == guilabels.CAPITALIZATION_STYLE_SPELL:
self.prefsDict["capitalizationStyle"] = settings.CAPITALIZATION_STYLE_SPELL
else:
self.prefsDict["capitalizationStyle"] = settings.CAPITALIZATION_STYLE_NONE
speech.updateCapitalizationStyle()
def sayAllStyleChanged(self, widget):
"""Signal handler for the "changed" signal for the sayAllStyle
GtkComboBox widget. Set the 'sayAllStyle' preference to the
new value.
Arguments:
- widget: the component that generated the signal.
"""
model = widget.get_model()
myIter = widget.get_active_iter()
sayAllStyle = model[myIter][0]
if sayAllStyle == guilabels.SAY_ALL_STYLE_LINE:
self.prefsDict["sayAllStyle"] = settings.SAYALL_STYLE_LINE
elif sayAllStyle == guilabels.SAY_ALL_STYLE_SENTENCE:
self.prefsDict["sayAllStyle"] = settings.SAYALL_STYLE_SENTENCE
def dateFormatChanged(self, widget):
"""Signal handler for the "changed" signal for the dateFormat
GtkComboBox widget. Set the 'dateFormat' preference to the
new value.
Arguments:
- widget: the component that generated the signal.
"""
dateFormatCombo = widget.get_active()
if dateFormatCombo == DATE_FORMAT_LOCALE:
newFormat = messages.DATE_FORMAT_LOCALE
elif dateFormatCombo == DATE_FORMAT_NUMBERS_DM:
newFormat = messages.DATE_FORMAT_NUMBERS_DM
elif dateFormatCombo == DATE_FORMAT_NUMBERS_MD:
newFormat = messages.DATE_FORMAT_NUMBERS_MD
elif dateFormatCombo == DATE_FORMAT_NUMBERS_DMY:
newFormat = messages.DATE_FORMAT_NUMBERS_DMY
elif dateFormatCombo == DATE_FORMAT_NUMBERS_MDY:
newFormat = messages.DATE_FORMAT_NUMBERS_MDY
elif dateFormatCombo == DATE_FORMAT_NUMBERS_YMD:
newFormat = messages.DATE_FORMAT_NUMBERS_YMD
elif dateFormatCombo == DATE_FORMAT_FULL_DM:
newFormat = messages.DATE_FORMAT_FULL_DM
elif dateFormatCombo == DATE_FORMAT_FULL_MD:
newFormat = messages.DATE_FORMAT_FULL_MD
elif dateFormatCombo == DATE_FORMAT_FULL_DMY:
newFormat = messages.DATE_FORMAT_FULL_DMY
elif dateFormatCombo == DATE_FORMAT_FULL_MDY:
newFormat = messages.DATE_FORMAT_FULL_MDY
elif dateFormatCombo == DATE_FORMAT_FULL_YMD:
newFormat = messages.DATE_FORMAT_FULL_YMD
elif dateFormatCombo == DATE_FORMAT_ABBREVIATED_DM:
newFormat = messages.DATE_FORMAT_ABBREVIATED_DM
elif dateFormatCombo == DATE_FORMAT_ABBREVIATED_MD:
newFormat = messages.DATE_FORMAT_ABBREVIATED_MD
elif dateFormatCombo == DATE_FORMAT_ABBREVIATED_DMY:
newFormat = messages.DATE_FORMAT_ABBREVIATED_DMY
elif dateFormatCombo == DATE_FORMAT_ABBREVIATED_MDY:
newFormat = messages.DATE_FORMAT_ABBREVIATED_MDY
elif dateFormatCombo == DATE_FORMAT_ABBREVIATED_YMD:
newFormat = messages.DATE_FORMAT_ABBREVIATED_YMD
self.prefsDict["presentDateFormat"] = newFormat
def timeFormatChanged(self, widget):
"""Signal handler for the "changed" signal for the timeFormat
GtkComboBox widget. Set the 'timeFormat' preference to the
new value.
Arguments:
- widget: the component that generated the signal.
"""
timeFormatCombo = widget.get_active()
if timeFormatCombo == TIME_FORMAT_LOCALE:
newFormat = messages.TIME_FORMAT_LOCALE
elif timeFormatCombo == TIME_FORMAT_12_HM:
newFormat = messages.TIME_FORMAT_12_HM
elif timeFormatCombo == TIME_FORMAT_12_HMS:
newFormat = messages.TIME_FORMAT_12_HMS
elif timeFormatCombo == TIME_FORMAT_24_HMS:
newFormat = messages.TIME_FORMAT_24_HMS
elif timeFormatCombo == TIME_FORMAT_24_HMS_WITH_WORDS:
newFormat = messages.TIME_FORMAT_24_HMS_WITH_WORDS
elif timeFormatCombo == TIME_FORMAT_24_HM:
newFormat = messages.TIME_FORMAT_24_HM
elif timeFormatCombo == TIME_FORMAT_24_HM_WITH_WORDS:
newFormat = messages.TIME_FORMAT_24_HM_WITH_WORDS
self.prefsDict["presentTimeFormat"] = newFormat
def speechVerbosityChanged(self, widget):
"""Signal handler for the "toggled" signal for the speechBriefButton,
or speechVerboseButton GtkRadioButton widgets. The user has
toggled the speech verbosity level value. If this signal was
generated as the result of a radio button getting selected
(as opposed to a radio button losing the selection), set the
'speechVerbosityLevel' preference to the new value.
Arguments:
- widget: the component that generated the signal.
"""
if widget.get_active():
if widget.get_label() == guilabels.VERBOSITY_LEVEL_BRIEF:
self.prefsDict["speechVerbosityLevel"] = \
settings.VERBOSITY_LEVEL_BRIEF
else:
self.prefsDict["speechVerbosityLevel"] = \
settings.VERBOSITY_LEVEL_VERBOSE
def progressBarUpdateIntervalValueChanged(self, widget):
"""Signal handler for the "value_changed" signal for the
progressBarUpdateIntervalSpinButton GtkSpinButton widget.
Arguments:
- widget: the component that generated the signal.
"""
self.prefsDict["progressBarUpdateInterval"] = widget.get_value_as_int()
def brailleFlashTimeValueChanged(self, widget):
self.prefsDict["brailleFlashTime"] = widget.get_value_as_int() * 1000
def abbrevRolenamesChecked(self, widget):
"""Signal handler for the "toggled" signal for the abbrevRolenames
GtkCheckButton widget. The user has [un]checked the 'Abbreviated
Rolenames' checkbox. Set the 'brailleRolenameStyle' preference
to the new value.
Arguments:
- widget: the component that generated the signal.
"""
if widget.get_active():
self.prefsDict["brailleRolenameStyle"] = \
settings.BRAILLE_ROLENAME_STYLE_SHORT
else:
self.prefsDict["brailleRolenameStyle"] = \
settings.BRAILLE_ROLENAME_STYLE_LONG
def brailleVerbosityChanged(self, widget):
"""Signal handler for the "toggled" signal for the brailleBriefButton,
or brailleVerboseButton GtkRadioButton widgets. The user has
toggled the braille verbosity level value. If this signal was
generated as the result of a radio button getting selected
(as opposed to a radio button losing the selection), set the
'brailleVerbosityLevel' preference to the new value.
Arguments:
- widget: the component that generated the signal.
"""
if widget.get_active():
if widget.get_label() == guilabels.VERBOSITY_LEVEL_BRIEF:
self.prefsDict["brailleVerbosityLevel"] = \
settings.VERBOSITY_LEVEL_BRIEF
else:
self.prefsDict["brailleVerbosityLevel"] = \
settings.VERBOSITY_LEVEL_VERBOSE
def keyModifiedToggle(self, cell, path, model, col):
"""When the user changes a checkbox field (boolean field)"""
model[path][col] = not model[path][col]
return
def editingKey(self, cell, editable, path, treeModel):
"""Starts user input of a Key for a selected key binding"""
self._presentMessage(messages.KB_ENTER_NEW_KEY)
orca_state.capturingKeys = True
editable.connect('key-press-event', self.kbKeyPressed)
return
def editingCanceledKey(self, editable):
"""Stops user input of a Key for a selected key binding"""
orca_state.capturingKeys = False
self._capturedKey = []
return
def _processKeyCaptured(self, keyPressedEvent):
"""Called when a new key event arrives and we are capturing keys.
(used for key bindings redefinition)
"""
# We want the keyname rather than the printable character.
# If it's not on the keypad, get the name of the unshifted
# character. (i.e. "1" instead of "!")
#
keycode = keyPressedEvent.hardware_keycode
keymap = Gdk.Keymap.get_default()
entries_for_keycode = keymap.get_entries_for_keycode(keycode)
entries = entries_for_keycode[-1]
eventString = Gdk.keyval_name(entries[0])
eventState = keyPressedEvent.state
orcaMods = settings.orcaModifierKeys
if eventString in orcaMods:
self._capturedKey = ['', keybindings.ORCA_MODIFIER_MASK, 0]
return False
modifierKeys = ['Alt_L', 'Alt_R', 'Control_L', 'Control_R',
'Shift_L', 'Shift_R', 'Meta_L', 'Meta_R',
'Num_Lock', 'Caps_Lock', 'Shift_Lock']
if eventString in modifierKeys:
return False
eventState = eventState & Gtk.accelerator_get_default_mod_mask()
if not self._capturedKey \
or eventString in ['Return', 'Escape']:
self._capturedKey = [eventString, eventState, 1]
return True
string, modifiers, clickCount = self._capturedKey
isOrcaModifier = modifiers & keybindings.ORCA_MODIFIER_MASK
if isOrcaModifier:
eventState |= keybindings.ORCA_MODIFIER_MASK
self._capturedKey = [eventString, eventState, clickCount + 1]
return True
def kbKeyPressed(self, editable, event):
"""Special handler for the key_pressed events when editing the
keybindings. This lets us control what gets inserted into the
entry.
"""
keyProcessed = self._processKeyCaptured(event)
if not keyProcessed:
return True
if not self._capturedKey:
return False
keyName, modifiers, clickCount = self._capturedKey
if not keyName or keyName in ["Return", "Escape"]:
return False
isOrcaModifier = modifiers & keybindings.ORCA_MODIFIER_MASK
if keyName in ["Delete", "BackSpace"] and not isOrcaModifier:
editable.set_text("")
self._presentMessage(messages.KB_DELETED)
self._capturedKey = []
self.newBinding = None
return True
self.newBinding = keybindings.KeyBinding(keyName,
keybindings.defaultModifierMask,
modifiers,
None,
clickCount)
modifierNames = keybindings.getModifierNames(modifiers)
clickCountString = self._clickCountToString(clickCount)
newString = modifierNames + keyName + clickCountString
description = self.pendingKeyBindings.get(newString)
if description is None:
match = lambda x: x.keysymstring == keyName \
and x.modifiers == modifiers \
and x.click_count == clickCount \
and x.handler
matches = list(filter(match, self.kbindings.keyBindings))
if matches:
description = matches[0].handler.description
if description:
msg = messages.KB_ALREADY_BOUND % description
delay = int(1000 * settings.doubleClickTimeout)
GLib.timeout_add(delay, self._presentMessage, msg)
else:
msg = messages.KB_CAPTURED % newString
editable.set_text(newString)
self._presentMessage(msg)
return True
def editedKey(self, cell, path, new_text, treeModel,
modMask, modUsed, key, click_count, text):
"""The user changed the key for a Keybinding: update the model of
the treeview.
"""
orca_state.capturingKeys = False
self._capturedKey = []
myiter = treeModel.get_iter_from_string(path)
try:
originalBinding = treeModel.get_value(myiter, text)
except:
originalBinding = ''
modified = (originalBinding != new_text)
try:
string = self.newBinding.keysymstring
mods = self.newBinding.modifiers
clickCount = self.newBinding.click_count
except:
string = ''
mods = 0
clickCount = 1
mods = mods & Gdk.ModifierType.MODIFIER_MASK
if mods & (1 << pyatspi.MODIFIER_SHIFTLOCK) \
and mods & keybindings.ORCA_MODIFIER_MASK:
mods ^= (1 << pyatspi.MODIFIER_SHIFTLOCK)
treeModel.set(myiter,
modMask, str(keybindings.defaultModifierMask),
modUsed, str(int(mods)),
key, string,
text, new_text,
click_count, str(clickCount),
MODIF, modified)
speech.stop()
if new_text:
message = messages.KB_CAPTURED_CONFIRMATION % new_text
description = treeModel.get_value(myiter, DESCRIP)
self.pendingKeyBindings[new_text] = description
else:
message = messages.KB_DELETED_CONFIRMATION
if modified:
self._presentMessage(message)
self.pendingKeyBindings[originalBinding] = ""
return
def presentToolTipsChecked(self, widget):
"""Signal handler for the "toggled" signal for the
presentToolTipsCheckButton GtkCheckButton widget.
The user has [un]checked the 'Present ToolTips'
checkbox. Set the 'presentToolTips'
preference to the new value if the user can present tooltips.
Arguments:
- widget: the component that generated the signal.
"""
self.prefsDict["presentToolTips"] = widget.get_active()
def keyboardLayoutChanged(self, widget):
"""Signal handler for the "toggled" signal for the generalDesktopButton,
or generalLaptopButton GtkRadioButton widgets. The user has
toggled the keyboard layout value. If this signal was
generated as the result of a radio button getting selected
(as opposed to a radio button losing the selection), set the
'keyboardLayout' preference to the new value. Also set the
matching list of Orca modifier keys
Arguments:
- widget: the component that generated the signal.
"""
if widget.get_active():
if widget.get_label() == guilabels.KEYBOARD_LAYOUT_DESKTOP:
self.prefsDict["keyboardLayout"] = \
settings.GENERAL_KEYBOARD_LAYOUT_DESKTOP
self.prefsDict["orcaModifierKeys"] = \
settings.DESKTOP_MODIFIER_KEYS
else:
self.prefsDict["keyboardLayout"] = \
settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP
self.prefsDict["orcaModifierKeys"] = \
settings.LAPTOP_MODIFIER_KEYS
def pronunciationAddButtonClicked(self, widget):
"""Signal handler for the "clicked" signal for the
pronunciationAddButton GtkButton widget. The user has clicked
the Add button on the Pronunciation pane. A new row will be
added to the end of the pronunciation dictionary list. Both the
actual and replacement strings will initially be set to an empty
string. Focus will be moved to that row.
Arguments:
- widget: the component that generated the signal.
"""
model = self.pronunciationView.get_model()
thisIter = model.append()
model.set(thisIter, ACTUAL, "", REPLACEMENT, "")
path = model.get_path(thisIter)
col = self.pronunciationView.get_column(0)
self.pronunciationView.grab_focus()
self.pronunciationView.set_cursor(path, col, True)
def pronunciationDeleteButtonClicked(self, widget):
"""Signal handler for the "clicked" signal for the
pronunciationDeleteButton GtkButton widget. The user has clicked
the Delete button on the Pronunciation pane. The row in the
pronunciation dictionary list with focus will be deleted.
Arguments:
- widget: the component that generated the signal.
"""
model, oldIter = self.pronunciationView.get_selection().get_selected()
model.remove(oldIter)
def textSelectAllButtonClicked(self, widget):
"""Signal handler for the "clicked" signal for the
textSelectAllButton GtkButton widget. The user has clicked
the Speak all button. Check all the text attributes and
then update the "enabledSpokenTextAttributes" and
"enabledBrailledTextAttributes" preference strings.
Arguments:
- widget: the component that generated the signal.
"""
attributes = _settingsManager.getSetting('allTextAttributes')
self._setSpokenTextAttributes(
self.getTextAttributesView, attributes, True)
self._setBrailledTextAttributes(
self.getTextAttributesView, attributes, True)
self._updateTextDictEntry()
def textUnselectAllButtonClicked(self, widget):
"""Signal handler for the "clicked" signal for the
textUnselectAllButton GtkButton widget. The user has clicked
the Speak none button. Uncheck all the text attributes and
then update the "enabledSpokenTextAttributes" and
"enabledBrailledTextAttributes" preference strings.
Arguments:
- widget: the component that generated the signal.
"""
attributes = _settingsManager.getSetting('allTextAttributes')
self._setSpokenTextAttributes(
self.getTextAttributesView, attributes, False)
self._setBrailledTextAttributes(
self.getTextAttributesView, attributes, False)
self._updateTextDictEntry()
def textResetButtonClicked(self, widget):
"""Signal handler for the "clicked" signal for the
textResetButton GtkButton widget. The user has clicked
the Reset button. Reset all the text attributes to their
initial state and then update the "enabledSpokenTextAttributes"
and "enabledBrailledTextAttributes" preference strings.
Arguments:
- widget: the component that generated the signal.
"""
attributes = _settingsManager.getSetting('allTextAttributes')
self._setSpokenTextAttributes(
self.getTextAttributesView, attributes, False)
self._setBrailledTextAttributes(
self.getTextAttributesView, attributes, False)
attributes = _settingsManager.getSetting('enabledSpokenTextAttributes')
self._setSpokenTextAttributes(
self.getTextAttributesView, attributes, True)
attributes = \
_settingsManager.getSetting('enabledBrailledTextAttributes')
self._setBrailledTextAttributes(
self.getTextAttributesView, attributes, True)
self._updateTextDictEntry()
def textMoveToTopButtonClicked(self, widget):
"""Signal handler for the "clicked" signal for the
textMoveToTopButton GtkButton widget. The user has clicked
the Move to top button. Move the selected rows in the text
attribute view to the very top of the list and then update
the "enabledSpokenTextAttributes" and "enabledBrailledTextAttributes"
preference strings.
Arguments:
- widget: the component that generated the signal.
"""
textSelection = self.getTextAttributesView.get_selection()
[model, paths] = textSelection.get_selected_rows()
for path in paths:
thisIter = model.get_iter(path)
model.move_after(thisIter, None)
self._updateTextDictEntry()
def textMoveUpOneButtonClicked(self, widget):
"""Signal handler for the "clicked" signal for the
textMoveUpOneButton GtkButton widget. The user has clicked
the Move up one button. Move the selected rows in the text
attribute view up one row in the list and then update the
"enabledSpokenTextAttributes" and "enabledBrailledTextAttributes"
preference strings.
Arguments:
- widget: the component that generated the signal.
"""
textSelection = self.getTextAttributesView.get_selection()
[model, paths] = textSelection.get_selected_rows()
for path in paths:
thisIter = model.get_iter(path)
indices = path.get_indices()
if indices[0]:
otherIter = model.iter_nth_child(None, indices[0]-1)
model.swap(thisIter, otherIter)
self._updateTextDictEntry()
def textMoveDownOneButtonClicked(self, widget):
"""Signal handler for the "clicked" signal for the
textMoveDownOneButton GtkButton widget. The user has clicked
the Move down one button. Move the selected rows in the text
attribute view down one row in the list and then update the
"enabledSpokenTextAttributes" and "enabledBrailledTextAttributes"
preference strings.
Arguments:
- widget: the component that generated the signal.
"""
textSelection = self.getTextAttributesView.get_selection()
[model, paths] = textSelection.get_selected_rows()
noRows = model.iter_n_children(None)
for path in paths:
thisIter = model.get_iter(path)
indices = path.get_indices()
if indices[0] < noRows-1:
otherIter = model.iter_next(thisIter)
model.swap(thisIter, otherIter)
self._updateTextDictEntry()
def textMoveToBottomButtonClicked(self, widget):
"""Signal handler for the "clicked" signal for the
textMoveToBottomButton GtkButton widget. The user has clicked
the Move to bottom button. Move the selected rows in the text
attribute view to the bottom of the list and then update the
"enabledSpokenTextAttributes" and "enabledBrailledTextAttributes"
preference strings.
Arguments:
- widget: the component that generated the signal.
"""
textSelection = self.getTextAttributesView.get_selection()
[model, paths] = textSelection.get_selected_rows()
for path in paths:
thisIter = model.get_iter(path)
model.move_before(thisIter, None)
self._updateTextDictEntry()
def helpButtonClicked(self, widget):
"""Signal handler for the "clicked" signal for the helpButton
GtkButton widget. The user has clicked the Help button.
Arguments:
- widget: the component that generated the signal.
"""
orca.helpForOrca(page="preferences")
def restoreSettings(self):
"""Restore the settings we saved away when opening the preferences
dialog."""
# Restore the default rate/pitch/gain,
# in case the user played with the sliders.
#
voices = _settingsManager.getSetting('voices')
defaultVoice = voices[settings.DEFAULT_VOICE]
defaultVoice[acss.ACSS.GAIN] = self.savedGain
defaultVoice[acss.ACSS.AVERAGE_PITCH] = self.savedPitch
defaultVoice[acss.ACSS.RATE] = self.savedRate
def saveBasicSettings(self):
if not self._isInitialSetup:
self.restoreSettings()
enable = self.get_widget("speechSupportCheckButton").get_active()
self.prefsDict["enableSpeech"] = enable
if self.speechSystemsChoice:
self.prefsDict["speechServerFactory"] = \
self.speechSystemsChoice.__name__
if self.speechServersChoice:
self.prefsDict["speechServerInfo"] = \
self.speechServersChoice.getInfo()
if self.defaultVoice is not None:
self.prefsDict["voices"] = {
settings.DEFAULT_VOICE: acss.ACSS(self.defaultVoice),
settings.UPPERCASE_VOICE: acss.ACSS(self.uppercaseVoice),
settings.HYPERLINK_VOICE: acss.ACSS(self.hyperlinkVoice),
settings.SYSTEM_VOICE: acss.ACSS(self.systemVoice),
}
def applyButtonClicked(self, widget):
"""Signal handler for the "clicked" signal for the applyButton
GtkButton widget. The user has clicked the Apply button.
Write out the users preferences. If GNOME accessibility hadn't
previously been enabled, warn the user that they will need to
log out. Shut down any active speech servers that were started.
Reload the users preferences to get the new speech, braille and
key echo value to take effect. Do not dismiss the configuration
window.
Arguments:
- widget: the component that generated the signal.
"""
self.saveBasicSettings()
activeProfile = self.getComboBoxList(self.profilesCombo)
startingProfile = self.getComboBoxList(self.startingProfileCombo)
self.prefsDict['profile'] = activeProfile
self.prefsDict['activeProfile'] = activeProfile
self.prefsDict['startingProfile'] = startingProfile
_settingsManager.setStartingProfile(startingProfile)
self.writeUserPreferences()
orca.loadUserSettings(self.script)
braille.checkBrailleSetting()
self._initSpeechState()
self._populateKeyBindings()
self.__initProfileCombo()
def cancelButtonClicked(self, widget):
"""Signal handler for the "clicked" signal for the cancelButton
GtkButton widget. The user has clicked the Cancel button.
Don't write out the preferences. Destroy the configuration window.
Arguments:
- widget: the component that generated the signal.
"""
self.windowClosed(widget)
self.get_widget("orcaSetupWindow").destroy()
def okButtonClicked(self, widget=None):
"""Signal handler for the "clicked" signal for the okButton
GtkButton widget. The user has clicked the OK button.
Write out the users preferences. If GNOME accessibility hadn't
previously been enabled, warn the user that they will need to
log out. Shut down any active speech servers that were started.
Reload the users preferences to get the new speech, braille and
key echo value to take effect. Hide the configuration window.
Arguments:
- widget: the component that generated the signal.
"""
self.applyButtonClicked(widget)
self._cleanupSpeechServers()
self.get_widget("orcaSetupWindow").destroy()
def windowClosed(self, widget):
"""Signal handler for the "closed" signal for the orcaSetupWindow
GtkWindow widget. This is effectively the same as pressing the
cancel button, except the window is destroyed for us.
Arguments:
- widget: the component that generated the signal.
"""
factory = _settingsManager.getSetting('speechServerFactory')
if factory:
self._setSpeechSystemsChoice(factory)
server = _settingsManager.getSetting('speechServerInfo')
if server:
self._setSpeechServersChoice(server)
self._cleanupSpeechServers()
self.restoreSettings()
def windowDestroyed(self, widget):
"""Signal handler for the "destroyed" signal for the orcaSetupWindow
GtkWindow widget. Reset orca_state.orcaOS to None, so that the
GUI can be rebuilt from the GtkBuilder file the next time the user
wants to display the configuration GUI.
Arguments:
- widget: the component that generated the signal.
"""
self.keyBindView.set_model(None)
self.getTextAttributesView.set_model(None)
self.pronunciationView.set_model(None)
self.keyBindView.set_headers_visible(False)
self.getTextAttributesView.set_headers_visible(False)
self.pronunciationView.set_headers_visible(False)
self.keyBindView.hide()
self.getTextAttributesView.hide()
self.pronunciationView.hide()
orca_state.orcaOS = None
def showProfileGUI(self, widget):
"""Show profile Dialog to add a new one"""
orca_gui_profile.showProfileUI(self)
def saveProfile(self, profileToSaveLabel):
"""Creates a new profile based on the name profileToSaveLabel and
updates the Preferences dialog combo boxes accordingly."""
if not profileToSaveLabel:
return
profileToSave = profileToSaveLabel.replace(' ', '_').lower()
profile = [profileToSaveLabel, profileToSave]
def saveActiveProfile(newProfile = True):
if newProfile:
activeProfileIter = self.profilesComboModel.append(profile)
self.profilesCombo.set_active_iter(activeProfileIter)
self.prefsDict['profile'] = profile
self.prefsDict['activeProfile'] = profile
self.saveBasicSettings()
self.writeUserPreferences()
availableProfiles = [p[1] for p in self.__getAvailableProfiles()]
if isinstance(profileToSave, str) \
and profileToSave != '' \
and not profileToSave in availableProfiles \
and profileToSave != self._defaultProfile[1]:
saveActiveProfile()
else:
if profileToSave is not None:
message = guilabels.PROFILE_CONFLICT_MESSAGE % \
("<b>%s</b>" % GLib.markup_escape_text(profileToSaveLabel))
dialog = Gtk.MessageDialog(None,
Gtk.DialogFlags.MODAL,
type=Gtk.MessageType.INFO,
buttons=Gtk.ButtonsType.YES_NO)
dialog.set_markup("<b>%s</b>" % guilabels.PROFILE_CONFLICT_LABEL)
dialog.format_secondary_markup(message)
dialog.set_title(guilabels.PROFILE_CONFLICT_TITLE)
response = dialog.run()
if response == Gtk.ResponseType.YES:
dialog.destroy()
saveActiveProfile(False)
else:
dialog.destroy()
def removeProfileButtonClicked(self, widget):
"""Remove profile button clicked handler
If we removed the last profile, a default one will automatically get
added back by the settings manager.
"""
oldProfile = self.getComboBoxList(self.profilesCombo)
message = guilabels.PROFILE_REMOVE_MESSAGE % \
("<b>%s</b>" % GLib.markup_escape_text(oldProfile[0]))
dialog = Gtk.MessageDialog(self.window, Gtk.DialogFlags.MODAL,
type=Gtk.MessageType.INFO,
buttons=Gtk.ButtonsType.YES_NO)
dialog.set_markup("<b>%s</b>" % guilabels.PROFILE_REMOVE_LABEL)
dialog.format_secondary_markup(message)
if dialog.run() == Gtk.ResponseType.YES:
# If we remove the currently used starting profile, fallback on
# the first listed profile, or the default one if there's
# nothing better
newStartingProfile = self.prefsDict.get('startingProfile')
if not newStartingProfile or newStartingProfile == oldProfile:
newStartingProfile = self._defaultProfile
for row in self.profilesComboModel:
rowProfile = row[:]
if rowProfile != oldProfile:
newStartingProfile = rowProfile
break
# Update the current profile to the active profile unless we're
# removing that one, in which case we use the new starting
# profile
newProfile = self.prefsDict.get('activeProfile')
if not newProfile or newProfile == oldProfile:
newProfile = newStartingProfile
_settingsManager.removeProfile(oldProfile[1])
self.loadProfile(newProfile)
# Make sure nothing is referencing the removed profile anymore
startingProfile = self.prefsDict.get('startingProfile')
if not startingProfile or startingProfile == oldProfile:
self.prefsDict['startingProfile'] = newStartingProfile
_settingsManager.setStartingProfile(newStartingProfile)
self.writeUserPreferences()
dialog.destroy()
def loadProfileButtonClicked(self, widget):
"""Load profile button clicked handler"""
if self._isInitialSetup:
return
dialog = Gtk.MessageDialog(None,
Gtk.DialogFlags.MODAL,
type=Gtk.MessageType.INFO,
buttons=Gtk.ButtonsType.YES_NO)
dialog.set_markup("<b>%s</b>" % guilabels.PROFILE_LOAD_LABEL)
dialog.format_secondary_markup(guilabels.PROFILE_LOAD_MESSAGE)
response = dialog.run()
if response == Gtk.ResponseType.YES:
dialog.destroy()
self.loadSelectedProfile()
else:
dialog.destroy()
def loadSelectedProfile(self):
"""Load selected profile"""
activeProfile = self.getComboBoxList(self.profilesCombo)
self.loadProfile(activeProfile)
def loadProfile(self, profile):
"""Load profile"""
self.saveBasicSettings()
self.prefsDict['activeProfile'] = profile
_settingsManager.setProfile(profile[1])
self.prefsDict = _settingsManager.getGeneralSettings(profile[1])
orca.loadUserSettings(skipReloadMessage=True)
self._initGUIState()
braille.checkBrailleSetting()
self._initSpeechState()
self._populateKeyBindings()
self.__initProfileCombo()
| GNOME/orca | src/orca/orca_gui_prefs.py | Python | lgpl-2.1 | 142,434 |
# -*- coding: utf-8 -*-
# Copyright (C) 2010, 2011, 2012, 2013 Sebastian Wiesner <lunaryorn@gmail.com>
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
# for more details.
# You should have received a copy of the GNU Lesser General Public License
# along with this library; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# pylint: disable=anomalous-backslash-in-string
"""
pyudev.pyqt4
============
PyQt4 integration.
:class:`MonitorObserver` integrates device monitoring into the PyQt4\_
mainloop by turning device events into Qt signals.
:mod:`PyQt4.QtCore` from PyQt4\_ must be available when importing this
module.
.. _PyQt4: http://riverbankcomputing.co.uk/software/pyqt/intro
.. moduleauthor:: Sebastian Wiesner <lunaryorn@gmail.com>
"""
from __future__ import (print_function, division, unicode_literals,
absolute_import)
from PyQt4.QtCore import QSocketNotifier, QObject, pyqtSignal
from pyudev._util import text_type
from pyudev.core import Device
from pyudev._qt_base import QUDevMonitorObserverMixin, MonitorObserverMixin
class MonitorObserver(QObject, MonitorObserverMixin):
"""An observer for device events integrating into the :mod:`PyQt4` mainloop.
This class inherits :class:`~PyQt4.QtCore.QObject` to turn device events
into Qt signals:
>>> from pyudev import Context, Monitor
>>> from pyudev.pyqt4 import MonitorObserver
>>> context = Context()
>>> monitor = Monitor.from_netlink(context)
>>> monitor.filter_by(subsystem='input')
>>> observer = MonitorObserver(monitor)
>>> def device_event(device):
... print('event {0} on device {1}'.format(device.action, device))
>>> observer.deviceEvent.connect(device_event)
>>> monitor.start()
This class is a child of :class:`~PyQt4.QtCore.QObject`.
"""
#: emitted upon arbitrary device events
deviceEvent = pyqtSignal(Device)
def __init__(self, monitor, parent=None):
"""
Observe the given ``monitor`` (a :class:`~pyudev.Monitor`):
``parent`` is the parent :class:`~PyQt4.QtCore.QObject` of this
object. It is passed unchanged to the inherited constructor of
:class:`~PyQt4.QtCore.QObject`.
"""
QObject.__init__(self, parent)
self._setup_notifier(monitor, QSocketNotifier)
class QUDevMonitorObserver(QObject, QUDevMonitorObserverMixin):
"""An observer for device events integrating into the :mod:`PyQt4` mainloop.
.. deprecated:: 0.17
Will be removed in 1.0. Use :class:`MonitorObserver` instead.
"""
#: emitted upon arbitrary device events
deviceEvent = pyqtSignal(text_type, Device)
#: emitted, if a device was added
deviceAdded = pyqtSignal(Device)
#: emitted, if a device was removed
deviceRemoved = pyqtSignal(Device)
#: emitted, if a device was changed
deviceChanged = pyqtSignal(Device)
#: emitted, if a device was moved
deviceMoved = pyqtSignal(Device)
def __init__(self, monitor, parent=None):
"""
Observe the given ``monitor`` (a :class:`~pyudev.Monitor`):
``parent`` is the parent :class:`~PyQt4.QtCore.QObject` of this
object. It is passed unchanged to the inherited constructor of
:class:`~PyQt4.QtCore.QObject`.
"""
QObject.__init__(self, parent)
self._setup_notifier(monitor, QSocketNotifier)
| mulkieran/pyudev | pyudev/pyqt4.py | Python | lgpl-2.1 | 3,930 |
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
#include "piechart.h"
#include <QPainter>
#include <QDebug>
PieChart::PieChart(QDeclarativeItem *parent)
: QDeclarativeItem(parent)
{
// need to disable this flag to draw inside a QDeclarativeItem
setFlag(QGraphicsItem::ItemHasNoContents, false);
}
QString PieChart::name() const
{
return m_name;
}
void PieChart::setName(const QString &name)
{
m_name = name;
}
QColor PieChart::color() const
{
return m_color;
}
void PieChart::setColor(const QColor &color)
{
m_color = color;
}
void PieChart::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
{
QPen pen(m_color, 2);
painter->setPen(pen);
painter->setRenderHints(QPainter::Antialiasing, true);
painter->drawPie(boundingRect(), 90 * 16, 290 * 16);
}
//![0]
void PieChart::clearChart()
{
setColor(QColor(Qt::transparent));
update();
emit chartCleared();
}
//![0]
| sunblithe/qt-everywhere-opensource-src-4.7.1 | examples/declarative/tutorials/extending/chapter2-methods/piechart.cpp | C++ | lgpl-2.1 | 2,942 |
using System.Xml.Serialization;
namespace MDFe.Classes.Informacoes
{
public enum tpComp
{
[XmlEnum("01")]
ValePedagio = 01,
[XmlEnum("02")]
ImpostosTaxasEContribuicoes = 02,
[XmlEnum("03")]
DespesasBancariasEmiosDePagamentoOutras = 03,
[XmlEnum("99")]
Outros = 99
}
} | ernanisp/Zeus.Net.NFe.NFCe | MDFe.Classes/Informacoes/tpComp.cs | C# | lgpl-2.1 | 350 |
/* LanguageTool, a natural language style checker
* Copyright (C) 2005 Daniel Naber (http://www.danielnaber.de)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
package org.languagetool.tokenizers.uk;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map.Entry;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.StringTokenizer;
import org.languagetool.tokenizers.Tokenizer;
/**
* Tokenizes a sentence into words.
* Punctuation and whitespace gets its own token.
* Specific to Ukrainian: apostrophes (0x27 and U+2019) not in the list as they are part of the word
*
* @author Andriy Rysin
*/
public class UkrainianWordTokenizer implements Tokenizer {
private static final String SPLIT_CHARS = "\u0020\u00A0"
+ "\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007"
+ "\u2008\u2009\u200A\u200B\u200c\u200d\u200e\u200f"
+ "\u2028\u2029\u202a\u202b\u202c\u202d\u202e\u202f"
+ "\u205F\u2060\u2061\u2062\u2063\u206A\u206b\u206c\u206d"
+ "\u206E\u206F\u3000\u3164\ufeff\uffa0\ufff9\ufffa\ufffb"
+ ",.;()[]{}<>!?:/|\\\"«»„”“…¿¡\t\n\r\uE100\uE101\uE102\uE110";
// for handling exceptions
private static final char DECIMAL_COMMA_SUBST = '\uE001'; // some unused character to hide comma in decimal number temporary for tokenizer run
private static final char NON_BREAKING_SPACE_SUBST = '\uE002';
private static final char NON_BREAKING_DOT_SUBST = '\uE003'; // some unused character to hide dot in date temporary for tokenizer run
private static final char NON_BREAKING_COLON_SUBST = '\uE004';
// decimal comma between digits
private static final Pattern DECIMAL_COMMA_PATTERN = Pattern.compile("([\\d]),([\\d])", Pattern.CASE_INSENSITIVE|Pattern.UNICODE_CASE);
private static final String DECIMAL_COMMA_REPL = "$1" + DECIMAL_COMMA_SUBST + "$2";
// space between digits
private static final Pattern DECIMAL_SPACE_PATTERN = Pattern.compile("(?<=^|[\\s(])\\d{1,3}( [\\d]{3})+(?=[\\s(]|$)", Pattern.CASE_INSENSITIVE|Pattern.UNICODE_CASE);
// dots in numbers
private static final Pattern DOTTED_NUMBERS_PATTERN = Pattern.compile("([\\d])\\.([\\d])", Pattern.CASE_INSENSITIVE|Pattern.UNICODE_CASE);
private static final String DOTTED_NUMBERS_REPL = "$1" + NON_BREAKING_DOT_SUBST + "$2";
// colon in numbers
private static final Pattern COLON_NUMBERS_PATTERN = Pattern.compile("([\\d]):([\\d])", Pattern.CASE_INSENSITIVE|Pattern.UNICODE_CASE);
private static final String COLON_NUMBERS_REPL = "$1" + NON_BREAKING_COLON_SUBST + "$2";
// dates
private static final Pattern DATE_PATTERN = Pattern.compile("([\\d]{2})\\.([\\d]{2})\\.([\\d]{4})|([\\d]{4})\\.([\\d]{2})\\.([\\d]{2})|([\\d]{4})-([\\d]{2})-([\\d]{2})", Pattern.CASE_INSENSITIVE|Pattern.UNICODE_CASE);
private static final String DATE_PATTERN_REPL = "$1" + NON_BREAKING_DOT_SUBST + "$2" + NON_BREAKING_DOT_SUBST + "$3";
// braces in words
private static final Pattern BRACE_IN_WORD_PATTERN = Pattern.compile("([а-яіїєґ'])\\(([а-яіїєґ']+)\\)", Pattern.CASE_INSENSITIVE|Pattern.UNICODE_CASE);
private static final char LEFT_BRACE_SUBST = '\uE005';
private static final char RIGHT_BRACE_SUBST = '\uE006';
private static final String BREAKING_PLACEHOLDER = "\uE110";
// abbreviation dot
//TODO: л.с., ч.л./ч. л., ст. л., р. х.
private static final Pattern ABBR_DOT_TYS_PATTERN = Pattern.compile("(тис)\\.([ \u00A0]+[а-яіїєґ])");
private static final Pattern ABBR_DOT_LAT_PATTERN = Pattern.compile("([^а-яіїєґА-ЯІЇЄҐ'-]лат)\\.([ \u00A0]+[a-zA-Z])");
private static final Pattern ABBR_DOT_PROF_PATTERN = Pattern.compile("([Аа]кад|[Пп]роф|[Дд]оц|[Аа]сист|вул|о|р|ім)\\.([\\s\u00A0]+[А-ЯІЇЄҐ])");
// tokenize initials with dot, e.g. "А.", "Ковальчук"
private static final Pattern INITIALS_DOT_PATTERN_SP_2 = Pattern.compile("([А-ЯІЇЄҐ])\\.([\\s\u00A0][А-ЯІЇЄҐ])\\.([\\s\u00A0][А-ЯІЇЄҐ][а-яіїєґ']+)");
private static final String INITIALS_DOT_REPL_SP_2 = "$1" + NON_BREAKING_DOT_SUBST + "$2" + NON_BREAKING_DOT_SUBST + "$3";
private static final Pattern INITIALS_DOT_PATTERN_SP_1 = Pattern.compile("([А-ЯІЇЄҐ])\\.([\\s\u00A0][А-ЯІЇЄҐ][а-яіїєґ']+)");
private static final String INITIALS_DOT_REPL_SP_1 = "$1" + NON_BREAKING_DOT_SUBST + "$2";
private static final Pattern INITIALS_DOT_PATTERN_NSP_2 = Pattern.compile("([А-ЯІЇЄҐ])\\.([А-ЯІЇЄҐ])\\.([А-ЯІЇЄҐ][а-яіїєґ']+)");
private static final String INITIALS_DOT_REPL_NSP_2 = "$1" + NON_BREAKING_DOT_SUBST + BREAKING_PLACEHOLDER + "$2" + NON_BREAKING_DOT_SUBST + BREAKING_PLACEHOLDER + "$3";
private static final Pattern INITIALS_DOT_PATTERN_NSP_1 = Pattern.compile("([А-ЯІЇЄҐ])\\.([А-ЯІЇЄҐ][а-яіїєґ']+)");
private static final String INITIALS_DOT_REPL_NSP_1 = "$1" + NON_BREAKING_DOT_SUBST + BREAKING_PLACEHOLDER + "$2";
// село, місто, річка (якщо з цифрою: секунди, метри, роки) - з роками складно
private static final Pattern ABBR_DOT_KUB_SM_PATTERN = Pattern.compile("((?:[0-9]|кв\\.?|куб\\.?)[\\s\u00A0]+[см])\\.");
private static final Pattern ABBR_DOT_S_G_PATTERN = Pattern.compile("(с)\\.(-г)\\.");
private static final Pattern ABBR_DOT_2_SMALL_LETTERS_PATTERN = Pattern.compile("([^а-яіїєґ'-][векнпрстцч]{1,2})\\.([екмнпрстч]{1,2})\\.");
private static final String ABBR_DOT_2_SMALL_LETTERS_REPL = "$1" + NON_BREAKING_DOT_SUBST + BREAKING_PLACEHOLDER + "$2" + NON_BREAKING_DOT_SUBST;
// скорочення що не можуть бути в кінці речення
private static final Pattern ABBR_DOT_NON_ENDING_PATTERN = Pattern.compile("([^а-яіїєґА-ЯІЇЄҐ'-](?:амер|англ|бл(?:изьк)?|буд|вірм|грец(?:ьк)|див|дол|досл|доц|ел|жін|заст|зв|ім|івр|ісп|італ|к|кв|[1-9]-кімн|кімн|кл|м|н|напр|п|пен|перекл|пл|пор|поч|прибл|пров|просп|[Рр]ед|[Рр]еж|рт|с|[Сс]в|соц|співавт|стор|табл|тел|укр|філол|фр|франц|ч|чайн|ц))\\.(?!$)");
// скорочення що можуть бути в кінці речення
private static final Pattern ABBR_DOT_ENDING_PATTERN = Pattern.compile("([^а-яіїєґА-ЯІЇЄҐ'-]((та|й) ін|е|коп|обл|р|рр|руб|ст|стол|стор|чол|шт))\\.");
private static final Pattern ABBR_DOT_I_T_P_PATTERN = Pattern.compile("([ій][ \u00A0]+т)\\.([ \u00A0]*(д|п|ін))\\.");
// Сьогодні (у четвер. - Ред.), вранці.
// private static final Pattern ABBR_DOT_PATTERN8 = Pattern.compile("([\\s\u00A0]+[–—-][\\s\u00A0]+(?:[Рр]ед|[Аа]вт))\\.([\\)\\]])");
private static final Pattern ABBR_DOT_RED_AVT_PATTERN = Pattern.compile("([\\s\u00A0]+(?:[Рр]ед|[Аа]вт))\\.([\\)\\]])");
// ellipsis
private static final String ELLIPSIS = "...";
private static final String ELLIPSIS_SUBST = "\uE100";
private static final String ELLIPSIS2 = "!..";
private static final String ELLIPSIS2_SUBST = "\uE101";
private static final String ELLIPSIS3 = "?..";
private static final String ELLIPSIS3_SUBST = "\uE102";
private static final String SOFT_HYPHEN_WRAP = "\u00AD\n";
private static final String SOFT_HYPHEN_WRAP_SUBST = "\uE103";
// url
private static final Pattern URL_PATTERN = Pattern.compile("^(https?|ftp)://[^\\s/$.?#].[^\\s]*$", Pattern.CASE_INSENSITIVE);
private static final int URL_START_REPLACE_CHAR = 0xE300;
public UkrainianWordTokenizer() {
}
@Override
public List<String> tokenize(String text) {
HashMap<String, String> urls = new HashMap<>();
text = cleanup(text);
if( text.contains(",") ) {
text = DECIMAL_COMMA_PATTERN.matcher(text).replaceAll(DECIMAL_COMMA_REPL);
}
// check for urls
if( text.contains("tp") ) { // https?|ftp
Matcher matcher = URL_PATTERN.matcher(text);
int urlReplaceChar = URL_START_REPLACE_CHAR;
while( matcher.find() ) {
String urlGroup = matcher.group();
String replaceChar = String.valueOf((char)urlReplaceChar);
urls.put(replaceChar, urlGroup);
text = matcher.replaceAll(replaceChar);
urlReplaceChar++;
}
}
// if period is not the last character in the sentence
int dotIndex = text.indexOf(".");
boolean dotInsideSentence = dotIndex >= 0 && dotIndex < text.length()-1;
if( dotInsideSentence ){
if( text.contains(ELLIPSIS) ) {
text = text.replace(ELLIPSIS, ELLIPSIS_SUBST);
}
if( text.contains(ELLIPSIS2) ) {
text = text.replace(ELLIPSIS2, ELLIPSIS2_SUBST);
}
if( text.contains(ELLIPSIS3) ) {
text = text.replace(ELLIPSIS3, ELLIPSIS3_SUBST);
}
text = DATE_PATTERN.matcher(text).replaceAll(DATE_PATTERN_REPL);
text = DOTTED_NUMBERS_PATTERN.matcher(text).replaceAll(DOTTED_NUMBERS_REPL);
text = ABBR_DOT_2_SMALL_LETTERS_PATTERN.matcher(text).replaceAll(ABBR_DOT_2_SMALL_LETTERS_REPL);
text = ABBR_DOT_TYS_PATTERN.matcher(text).replaceAll("$1" + NON_BREAKING_DOT_SUBST + "$2");
text = ABBR_DOT_LAT_PATTERN.matcher(text).replaceAll("$1" + NON_BREAKING_DOT_SUBST + "$2");
text = ABBR_DOT_PROF_PATTERN.matcher(text).replaceAll("$1" + NON_BREAKING_DOT_SUBST + "$2");
text = INITIALS_DOT_PATTERN_SP_2.matcher(text).replaceAll(INITIALS_DOT_REPL_SP_2);
text = INITIALS_DOT_PATTERN_SP_1.matcher(text).replaceAll(INITIALS_DOT_REPL_SP_1);
text = INITIALS_DOT_PATTERN_NSP_2.matcher(text).replaceAll(INITIALS_DOT_REPL_NSP_2);
text = INITIALS_DOT_PATTERN_NSP_1.matcher(text).replaceAll(INITIALS_DOT_REPL_NSP_1);
text = ABBR_DOT_KUB_SM_PATTERN.matcher(text).replaceAll("$1" + BREAKING_PLACEHOLDER + NON_BREAKING_DOT_SUBST);
text = ABBR_DOT_S_G_PATTERN.matcher(text).replaceAll("$1" + NON_BREAKING_DOT_SUBST + "$2" + NON_BREAKING_DOT_SUBST);
text = ABBR_DOT_I_T_P_PATTERN.matcher(text).replaceAll("$1" + NON_BREAKING_DOT_SUBST + "$2" + NON_BREAKING_DOT_SUBST);
text = ABBR_DOT_RED_AVT_PATTERN.matcher(text).replaceAll("$1" + NON_BREAKING_DOT_SUBST + "$2");
text = ABBR_DOT_NON_ENDING_PATTERN.matcher(text).replaceAll("$1" + NON_BREAKING_DOT_SUBST);
}
text = ABBR_DOT_ENDING_PATTERN.matcher(text).replaceAll("$1" + NON_BREAKING_DOT_SUBST);
// 2 000 000
Matcher spacedDecimalMatcher = DECIMAL_SPACE_PATTERN.matcher(text);
if( spacedDecimalMatcher.find() ) {
StringBuffer sb = new StringBuffer();
do {
String splitNumber = spacedDecimalMatcher.group(0);
String splitNumberAdjusted = splitNumber.replace(' ', NON_BREAKING_SPACE_SUBST);
splitNumberAdjusted = splitNumberAdjusted.replace('\u00A0', NON_BREAKING_SPACE_SUBST);
spacedDecimalMatcher.appendReplacement(sb, splitNumberAdjusted);
} while( spacedDecimalMatcher.find() );
spacedDecimalMatcher.appendTail(sb);
text = sb.toString();
}
// 12:25
if( text.contains(":") ) {
text = COLON_NUMBERS_PATTERN.matcher(text).replaceAll(COLON_NUMBERS_REPL);
}
// ВКПБ(о)
if( text.contains("(") ) {
text = BRACE_IN_WORD_PATTERN.matcher(text).replaceAll("$1" + LEFT_BRACE_SUBST + "$2" + RIGHT_BRACE_SUBST);
}
if( text.contains(SOFT_HYPHEN_WRAP) ) {
text = text.replace(SOFT_HYPHEN_WRAP, SOFT_HYPHEN_WRAP_SUBST);
}
List<String> tokenList = new ArrayList<>();
StringTokenizer st = new StringTokenizer(text, SPLIT_CHARS, true);
while (st.hasMoreElements()) {
String token = st.nextToken();
if( token.equals(BREAKING_PLACEHOLDER) )
continue;
token = token.replace(DECIMAL_COMMA_SUBST, ',');
token = token.replace(NON_BREAKING_COLON_SUBST, ':');
token = token.replace(NON_BREAKING_SPACE_SUBST, ' ');
token = token.replace(LEFT_BRACE_SUBST, '(');
token = token.replace(RIGHT_BRACE_SUBST, ')');
// outside of if as we also replace back sentence-ending abbreviations
token = token.replace(NON_BREAKING_DOT_SUBST, '.');
if( dotInsideSentence ){
token = token.replace(ELLIPSIS_SUBST, ELLIPSIS);
token = token.replace(ELLIPSIS2_SUBST, ELLIPSIS2);
token = token.replace(ELLIPSIS3_SUBST, ELLIPSIS3);
}
token = token.replace(SOFT_HYPHEN_WRAP_SUBST, SOFT_HYPHEN_WRAP);
if( ! urls.isEmpty() ) {
for(Entry<String, String> entry : urls.entrySet()) {
token = token.replace(entry.getKey(), entry.getValue());
}
}
tokenList.add( token );
}
return tokenList;
}
private static String cleanup(String text) {
text = text
.replace('\u2019', '\'')
.replace('\u02BC', '\'')
.replace('\u2018', '\'')
.replace('`', '\'')
.replace('´', '\'')
.replace('\u2011', '-'); // we handle \u2013 in tagger so we can base our rule on it
return text;
}
}
| meg0man/languagetool | languagetool-language-modules/uk/src/main/java/org/languagetool/tokenizers/uk/UkrainianWordTokenizer.java | Java | lgpl-2.1 | 13,891 |
/***
Copyright (c) 2011, 2014 Hércules S. S. José
Este arquivo é parte do programa Imobiliária Web.
Imobiliária Web é um software livre; você pode redistribui-lo e/ou
modificá-lo dentro dos termos da Licença Pública Geral Menor GNU como
publicada pela Fundação do Software Livre (FSF); na versão 2.1 da
Licença.
Este programa é distribuído na esperança que possa ser util,
mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer
MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral Menor GNU em
português para maiores detalhes.
Você deve ter recebido uma cópia da Licença Pública Geral Menor GNU sob o
nome de "LICENSE.TXT" junto com este programa, se não, acesse o site HSlife no
endereco www.hslife.com.br ou escreva para a Fundação do Software Livre(FSF) Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
Para mais informações sobre o programa Imobiliária Web e seus autores acesso o
endereço www.hslife.com.br, pelo e-mail contato@hslife.com.br ou escreva para
Hércules S. S. José, Av. Ministro Lafaeyte de Andrade, 1683 - Bl. 3 Apt 404,
Marco II - Nova Iguaçu, RJ, Brasil.
***/
package br.com.hslife.imobiliaria.logic;
import java.util.List;
import br.com.hslife.imobiliaria.exception.BusinessException;
import br.com.hslife.imobiliaria.model.Usuario;
public interface IUsuario {
public void cadastrar(Usuario usuario) throws BusinessException;
public void editar(Usuario usuario) throws BusinessException;
public void habilitar(Long id) throws BusinessException;
public Usuario buscar(Long id) throws BusinessException;
public List<Usuario> buscar(Usuario usuario) throws BusinessException;
public List<Usuario> buscarTodos() throws BusinessException;
public Usuario buscarPorLogin(String login) throws BusinessException;
public List<Usuario> buscarTodosPorLogin(String login) throws BusinessException;
}
| herculeshssj/imobiliariaweb | src/br/com/hslife/imobiliaria/logic/IUsuario.java | Java | lgpl-2.1 | 2,132 |
/**
*/
package net.opengis.gml311;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Abstract Parametric Curve Surface Type</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
*
*
* <!-- end-model-doc -->
*
*
* @see net.opengis.gml311.Gml311Package#getAbstractParametricCurveSurfaceType()
* @model extendedMetaData="name='AbstractParametricCurveSurfaceType' kind='empty'"
* @generated
*/
public interface AbstractParametricCurveSurfaceType extends AbstractSurfacePatchType {
} // AbstractParametricCurveSurfaceType
| geotools/geotools | modules/ogc/net.opengis.wmts/src/net/opengis/gml311/AbstractParametricCurveSurfaceType.java | Java | lgpl-2.1 | 576 |
// The libMesh Finite Element Library.
// Copyright (C) 2002-2020 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "libmesh/diff_context.h"
#include "libmesh/diff_physics.h"
#include "libmesh/system.h"
namespace libMesh
{
DifferentiablePhysics::~DifferentiablePhysics()
{
DifferentiablePhysics::clear_physics();
}
void DifferentiablePhysics::clear_physics ()
{
_time_evolving.resize(0);
}
void DifferentiablePhysics::init_physics (const System & sys)
{
// give us flags for every variable that might be time evolving
_time_evolving.resize(sys.n_vars(), false);
}
void DifferentiablePhysics::time_evolving (unsigned int var,
unsigned int order)
{
if (order != 1 && order != 2)
libmesh_error_msg("Input order must be 1 or 2!");
if (_time_evolving.size() <= var)
_time_evolving.resize(var+1, 0);
_time_evolving[var] = order;
if (order == 1)
_first_order_vars.insert(var);
else
_second_order_vars.insert(var);
}
bool DifferentiablePhysics::nonlocal_mass_residual(bool request_jacobian,
DiffContext & c)
{
FEMContext & context = cast_ref<FEMContext &>(c);
for (auto var : IntRange<unsigned int>(0, context.n_vars()))
{
if (!this->is_time_evolving(var))
continue;
if (c.get_system().variable(var).type().family != SCALAR)
continue;
const std::vector<dof_id_type> & dof_indices =
context.get_dof_indices(var);
const unsigned int n_dofs = cast_int<unsigned int>
(dof_indices.size());
DenseSubVector<Number> & Fs = context.get_elem_residual(var);
DenseSubMatrix<Number> & Kss = context.get_elem_jacobian( var, var );
const libMesh::DenseSubVector<libMesh::Number> & Us =
context.get_elem_solution(var);
for (unsigned int i=0; i != n_dofs; ++i)
{
Fs(i) -= Us(i);
if (request_jacobian)
Kss(i,i) -= context.elem_solution_rate_derivative;
}
}
return request_jacobian;
}
bool DifferentiablePhysics::_eulerian_time_deriv (bool request_jacobian,
DiffContext & context)
{
// For any problem we need time derivative terms
request_jacobian =
this->element_time_derivative(request_jacobian, context);
// For a moving mesh problem we may need the pseudoconvection term too
return this->eulerian_residual(request_jacobian, context) &&
request_jacobian;
}
} // namespace libMesh
| capitalaslash/libmesh | src/physics/diff_physics.C | C++ | lgpl-2.1 | 3,273 |
/*
Simple DirectMedia Layer
Java source code (C) 2009-2011 Sergii Pylypenko
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
package net.sourceforge.clonekeenplus;
import java.lang.String;
import java.util.ArrayList;
import java.util.Arrays;
import java.lang.reflect.Field;
// Autogenerated by hand with a command:
// grep 'SDLK_' SDL_keysym.h | sed 's/SDLK_\([a-zA-Z0-9_]\+\).*[=] \([0-9]\+\).*/public static final int SDLK_\1 = \2;/' >> Keycodes.java
class SDL_1_2_Keycodes {
public static final int SDLK_UNKNOWN = 0;
public static final int SDLK_BACKSPACE = 8;
public static final int SDLK_TAB = 9;
public static final int SDLK_CLEAR = 12;
public static final int SDLK_RETURN = 13;
public static final int SDLK_PAUSE = 19;
public static final int SDLK_ESCAPE = 27;
public static final int SDLK_SPACE = 32;
public static final int SDLK_EXCLAIM = 33;
public static final int SDLK_QUOTEDBL = 34;
public static final int SDLK_HASH = 35;
public static final int SDLK_DOLLAR = 36;
public static final int SDLK_AMPERSAND = 38;
public static final int SDLK_QUOTE = 39;
public static final int SDLK_LEFTPAREN = 40;
public static final int SDLK_RIGHTPAREN = 41;
public static final int SDLK_ASTERISK = 42;
public static final int SDLK_PLUS = 43;
public static final int SDLK_COMMA = 44;
public static final int SDLK_MINUS = 45;
public static final int SDLK_PERIOD = 46;
public static final int SDLK_SLASH = 47;
public static final int SDLK_0 = 48;
public static final int SDLK_1 = 49;
public static final int SDLK_2 = 50;
public static final int SDLK_3 = 51;
public static final int SDLK_4 = 52;
public static final int SDLK_5 = 53;
public static final int SDLK_6 = 54;
public static final int SDLK_7 = 55;
public static final int SDLK_8 = 56;
public static final int SDLK_9 = 57;
public static final int SDLK_COLON = 58;
public static final int SDLK_SEMICOLON = 59;
public static final int SDLK_LESS = 60;
public static final int SDLK_EQUALS = 61;
public static final int SDLK_GREATER = 62;
public static final int SDLK_QUESTION = 63;
public static final int SDLK_AT = 64;
public static final int SDLK_LEFTBRACKET = 91;
public static final int SDLK_BACKSLASH = 92;
public static final int SDLK_RIGHTBRACKET = 93;
public static final int SDLK_CARET = 94;
public static final int SDLK_UNDERSCORE = 95;
public static final int SDLK_BACKQUOTE = 96;
public static final int SDLK_a = 97;
public static final int SDLK_b = 98;
public static final int SDLK_c = 99;
public static final int SDLK_d = 100;
public static final int SDLK_e = 101;
public static final int SDLK_f = 102;
public static final int SDLK_g = 103;
public static final int SDLK_h = 104;
public static final int SDLK_i = 105;
public static final int SDLK_j = 106;
public static final int SDLK_k = 107;
public static final int SDLK_l = 108;
public static final int SDLK_m = 109;
public static final int SDLK_n = 110;
public static final int SDLK_o = 111;
public static final int SDLK_p = 112;
public static final int SDLK_q = 113;
public static final int SDLK_r = 114;
public static final int SDLK_s = 115;
public static final int SDLK_t = 116;
public static final int SDLK_u = 117;
public static final int SDLK_v = 118;
public static final int SDLK_w = 119;
public static final int SDLK_x = 120;
public static final int SDLK_y = 121;
public static final int SDLK_z = 122;
public static final int SDLK_DELETE = 127;
public static final int SDLK_WORLD_0 = 160;
public static final int SDLK_WORLD_1 = 161;
public static final int SDLK_WORLD_2 = 162;
public static final int SDLK_WORLD_3 = 163;
public static final int SDLK_WORLD_4 = 164;
public static final int SDLK_WORLD_5 = 165;
public static final int SDLK_WORLD_6 = 166;
public static final int SDLK_WORLD_7 = 167;
public static final int SDLK_WORLD_8 = 168;
public static final int SDLK_WORLD_9 = 169;
public static final int SDLK_WORLD_10 = 170;
public static final int SDLK_WORLD_11 = 171;
public static final int SDLK_WORLD_12 = 172;
public static final int SDLK_WORLD_13 = 173;
public static final int SDLK_WORLD_14 = 174;
public static final int SDLK_WORLD_15 = 175;
public static final int SDLK_WORLD_16 = 176;
public static final int SDLK_WORLD_17 = 177;
public static final int SDLK_WORLD_18 = 178;
public static final int SDLK_WORLD_19 = 179;
public static final int SDLK_WORLD_20 = 180;
public static final int SDLK_WORLD_21 = 181;
public static final int SDLK_WORLD_22 = 182;
public static final int SDLK_WORLD_23 = 183;
public static final int SDLK_WORLD_24 = 184;
public static final int SDLK_WORLD_25 = 185;
public static final int SDLK_WORLD_26 = 186;
public static final int SDLK_WORLD_27 = 187;
public static final int SDLK_WORLD_28 = 188;
public static final int SDLK_WORLD_29 = 189;
public static final int SDLK_WORLD_30 = 190;
public static final int SDLK_WORLD_31 = 191;
public static final int SDLK_WORLD_32 = 192;
public static final int SDLK_WORLD_33 = 193;
public static final int SDLK_WORLD_34 = 194;
public static final int SDLK_WORLD_35 = 195;
public static final int SDLK_WORLD_36 = 196;
public static final int SDLK_WORLD_37 = 197;
public static final int SDLK_WORLD_38 = 198;
public static final int SDLK_WORLD_39 = 199;
public static final int SDLK_WORLD_40 = 200;
public static final int SDLK_WORLD_41 = 201;
public static final int SDLK_WORLD_42 = 202;
public static final int SDLK_WORLD_43 = 203;
public static final int SDLK_WORLD_44 = 204;
public static final int SDLK_WORLD_45 = 205;
public static final int SDLK_WORLD_46 = 206;
public static final int SDLK_WORLD_47 = 207;
public static final int SDLK_WORLD_48 = 208;
public static final int SDLK_WORLD_49 = 209;
public static final int SDLK_WORLD_50 = 210;
public static final int SDLK_WORLD_51 = 211;
public static final int SDLK_WORLD_52 = 212;
public static final int SDLK_WORLD_53 = 213;
public static final int SDLK_WORLD_54 = 214;
public static final int SDLK_WORLD_55 = 215;
public static final int SDLK_WORLD_56 = 216;
public static final int SDLK_WORLD_57 = 217;
public static final int SDLK_WORLD_58 = 218;
public static final int SDLK_WORLD_59 = 219;
public static final int SDLK_WORLD_60 = 220;
public static final int SDLK_WORLD_61 = 221;
public static final int SDLK_WORLD_62 = 222;
public static final int SDLK_WORLD_63 = 223;
public static final int SDLK_WORLD_64 = 224;
public static final int SDLK_WORLD_65 = 225;
public static final int SDLK_WORLD_66 = 226;
public static final int SDLK_WORLD_67 = 227;
public static final int SDLK_WORLD_68 = 228;
public static final int SDLK_WORLD_69 = 229;
public static final int SDLK_WORLD_70 = 230;
public static final int SDLK_WORLD_71 = 231;
public static final int SDLK_WORLD_72 = 232;
public static final int SDLK_WORLD_73 = 233;
public static final int SDLK_WORLD_74 = 234;
public static final int SDLK_WORLD_75 = 235;
public static final int SDLK_WORLD_76 = 236;
public static final int SDLK_WORLD_77 = 237;
public static final int SDLK_WORLD_78 = 238;
public static final int SDLK_WORLD_79 = 239;
public static final int SDLK_WORLD_80 = 240;
public static final int SDLK_WORLD_81 = 241;
public static final int SDLK_WORLD_82 = 242;
public static final int SDLK_WORLD_83 = 243;
public static final int SDLK_WORLD_84 = 244;
public static final int SDLK_WORLD_85 = 245;
public static final int SDLK_WORLD_86 = 246;
public static final int SDLK_WORLD_87 = 247;
public static final int SDLK_WORLD_88 = 248;
public static final int SDLK_WORLD_89 = 249;
public static final int SDLK_WORLD_90 = 250;
public static final int SDLK_WORLD_91 = 251;
public static final int SDLK_WORLD_92 = 252;
public static final int SDLK_WORLD_93 = 253;
public static final int SDLK_WORLD_94 = 254;
public static final int SDLK_WORLD_95 = 255;
public static final int SDLK_KP0 = 256;
public static final int SDLK_KP1 = 257;
public static final int SDLK_KP2 = 258;
public static final int SDLK_KP3 = 259;
public static final int SDLK_KP4 = 260;
public static final int SDLK_KP5 = 261;
public static final int SDLK_KP6 = 262;
public static final int SDLK_KP7 = 263;
public static final int SDLK_KP8 = 264;
public static final int SDLK_KP9 = 265;
public static final int SDLK_KP_PERIOD = 266;
public static final int SDLK_KP_DIVIDE = 267;
public static final int SDLK_KP_MULTIPLY = 268;
public static final int SDLK_KP_MINUS = 269;
public static final int SDLK_KP_PLUS = 270;
public static final int SDLK_KP_ENTER = 271;
public static final int SDLK_KP_EQUALS = 272;
public static final int SDLK_UP = 273;
public static final int SDLK_DOWN = 274;
public static final int SDLK_RIGHT = 275;
public static final int SDLK_LEFT = 276;
public static final int SDLK_INSERT = 277;
public static final int SDLK_HOME = 278;
public static final int SDLK_END = 279;
public static final int SDLK_PAGEUP = 280;
public static final int SDLK_PAGEDOWN = 281;
public static final int SDLK_F1 = 282;
public static final int SDLK_F2 = 283;
public static final int SDLK_F3 = 284;
public static final int SDLK_F4 = 285;
public static final int SDLK_F5 = 286;
public static final int SDLK_F6 = 287;
public static final int SDLK_F7 = 288;
public static final int SDLK_F8 = 289;
public static final int SDLK_F9 = 290;
public static final int SDLK_F10 = 291;
public static final int SDLK_F11 = 292;
public static final int SDLK_F12 = 293;
public static final int SDLK_F13 = 294;
public static final int SDLK_F14 = 295;
public static final int SDLK_F15 = 296;
public static final int SDLK_NUMLOCK = 300;
public static final int SDLK_CAPSLOCK = 301;
public static final int SDLK_SCROLLOCK = 302;
public static final int SDLK_RSHIFT = 303;
public static final int SDLK_LSHIFT = 304;
public static final int SDLK_RCTRL = 305;
public static final int SDLK_LCTRL = 306;
public static final int SDLK_RALT = 307;
public static final int SDLK_LALT = 308;
public static final int SDLK_RMETA = 309;
public static final int SDLK_LMETA = 310;
public static final int SDLK_LSUPER = 311;
public static final int SDLK_RSUPER = 312;
public static final int SDLK_MODE = 313;
public static final int SDLK_COMPOSE = 314;
public static final int SDLK_HELP = 315;
public static final int SDLK_PRINT = 316;
public static final int SDLK_SYSREQ = 317;
public static final int SDLK_BREAK = 318;
public static final int SDLK_MENU = 319;
public static final int SDLK_POWER = 320;
public static final int SDLK_EURO = 321;
public static final int SDLK_UNDO = 322;
public static final int SDLK_NO_REMAP = 512;
}
// Autogenerated by hand with a command:
// grep 'SDL_SCANCODE_' SDL_scancode.h | sed 's/SDL_SCANCODE_\([a-zA-Z0-9_]\+\).*[=] \([0-9]\+\).*/public static final int SDLK_\1 = \2;/' >> Keycodes.java
class SDL_1_3_Keycodes {
public static final int SDLK_UNKNOWN = 0;
public static final int SDLK_A = 4;
public static final int SDLK_B = 5;
public static final int SDLK_C = 6;
public static final int SDLK_D = 7;
public static final int SDLK_E = 8;
public static final int SDLK_F = 9;
public static final int SDLK_G = 10;
public static final int SDLK_H = 11;
public static final int SDLK_I = 12;
public static final int SDLK_J = 13;
public static final int SDLK_K = 14;
public static final int SDLK_L = 15;
public static final int SDLK_M = 16;
public static final int SDLK_N = 17;
public static final int SDLK_O = 18;
public static final int SDLK_P = 19;
public static final int SDLK_Q = 20;
public static final int SDLK_R = 21;
public static final int SDLK_S = 22;
public static final int SDLK_T = 23;
public static final int SDLK_U = 24;
public static final int SDLK_V = 25;
public static final int SDLK_W = 26;
public static final int SDLK_X = 27;
public static final int SDLK_Y = 28;
public static final int SDLK_Z = 29;
public static final int SDLK_1 = 30;
public static final int SDLK_2 = 31;
public static final int SDLK_3 = 32;
public static final int SDLK_4 = 33;
public static final int SDLK_5 = 34;
public static final int SDLK_6 = 35;
public static final int SDLK_7 = 36;
public static final int SDLK_8 = 37;
public static final int SDLK_9 = 38;
public static final int SDLK_0 = 39;
public static final int SDLK_RETURN = 40;
public static final int SDLK_ESCAPE = 41;
public static final int SDLK_BACKSPACE = 42;
public static final int SDLK_TAB = 43;
public static final int SDLK_SPACE = 44;
public static final int SDLK_MINUS = 45;
public static final int SDLK_EQUALS = 46;
public static final int SDLK_LEFTBRACKET = 47;
public static final int SDLK_RIGHTBRACKET = 48;
public static final int SDLK_BACKSLASH = 49;
public static final int SDLK_NONUSHASH = 50;
public static final int SDLK_SEMICOLON = 51;
public static final int SDLK_APOSTROPHE = 52;
public static final int SDLK_GRAVE = 53;
public static final int SDLK_COMMA = 54;
public static final int SDLK_PERIOD = 55;
public static final int SDLK_SLASH = 56;
public static final int SDLK_CAPSLOCK = 57;
public static final int SDLK_F1 = 58;
public static final int SDLK_F2 = 59;
public static final int SDLK_F3 = 60;
public static final int SDLK_F4 = 61;
public static final int SDLK_F5 = 62;
public static final int SDLK_F6 = 63;
public static final int SDLK_F7 = 64;
public static final int SDLK_F8 = 65;
public static final int SDLK_F9 = 66;
public static final int SDLK_F10 = 67;
public static final int SDLK_F11 = 68;
public static final int SDLK_F12 = 69;
public static final int SDLK_PRINTSCREEN = 70;
public static final int SDLK_SCROLLLOCK = 71;
public static final int SDLK_PAUSE = 72;
public static final int SDLK_INSERT = 73;
public static final int SDLK_HOME = 74;
public static final int SDLK_PAGEUP = 75;
public static final int SDLK_DELETE = 76;
public static final int SDLK_END = 77;
public static final int SDLK_PAGEDOWN = 78;
public static final int SDLK_RIGHT = 79;
public static final int SDLK_LEFT = 80;
public static final int SDLK_DOWN = 81;
public static final int SDLK_UP = 82;
public static final int SDLK_NUMLOCKCLEAR = 83;
public static final int SDLK_KP_DIVIDE = 84;
public static final int SDLK_KP_MULTIPLY = 85;
public static final int SDLK_KP_MINUS = 86;
public static final int SDLK_KP_PLUS = 87;
public static final int SDLK_KP_ENTER = 88;
public static final int SDLK_KP_1 = 89;
public static final int SDLK_KP_2 = 90;
public static final int SDLK_KP_3 = 91;
public static final int SDLK_KP_4 = 92;
public static final int SDLK_KP_5 = 93;
public static final int SDLK_KP_6 = 94;
public static final int SDLK_KP_7 = 95;
public static final int SDLK_KP_8 = 96;
public static final int SDLK_KP_9 = 97;
public static final int SDLK_KP_0 = 98;
public static final int SDLK_KP_PERIOD = 99;
public static final int SDLK_NONUSBACKSLASH = 100;
public static final int SDLK_APPLICATION = 101;
public static final int SDLK_POWER = 102;
public static final int SDLK_KP_EQUALS = 103;
public static final int SDLK_F13 = 104;
public static final int SDLK_F14 = 105;
public static final int SDLK_F15 = 106;
public static final int SDLK_F16 = 107;
public static final int SDLK_F17 = 108;
public static final int SDLK_F18 = 109;
public static final int SDLK_F19 = 110;
public static final int SDLK_F20 = 111;
public static final int SDLK_F21 = 112;
public static final int SDLK_F22 = 113;
public static final int SDLK_F23 = 114;
public static final int SDLK_F24 = 115;
public static final int SDLK_EXECUTE = 116;
public static final int SDLK_HELP = 117;
public static final int SDLK_MENU = 118;
public static final int SDLK_SELECT = 119;
public static final int SDLK_STOP = 120;
public static final int SDLK_AGAIN = 121;
public static final int SDLK_UNDO = 122;
public static final int SDLK_CUT = 123;
public static final int SDLK_COPY = 124;
public static final int SDLK_PASTE = 125;
public static final int SDLK_FIND = 126;
public static final int SDLK_MUTE = 127;
public static final int SDLK_VOLUMEUP = 128;
public static final int SDLK_VOLUMEDOWN = 129;
public static final int SDLK_KP_COMMA = 133;
public static final int SDLK_KP_EQUALSAS400 = 134;
public static final int SDLK_INTERNATIONAL1 = 135;
public static final int SDLK_INTERNATIONAL2 = 136;
public static final int SDLK_INTERNATIONAL3 = 137;
public static final int SDLK_INTERNATIONAL4 = 138;
public static final int SDLK_INTERNATIONAL5 = 139;
public static final int SDLK_INTERNATIONAL6 = 140;
public static final int SDLK_INTERNATIONAL7 = 141;
public static final int SDLK_INTERNATIONAL8 = 142;
public static final int SDLK_INTERNATIONAL9 = 143;
public static final int SDLK_LANG1 = 144;
public static final int SDLK_LANG2 = 145;
public static final int SDLK_LANG3 = 146;
public static final int SDLK_LANG4 = 147;
public static final int SDLK_LANG5 = 148;
public static final int SDLK_LANG6 = 149;
public static final int SDLK_LANG7 = 150;
public static final int SDLK_LANG8 = 151;
public static final int SDLK_LANG9 = 152;
public static final int SDLK_ALTERASE = 153;
public static final int SDLK_SYSREQ = 154;
public static final int SDLK_CANCEL = 155;
public static final int SDLK_CLEAR = 156;
public static final int SDLK_PRIOR = 157;
public static final int SDLK_RETURN2 = 158;
public static final int SDLK_SEPARATOR = 159;
public static final int SDLK_OUT = 160;
public static final int SDLK_OPER = 161;
public static final int SDLK_CLEARAGAIN = 162;
public static final int SDLK_CRSEL = 163;
public static final int SDLK_EXSEL = 164;
public static final int SDLK_KP_00 = 176;
public static final int SDLK_KP_000 = 177;
public static final int SDLK_THOUSANDSSEPARATOR = 178;
public static final int SDLK_DECIMALSEPARATOR = 179;
public static final int SDLK_CURRENCYUNIT = 180;
public static final int SDLK_CURRENCYSUBUNIT = 181;
public static final int SDLK_KP_LEFTPAREN = 182;
public static final int SDLK_KP_RIGHTPAREN = 183;
public static final int SDLK_KP_LEFTBRACE = 184;
public static final int SDLK_KP_RIGHTBRACE = 185;
public static final int SDLK_KP_TAB = 186;
public static final int SDLK_KP_BACKSPACE = 187;
public static final int SDLK_KP_A = 188;
public static final int SDLK_KP_B = 189;
public static final int SDLK_KP_C = 190;
public static final int SDLK_KP_D = 191;
public static final int SDLK_KP_E = 192;
public static final int SDLK_KP_F = 193;
public static final int SDLK_KP_XOR = 194;
public static final int SDLK_KP_POWER = 195;
public static final int SDLK_KP_PERCENT = 196;
public static final int SDLK_KP_LESS = 197;
public static final int SDLK_KP_GREATER = 198;
public static final int SDLK_KP_AMPERSAND = 199;
public static final int SDLK_KP_DBLAMPERSAND = 200;
public static final int SDLK_KP_VERTICALBAR = 201;
public static final int SDLK_KP_DBLVERTICALBAR = 202;
public static final int SDLK_KP_COLON = 203;
public static final int SDLK_KP_HASH = 204;
public static final int SDLK_KP_SPACE = 205;
public static final int SDLK_KP_AT = 206;
public static final int SDLK_KP_EXCLAM = 207;
public static final int SDLK_KP_MEMSTORE = 208;
public static final int SDLK_KP_MEMRECALL = 209;
public static final int SDLK_KP_MEMCLEAR = 210;
public static final int SDLK_KP_MEMADD = 211;
public static final int SDLK_KP_MEMSUBTRACT = 212;
public static final int SDLK_KP_MEMMULTIPLY = 213;
public static final int SDLK_KP_MEMDIVIDE = 214;
public static final int SDLK_KP_PLUSMINUS = 215;
public static final int SDLK_KP_CLEAR = 216;
public static final int SDLK_KP_CLEARENTRY = 217;
public static final int SDLK_KP_BINARY = 218;
public static final int SDLK_KP_OCTAL = 219;
public static final int SDLK_KP_DECIMAL = 220;
public static final int SDLK_KP_HEXADECIMAL = 221;
public static final int SDLK_LCTRL = 224;
public static final int SDLK_LSHIFT = 225;
public static final int SDLK_LALT = 226;
public static final int SDLK_LGUI = 227;
public static final int SDLK_RCTRL = 228;
public static final int SDLK_RSHIFT = 229;
public static final int SDLK_RALT = 230;
public static final int SDLK_RGUI = 231;
public static final int SDLK_MODE = 257;
public static final int SDLK_AUDIONEXT = 258;
public static final int SDLK_AUDIOPREV = 259;
public static final int SDLK_AUDIOSTOP = 260;
public static final int SDLK_AUDIOPLAY = 261;
public static final int SDLK_AUDIOMUTE = 262;
public static final int SDLK_MEDIASELECT = 263;
public static final int SDLK_WWW = 264;
public static final int SDLK_MAIL = 265;
public static final int SDLK_CALCULATOR = 266;
public static final int SDLK_COMPUTER = 267;
public static final int SDLK_AC_SEARCH = 268;
public static final int SDLK_AC_HOME = 269;
public static final int SDLK_AC_BACK = 270;
public static final int SDLK_AC_FORWARD = 271;
public static final int SDLK_AC_STOP = 272;
public static final int SDLK_AC_REFRESH = 273;
public static final int SDLK_AC_BOOKMARKS = 274;
public static final int SDLK_BRIGHTNESSDOWN = 275;
public static final int SDLK_BRIGHTNESSUP = 276;
public static final int SDLK_DISPLAYSWITCH = 277;
public static final int SDLK_KBDILLUMTOGGLE = 278;
public static final int SDLK_KBDILLUMDOWN = 279;
public static final int SDLK_KBDILLUMUP = 280;
public static final int SDLK_EJECT = 281;
public static final int SDLK_SLEEP = 282;
public static final int SDLK_NO_REMAP = 512;
}
class SDL_Keys
{
public static String [] names = null;
public static Integer [] values = null;
public static String [] namesSorted = null;
public static Integer [] namesSortedIdx = null;
public static Integer [] namesSortedBackIdx = null;
static final int JAVA_KEYCODE_LAST = 255; // Android 2.3 added several new gaming keys, Android 3.1 added even more - keep in sync with javakeycodes.h
static
{
ArrayList<String> Names = new ArrayList<String> ();
ArrayList<Integer> Values = new ArrayList<Integer> ();
Field [] fields = SDL_1_2_Keycodes.class.getDeclaredFields();
if( Globals.Using_SDL_1_3 )
{
fields = SDL_1_3_Keycodes.class.getDeclaredFields();
}
try {
for(Field f: fields)
{
Values.add(f.getInt(null));
Names.add(f.getName().substring(5).toUpperCase());
}
} catch(IllegalAccessException e) {};
// Sort by value
for( int i = 0; i < Values.size(); i++ )
{
for( int j = i; j < Values.size(); j++ )
{
if( Values.get(i) > Values.get(j) )
{
int x = Values.get(i);
Values.set(i, Values.get(j));
Values.set(j, x);
String s = Names.get(i);
Names.set(i, Names.get(j));
Names.set(j, s);
}
}
}
names = Names.toArray(new String[0]);
values = Values.toArray(new Integer[0]);
namesSorted = Names.toArray(new String[0]);
namesSortedIdx = new Integer[values.length];
namesSortedBackIdx = new Integer[values.length];
Arrays.sort(namesSorted);
for( int i = 0; i < namesSorted.length; i++ )
{
for( int j = 0; j < namesSorted.length; j++ )
{
if( namesSorted[i].equals( names[j] ) )
{
namesSortedIdx[i] = j;
namesSortedBackIdx[j] = i;
break;
}
}
}
}
}
| dennis-sheil/commandergenius | project/java/Keycodes.java | Java | lgpl-2.1 | 24,603 |
/*-------------------------------------------------------------------------
| RXTX License v 2.1 - LGPL v 2.1 + Linking Over Controlled Interface.
| RXTX is a native interface to serial ports in java.
| Copyright 1997-2007 by Trent Jarvi tjarvi@qbang.org and others who
| actually wrote it. See individual source files for more information.
|
| A copy of the LGPL v 2.1 may be found at
| http://www.gnu.org/licenses/lgpl.txt on March 4th 2007. A copy is
| here for your convenience.
|
| This library is free software; you can redistribute it and/or
| modify it under the terms of the GNU Lesser General Public
| License as published by the Free Software Foundation; either
| version 2.1 of the License, or (at your option) any later version.
|
| This library is distributed in the hope that it will be useful,
| but WITHOUT ANY WARRANTY; without even the implied warranty of
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
| Lesser General Public License for more details.
|
| An executable that contains no derivative of any portion of RXTX, but
| is designed to work with RXTX by being dynamically linked with it,
| is considered a "work that uses the Library" subject to the terms and
| conditions of the GNU Lesser General Public License.
|
| The following has been added to the RXTX License to remove
| any confusion about linking to RXTX. We want to allow in part what
| section 5, paragraph 2 of the LGPL does not permit in the special
| case of linking over a controlled interface. The intent is to add a
| Java Specification Request or standards body defined interface in the
| future as another exception but one is not currently available.
|
| http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface
|
| As a special exception, the copyright holders of RXTX give you
| permission to link RXTX with independent modules that communicate with
| RXTX solely through the Sun Microsytems CommAPI interface version 2,
| regardless of the license terms of these independent modules, and to copy
| and distribute the resulting combined work under terms of your choice,
| provided that every copy of the combined work is accompanied by a complete
| copy of the source code of RXTX (the version of RXTX used to produce the
| combined work), being distributed under the terms of the GNU Lesser General
| Public License plus this exception. An independent module is a
| module which is not derived from or based on RXTX.
|
| Note that people who make modified versions of RXTX are not obligated
| to grant this special exception for their modified versions; it is
| their choice whether to do so. The GNU Lesser General Public License
| gives permission to release a modified version without this exception; this
| exception also makes it possible to release a modified version which
| carries forward this exception.
|
| You should have received a copy of the GNU Lesser General Public
| License along with this library; if not, write to the Free
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
| All trademarks belong to their respective owners.
--------------------------------------------------------------------------*/
package gnu.io;
import java.io.*;
import java.util.*;
import java.lang.Math;
/**
* @author Trent Jarvi
* @version %I%, %G%
* @since JDK1.0
*/
final class RS485 extends RS485Port {
static
{
//System.loadLibrary( "rxtxRS485" );
Initialize();
}
/** Initialize the native library */
private native static void Initialize();
/** Actual RS485Port wrapper class */
/** Open the named port */
public RS485( String name ) throws PortInUseException {
fd = open( name );
}
private native int open( String name ) throws PortInUseException;
/** File descriptor */
private int fd;
/** DSR flag **/
static boolean dsrFlag = false;
/** Output stream */
private final RS485OutputStream out = new RS485OutputStream();
public OutputStream getOutputStream() { return out; }
/** Input stream */
private final RS485InputStream in = new RS485InputStream();
public InputStream getInputStream() { return in; }
/** Set the RS485Port parameters */
public void setRS485PortParams( int b, int d, int s, int p )
throws UnsupportedCommOperationException
{
nativeSetRS485PortParams( b, d, s, p );
speed = b;
dataBits = d;
stopBits = s;
parity = p;
}
/** Set the native RS485 port parameters */
private native void nativeSetRS485PortParams( int speed, int dataBits,
int stopBits, int parity ) throws UnsupportedCommOperationException;
/** Line speed in bits-per-second */
private int speed=9600;
public int getBaudRate() { return speed; }
/** Data bits port parameter */
private int dataBits=DATABITS_8;
public int getDataBits() { return dataBits; }
/** Stop bits port parameter */
private int stopBits=RS485Port.STOPBITS_1;
public int getStopBits() { return stopBits; }
/** Parity port parameter */
private int parity= RS485Port.PARITY_NONE;
public int getParity() { return parity; }
/** Flow control */
private int flowmode = RS485Port.FLOWCONTROL_NONE;
public void setFlowControlMode( int flowcontrol ) {
try { setflowcontrol( flowcontrol ); }
catch( IOException e ) {
e.printStackTrace();
return;
}
flowmode=flowcontrol;
}
public int getFlowControlMode() { return flowmode; }
native void setflowcontrol( int flowcontrol ) throws IOException;
/*
linux/drivers/char/n_hdlc.c? FIXME
taj@www.linux.org.uk
*/
/** Receive framing control
*/
public void enableReceiveFraming( int f )
throws UnsupportedCommOperationException
{
throw new UnsupportedCommOperationException( "Not supported" );
}
public void disableReceiveFraming() {}
public boolean isReceiveFramingEnabled() { return false; }
public int getReceiveFramingByte() { return 0; }
/** Receive timeout control */
private int timeout = 0;
public native int NativegetReceiveTimeout();
public native boolean NativeisReceiveTimeoutEnabled();
public native void NativeEnableReceiveTimeoutThreshold(int time, int threshold,int InputBuffer);
public void disableReceiveTimeout(){
enableReceiveTimeout(0);
}
public void enableReceiveTimeout( int time ){
if( time >= 0 ) {
timeout = time;
NativeEnableReceiveTimeoutThreshold( time , threshold, InputBuffer );
}
else {
System.out.println("Invalid timeout");
}
}
public boolean isReceiveTimeoutEnabled(){
return(NativeisReceiveTimeoutEnabled());
}
public int getReceiveTimeout(){
return(NativegetReceiveTimeout( ));
}
/** Receive threshold control */
private int threshold = 0;
public void enableReceiveThreshold( int thresh ){
if(thresh >=0)
{
threshold=thresh;
NativeEnableReceiveTimeoutThreshold(timeout, threshold, InputBuffer);
}
else /* invalid thresh */
{
System.out.println("Invalid Threshold");
}
}
public void disableReceiveThreshold() {
enableReceiveThreshold(0);
}
public int getReceiveThreshold(){
return threshold;
}
public boolean isReceiveThresholdEnabled(){
return(threshold>0);
}
/** Input/output buffers */
/** FIXME I think this refers to
FOPEN(3)/SETBUF(3)/FREAD(3)/FCLOSE(3)
taj@www.linux.org.uk
These are native stubs...
*/
private int InputBuffer=0;
private int OutputBuffer=0;
public void setInputBufferSize( int size )
{
InputBuffer=size;
}
public int getInputBufferSize()
{
return(InputBuffer);
}
public void setOutputBufferSize( int size )
{
OutputBuffer=size;
}
public int getOutputBufferSize()
{
return(OutputBuffer);
}
/** Line status methods */
public native boolean isDTR();
public native void setDTR( boolean state );
public native void setRTS( boolean state );
private native void setDSR( boolean state );
public native boolean isCTS();
public native boolean isDSR();
public native boolean isCD();
public native boolean isRI();
public native boolean isRTS();
/** Write to the port */
public native void sendBreak( int duration );
private native void writeByte( int b ) throws IOException;
private native void writeArray( byte b[], int off, int len )
throws IOException;
private native void drain() throws IOException;
/** RS485 read methods */
private native int nativeavailable() throws IOException;
private native int readByte() throws IOException;
private native int readArray( byte b[], int off, int len )
throws IOException;
/** RS485 Port Event listener */
private RS485PortEventListener SPEventListener;
/** Thread to monitor data */
private MonitorThread monThread;
/** Process RS485PortEvents */
native void eventLoop();
private int dataAvailable=0;
public void sendEvent( int event, boolean state ) {
switch( event ) {
case RS485PortEvent.DATA_AVAILABLE:
dataAvailable=1;
if( monThread.Data ) break;
return;
case RS485PortEvent.OUTPUT_BUFFER_EMPTY:
if( monThread.Output ) break;
return;
/*
if( monThread.DSR ) break;
return;
if (isDSR())
{
if (!dsrFlag)
{
dsrFlag = true;
RS485PortEvent e = new RS485PortEvent(this, RS485PortEvent.DSR, !dsrFlag, dsrFlag );
}
}
else if (dsrFlag)
{
dsrFlag = false;
RS485PortEvent e = new RS485PortEvent(this, RS485PortEvent.DSR, !dsrFlag, dsrFlag );
}
*/
case RS485PortEvent.CTS:
if( monThread.CTS ) break;
return;
case RS485PortEvent.DSR:
if( monThread.DSR ) break;
return;
case RS485PortEvent.RI:
if( monThread.RI ) break;
return;
case RS485PortEvent.CD:
if( monThread.CD ) break;
return;
case RS485PortEvent.OE:
if( monThread.OE ) break;
return;
case RS485PortEvent.PE:
if( monThread.PE ) break;
return;
case RS485PortEvent.FE:
if( monThread.FE ) break;
return;
case RS485PortEvent.BI:
if( monThread.BI ) break;
return;
default:
System.err.println("unknown event:"+event);
return;
}
RS485PortEvent e = new RS485PortEvent(this, event, !state, state );
if( SPEventListener != null ) SPEventListener.RS485Event( e );
}
/** Add an event listener */
public void addEventListener( RS485PortEventListener lsnr )
throws TooManyListenersException
{
if( SPEventListener != null ) throw new TooManyListenersException();
SPEventListener = lsnr;
monThread = new MonitorThread();
monThread.start();
}
/** Remove the RS485 port event listener */
public void removeEventListener() {
SPEventListener = null;
if( monThread != null ) {
monThread.interrupt();
monThread = null;
}
}
public void notifyOnDataAvailable( boolean enable ) { monThread.Data = enable; }
public void notifyOnOutputEmpty( boolean enable ) { monThread.Output = enable; }
public void notifyOnCTS( boolean enable ) { monThread.CTS = enable; }
public void notifyOnDSR( boolean enable ) { monThread.DSR = enable; }
public void notifyOnRingIndicator( boolean enable ) { monThread.RI = enable; }
public void notifyOnCarrierDetect( boolean enable ) { monThread.CD = enable; }
public void notifyOnOverrunError( boolean enable ) { monThread.OE = enable; }
public void notifyOnParityError( boolean enable ) { monThread.PE = enable; }
public void notifyOnFramingError( boolean enable ) { monThread.FE = enable; }
public void notifyOnBreakInterrupt( boolean enable ) { monThread.BI = enable; }
/** Close the port */
private native void nativeClose();
public void close() {
setDTR(false);
setDSR(false);
nativeClose();
super.close();
fd = 0;
}
/** Finalize the port */
protected void finalize() {
if( fd > 0 ) close();
}
/** Inner class for RS485OutputStream */
class RS485OutputStream extends OutputStream {
public void write( int b ) throws IOException {
writeByte( b );
}
public void write( byte b[] ) throws IOException {
writeArray( b, 0, b.length );
}
public void write( byte b[], int off, int len ) throws IOException {
writeArray( b, off, len );
}
public void flush() throws IOException {
drain();
}
}
/** Inner class for RS485InputStream */
class RS485InputStream extends InputStream {
public int read() throws IOException {
dataAvailable=0;
return readByte();
}
public int read( byte b[] ) throws IOException
{
return read ( b, 0, b.length);
}
public int read( byte b[], int off, int len ) throws IOException
{
dataAvailable=0;
int i=0, Minimum=0;
int intArray[] =
{
b.length,
InputBuffer,
len
};
/*
find the lowest nonzero value
timeout and threshold are handled on the native side
see NativeEnableReceiveTimeoutThreshold in
RS485Imp.c
*/
while(intArray[i]==0 && i < intArray.length) i++;
Minimum=intArray[i];
while( i < intArray.length )
{
if(intArray[i] > 0 )
{
Minimum=Math.min(Minimum,intArray[i]);
}
i++;
}
Minimum=Math.min(Minimum,threshold);
if(Minimum == 0) Minimum=1;
int Available=available();
int Ret = readArray( b, off, Minimum);
return Ret;
}
public int available() throws IOException {
return nativeavailable();
}
}
class MonitorThread extends Thread {
/** Note: these have to be separate boolean flags because the
RS485PortEvent constants are NOT bit-flags, they are just
defined as integers from 1 to 10 -DPL */
private boolean CTS=false;
private boolean DSR=false;
private boolean RI=false;
private boolean CD=false;
private boolean OE=false;
private boolean PE=false;
private boolean FE=false;
private boolean BI=false;
private boolean Data=false;
private boolean Output=false;
MonitorThread() { }
public void run() {
eventLoop();
}
}
}
| timmattison/rxtx | src/gnu/io/RS485.java | Java | lgpl-2.1 | 13,919 |
/*
* cron4j - A pure Java cron-like scheduler
*
* Copyright (C) 2007-2010 Carlo Pelliccia (www.sauronsoftware.it)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version
* 2.1, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License 2.1 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License version 2.1 along with this program.
* If not, see <http://www.gnu.org/licenses/>.
*/
package example;
import it.sauronsoftware.cron4j.Scheduler;
import it.sauronsoftware.cron4j.TaskExecutor;
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* This servlet enables the user to view and control any ongoing task execution.
* The HTML layout is generated calling the /WEB-INF/ongoing.jsp page.
*/
public class ExecutionServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
// Retrieves the servlet context.
ServletContext context = getServletContext();
// Retrieves the scheduler.
Scheduler scheduler = (Scheduler) context
.getAttribute(Constants.SCHEDULER);
// Retrieves the executors.
TaskExecutor[] executors = scheduler.getExecutingTasks();
// Registers the executors in the request.
req.setAttribute("executors", executors);
// Action requested?
String action = req.getParameter("action");
if ("pause".equals(action)) {
String id = req.getParameter("id");
TaskExecutor executor = find(executors, id);
if (executor != null && executor.isAlive() && !executor.isStopped()
&& executor.canBePaused() && !executor.isPaused()) {
executor.pause();
}
} else if ("resume".equals(action)) {
String id = req.getParameter("id");
TaskExecutor executor = find(executors, id);
if (executor != null && executor.isAlive() && !executor.isStopped()
&& executor.canBePaused() && executor.isPaused()) {
executor.resume();
}
} else if ("stop".equals(action)) {
String id = req.getParameter("id");
TaskExecutor executor = find(executors, id);
if (executor != null && executor.isAlive()
&& executor.canBeStopped() && !executor.isStopped()) {
executor.stop();
}
}
// Layout.
String page = "/WEB-INF/ongoing.jsp";
RequestDispatcher dispatcher = req.getRequestDispatcher(page);
dispatcher.include(req, resp);
}
private TaskExecutor find(TaskExecutor[] executors, String id) {
if (id == null) {
return null;
}
for (int i = 0; i < executors.length; i++) {
String aux = executors[i].getGuid();
if (aux.equals(id)) {
return executors[i];
}
}
return null;
}
}
| lazizgueye/TAGL | cron4j-original/examples/6-web-app-integration/src/example/ExecutionServlet.java | Java | lgpl-2.1 | 3,206 |
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="da_DK">
<context>
<name>ShowDesktop</name>
<message>
<location filename="../showdesktop.cpp" line="48"/>
<source>Show desktop</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../showdesktop.cpp" line="58"/>
<source>Show Desktop: Global shortcut '%1' cannot be registered</source>
<translation>Vis Skrivebord: Global genvej '%1' kan ikke registreres</translation>
</message>
<message>
<location filename="../showdesktop.cpp" line="63"/>
<source>Show Desktop</source>
<translation>Vis Skrivebord</translation>
</message>
</context>
</TS>
| npmiller/lxqt-panel | plugin-showdesktop/translations/showdesktop_da_DK.ts | TypeScript | lgpl-2.1 | 784 |
package org.reprap.comms;
import java.io.IOException;
import org.reprap.Device;
import org.reprap.ReprapException;
/**
*
*/
public abstract class IncomingMessage {
/**
* The actual content portion of a packet, not the frilly bits
*/
private byte [] payload;
/**
*
*/
IncomingContext incomingContext;
/**
*
*/
public class InvalidPayloadException extends ReprapException {
private static final long serialVersionUID = -5403970405132990115L;
public InvalidPayloadException() {
super();
}
public InvalidPayloadException(String arg) {
super(arg);
}
}
/**
* Receive a message matching context criteria
* @param incomingContext the context in which to receive messages
* @throws IOException
*/
public IncomingMessage(IncomingContext incomingContext) throws IOException {
this.incomingContext = incomingContext;
Communicator comm = incomingContext.getCommunicator();
comm.receiveMessage(this);
}
/**
* Send a given message and return the incoming response. Re-try
* if there is a comms problem.
* @param message
* @throws IOException
*/
public IncomingMessage(Device device, OutgoingMessage message, long timeout) throws IOException {
Communicator comm = device.getCommunicator();
for(int i=0;i<3;i++) { // Allow 3 retries.
//System.out.println("Retry: " + i);
incomingContext = comm.sendMessage(device, message);
try {
comm.receiveMessage(this, timeout);
} catch (IOException e) {
e.printStackTrace();
System.err.println("IO error/timeout, resending");
// Just to prevent any unexpected spinning
try {
Thread.sleep(1);
} catch (InterruptedException e1) {
e1.printStackTrace();
}
continue;
}
return;
}
// If it's not going to respond, try to continue regardless.
System.err.println("Resend limit exceeded. Failing without reported error.");
}
/**
* Implemented by subclasses to allow them to indicate if they
* understand or expect a given packetType. This is used to
* decide if a received packet should be accepted or possibly discarded.
* @param packetType the type of packet to receive
* @return true if the packetType matches what is expected
*/
protected abstract boolean isExpectedPacketType(byte packetType);
/**
* @return payload
*/
public byte[] getPayload() {
return payload;
}
/**
* Called by the framework to provide data to the IncomingMessage.
* This should not normally be called by a user.
* @param payload The completed message to insert into the IncomingMessage
* @return true is the data was accepted, otherwise false.
*/
public boolean receiveData(byte [] payload) {
// We assume the packet was for us, etc. But we need to
// know it contains the correct contents
if (payload == null || payload.length == 0)
return false;
if (isExpectedPacketType(payload[0])) {
this.payload = (byte[])payload.clone();
return true;
} else {
// That's not what we were after, so discard and wait for more
return false;
}
}
}
| alx/reprap-host-software | src/org/reprap/comms/IncomingMessage.java | Java | lgpl-2.1 | 3,047 |
package com.puppycrawl.tools.checkstyle.coding;
public class InputEqualsAvoidNull {
public boolean equals(Object o) {
return false;
}
/**
* methods that should get flagged
* @return
*/
public void flagForEquals() {
Object o = new Object();
String s = "pizza";
o.equals("hot pizza");
o.equals(s = "cold pizza");
o.equals(((s = "cold pizza")));
o.equals("cheese" + "ham" + "sauce");
o.equals(("cheese" + "ham") + "sauce");
o.equals((("cheese" + "ham")) + "sauce");
}
/**
* methods that should get flagged
*/
public void flagForEqualsIgnoreCase() {
String s = "pizza";
s.equalsIgnoreCase("hot pizza");
s.equalsIgnoreCase(s = "cold pizza");
s.equalsIgnoreCase(((s = "cold pizza")));
s.equalsIgnoreCase("cheese" + "ham" + "sauce");
s.equalsIgnoreCase(("cheese" + "ham") + "sauce");
s.equalsIgnoreCase((("cheese" + "ham")) + "sauce");
}
/**
* methods that should get flagged
*/
public void flagForBoth() {
Object o = new Object();
String s = "pizza";
o.equals("hot pizza");
o.equals(s = "cold pizza");
o.equals(((s = "cold pizza")));
o.equals("cheese" + "ham" + "sauce");
o.equals(("cheese" + "ham") + "sauce");
o.equals((("cheese" + "ham")) + "sauce");
s.equalsIgnoreCase("hot pizza");
s.equalsIgnoreCase(s = "cold pizza");
s.equalsIgnoreCase(((s = "cold pizza")));
s.equalsIgnoreCase("cheese" + "ham" + "sauce");
s.equalsIgnoreCase(("cheese" + "ham") + "sauce");
s.equalsIgnoreCase((("cheese" + "ham")) + "sauce");
}
/**
* methods that should not get flagged
*
* @return
*/
public void noFlagForEquals() {
Object o = new Object();
String s = "peperoni";
o.equals(s += "mushrooms");
(s = "thin crust").equals("thick crust");
(s += "garlic").equals("basil");
("Chicago Style" + "NY Style").equals("California Style" + "Any Style");
equals("peppers");
"onions".equals(o);
o.equals(new Object());
o.equals(equals(o));
equals("yummy");
new Object().equals("more cheese");
InputEqualsAvoidNullOutter outter = new InputEqualsAvoidNullOutter();
outter.new InputEqualsAvoidNullInner().equals("eat pizza and enjoy inner classes");
}
/**
* methods that should not get flagged
*/
public void noFlagForEqualsIgnoreCase() {
String s = "peperoni";
String s1 = "tasty";
s.equalsIgnoreCase(s += "mushrooms");
s1.equalsIgnoreCase(s += "mushrooms");
(s = "thin crust").equalsIgnoreCase("thick crust");
(s += "garlic").equalsIgnoreCase("basil");
("Chicago Style" + "NY Style").equalsIgnoreCase("California Style" + "Any Style");
"onions".equalsIgnoreCase(s);
s.equalsIgnoreCase(new String());
s.equals(s1);
new String().equalsIgnoreCase("more cheese");
}
public void noFlagForBoth() {
Object o = new Object();
String s = "peperoni";
String s1 = "tasty";
o.equals(s += "mushrooms");
(s = "thin crust").equals("thick crust");
(s += "garlic").equals("basil");
("Chicago Style" + "NY Style").equals("California Style" + "Any Style");
equals("peppers");
"onions".equals(o);
o.equals(new Object());
o.equals(equals(o));
equals("yummy");
new Object().equals("more cheese");
InputEqualsAvoidNullOutter outter = new InputEqualsAvoidNullOutter();
outter.new InputEqualsAvoidNullInner().equals("eat pizza and enjoy inner classes");
s.equalsIgnoreCase(s += "mushrooms");
s1.equalsIgnoreCase(s += "mushrooms");
(s = "thin crust").equalsIgnoreCase("thick crust");
(s += "garlic").equalsIgnoreCase("basil");
("Chicago Style" + "NY Style").equalsIgnoreCase("California Style" + "Any Style");
"onions".equalsIgnoreCase(s);
s.equalsIgnoreCase(new String());
s.equals(s1);
new String().equalsIgnoreCase("more cheese");
}
}
class InputEqualsAvoidNullOutter {
public class InputEqualsAvoidNullInner {
public boolean equals(Object o) {
return true;
}
}
}
| maikelsteneker/checkstyle-throwsIndent | src/testinputs/com/puppycrawl/tools/checkstyle/coding/InputEqualsAvoidNull.java | Java | lgpl-2.1 | 4,676 |
#include "derivations.hh"
#include "store-api.hh"
#include "globals.hh"
#include "util.hh"
#include "worker-protocol.hh"
#include "fs-accessor.hh"
#include "istringstream_nocopy.hh"
namespace nix {
void DerivationOutput::parseHashInfo(bool & recursive, Hash & hash) const
{
recursive = false;
string algo = hashAlgo;
if (string(algo, 0, 2) == "r:") {
recursive = true;
algo = string(algo, 2);
}
HashType hashType = parseHashType(algo);
if (hashType == htUnknown)
throw Error(format("unknown hash algorithm ‘%1%’") % algo);
hash = parseHash(hashType, this->hash);
}
Path BasicDerivation::findOutput(const string & id) const
{
auto i = outputs.find(id);
if (i == outputs.end())
throw Error(format("derivation has no output ‘%1%’") % id);
return i->second.path;
}
bool BasicDerivation::willBuildLocally() const
{
return get(env, "preferLocalBuild") == "1" && canBuildLocally();
}
bool BasicDerivation::substitutesAllowed() const
{
return get(env, "allowSubstitutes", "1") == "1";
}
bool BasicDerivation::isBuiltin() const
{
return string(builder, 0, 8) == "builtin:";
}
bool BasicDerivation::canBuildLocally() const
{
return platform == settings.thisSystem
|| isBuiltin()
#if __linux__
|| (platform == "i686-linux" && settings.thisSystem == "x86_64-linux")
|| (platform == "armv6l-linux" && settings.thisSystem == "armv7l-linux")
|| (platform == "armv5tel-linux" && (settings.thisSystem == "armv7l-linux" || settings.thisSystem == "armv6l-linux"))
#elif __FreeBSD__
|| (platform == "i686-linux" && settings.thisSystem == "x86_64-freebsd")
|| (platform == "i686-linux" && settings.thisSystem == "i686-freebsd")
#endif
;
}
Path writeDerivation(ref<Store> store,
const Derivation & drv, const string & name, bool repair)
{
PathSet references;
references.insert(drv.inputSrcs.begin(), drv.inputSrcs.end());
for (auto & i : drv.inputDrvs)
references.insert(i.first);
/* Note that the outputs of a derivation are *not* references
(that can be missing (of course) and should not necessarily be
held during a garbage collection). */
string suffix = name + drvExtension;
string contents = drv.unparse();
return settings.readOnlyMode
? store->computeStorePathForText(suffix, contents, references)
: store->addTextToStore(suffix, contents, references, repair);
}
/* Read string `s' from stream `str'. */
static void expect(std::istream & str, const string & s)
{
char s2[s.size()];
str.read(s2, s.size());
if (string(s2, s.size()) != s)
throw FormatError(format("expected string ‘%1%’") % s);
}
/* Read a C-style string from stream `str'. */
static string parseString(std::istream & str)
{
string res;
expect(str, "\"");
int c;
while ((c = str.get()) != '"')
if (c == '\\') {
c = str.get();
if (c == 'n') res += '\n';
else if (c == 'r') res += '\r';
else if (c == 't') res += '\t';
else res += c;
}
else res += c;
return res;
}
static Path parsePath(std::istream & str)
{
string s = parseString(str);
if (s.size() == 0 || s[0] != '/')
throw FormatError(format("bad path ‘%1%’ in derivation") % s);
return s;
}
static bool endOfList(std::istream & str)
{
if (str.peek() == ',') {
str.get();
return false;
}
if (str.peek() == ']') {
str.get();
return true;
}
return false;
}
static StringSet parseStrings(std::istream & str, bool arePaths)
{
StringSet res;
while (!endOfList(str))
res.insert(arePaths ? parsePath(str) : parseString(str));
return res;
}
static Derivation parseDerivation(const string & s)
{
Derivation drv;
istringstream_nocopy str(s);
expect(str, "Derive([");
/* Parse the list of outputs. */
while (!endOfList(str)) {
DerivationOutput out;
expect(str, "("); string id = parseString(str);
expect(str, ","); out.path = parsePath(str);
expect(str, ","); out.hashAlgo = parseString(str);
expect(str, ","); out.hash = parseString(str);
expect(str, ")");
drv.outputs[id] = out;
}
/* Parse the list of input derivations. */
expect(str, ",[");
while (!endOfList(str)) {
expect(str, "(");
Path drvPath = parsePath(str);
expect(str, ",[");
drv.inputDrvs[drvPath] = parseStrings(str, false);
expect(str, ")");
}
expect(str, ",["); drv.inputSrcs = parseStrings(str, true);
expect(str, ","); drv.platform = parseString(str);
expect(str, ","); drv.builder = parseString(str);
/* Parse the builder arguments. */
expect(str, ",[");
while (!endOfList(str))
drv.args.push_back(parseString(str));
/* Parse the environment variables. */
expect(str, ",[");
while (!endOfList(str)) {
expect(str, "("); string name = parseString(str);
expect(str, ","); string value = parseString(str);
expect(str, ")");
drv.env[name] = value;
}
expect(str, ")");
return drv;
}
Derivation readDerivation(const Path & drvPath)
{
try {
return parseDerivation(readFile(drvPath));
} catch (FormatError & e) {
throw Error(format("error parsing derivation ‘%1%’: %2%") % drvPath % e.msg());
}
}
Derivation Store::derivationFromPath(const Path & drvPath)
{
assertStorePath(drvPath);
ensurePath(drvPath);
auto accessor = getFSAccessor();
try {
return parseDerivation(accessor->readFile(drvPath));
} catch (FormatError & e) {
throw Error(format("error parsing derivation ‘%1%’: %2%") % drvPath % e.msg());
}
}
static void printString(string & res, const string & s)
{
res += '"';
for (const char * i = s.c_str(); *i; i++)
if (*i == '\"' || *i == '\\') { res += "\\"; res += *i; }
else if (*i == '\n') res += "\\n";
else if (*i == '\r') res += "\\r";
else if (*i == '\t') res += "\\t";
else res += *i;
res += '"';
}
template<class ForwardIterator>
static void printStrings(string & res, ForwardIterator i, ForwardIterator j)
{
res += '[';
bool first = true;
for ( ; i != j; ++i) {
if (first) first = false; else res += ',';
printString(res, *i);
}
res += ']';
}
string Derivation::unparse() const
{
string s;
s.reserve(65536);
s += "Derive([";
bool first = true;
for (auto & i : outputs) {
if (first) first = false; else s += ',';
s += '('; printString(s, i.first);
s += ','; printString(s, i.second.path);
s += ','; printString(s, i.second.hashAlgo);
s += ','; printString(s, i.second.hash);
s += ')';
}
s += "],[";
first = true;
for (auto & i : inputDrvs) {
if (first) first = false; else s += ',';
s += '('; printString(s, i.first);
s += ','; printStrings(s, i.second.begin(), i.second.end());
s += ')';
}
s += "],";
printStrings(s, inputSrcs.begin(), inputSrcs.end());
s += ','; printString(s, platform);
s += ','; printString(s, builder);
s += ','; printStrings(s, args.begin(), args.end());
s += ",[";
first = true;
for (auto & i : env) {
if (first) first = false; else s += ',';
s += '('; printString(s, i.first);
s += ','; printString(s, i.second);
s += ')';
}
s += "])";
return s;
}
bool isDerivation(const string & fileName)
{
return hasSuffix(fileName, drvExtension);
}
bool BasicDerivation::isFixedOutput() const
{
return outputs.size() == 1 &&
outputs.begin()->first == "out" &&
outputs.begin()->second.hash != "";
}
DrvHashes drvHashes;
/* Returns the hash of a derivation modulo fixed-output
subderivations. A fixed-output derivation is a derivation with one
output (`out') for which an expected hash and hash algorithm are
specified (using the `outputHash' and `outputHashAlgo'
attributes). We don't want changes to such derivations to
propagate upwards through the dependency graph, changing output
paths everywhere.
For instance, if we change the url in a call to the `fetchurl'
function, we do not want to rebuild everything depending on it
(after all, (the hash of) the file being downloaded is unchanged).
So the *output paths* should not change. On the other hand, the
*derivation paths* should change to reflect the new dependency
graph.
That's what this function does: it returns a hash which is just the
hash of the derivation ATerm, except that any input derivation
paths have been replaced by the result of a recursive call to this
function, and that for fixed-output derivations we return a hash of
its output path. */
Hash hashDerivationModulo(Store & store, Derivation drv)
{
/* Return a fixed hash for fixed-output derivations. */
if (drv.isFixedOutput()) {
DerivationOutputs::const_iterator i = drv.outputs.begin();
return hashString(htSHA256, "fixed:out:"
+ i->second.hashAlgo + ":"
+ i->second.hash + ":"
+ i->second.path);
}
/* For other derivations, replace the inputs paths with recursive
calls to this function.*/
DerivationInputs inputs2;
for (auto & i : drv.inputDrvs) {
Hash h = drvHashes[i.first];
if (!h) {
assert(store.isValidPath(i.first));
Derivation drv2 = readDerivation(i.first);
h = hashDerivationModulo(store, drv2);
drvHashes[i.first] = h;
}
inputs2[printHash(h)] = i.second;
}
drv.inputDrvs = inputs2;
return hashString(htSHA256, drv.unparse());
}
DrvPathWithOutputs parseDrvPathWithOutputs(const string & s)
{
size_t n = s.find("!");
return n == s.npos
? DrvPathWithOutputs(s, std::set<string>())
: DrvPathWithOutputs(string(s, 0, n), tokenizeString<std::set<string> >(string(s, n + 1), ","));
}
Path makeDrvPathWithOutputs(const Path & drvPath, const std::set<string> & outputs)
{
return outputs.empty()
? drvPath
: drvPath + "!" + concatStringsSep(",", outputs);
}
bool wantOutput(const string & output, const std::set<string> & wanted)
{
return wanted.empty() || wanted.find(output) != wanted.end();
}
PathSet BasicDerivation::outputPaths() const
{
PathSet paths;
for (auto & i : outputs)
paths.insert(i.second.path);
return paths;
}
Source & readDerivation(Source & in, Store & store, BasicDerivation & drv)
{
drv.outputs.clear();
auto nr = readNum<size_t>(in);
for (size_t n = 0; n < nr; n++) {
auto name = readString(in);
DerivationOutput o;
in >> o.path >> o.hashAlgo >> o.hash;
store.assertStorePath(o.path);
drv.outputs[name] = o;
}
drv.inputSrcs = readStorePaths<PathSet>(store, in);
in >> drv.platform >> drv.builder;
drv.args = readStrings<Strings>(in);
nr = readNum<size_t>(in);
for (size_t n = 0; n < nr; n++) {
auto key = readString(in);
auto value = readString(in);
drv.env[key] = value;
}
return in;
}
Sink & operator << (Sink & out, const BasicDerivation & drv)
{
out << drv.outputs.size();
for (auto & i : drv.outputs)
out << i.first << i.second.path << i.second.hashAlgo << i.second.hash;
out << drv.inputSrcs << drv.platform << drv.builder << drv.args;
out << drv.env.size();
for (auto & i : drv.env)
out << i.first << i.second;
return out;
}
std::string hashPlaceholder(const std::string & outputName)
{
// FIXME: memoize?
return "/" + printHash32(hashString(htSHA256, "nix-output:" + outputName));
}
}
| bennofs/nix | src/libstore/derivations.cc | C++ | lgpl-2.1 | 11,922 |
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial Usage
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qwindowsmobilestyle.h"
#include "qwindowsmobilestyle_p.h"
#if !defined(QT_NO_STYLE_WINDOWSMOBILE) || defined(QT_PLUGIN)
#include "qpainterpath.h"
#include "qapplication.h"
#include "qdesktopwidget.h"
#include "qwidget.h"
#include "qdockwidget.h"
#include "qframe.h"
#include "qmenu.h"
#include "qpaintengine.h"
#include "qpainter.h"
#include "qgroupbox.h"
#include "qstyleoption.h"
#include "qlistview.h"
#include "qdrawutil.h"
#include "qtoolbar.h"
#include "qabstractscrollarea.h"
#include "qabstractbutton.h"
#include "qcombobox.h"
#include "qabstractscrollarea.h"
#include "qframe.h"
#include "qscrollbar.h"
#include "qabstractitemview.h"
#include "qmenubar.h"
#include "qtoolbutton.h"
#include "qtextedit.h"
#include "qdialog.h"
#include "qdebug.h"
#include "qtabwidget.h"
#ifdef Q_WS_WINCE
#include "qt_windows.h"
#include "qguifunctions_wince.h"
extern bool qt_wince_is_high_dpi(); //defined in qguifunctions_wince.cpp
extern bool qt_wince_is_smartphone(); //defined in qguifunctions_wince.cpp
extern bool qt_wince_is_windows_mobile_65(); //defined in qguifunctions_wince.cpp
#endif // Q_WS_WINCE
#include "qstylehelper_p.h"
QT_BEGIN_NAMESPACE
static const int windowsItemFrame = 1; // menu item frame width
static const int windowsMobileitemViewCheckBoxSize = 13;
static const int windowsMobileFrameGroupBoxOffset = 9;
static const int windowsMobileIndicatorSize = 14;
static const int windowsMobileExclusiveIndicatorSize = 14;
static const int windowsMobileSliderThickness = 6;
static const int windowsMobileIconSize = 16;
static const int PE_IndicatorArrowUpBig = 0xf000101;
static const int PE_IndicatorArrowDownBig = 0xf000102;
static const int PE_IndicatorArrowLeftBig = 0xf000103;
static const int PE_IndicatorArrowRightBig = 0xf000104;
/* XPM */
static const char *const radiobutton_xpm[] = {
"30 30 2 1",
" c None",
". c #000000",
" ........ ",
" .............. ",
" .... .... ",
" .... .... ",
" ... ... ",
" ... ... ",
" .. .. ",
" .. .. ",
" ... ... ",
" .. .. ",
" .. .. ",
".. ..",
".. ..",
".. ..",
".. ..",
".. ..",
".. ..",
".. ..",
".. ..",
" .. .. ",
" .. .. ",
" ... ... ",
" .. .. ",
" .. .. ",
" ... ... ",
" ... ... ",
" .... .... ",
" .... .... ",
" .............. ",
" ........ "};
/* XPM */
static const char * const radiobutton_low_xpm[] = {
"15 15 2 1",
" c None",
". c #000000",
" ..... ",
" .. .. ",
" . . ",
" . . ",
" . . ",
". .",
". .",
". .",
". .",
". .",
" . . ",
" . . ",
" . . ",
" .. .. ",
" ..... "};
/* XPM */
static const char * const arrowleft_big_xpm[] = {
"9 17 2 1",
" c None",
". c #000000",
" .",
" ..",
" ...",
" ....",
" .....",
" ......",
" .......",
" ........",
".........",
" ........",
" .......",
" ......",
" .....",
" ....",
" ...",
" ..",
" ."};
/* XPM */
static const char * const arrowleft_xpm[] = {
"8 15 2 1",
" c None",
". c #000000",
" .",
" ..",
" ...",
" ....",
" .....",
" ......",
" .......",
"........",
" .......",
" ......",
" .....",
" ....",
" ...",
" ..",
" ."};
/* XPM */
static const char *const horlines_xpm[] = {
"2 2 2 1",
" c None",
". c #000000",
" ",
".."};
/* XPM */
static const char *const vertlines_xpm[] = {
"2 2 2 1",
" c None",
". c #000000",
". ",
". "};
/* XPM */
static const char *const radiochecked_xpm[] = {
"18 18 2 1",
" c None",
". c #000000",
" ...... ",
" .......... ",
" .............. ",
" .............. ",
" ................ ",
" ................ ",
"..................",
"..................",
"..................",
"..................",
"..................",
"..................",
" ................ ",
" ................ ",
" .............. ",
" .............. ",
" .......... ",
" ...... "};
/* XPM */
static const char * const radiochecked_low_xpm[] = {
"9 9 2 1",
" c None",
". c #000000",
" ... ",
" ....... ",
" ....... ",
".........",
".........",
".........",
" ....... ",
" ....... ",
" ... "};
static const char *const arrowdown_xpm[] = {
"15 8 2 1",
" c None",
". c #000000",
"...............",
" ............. ",
" ........... ",
" ......... ",
" ....... ",
" ..... ",
" ... ",
" . "};
static const char *const arrowdown_big_xpm[] = {
"17 9 2 1",
" c None",
". c #000000",
".................",
" ............... ",
" ............. ",
" ........... ",
" ......... ",
" ....... ",
" ..... ",
" ... ",
" . "};
/* XPM */
static const char *const checkedlight_xpm[] = {
"24 24 2 1",
" c None",
". c #000000",
" ",
" ",
" ",
" ",
" ",
" . ",
" .. ",
" ... ",
" .... ",
" ..... ",
" ...... ",
" . ...... ",
" .. ...... ",
" ... ...... ",
" .... ...... ",
" .......... ",
" ......... ",
" ....... ",
" ..... ",
" ... ",
" . ",
" ",
" ",
" "};
/* XPM */
static const char *const checkedbold_xpm[] = {
"26 26 2 1",
" c None",
". c #000000",
" ",
" ",
" ",
" ",
" ",
" ",
" .. ",
" ... ",
" .... ",
" ..... ",
" .. ...... ",
" ... ....... ",
" .... ....... ",
" ..... ....... ",
" ...... ....... ",
" .............. ",
" ............ ",
" .......... ",
" ........ ",
" ...... ",
" .... ",
" .. ",
" ",
" ",
" ",
" "};
/* XPM */
static const char * const checkedbold_low_xpm[] = {
"9 8 2 1",
" c None",
". c #000000",
" .",
" ..",
". ...",
".. ... ",
"... ... ",
" ..... ",
" ... ",
" . "};
/* XPM */
static const char * const checkedlight_low_xpm[] = {
"8 8 2 1",
" c None",
". c #000000",
" .",
" ..",
" ...",
". ... ",
".. ... ",
"..... ",
" ... ",
" . "};
/* XPM */
static const char * const highlightedradiobutton_xpm[] = {
"30 30 3 1",
" c None",
". c #000000",
"+ c #0078CC",
" ........ ",
" .............. ",
" ....++++++++.... ",
" ....++++++++++++.... ",
" ...++++ ++++... ",
" ...+++ +++... ",
" ..++ ++.. ",
" ..++ ++.. ",
" ...++ ++... ",
" ..++ ++.. ",
" ..++ ++.. ",
"..++ ++..",
"..++ ++..",
"..++ ++..",
"..++ ++..",
"..++ ++..",
"..++ ++..",
"..++ ++..",
"..++ ++..",
" ..++ ++.. ",
" ..++ ++.. ",
" ...++ ++... ",
" ..++ ++.. ",
" ..++ ++.. ",
" ...+++ +++... ",
" ...++++ ++++... ",
" ....++++++++++++.... ",
" ....++++++++.... ",
" .............. ",
" ........ "};
/* XPM */
static const char * const highlightedradiobutton_low_xpm[] = {
"15 15 3 1",
" c None",
". c #000000",
"+ c #3192D6",
" ..... ",
" ..+++++.. ",
" .++ ++. ",
" .+ +. ",
" .+ +. ",
".+ +.",
".+ +.",
".+ +.",
".+ +.",
".+ +.",
" .+ +. ",
" .+ +. ",
" .++ ++. ",
" ..+++++.. ",
" ..... "};
/* XPM */
static const char * const cross_big_xpm[] = {
"28 28 4 1",
" c #09454A",
". c #218C98",
"+ c #47D8E5",
"@ c #FDFFFC",
" ",
" ",
" ++++++++++++++++++++++++ ",
" ++++++++++++++++++++++++ ",
" ++....................++ ",
" ++....................++ ",
" ++..@@@..........@@@..++ ",
" ++..@@@@........@@@@..++ ",
" ++..@@@@@......@@@@@..++ ",
" ++...@@@@@....@@@@@...++ ",
" ++....@@@@@..@@@@@....++ ",
" ++.....@@@@@@@@@@.....++ ",
" ++......@@@@@@@@......++ ",
" ++.......@@@@@@.......++ ",
" ++.......@@@@@@.......++ ",
" ++......@@@@@@@@......++ ",
" ++.....@@@@@@@@@@.....++ ",
" ++....@@@@@..@@@@@....++ ",
" ++...@@@@@....@@@@@...++ ",
" ++..@@@@@......@@@@@..++ ",
" ++..@@@@........@@@@..++ ",
" ++..@@@..........@@@..++ ",
" ++....................++ ",
" ++....................++ ",
" ++++++++++++++++++++++++ ",
" ++++++++++++++++++++++++ ",
" ",
" "};
/* XPM */
static const char * const cross_small_xpm[] = {
"14 14 4 1",
" c #09454A",
". c #218C98",
"+ c #47D8E5",
"@ c #FCFFFC",
" ",
" ++++++++++++ ",
" +..........+ ",
" +.@@....@@.+ ",
" +.@@@..@@@.+ ",
" +..@@@@@@..+ ",
" +...@@@@...+ ",
" +...@@@@...+ ",
" +..@@@@@@..+ ",
" +.@@@..@@@.+ ",
" +.@@....@@.+ ",
" +..........+ ",
" ++++++++++++ ",
" "};
/* XPM */
static const char * const max_big_xpm[] = {
"28 28 4 1",
" c #09454A",
". c #218C98",
"+ c #47D8E5",
"@ c #FDFFFC",
" ",
" ",
" ++++++++++++++++++++++++ ",
" ++++++++++++++++++++++++ ",
" ++....................++ ",
" ++....................++ ",
" ++....................++ ",
" ++....................++ ",
" ++..@@@@@@@@@@@@@@@@..++ ",
" ++..@@@@@@@@@@@@@@@@..++ ",
" ++..@@@@@@@@@@@@@@@@..++ ",
" ++..@@@@@@@@@@@@@@@@..++ ",
" ++..@@............@@..++ ",
" ++..@@............@@..++ ",
" ++..@@............@@..++ ",
" ++..@@............@@..++ ",
" ++..@@............@@..++ ",
" ++..@@............@@..++ ",
" ++..@@@@@@@@@@@@@@@@..++ ",
" ++..@@@@@@@@@@@@@@@@..++ ",
" ++....................++ ",
" ++....................++ ",
" ++....................++ ",
" ++....................++ ",
" ++++++++++++++++++++++++ ",
" ++++++++++++++++++++++++ ",
" ",
" "};
/* XPM */
static const char * const max_small_xpm[] = {
"14 14 4 1",
" c #09454A",
". c #218C98",
"+ c #47D8E5",
"@ c #FCFFFC",
" ",
" ++++++++++++ ",
" +..........+ ",
" +..........+ ",
" +.@@@@@@@@.+ ",
" +.@@@@@@@@.+ ",
" +.@......@.+ ",
" +.@......@.+ ",
" +.@......@.+ ",
" +.@@@@@@@@.+ ",
" +..........+ ",
" +..........+ ",
" ++++++++++++ ",
" "};
/* XPM */
static const char * const normal_big_xpm[] = {
"28 28 4 1",
" c #09454A",
". c #218C98",
"+ c #47D8E5",
"@ c #FDFFFC",
" ",
" ",
" ++++++++++++++++++++++++ ",
" ++++++++++++++++++++++++ ",
" ++....................++ ",
" ++....................++ ",
" ++..@@@@@@@@@@@@@@@@..++ ",
" ++..@@@@@@@@@@@@@@@@..++ ",
" ++..@@............@@..++ ",
" ++..@@............@@..++ ",
" ++..@@............@@..++ ",
" ++..@@............@@..++ ",
" ++..@@............@@..++ ",
" ++..@@............@@..++ ",
" ++..@@............@@..++ ",
" ++..@@............@@..++ ",
" ++..@@............@@..++ ",
" ++..@@............@@..++ ",
" ++..@@............@@..++ ",
" ++..@@............@@..++ ",
" ++..@@@@@@@@@@@@@@@@..++ ",
" ++..@@@@@@@@@@@@@@@@..++ ",
" ++....................++ ",
" ++....................++ ",
" ++++++++++++++++++++++++ ",
" ++++++++++++++++++++++++ ",
" ",
" "};
/* XPM */
static const char * const normal_small_xpm[] = {
"14 14 4 1",
" c #09454A",
". c #218C98",
"+ c #47D8E5",
"@ c #FCFFFC",
" ",
" ++++++++++++ ",
" +..........+ ",
" +.@@@@@@@@.+ ",
" +.@......@.+ ",
" +.@......@.+ ",
" +.@......@.+ ",
" +.@......@.+ ",
" +.@......@.+ ",
" +.@......@.+ ",
" +.@@@@@@@@.+ ",
" +..........+ ",
" ++++++++++++ ",
" "};
/* XPM */
static const char * const min_big_xpm[] = {
"28 28 4 1",
" c #09454A",
". c #218C98",
"+ c #47D8E5",
"@ c #FDFFFC",
" ",
" ",
" ++++++++++++++++++++++++ ",
" ++++++++++++++++++++++++ ",
" ++....................++ ",
" ++....................++ ",
" ++....................++ ",
" ++....................++ ",
" ++....................++ ",
" ++....................++ ",
" ++....................++ ",
" ++....................++ ",
" ++....................++ ",
" ++....................++ ",
" ++....................++ ",
" ++....................++ ",
" ++....................++ ",
" ++....................++ ",
" ++..@@@@@@@@@@@@@@@@..++ ",
" ++..@@@@@@@@@@@@@@@@..++ ",
" ++....................++ ",
" ++....................++ ",
" ++....................++ ",
" ++....................++ ",
" ++++++++++++++++++++++++ ",
" ++++++++++++++++++++++++ ",
" ",
" "};
/* XPM */
static const char * const min_small_xpm[] = {
"14 14 4 1",
" c #09454A",
". c #218C98",
"+ c #47D8E5",
"@ c #FCFFFC",
" ",
" ++++++++++++ ",
" +..........+ ",
" +..........+ ",
" +..........+ ",
" +..........+ ",
" +..........+ ",
" +..........+ ",
" +..........+ ",
" +.@@@@@@@@.+ ",
" +..........+ ",
" +..........+ ",
" ++++++++++++ ",
" "};
#ifdef Q_WS_WINCE_WM
static char * sbhandleup_xpm[] = {
"26 41 45 1",
" c None",
". c #000000",
"+ c #E7E7E7",
"@ c #D6D7D6",
"# c #949294",
"$ c #737573",
"% c #636563",
"& c #636163",
"* c #5A5D5A",
"= c #5A595A",
"- c #525552",
"; c #525152",
"> c #4A4D4A",
", c #7B797B",
"' c #CECFCE",
") c #CED3CE",
"! c #6B6D6B",
"~ c #6B696B",
"{ c #737173",
"] c #7B7D7B",
"^ c #848684",
"/ c #848284",
"( c #8C8A8C",
"_ c #8C8E8C",
": c #B5B2B5",
"< c #FFFFFF",
"[ c #949694",
"} c #B5B6B5",
"| c #9C9A9C",
"1 c #ADAEAD",
"2 c #9C9E9C",
"3 c #BDBABD",
"4 c #BDBEBD",
"5 c #F7F3F7",
"6 c #C6C3C6",
"7 c #C6C7C6",
"8 c #A5A2A5",
"9 c #CECBCE",
"0 c #FFFBFF",
"a c #ADAAAD",
"b c #A5A6A5",
"c c #D6D3D6",
"d c #B5BAB5",
"e c #DEDFDE",
"f c #DEDBDE",
"..........................",
"+@#$%%&&&**===---;;;;>=,'+",
"+@#$%%&&&**===---;;;;>=$'+",
")$!!~~%%&&&**===---;;;;>;'",
"#{$]],,$${{{!!~~%%%&&&*-;]",
"#{$]],,$${{{!!~~%%%&&&*-;]",
",$^//]],,$${{{!!~~%%%&&*;*",
",,(^^//]],$${!!!!!~~%%%&-*",
",,(^^//]],$${!!!!!~~%%%&-*",
"]]_((^^//]$!%%~!{{!!~~%%-*",
"//#__((^^]{:<<:~!{{{!!~~=*",
"//#__((^^]{:<<:~!{{{!!~~=&",
"//###__(/$:<<<<:~{${{!!~*&",
"^^[[##_^]:<<<<<<}!{$${{!*%",
"^^[[##_^]:<<<<<<}!{$${{!*%",
"((|[[#_/:<<<<<<<<}!$$${{&~",
"((||[#^1<<<<1:<<<<}!$$$$&~",
"((||[#^1<<<<1:<<<<}!$$$$&~",
"__2|#(1<<<<}],}<<<<}{$,$%~",
"##2|_1<<<<}^((]3<<<<}{$,~!",
"##2|_1<<<<}^((]3<<<<}{$,~!",
"##2#1<<<<3^###(/4<<<<}{,~{",
"##2#1<<<<3^###(/4<<<<}{,~!",
"[[2_5<<<4(#|[[#_/6<<<<,,!{",
"[|2_5<<4_[||||[[_/7<<<,]{$",
"[|2_5<<4_[||||[[_/7<<<,]{$",
"||8_5<6#|2222|||[_/9<<,]{$",
"228#06[28888222||[_/'<,/$,",
"228#06[28888222||[_/'<,/$,",
"22a|6[8bbbb88822||[(/c](,]",
"881b8baaabbbb88222|[(^(_,]",
"881b8baaabbbb88222|[(^(_,]",
"88111111aaabbb88822|[###]/",
"bb:::11111aaabbb8822||[[/^",
"bb:::11111aaabbb8822||[[//",
"bb:::::1111aaabbb8822||[/(",
"3a1::::::1111aaabb8822|_^8",
"da1::::::1111aaabb8822|_^8",
"e1aaabbbb888822||[[##__((@",
"+e4:aaabbbb88822||[[[#[b@+",
"+e4:aaabbbb88822||[[[#[bf+"};
static char * sbhandledown_xpm[] = {
"26 40 46 1",
" c None",
". c #E7E7E7",
"+ c #DEDFDE",
"@ c #BDBEBD",
"# c #B5B2B5",
"$ c #ADAAAD",
"% c #A5A6A5",
"& c #A5A2A5",
"* c #9C9E9C",
"= c #9C9A9C",
"- c #949694",
"; c #949294",
"> c #D6D7D6",
", c #DEDBDE",
"' c #D6DBD6",
") c #ADAEAD",
"! c #8C8E8C",
"~ c #8C8A8C",
"{ c #BDBABD",
"] c #848684",
"^ c #B5BAB5",
"/ c #848284",
"( c #848A84",
"_ c #7B7D7B",
": c #7B797B",
"< c #C6C3C6",
"[ c #D6D3D6",
"} c #FFFBFF",
"| c #CECFCE",
"1 c #FFFFFF",
"2 c #737573",
"3 c #F7F3F7",
"4 c #CECBCE",
"5 c #737173",
"6 c #C6C7C6",
"7 c #6B6D6B",
"8 c #B5B6B5",
"9 c #6B696B",
"0 c #636563",
"a c #636163",
"b c #5A5D5A",
"c c #5A595A",
"d c #525552",
"e c #525152",
"f c #4A4D4A",
"g c #C6CBC6",
".+@#$$$%%%%&&&**==---;-%>.",
".+@#$$$%%%%&&&**==---;-%,.",
"')$$$%%%%&&&&**==--;;!!~~>",
"{$)######))))$$$%%&&**=!]&",
"^$)######))))$$$%%&&**=!]&",
"%%#####))))$$$%%%&&**==-/(",
"%%###)))))$$$%%%&&**==--/]",
"%%###)))))$$$%%%&&**==--//",
"&&))))))$$$%%%&&&**=-;;;_/",
"&&)%&%$$$%%%%&&***=-~]~!:_",
"&&)%&%$$$%%%%&&***=-~]~!:_",
"**$=<-&%%%%&&&**==-~/[_~:_",
"**&;}<-*&&&&***==-!/|1:/2:",
"**&;}<-*&&&&***==-!/|1:/2:",
"==&!31<;=****===-!/411:_5:",
"-=*!311@!-====--!/6111:_52",
"-=*!311@!-====--!/6111:_52",
"--*!3111@~;=--;!/<1111::75",
";;*;)1111{];;;~/@111185:95",
";;*;)1111{];;;~/@111185:97",
";;*=!)11118]~~_{1111852:97",
";;*=!)11118]~~_{1111852:97",
"!!*=;~)11118_:81111852:207",
"~~==-;])1111)#1111872222a9",
"~~==-;])1111)#1111872222a9",
"~~=--;!/#111111118722255a0",
"]]--;;!]_#11111187522557b0",
"]]--;;!]_#11111187522557b0",
"//;;;!!~/2#1111#95255779ba",
"//;!!~~]]_5#11#975557799cb",
"//;!!~~]]_5#11#975557799ca",
"__!~~]]//_27009755779900db",
"::~]]//__:2257777799000adb",
"::~]]//__:2257777799000adb",
":2]//__::225557799000aabeb",
";52__::225557799000aaabde_",
";52__::225557799000aaabde_",
"[2779900aaabbcccdddeeeefeg",
".>;200aaabbcccdddeeeefc:|.",
".>;200aaabbcccdddeeeefc2|."};
static char * sbgripdown_xpm[] = {
"26 34 39 1",
" c None",
". c #949294",
"+ c #9C9E9C",
"@ c #9C9A9C",
"# c #949694",
"$ c #8C8E8C",
"% c #8C8A8C",
"& c #848684",
"* c #848284",
"= c #7B7D7B",
"- c #7B797B",
"; c #6B696B",
"> c #636563",
", c #737573",
"' c #636163",
") c #737173",
"! c #5A5D5A",
"~ c #6B6D6B",
"{ c #5A595A",
"] c #B5B6B5",
"^ c #BDBEBD",
"/ c #ADAEAD",
"( c #BDBABD",
"_ c #525552",
": c #313031",
"< c #525152",
"[ c #ADAAAD",
"} c #BDBAB5",
"| c #4A4D4A",
"1 c #4A494A",
"2 c #C6C3C6",
"3 c #C6CBC6",
"4 c #E7E7E7",
"5 c #DEDFDE",
"6 c #E7E3E7",
"7 c #DEE3DE",
"8 c #CECBCE",
"9 c #8C928C",
"0 c #CECFCE",
"..+++@@@###...$$%&&**==-;>",
"$.++@@@@##...$$%%&**==-->>",
"$$+@@@@###..$$%%&&*==--,>>",
"$$@@@@###..$$%%&&**==-,,>'",
"%%@@@###..$$$%&&**==--,,''",
"%%@@###..$$$%&&**==--,,)''",
"%%@###...$$%%&&*==--,,))'!",
"&&###...$$%%&&**==--,)))!!",
"&&##...$$%%&&**==--,,))~!!",
"&&#...$$%%&&**==--,,))~~!{",
"**...$$%%&&**==--,,))~~;!{",
"**..$$%%&&**===--,)))~~;{{",
"**.$$%%&]^&===//,,))~~;;{{",
"==$$%%&&]^*==-((,))~~;;>{_",
"==$%%&&***::--,,::~~;;;>__",
"==%%&&&**=::-,,)::~~;;>>__",
"--%&&&**==--,,)))~~;;>>>__",
"--&&&**==--,,)))~~;;>>>'_<",
",-&&**==]^-,))[[~;;>>>''<<",
",,&**==-]^-)))}};;>>>'''<<",
",,**==--,,::)~~;::>>'''!<<",
"))*==--,,)::~~;;::>'''!!<|",
"))==--,,)))~~;;;>>'''!!!||",
"))=--,,)))~~;;;>>'''!!!{||",
"~~--,,)))~~;;;>>'''!!!{{||",
"~~-,,)))~~;;>>>'''!!!{{{|1",
";;,,)))~~;;>>>'''!!!{{{_1<",
"~;,)))~~;;>>>'''!!!{{{__1'",
"%>~))~~;;>>>'''!!!{{{__|1$",
"2>>~~~;;>>>''!!!{{{{__<113",
"4%'';;;>>>''!!!{{{{__<11%4",
"45-!!'>>>''!!!{{{{_<|11)64",
"447+!{{___<<<||||1111|+444",
"444489~__<<<||||111>$04444"};
static char * sbgripup_xpm[] = {
"26 34 38 1",
" c None",
". c #E7E7E7",
"+ c #D6DBD6",
"@ c #C6C7C6",
"# c #B5B6B5",
"$ c #ADAEAD",
"% c #ADAAAD",
"& c #A5A6A5",
"* c #A5A2A5",
"= c #BDBEBD",
"- c #DEDFDE",
"; c #C6CBC6",
"> c #9C9E9C",
", c #E7E3E7",
"' c #BDBABD",
") c #B5B2B5",
"! c #9C9A9C",
"~ c #DEE3DE",
"{ c #949694",
"] c #D6D7D6",
"^ c #949294",
"/ c #DEDBDE",
"( c #8C8E8C",
"_ c #8C8A8C",
": c #848684",
"< c #D6D3CE",
"[ c #CECBCE",
"} c #D6D3D6",
"| c #848284",
"1 c #313031",
"2 c #7B7D7B",
"3 c #CECFCE",
"4 c #CECBC6",
"5 c #7B797B",
"6 c #737573",
"7 c #737173",
"8 c #6B6D6B",
"9 c #6B696B",
"....+@#$$%%%%&&&***$=-....",
"...;$$$$$%%%&&&&**>>>>@...",
".,'$$)#'#####)))$$$%*!!$~.",
".=$)#'''####))))$$$%%*!{'.",
"]$$''''#####)))$$$%%%&*{^/",
"=$#'''#####)))$$$$%%&&&!^#",
"$$'''#####))))$$$%%%&&*>(!",
"$$''#####))))$$$%%%&&&*>(^",
"$$######))))$$$$%%&&&**>(_",
"%$#####))))$$$$%%%&&***>__",
"%$####))))$$$$%%%&&&**>>__",
"%%###)))))$$$%%%&&&**>>>_:",
"%%##))))<])$$%[[&&***>>!::",
"%%#)))))<]$$%%}<&&**>>!!:|",
"&%)))))$$$11%%&&11*>>>!!:|",
"&&))))$$$$11%&&&11*>>!!{||",
"&&)))$$$$$%%%&&&**>>!!!{|2",
"&&))$$$$$%%%&&&**>>>!!{{|2",
"*&)$$$$$3]%&&&4@*>>!!{{{22",
"**$$$$$%3]%&&&<<>>!!!{{^25",
"**$$$$%%%%11&**>11!!{{^^25",
"**$$$%%%%&11***>11!!{{^^55",
"**$$%%%%&&&***>>!!!{{^^(55",
">>$%%%%&&&***>>>!!{{^^((56",
">>%%%%&&&&***>>!!!{{^^((66",
">>%%%&&&&***>>!!!{{^^((_67",
"!>%%&&&&***>>>!!{{{^^(__67",
"!!%&&&&***>>>!!!{{^^((_:77",
"!!&&&&***>>>!!!{{^^((__:77",
"!!&&&****>>!!!{{^^^(__::78",
"{!&&****>>>!!{{{^^((_::|88",
"{{&****>>>!!!{{^^((__:||88",
"{{****>>>!!!{{^^^(__::|289",
"{{***>>>!!!{{{^^((_::||289"};
static char * sbgripmiddle_xpm[] = {
"26 2 12 1",
" c None",
". c #949294",
"+ c #A5A2A5",
"@ c #9C9E9C",
"# c #9C9A9C",
"$ c #949694",
"% c #8C8E8C",
"& c #8C8A8C",
"* c #848684",
"= c #848284",
"- c #7B7D7B",
"; c #6B696B",
"..++@@@###$$$..%%&&*==--;;",
"..++@@@###$$$..%%&&*==--;;"};
static char * listviewhighmiddle_xpm[] = {
"8 46 197 2",
" c None",
". c #66759E",
"+ c #6C789D",
"@ c #6A789E",
"# c #6B789E",
"$ c #6A779D",
"% c #6C789C",
"& c #6F7D9B",
"* c #6F7D9A",
"= c #9DB6EE",
"- c #9DB6ED",
"; c #9CB6ED",
"> c #A1B6EF",
", c #A2B6F0",
"' c #93AAE9",
") c #95ABEA",
"! c #94ABEA",
"~ c #94A9E8",
"{ c #8BA8EA",
"] c #8BA7EA",
"^ c #8AA7EA",
"/ c #8EAAE8",
"( c #8FAAE8",
"_ c #88A2E7",
": c #8CA3E8",
"< c #8BA3E7",
"[ c #8BA3E8",
"} c #8BA2E7",
"| c #8CA2E7",
"1 c #8DA2E7",
"2 c #87A1E8",
"3 c #87A1E9",
"4 c #86A0E8",
"5 c #86A1E7",
"6 c #87A2E7",
"7 c #859EE9",
"8 c #849DE9",
"9 c #869EE9",
"0 c #869FE9",
"a c #7C9BEA",
"b c #7C9CEA",
"c c #7B9CEA",
"d c #7C9BE9",
"e c #7E9CE9",
"f c #7B9AEA",
"g c #7C99E9",
"h c #7C9AEA",
"i c #7B9AE8",
"j c #7A9AEA",
"k c #7996E1",
"l c #7C96E4",
"m c #7B96E3",
"n c #7B95E3",
"o c #7E95E5",
"p c #7E95E6",
"q c #7292E1",
"r c #7490DF",
"s c #7591E0",
"t c #7590DF",
"u c #7392E1",
"v c #6D8CDE",
"w c #6F8EDD",
"x c #6E8DDD",
"y c #6E8DDE",
"z c #6F8EDE",
"A c #6E8EDE",
"B c #718EDD",
"C c #728EDD",
"D c #6B89E0",
"E c #6C89DF",
"F c #6D89E0",
"G c #6D89DF",
"H c #6C88DF",
"I c #6D88DF",
"J c #6D86DD",
"K c #6086E0",
"L c #6686E0",
"M c #6586E0",
"N c #6486E0",
"O c #6485E0",
"P c #6786DF",
"Q c #5F85E0",
"R c #6583DE",
"S c #6683DE",
"T c #6682DD",
"U c #6086DF",
"V c #5F86E0",
"W c #567ED7",
"X c #567ED8",
"Y c #557DD7",
"Z c #5A7FD8",
"` c #6281DA",
" . c #5379D9",
".. c #5278D9",
"+. c #547BD8",
"@. c #4C73D7",
"#. c #4B72D2",
"$. c #4C73D4",
"%. c #4C73D3",
"&. c #4B72D4",
"*. c #4F75D3",
"=. c #5074D2",
"-. c #4971D0",
";. c #4871D0",
">. c #335ECF",
",. c #325ECB",
"'. c #335ECD",
"). c #335ECE",
"!. c #325DCD",
"~. c #2E59C9",
"{. c #3059C9",
"]. c #2F59C9",
"^. c #2F59C8",
"/. c #2B59CA",
"(. c #3355C6",
"_. c #3354C5",
":. c #3156C7",
"<. c #3056C7",
"[. c #3355C7",
"}. c #3355C5",
"|. c #254EBF",
"1. c #1F51C1",
"2. c #234FC0",
"3. c #234FBF",
"4. c #2350C0",
"5. c #1E50BE",
"6. c #1D50C0",
"7. c #264DBE",
"8. c #264CBD",
"9. c #254DBE",
"0. c #244EBF",
"a. c #254DBF",
"b. c #234CBF",
"c. c #244CC0",
"d. c #244BC0",
"e. c #234BC0",
"f. c #234BBF",
"g. c #234CBE",
"h. c #2049B7",
"i. c #2A49B5",
"j. c #2749B5",
"k. c #2749B6",
"l. c #2D49B4",
"m. c #2649B6",
"n. c #2946B5",
"o. c #2A48B6",
"p. c #2947B5",
"q. c #2946B6",
"r. c #2848B6",
"s. c #2549B5",
"t. c #2648B6",
"u. c #2744B5",
"v. c #2744B4",
"w. c #2744AF",
"x. c #2543B4",
"y. c #2543B2",
"z. c #2442B2",
"A. c #2442B3",
"B. c #2442B5",
"C. c #2543B3",
"D. c #1F40B1",
"E. c #1E40B1",
"F. c #243EAE",
"G. c #273BAC",
"H. c #263DAC",
"I. c #253CAB",
"J. c #273CAB",
"K. c #273CAC",
"L. c #263BAA",
"M. c #253CAE",
"N. c #263BA6",
"O. c #253BA5",
"P. c #253AA5",
"Q. c #253BA6",
"R. c #253CA7",
"S. c #263AA6",
"T. c #243CA6",
"U. c #253CA5",
"V. c #273BA8",
"W. c #2F4DA4",
"X. c #2F4DA3",
"Y. c #1B2F85",
"Z. c #B5B5B6",
"`. c #B5B5B5",
" + c #B5B6B6",
".+ c #B5B4B6",
"++ c #C2C3C5",
"@+ c #C0C3C3",
"#+ c #C1C3C4",
"$+ c #E3E3E3",
"%+ c #E3E3E4",
"&+ c #E4E3E4",
"*+ c #E2E3E4",
"=+ c #ECEEEB",
"-+ c #EBEDEA",
";+ c #EEF0ED",
">+ c #EFF0EE",
". + @ @ # # $ % ",
"& & * & & & & & ",
"= = - = = ; > , ",
"' ) ! ! ! ) ' ~ ",
"{ ] { { { ^ / ( ",
"_ : < [ : } | 1 ",
"2 2 2 3 2 4 5 6 ",
"7 7 7 7 7 8 9 0 ",
"a b a a a c d e ",
"f g h h h h i j ",
"k l m m m n o p ",
"q q q q q q q q ",
"r r s s s t q u ",
"v w x y z A B C ",
"D E F F G F H I ",
"J K L M N O P Q ",
"R R S S S T U V ",
"W W X X X Y Z ` ",
" . . . . ...+.W ",
" . . . . ..... .",
"@.#.$.$.%.&.*.=.",
"-.-.;.-.-.-.-.-.",
">.,.'.).).!.!.>.",
"~.{.].^.].^././.",
"(.(.(.(.(._.:.<.",
"(.(.[.[.[.[.(.}.",
"|.1.2.3.3.4.5.6.",
"7.7.7.7.7.8.9.0.",
"a.b.c.d.c.e.f.g.",
"h.i.j.k.j.k.l.m.",
"n.o.p.q.r.p.s.t.",
"u.u.v.u.u.u.u.u.",
"w.x.y.z.A.y.B.C.",
"D.D.E.D.D.D.D.D.",
"D.D.E.D.D.D.D.D.",
"F.G.H.I.J.K.L.M.",
"N.N.O.N.N.P.Q.R.",
"N.N.S.N.N.N.N.N.",
"T.N.T.T.T.U.N.V.",
"W.W.X.W.W.W.W.W.",
"W.W.W.W.W.W.W.W.",
"Y.Y.Y.Y.Y.Y.Y.Y.",
"Z.`. + +.+Z.`.`.",
"++@+#+#+#+#+@+@+",
"$+%+&+&+*+%+%+%+",
"=+-+;+-+-+>+-+-+"};
static char * listviewhighcornerleft_xpm[] = {
"100 46 1475 2",
" c None",
". c #FBFBFC",
"+ c #E8EAE7",
"@ c #758DC3",
"# c #42599E",
"$ c #28418A",
"% c #19418F",
"& c #3F5695",
"* c #415896",
"= c #435A98",
"- c #445C99",
"; c #465E9B",
"> c #48609B",
", c #49629C",
"' c #4A639D",
") c #49639D",
"! c #4A629D",
"~ c #4B639D",
"{ c #4B649D",
"] c #4C659D",
"^ c #4D669D",
"/ c #4E689D",
"( c #506A9D",
"_ c #516A9D",
": c #536B9C",
"< c #546C9C",
"[ c #566D9B",
"} c #576D9B",
"| c #586E9C",
"1 c #5B6F9D",
"2 c #61739D",
"3 c #63749E",
"4 c #64749E",
"5 c #68769E",
"6 c #6A779E",
"7 c #6B789E",
"8 c #66759E",
"9 c #6C789D",
"0 c #EEF0ED",
"a c #D0D3DC",
"b c #3E51A3",
"c c #28428B",
"d c #29428C",
"e c #425996",
"f c #455C99",
"g c #485F9C",
"h c #49619E",
"i c #4A63A0",
"j c #4B64A1",
"k c #4B65A1",
"l c #4C66A2",
"m c #4D67A2",
"n c #4F69A1",
"o c #516AA1",
"p c #536CA0",
"q c #556DA1",
"r c #576EA0",
"s c #586F9F",
"t c #586E9F",
"u c #596F9E",
"v c #5A6F9E",
"w c #5C709E",
"x c #5E719E",
"y c #5F729F",
"z c #62739F",
"A c #63739E",
"B c #64749D",
"C c #65749E",
"D c #69769D",
"E c #6C799E",
"F c #6D799F",
"G c #707D9F",
"H c #717F9E",
"I c #6E7AA1",
"J c #6C789E",
"K c #6F7C9C",
"L c #6F7D9B",
"M c #2A4AA0",
"N c #4971D0",
"O c #4C72D8",
"P c #5472C0",
"Q c #5573BF",
"R c #5774BF",
"S c #5875BF",
"T c #5976C1",
"U c #5A76C1",
"V c #5C78C2",
"W c #5E7AC2",
"X c #607CC3",
"Y c #627EC3",
"Z c #637FC4",
"` c #6581C5",
" . c #6682C6",
".. c #6783C7",
"+. c #6984C8",
"@. c #6B85C9",
"#. c #6D87CA",
"$. c #6F89CB",
"%. c #718CCD",
"&. c #748ECF",
"*. c #7690D0",
"=. c #7992D2",
"-. c #7A93D3",
";. c #7C95D5",
">. c #7F98D7",
",. c #8099D8",
"'. c #859CDB",
"). c #8AA0DD",
"!. c #8DA3DF",
"~. c #8FA5E0",
"{. c #90A5E0",
"]. c #91A6E1",
"^. c #91A5E1",
"/. c #90A4E0",
"(. c #8EA3DE",
"_. c #92A6E2",
":. c #8FA4DF",
"<. c #90A5DE",
"[. c #90A5DC",
"}. c #90A6DB",
"|. c #91A6E0",
"1. c #93A7E2",
"2. c #95AAE6",
"3. c #99AEEA",
"4. c #9AB2EA",
"5. c #99B1E9",
"6. c #99B1E7",
"7. c #98AFE6",
"8. c #93A8E2",
"9. c #97ACE7",
"0. c #9AB3EB",
"a. c #9DB5ED",
"b. c #9DB6EE",
"c. c #375095",
"d. c #4056AD",
"e. c #506DCD",
"f. c #4360CC",
"g. c #345ED6",
"h. c #335ECF",
"i. c #355ED6",
"j. c #355FD6",
"k. c #365FD6",
"l. c #355FD0",
"m. c #3760D5",
"n. c #3A63D4",
"o. c #3C63D1",
"p. c #3B63CD",
"q. c #3B63C9",
"r. c #3B62C9",
"s. c #3D63C8",
"t. c #4065C5",
"u. c #4567C5",
"v. c #496BC5",
"w. c #4F70C7",
"x. c #5273C8",
"y. c #5475CA",
"z. c #5777CB",
"A. c #5879CD",
"B. c #5A7BCE",
"C. c #5D7DCF",
"D. c #5F7ECF",
"E. c #617FD0",
"F. c #6381D1",
"G. c #6583D2",
"H. c #6785D2",
"I. c #6886D3",
"J. c #6A88D4",
"K. c #6C89D5",
"L. c #6E8BD6",
"M. c #708CD7",
"N. c #718DD8",
"O. c #738EDA",
"P. c #748FDB",
"Q. c #7691DC",
"R. c #7893DD",
"S. c #7994DD",
"T. c #7A96DE",
"U. c #7B97DF",
"V. c #7C98E0",
"W. c #7E9AE2",
"X. c #7F9BE3",
"Y. c #829DE4",
"Z. c #849FE5",
"`. c #87A0E6",
" + c #88A1E7",
".+ c #89A2E6",
"++ c #8CA3E7",
"@+ c #8EA5E9",
"#+ c #8EA6E9",
"$+ c #8FA7E9",
"%+ c #8FA8E8",
"&+ c #8FA9E8",
"*+ c #91A9E8",
"=+ c #90A7E8",
"-+ c #8FA8EA",
";+ c #90AAEA",
">+ c #93ABEA",
",+ c #95ABEA",
"'+ c #93ABE9",
")+ c #94ABEA",
"!+ c #90A9EA",
"~+ c #93AAE9",
"{+ c #273E7E",
"]+ c #345ED5",
"^+ c #3D60CE",
"/+ c #3D60CF",
"(+ c #345ECF",
"_+ c #335ED0",
":+ c #355FD3",
"<+ c #3A60CE",
"[+ c #3A5FCB",
"}+ c #385FC9",
"|+ c #3B60C8",
"1+ c #3C63CB",
"2+ c #3E64CB",
"3+ c #4166CA",
"4+ c #4568C9",
"5+ c #4A6CC7",
"6+ c #4F71C8",
"7+ c #5172CA",
"8+ c #5475CE",
"9+ c #5678D3",
"0+ c #597CD6",
"a+ c #5C7ED7",
"b+ c #5E7FD8",
"c+ c #6181D9",
"d+ c #6383DA",
"e+ c #6585DA",
"f+ c #6786DB",
"g+ c #6988DC",
"h+ c #6B8ADD",
"i+ c #6D8BDE",
"j+ c #6F8DDE",
"k+ c #718EDF",
"l+ c #728FE0",
"m+ c #7390E1",
"n+ c #7390E2",
"o+ c #7491E3",
"p+ c #7592E4",
"q+ c #7693E4",
"r+ c #7794E5",
"s+ c #7894E5",
"t+ c #7995E6",
"u+ c #7B96E6",
"v+ c #7C97E7",
"w+ c #7D9AE8",
"x+ c #7F9CE9",
"y+ c #829DE9",
"z+ c #849EE9",
"A+ c #859EE9",
"B+ c #87A0E7",
"C+ c #8AA2E7",
"D+ c #8BA3E8",
"E+ c #89A2E7",
"F+ c #8CA6EA",
"G+ c #8BA6EA",
"H+ c #8BA7EA",
"I+ c #8CA3E8",
"J+ c #8BA8EA",
"K+ c #8CA7EA",
"L+ c #8CA8EA",
"M+ c #4659C7",
"N+ c #355ECF",
"O+ c #3660CF",
"P+ c #3860CE",
"Q+ c #3961CD",
"R+ c #3B61CB",
"S+ c #3B61CA",
"T+ c #3D62CA",
"U+ c #3D63CA",
"V+ c #4165CB",
"W+ c #456ACB",
"X+ c #4B6FCD",
"Y+ c #5174CE",
"Z+ c #5275D1",
"`+ c #5477D4",
" @ c #5678D9",
".@ c #587ADB",
"+@ c #597BDB",
"@@ c #5B7DDC",
"#@ c #5E7FDC",
"$@ c #6081DD",
"%@ c #6283DE",
"&@ c #6484DF",
"*@ c #6787E0",
"=@ c #6989E1",
"-@ c #6B8BE1",
";@ c #6D8DE2",
">@ c #6F8EE3",
",@ c #718FE4",
"'@ c #7290E4",
")@ c #7491E5",
"!@ c #7692E6",
"~@ c #7793E5",
"{@ c #7894E6",
"]@ c #7895E7",
"^@ c #7996E8",
"/@ c #7A97E8",
"(@ c #7B98E9",
"_@ c #7D99E8",
":@ c #7F9AE8",
"<@ c #7F9BE9",
"[@ c #7F9CEA",
"}@ c #859EE8",
"|@ c #859FE8",
"1@ c #85A0E9",
"2@ c #869FE9",
"3@ c #86A1E7",
"4@ c #86A0E9",
"5@ c #87A1E7",
"6@ c #88A2E7",
"7@ c #87A1E9",
"8@ c #5A6FCA",
"9@ c #365FCF",
"0@ c #345ED0",
"a@ c #385FCC",
"b@ c #385FCE",
"c@ c #3A61CC",
"d@ c #3B62CD",
"e@ c #3E64CD",
"f@ c #4167CF",
"g@ c #4469CF",
"h@ c #486CD1",
"i@ c #4D71D2",
"j@ c #5175D4",
"k@ c #5376D6",
"l@ c #5578DA",
"m@ c #5679DC",
"n@ c #587BDD",
"o@ c #5A7DDE",
"p@ c #5D80DE",
"q@ c #5F82DF",
"r@ c #6284DF",
"s@ c #6585E0",
"t@ c #6787E1",
"u@ c #6988E2",
"v@ c #6B8AE2",
"w@ c #6D8CE3",
"x@ c #6E8DE3",
"y@ c #708EE4",
"z@ c #718FE3",
"A@ c #7391E4",
"B@ c #7592E5",
"C@ c #7895E5",
"D@ c #7996E6",
"E@ c #7A97E6",
"F@ c #7B98E7",
"G@ c #7A98E8",
"H@ c #7B99E9",
"I@ c #7E9AE9",
"J@ c #7D9AE9",
"K@ c #7E9AEA",
"L@ c #809CE9",
"M@ c #819DE8",
"N@ c #7F9BEA",
"O@ c #819DE9",
"P@ c #819CE9",
"Q@ c #839EE9",
"R@ c #839EE8",
"S@ c #839DEA",
"T@ c #859FE9",
"U@ c #87A0E8",
"V@ c #86A0E8",
"W@ c #87A1E8",
"X@ c #3760CF",
"Y@ c #3A61CE",
"Z@ c #3A62CD",
"`@ c #3F66CE",
" # c #4368D0",
".# c #466CD2",
"+# c #496DD5",
"@# c #4E72D6",
"## c #5175D8",
"$# c #5276DA",
"%# c #5578DC",
"&# c #577ADC",
"*# c #597CDD",
"=# c #5B7DDD",
"-# c #5D7FDE",
";# c #5E81DE",
"># c #6183DF",
",# c #6386DF",
"'# c #6687E0",
")# c #6888E0",
"!# c #6A89E1",
"~# c #6C8AE1",
"{# c #6E8CE2",
"]# c #6F8DE2",
"^# c #7390E4",
"/# c #7390E3",
"(# c #7491E4",
"_# c #7693E5",
":# c #7895E6",
"<# c #7896E6",
"[# c #7997E7",
"}# c #7B97E7",
"|# c #7B98E8",
"1# c #7C98E8",
"2# c #7E9BE9",
"3# c #809CEA",
"4# c #819CEA",
"5# c #839DE9",
"6# c #365FD0",
"7# c #3660D0",
"8# c #3961CF",
"9# c #3B63CF",
"0# c #3D64D0",
"a# c #4067D0",
"b# c #4469D2",
"c# c #466BD3",
"d# c #496ED5",
"e# c #4C71D6",
"f# c #4E72D8",
"g# c #5074D9",
"h# c #5376DB",
"i# c #5578DB",
"j# c #587ADC",
"k# c #5B7CDC",
"l# c #5D7EDD",
"m# c #5F80DD",
"n# c #6081DE",
"o# c #6383DE",
"p# c #6686DF",
"q# c #6887E0",
"r# c #6988E0",
"s# c #6B89E1",
"t# c #6C8AE0",
"u# c #6E8CE1",
"v# c #708EE2",
"w# c #718FE2",
"x# c #7290E3",
"y# c #7391E2",
"z# c #7492E1",
"A# c #7592E2",
"B# c #7691E3",
"C# c #7591E3",
"D# c #7692E3",
"E# c #7693E3",
"F# c #7793E4",
"G# c #7893E4",
"H# c #7994E5",
"I# c #7D97E8",
"J# c #7E98E8",
"K# c #7D98E8",
"L# c #7D99E9",
"M# c #7D9BEA",
"N# c #7D9CEA",
"O# c #7E99E8",
"P# c #7D9AEA",
"Q# c #7C9BEA",
"R# c #7C9CEA",
"S# c #355FCF",
"T# c #3860D0",
"U# c #3A62D0",
"V# c #3C64D1",
"W# c #4167D1",
"X# c #4369D3",
"Y# c #466BD4",
"Z# c #486DD5",
"`# c #4A6ED7",
" $ c #4C70D8",
".$ c #5478D9",
"+$ c #577BDA",
"@$ c #597DDB",
"#$ c #5B7EDB",
"$$ c #5D7FDC",
"%$ c #6182DE",
"&$ c #6284DE",
"*$ c #6485DF",
"=$ c #6586DF",
"-$ c #6787DF",
";$ c #6888DF",
">$ c #6A8ADF",
",$ c #6C8BE0",
"'$ c #6D8CE0",
")$ c #6E8DE1",
"!$ c #6F8DE1",
"~$ c #708EE1",
"{$ c #718FE0",
"]$ c #728FE1",
"^$ c #7390E0",
"/$ c #738FE0",
"($ c #7490E1",
"_$ c #7590E1",
":$ c #7591E1",
"<$ c #7592E1",
"[$ c #7692E2",
"}$ c #7794E2",
"|$ c #7894E3",
"1$ c #7996E3",
"2$ c #7A96E5",
"3$ c #7B98E6",
"4$ c #7B9AE8",
"5$ c #7C99E8",
"6$ c #7C96E5",
"7$ c #7D97E7",
"8$ c #7C99E9",
"9$ c #7B9AE9",
"0$ c #7B9AEA",
"a$ c #5B6DCF",
"b$ c #305EC8",
"c$ c #335ECE",
"d$ c #305ECA",
"e$ c #345FCF",
"f$ c #3761D0",
"g$ c #3A62D1",
"h$ c #3C64D2",
"i$ c #4066D3",
"j$ c #466BD5",
"k$ c #486ED6",
"l$ c #4A6ED6",
"m$ c #4D71D8",
"n$ c #4F72D9",
"o$ c #5073D9",
"p$ c #4F72D8",
"q$ c #5074D8",
"r$ c #5276D9",
"s$ c #587ADA",
"t$ c #5B7CDB",
"u$ c #5D7EDC",
"v$ c #5F7FDD",
"w$ c #6081DC",
"x$ c #6182DD",
"y$ c #6283DD",
"z$ c #6484DE",
"A$ c #6585DD",
"B$ c #6787DE",
"C$ c #6988DF",
"D$ c #6A89DE",
"E$ c #6C8ADF",
"F$ c #6D8BDF",
"G$ c #6E8CE0",
"H$ c #6F8DE0",
"I$ c #718EE0",
"J$ c #728FDF",
"K$ c #728FDE",
"L$ c #7290E0",
"M$ c #7190E0",
"N$ c #7291E0",
"O$ c #7191E0",
"P$ c #7392E1",
"Q$ c #7493E1",
"R$ c #7594E1",
"S$ c #7594E2",
"T$ c #7694E2",
"U$ c #7695E2",
"V$ c #7A96E4",
"W$ c #7895E2",
"X$ c #7A96E2",
"Y$ c #7A96E3",
"Z$ c #7B96E3",
"`$ c #7996E1",
" % c #7C96E4",
".% c #305EC9",
"+% c #315ECC",
"@% c #325ECE",
"#% c #3760D0",
"$% c #3962D1",
"%% c #3E66D3",
"&% c #4268D4",
"*% c #446BD5",
"=% c #476CD6",
"-% c #496ED7",
";% c #4B6FD7",
">% c #4C70D7",
",% c #4E71D7",
"'% c #5074D7",
")% c #5276D8",
"!% c #5376D8",
"~% c #5779DA",
"{% c #597ADA",
"]% c #5A7BDB",
"^% c #5B7CDA",
"/% c #5D7EDB",
"(% c #5E7FDB",
"_% c #6182DB",
":% c #6384DC",
"<% c #6586DD",
"[% c #6686DC",
"}% c #6887DD",
"|% c #6988DD",
"1% c #6A8ADE",
"2% c #6B8BDE",
"3% c #6C8CDE",
"4% c #6E8DDF",
"5% c #6E8CDF",
"6% c #6D8DDF",
"7% c #6C8BDF",
"8% c #6F8DDF",
"9% c #718FDF",
"0% c #7290DF",
"a% c #7391E0",
"b% c #7491E0",
"c% c #7292E1",
"d% c #3959C5",
"e% c #345BC5",
"f% c #315EC8",
"g% c #355BC5",
"h% c #325EC8",
"i% c #315ECB",
"j% c #345DCC",
"k% c #335ECD",
"l% c #345ECD",
"m% c #355FCE",
"n% c #3862D0",
"o% c #3E66D2",
"p% c #456BD5",
"q% c #476CD5",
"r% c #4B6ED7",
"s% c #4B6FD6",
"t% c #4B6FD5",
"u% c #4D71D6",
"v% c #5073D7",
"w% c #5174D7",
"x% c #5275D8",
"y% c #5577D8",
"z% c #5678D8",
"A% c #5779D9",
"B% c #587AD8",
"C% c #597CD9",
"D% c #5B7DD9",
"E% c #5D7FDA",
"F% c #5F80DB",
"G% c #6182DC",
"H% c #6484DC",
"I% c #6585DC",
"J% c #6787DD",
"K% c #6988DE",
"L% c #6B8ADE",
"M% c #6B8ADF",
"N% c #6989DE",
"O% c #6B89DE",
"P% c #6E8BDF",
"Q% c #708CDE",
"R% c #708DDF",
"S% c #708FDF",
"T% c #728EDF",
"U% c #6F8EDD",
"V% c #728EDD",
"W% c #7390DF",
"X% c #7490DF",
"Y% c #335DC8",
"Z% c #3759C5",
"`% c #3859C5",
" & c #335EC8",
".& c #325DCA",
"+& c #345CCB",
"@& c #335DCC",
"#& c #345DCD",
"$& c #355FCD",
"%& c #3861D0",
"&& c #3B64D1",
"*& c #3E65D2",
"=& c #4168D3",
"-& c #456AD5",
";& c #4B6ED5",
">& c #4C6FD4",
",& c #4D70D5",
"'& c #4F72D6",
")& c #5173D6",
"!& c #5375D7",
"~& c #5476D8",
"{& c #5577D7",
"]& c #5477D8",
"^& c #5677D8",
"/& c #5879D9",
"(& c #597AD9",
"_& c #5C7DDA",
":& c #6080DC",
"<& c #6080DB",
"[& c #6181DC",
"}& c #6282DC",
"|& c #6383DD",
"1& c #6484DD",
"2& c #6686DE",
"3& c #6685DE",
"4& c #6786DE",
"5& c #6687DE",
"6& c #6887DE",
"7& c #6987DE",
"8& c #6788DF",
"9& c #6785DF",
"0& c #6B89DF",
"a& c #6C89DF",
"b& c #6F8DDD",
"c& c #6D8CDE",
"d& c #445BBB",
"e& c #3759BE",
"f& c #375AC6",
"g& c #355CC8",
"h& c #345CCA",
"i& c #355ECC",
"j& c #365FCD",
"k& c #3761CE",
"l& c #3A63D0",
"m& c #3D65D1",
"n& c #466AD4",
"o& c #476BD4",
"p& c #486CD3",
"q& c #4A6ED4",
"r& c #4B6ED4",
"s& c #4E71D6",
"t& c #4F71D5",
"u& c #5072D6",
"v& c #5274D7",
"w& c #5273D7",
"x& c #5274D6",
"y& c #5476D7",
"z& c #5779D8",
"A& c #587AD9",
"B& c #5A7CDA",
"C& c #5C7DDB",
"D& c #5D7EDA",
"E& c #6081DA",
"F& c #6181DB",
"G& c #6283DC",
"H& c #6483DD",
"I& c #6483DE",
"J& c #6585DE",
"K& c #6786DF",
"L& c #6886DE",
"M& c #6887DF",
"N& c #6987DF",
"O& c #6A88DF",
"P& c #6786E0",
"Q& c #6A86DE",
"R& c #6B89E0",
"S& c #365BC8",
"T& c #365CC8",
"U& c #375DCA",
"V& c #375FCB",
"W& c #3860CD",
"X& c #3C63D0",
"Y& c #4167D2",
"Z& c #4268D2",
"`& c #4368D2",
" * c #4367D2",
".* c #4568D2",
"+* c #466AD2",
"@* c #496CD3",
"#* c #4A6DD3",
"$* c #4A6DD4",
"%* c #4D70D4",
"&* c #4F72D5",
"** c #4C70D4",
"=* c #4E72D5",
"-* c #5173D5",
";* c #5375D6",
">* c #597BDA",
",* c #5B7DDA",
"'* c #5C7EDB",
")* c #5D7FDB",
"!* c #5E80DB",
"~* c #5E81DA",
"{* c #5F81DB",
"]* c #5F82DB",
"^* c #6384DD",
"/* c #6384DE",
"(* c #6585DF",
"_* c #6486E0",
":* c #6583DD",
"<* c #6386E0",
"[* c #6686E0",
"}* c #6B86DD",
"|* c #6D86DD",
"1* c #6086E0",
"2* c #5573CD",
"3* c #3959C3",
"4* c #3959C4",
"5* c #3759C0",
"6* c #375BC7",
"7* c #365CC7",
"8* c #395FCC",
"9* c #3B62CE",
"0* c #3E64D0",
"a* c #4066D1",
"b* c #4166D1",
"c* c #4064CF",
"d* c #4065CF",
"e* c #4266D0",
"f* c #4468D1",
"g* c #4569D1",
"h* c #476BD2",
"i* c #466AD1",
"j* c #476AD2",
"k* c #456AD1",
"l* c #496DD2",
"m* c #4A6FD3",
"n* c #496ED2",
"o* c #4B70D4",
"p* c #4D71D4",
"q* c #4E72D4",
"r* c #5073D4",
"s* c #5174D5",
"t* c #5175D5",
"u* c #5276D6",
"v* c #5377D6",
"w* c #5478D7",
"x* c #5579D7",
"y* c #567AD8",
"z* c #577BD9",
"A* c #597CD8",
"B* c #5A7DD9",
"C* c #5A7ED9",
"D* c #5B7FDA",
"E* c #5C80DA",
"F* c #5D80DA",
"G* c #5E81DB",
"H* c #5D80DB",
"I* c #6082DC",
"J* c #6183DD",
"K* c #6183DE",
"L* c #6082DB",
"M* c #6282DE",
"N* c #6682DE",
"O* c #6583DE",
"P* c #3759BF",
"Q* c #375AC2",
"R* c #375AC1",
"S* c #375AC4",
"T* c #395DCA",
"U* c #3A5ECA",
"V* c #3C60CC",
"W* c #3D61CD",
"X* c #3D61CC",
"Y* c #3C61CD",
"Z* c #3E62CD",
"`* c #3F64CE",
" = c #4266CF",
".= c #4468D0",
"+= c #4267CF",
"@= c #4166CE",
"#= c #4065CE",
"$= c #4166CD",
"%= c #4267CE",
"&= c #456AD0",
"*= c #4368CE",
"== c #4468CF",
"-= c #4569D0",
";= c #486BD1",
">= c #4B6FD3",
",= c #4C70D3",
"'= c #4F73D4",
")= c #5275D5",
"!= c #5477D6",
"~= c #577BD7",
"{= c #587CD8",
"]= c #577CD8",
"^= c #597DD9",
"/= c #5A7DDA",
"(= c #597DDA",
"_= c #587CDA",
":= c #5A7EDA",
"<= c #567BD8",
"[= c #557AD9",
"}= c #567BD9",
"|= c #577CD9",
"1= c #587DD9",
"2= c #587ED9",
"3= c #577ED8",
"4= c #587DD8",
"5= c #587ED8",
"6= c #567ED7",
"7= c #526ABD",
"8= c #3759C1",
"9= c #385BC7",
"0= c #395CC8",
"a= c #3B5DC9",
"b= c #3B5ECA",
"c= c #3A5FCA",
"d= c #3B60CC",
"e= c #3C61CC",
"f= c #3D62CD",
"g= c #3E63CD",
"h= c #3C61CB",
"i= c #3C61CA",
"j= c #3D62CB",
"k= c #3F64CC",
"l= c #4065CD",
"m= c #4669D0",
"n= c #476AD0",
"o= c #496BD1",
"p= c #4A6DD2",
"q= c #4B6ED2",
"r= c #4D71D3",
"s= c #4E73D4",
"t= c #4F74D4",
"u= c #5075D5",
"v= c #5276D5",
"w= c #5377D7",
"x= c #5278D7",
"y= c #5277D6",
"z= c #5378D7",
"A= c #5379D8",
"B= c #5379D9",
"C= c #5278D8",
"D= c #5178D7",
"E= c #3355C0",
"F= c #3556C1",
"G= c #395AC6",
"H= c #385AC7",
"I= c #395BC7",
"J= c #395EC9",
"K= c #395FCA",
"L= c #3B60CA",
"M= c #3B60CB",
"N= c #375DC7",
"O= c #385EC8",
"P= c #395FC9",
"Q= c #3A60CA",
"R= c #3D63CC",
"S= c #4367CF",
"T= c #476BD1",
"U= c #4A6ED2",
"V= c #4B6FD2",
"W= c #4C6FD2",
"X= c #4D70D1",
"Y= c #4E71D2",
"Z= c #4E72D2",
"`= c #4E74D4",
" - c #4E75D5",
".- c #4E75D4",
"+- c #4F75D3",
"@- c #5075D2",
"#- c #5075D3",
"$- c #5177D7",
"%- c #5178D8",
"&- c #4F75D5",
"*- c #5076D5",
"=- c #4F76D6",
"-- c #5279D9",
";- c #3C52B1",
">- c #3656C3",
",- c #3757C5",
"'- c #3758C6",
")- c #3759C6",
"!- c #375BC6",
"~- c #385CC7",
"{- c #385DC8",
"]- c #365CC6",
"^- c #355BC6",
"/- c #355CC6",
"(- c #365DC7",
"_- c #375EC8",
":- c #375CC6",
"<- c #385EC6",
"[- c #3A5FC7",
"}- c #3C60C8",
"|- c #3D61C9",
"1- c #3E62CA",
"2- c #4063CC",
"3- c #4165CE",
"4- c #4268D0",
"5- c #4269D1",
"6- c #436AD2",
"7- c #446AD2",
"8- c #456BD2",
"9- c #496CD1",
"0- c #4C6CD0",
"a- c #4D6CCF",
"b- c #4E6DD0",
"c- c #4F6ECF",
"d- c #4E6FCF",
"e- c #4C70CF",
"f- c #4A71D0",
"g- c #4F6FCF",
"h- c #4B71D0",
"i- c #4A72D1",
"j- c #4B73D4",
"k- c #4F70D0",
"l- c #4C73D3",
"m- c #4C73D6",
"n- c #4B72D2",
"o- c #4B71D1",
"p- c #4C73D7",
"q- c #3354C0",
"r- c #3152BE",
"s- c #3052BE",
"t- c #3051BF",
"u- c #2E4FBF",
"v- c #2E4FBE",
"w- c #2E50BF",
"x- c #2F50BF",
"y- c #3156C4",
"z- c #2F56C5",
"A- c #2E57C5",
"B- c #2F57C5",
"C- c #3057C6",
"D- c #3258C6",
"E- c #3459C7",
"F- c #365AC7",
"G- c #385BC8",
"H- c #3B5DCA",
"I- c #3B5DCB",
"J- c #3C5ECC",
"K- c #3C60CD",
"L- c #3C62CE",
"M- c #3D65D0",
"N- c #3D66D1",
"O- c #4166D2",
"P- c #4667D2",
"Q- c #4A67D1",
"R- c #4C68D0",
"S- c #4C69CF",
"T- c #4D6BCE",
"U- c #4E6DCD",
"V- c #4E6ECE",
"W- c #4E6DCE",
"X- c #4970D0",
"Y- c #4770D0",
"Z- c #4B6BCE",
"`- c #4A6CCE",
" ; c #496DCF",
".; c #476FD0",
"+; c #4870D0",
"@; c #486DCF",
"#; c #242F79",
"$; c #2F41AC",
"%; c #2040B8",
"&; c #2041B8",
"*; c #2243B3",
"=; c #2243B8",
"-; c #2343B8",
";; c #2444B8",
">; c #2445B8",
",; c #2445B6",
"'; c #2445B7",
"); c #2444B9",
"!; c #2949BE",
"~; c #2649BF",
"{; c #234BBF",
"]; c #224CBF",
"^; c #224AC0",
"/; c #244CC0",
"(; c #254DC0",
"_; c #254DC1",
":; c #264DC2",
"<; c #274EC3",
"[; c #274CC3",
"}; c #274DC4",
"|; c #254DC5",
"1; c #214EC5",
"2; c #204FC6",
"3; c #1F50C8",
"4; c #2151C9",
"5; c #2B53C8",
"6; c #3154C7",
"7; c #3255C6",
"8; c #2F57C7",
"9; c #2C58C9",
"0; c #2D59CA",
"a; c #2D58C9",
"b; c #2E5BCC",
"c; c #325ECC",
"d; c #325ECB",
"e; c #1F40B1",
"f; c #1F40B2",
"g; c #1F40B3",
"h; c #2A44BD",
"i; c #2845BE",
"j; c #2745BE",
"k; c #2646BF",
"l; c #2546BE",
"m; c #2347BF",
"n; c #2147BF",
"o; c #2048C0",
"p; c #1D48C0",
"q; c #1C48C0",
"r; c #1B47C0",
"s; c #1C48BF",
"t; c #1E49BE",
"u; c #214ABD",
"v; c #244CBD",
"w; c #264DBE",
"x; c #254EC0",
"y; c #214FC2",
"z; c #1B51C5",
"A; c #1C51C7",
"B; c #2250C8",
"C; c #2A52C8",
"D; c #3254C6",
"E; c #3355C5",
"F; c #3154C8",
"G; c #3355C6",
"H; c #2F57C8",
"I; c #2E58C9",
"J; c #2E59C9",
"K; c #3059C9",
"L; c #2040B6",
"M; c #2743BB",
"N; c #2844BC",
"O; c #2743BD",
"P; c #2844BE",
"Q; c #2844BD",
"R; c #2346BE",
"S; c #2047BF",
"T; c #1E48C0",
"U; c #1D47C0",
"V; c #1D49BF",
"W; c #1F49BF",
"X; c #204ABE",
"Y; c #254DBF",
"Z; c #234EC0",
"`; c #2050C1",
" > c #1C51C3",
".> c #1F51C6",
"+> c #2651C8",
"@> c #2D53C7",
"#> c #3155C6",
"$> c #3155C7",
"%> c #3355C7",
"&> c #3254C7",
"*> c #1E40B1",
"=> c #2141B8",
"-> c #2442B9",
";> c #2744BB",
">> c #2945BB",
",> c #2A45BB",
"'> c #2944BA",
")> c #2745BB",
"!> c #2545BC",
"~> c #2246BD",
"{> c #2047BE",
"]> c #1F47BD",
"^> c #1D48BE",
"/> c #1E49C0",
"(> c #1F4AC0",
"_> c #214BBF",
":> c #244CBE",
"<> c #254DBE",
"[> c #244DBE",
"}> c #224FBF",
"|> c #2051C1",
"1> c #2151C3",
"2> c #2252C5",
"3> c #2151C1",
"4> c #2851C6",
"5> c #2A50C6",
"6> c #2E54C6",
"7> c #1F51C2",
"8> c #1D52C5",
"9> c #2651C9",
"0> c #2950C7",
"a> c #2D40A5",
"b> c #2040B0",
"c> c #1F40B0",
"d> c #223CAE",
"e> c #233CAE",
"f> c #253BAC",
"g> c #253BAD",
"h> c #233CB0",
"i> c #213EB2",
"j> c #1F3FB4",
"k> c #1E40B6",
"l> c #1F3FB7",
"m> c #1E3EB8",
"n> c #1F3FB8",
"o> c #2040B7",
"p> c #2141B6",
"q> c #2140B7",
"r> c #2241B6",
"s> c #2342B5",
"t> c #2442B6",
"u> c #2543B5",
"v> c #2643B4",
"w> c #2544B6",
"x> c #2346B8",
"y> c #2247B9",
"z> c #2048BC",
"A> c #1F48BF",
"B> c #2049C0",
"C> c #214AC0",
"D> c #224BBF",
"E> c #234CBE",
"F> c #244DBF",
"G> c #234CBF",
"H> c #264DC0",
"I> c #274EBF",
"J> c #264DBF",
"K> c #254EBF",
"L> c #2050C0",
"M> c #1F51C1",
"N> c #1E42A4",
"O> c #263BA6",
"P> c #253BA7",
"Q> c #253CA7",
"R> c #1E41A5",
"S> c #1F40AF",
"T> c #273AAC",
"U> c #1E40B0",
"V> c #1F40B5",
"W> c #1F40B6",
"X> c #1F40B8",
"Y> c #1E40B8",
"Z> c #1F3EB8",
"`> c #203FB7",
" , c #2240B6",
"., c #2341B7",
"+, c #2345B9",
"@, c #2147BB",
"#, c #2148BA",
"$, c #2049BB",
"%, c #2049BD",
"&, c #2049BF",
"*, c #224BBE",
"=, c #244DBD",
"-, c #244CBF",
";, c #182969",
">, c #273BAD",
",, c #2739AB",
"', c #263AAC",
"), c #243CAE",
"!, c #233DAE",
"~, c #213EAF",
"{, c #1F3FB0",
"], c #2040B4",
"^, c #1F3FB6",
"/, c #1E3EB7",
"(, c #2240B7",
"_, c #2341B6",
":, c #2543B4",
"<, c #2644B3",
"[, c #2544B5",
"}, c #2545B5",
"|, c #2547B6",
"1, c #2548B7",
"2, c #2349BA",
"3, c #1F49BE",
"4, c #2149BD",
"5, c #2049BE",
"6, c #214BBE",
"7, c #2249BE",
"8, c #234CBD",
"9, c #2149BE",
"0, c #1E49BF",
"a, c #253BA9",
"b, c #253BAB",
"c, c #263AAB",
"d, c #213DAF",
"e, c #203EAF",
"f, c #1D40AF",
"g, c #1D40B0",
"h, c #1E40B4",
"i, c #2241B7",
"j, c #2643B6",
"k, c #2744B5",
"l, c #2643B5",
"m, c #2346B6",
"n, c #2147B7",
"o, c #2644B6",
"p, c #2247B7",
"q, c #2248B8",
"r, c #2647B7",
"s, c #2549B7",
"t, c #2645B7",
"u, c #2148B8",
"v, c #2847B6",
"w, c #2549B6",
"x, c #2849B6",
"y, c #2049B7",
"z, c #2A49B5",
"A, c #243BA4",
"B, c #253BA5",
"C, c #253BA6",
"D, c #263AA7",
"E, c #263AA8",
"F, c #2739AA",
"G, c #243CAD",
"H, c #223DAE",
"I, c #1F3EAF",
"J, c #1E3FB0",
"K, c #1D40B1",
"L, c #1E3FB1",
"M, c #1F3FB3",
"N, c #1F3FB5",
"O, c #2140B6",
"P, c #2140B8",
"Q, c #2744B4",
"R, c #2746B6",
"S, c #2947B6",
"T, c #2946B5",
"U, c #2A48B6",
"V, c #3551A8",
"W, c #1F399C",
"X, c #143D9F",
"Y, c #263BA5",
"Z, c #273BA8",
"`, c #273BAA",
" ' c #263AAD",
".' c #233CAD",
"+' c #213DAE",
"@' c #203FB2",
"#' c #2342B6",
"$' c #2443B6",
"%' c #2543B6",
"&' c #2644B5",
"*' c #133D9E",
"=' c #263BA7",
"-' c #263BA9",
";' c #273BA9",
">' c #263AAA",
",' c #2539AB",
"'' c #2639AB",
")' c #253AAC",
"!' c #243BAD",
"~' c #223DAF",
"{' c #203FB0",
"]' c #2040B1",
"^' c #2140B3",
"/' c #2543B1",
"(' c #2744AF",
"_' c #1A3CA0",
":' c #1D3BA2",
"<' c #233BA4",
"[' c #263AA5",
"}' c #253AA5",
"|' c #263AA6",
"1' c #263BA4",
"2' c #243BA5",
"3' c #263BA8",
"4' c #223EAF",
"5' c #3B4CA5",
"6' c #1D379A",
"7' c #1E389C",
"8' c #1E399F",
"9' c #1F3BA2",
"0' c #1F3BA3",
"a' c #213BA4",
"b' c #233AA3",
"c' c #243AA3",
"d' c #2539A4",
"e' c #253AA6",
"f' c #243BA7",
"g' c #253CAA",
"h' c #253CAC",
"i' c #253CAD",
"j' c #253CAE",
"k' c #243DAE",
"l' c #213FAF",
"m' c #223FAF",
"n' c #2040AF",
"o' c #253D93",
"p' c #1D3894",
"q' c #1F379A",
"r' c #1E389B",
"s' c #1D399C",
"t' c #1C3A9D",
"u' c #1B3A9D",
"v' c #183B9E",
"w' c #163C9E",
"x' c #153C9E",
"y' c #163B9D",
"z' c #173B9D",
"A' c #193A9D",
"B' c #1C3A9E",
"C' c #1F3AA1",
"D' c #223AA4",
"E' c #253BA8",
"F' c #273BA7",
"G' c #263CAB",
"H' c #263CAC",
"I' c #243EAE",
"J' c #273BAC",
"K' c #2A3795",
"L' c #1F389B",
"M' c #1D389B",
"N' c #1C399C",
"O' c #1B399C",
"P' c #1A3A9D",
"Q' c #1D399B",
"R' c #1B399B",
"S' c #1A3A9C",
"T' c #1B3A9F",
"U' c #1D3AA0",
"V' c #203BA2",
"W' c #203BA3",
"X' c #2639A6",
"Y' c #1B3692",
"Z' c #1C3794",
"`' c #1D3796",
" ) c #1E3898",
".) c #1E389A",
"+) c #1F399B",
"@) c #1A399C",
"#) c #193A9E",
"$) c #1A3BA0",
"%) c #1C3BA2",
"&) c #1D3CA3",
"*) c #203CA4",
"=) c #223BA5",
"-) c #3C4699",
";) c #2B4595",
">) c #1C3793",
",) c #1D3895",
"') c #1E3897",
")) c #1F3998",
"!) c #1F3999",
"~) c #1F399A",
"{) c #1E399C",
"]) c #1C3B9E",
"^) c #1D3BA0",
"/) c #1E3CA2",
"() c #223CA5",
"_) c #243CA6",
":) c #596FA9",
"<) c #3B4894",
"[) c #314993",
"}) c #29499F",
"|) c #28489E",
"1) c #2B4BA1",
"2) c #2C4BA1",
"3) c #2D4CA2",
"4) c #2E4CA3",
"5) c #2F4CA4",
"6) c #2E4CA4",
"7) c #2F4DA3",
"8) c #2F4DA4",
"9) c #D3D5D2",
"0) c #3B4794",
"a) c #314791",
"b) c #304892",
"c) c #304893",
"d) c #2F4995",
"e) c #2F4997",
"f) c #2D4A9A",
"g) c #2A4A9D",
"h) c #294A9F",
"i) c #284AA0",
"j) c #294AA0",
"k) c #2B4AA1",
"l) c #2D4CA3",
"m) c #C9CAC9",
"n) c #455D9B",
"o) c #242F78",
"p) c #1B2F85",
"q) c #C6C3C8",
"r) c #B5B2B6",
"s) c #B5B7B4",
"t) c #B5B7B3",
"u) c #B5B2B5",
"v) c #B5B3B4",
"w) c #B5B5B4",
"x) c #B5B6B3",
"y) c #B5B4B4",
"z) c #B5B3B5",
"A) c #B5B4B5",
"B) c #B5B5B5",
"C) c #B5B5B3",
"D) c #B5B5B6",
"E) c #BAC3BE",
"F) c #B9C3BD",
"G) c #C1C3C4",
"H) c #BFC3C2",
"I) c #B9C3BE",
"J) c #BBC3BF",
"K) c #BDC3C1",
"L) c #C0C3C3",
"M) c #BEC3C1",
"N) c #C2C3C5",
"O) c #E6E3E8",
"P) c #E0E2DF",
"Q) c #E1E1E1",
"R) c #E2E1E3",
"S) c #E4E1E6",
"T) c #E4E2E7",
"U) c #E4E2E6",
"V) c #E3E3E4",
"W) c #E2E3E3",
"X) c #E1E3E2",
"Y) c #E3E3E3",
"Z) c #E3E3E2",
"`) c #EBEDEA",
" ! c #EAECE9",
".! c #E9EBE8",
"+! c #ECEEEB",
". . + @ # $ $ $ $ $ $ $ % $ $ $ $ $ % $ $ $ $ $ $ % $ $ $ $ $ % $ $ $ $ $ $ $ $ $ % $ $ & * = - ; > , , ' ) ! ! ~ { ] ^ / ( _ : < [ } | | 1 2 3 3 4 4 4 4 4 4 4 5 6 4 4 4 5 6 7 8 9 4 5 6 7 8 9 6 7 8 9 ",
"0 a b % $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ c d d d d $ $ $ $ $ c d e f g h i i i i j k l m n o p q r s t u v w x y z 4 A B C D 9 9 E 9 E F G H I F J K L L L L J K L L L L L L L L ",
"@ % M N O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O P Q R S T U V W X Y Z ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.9.0.a.b.b.b.b.b.b.",
"c.$ d.O e.f.g.g.g.h.g.g.g.g.g.h.h.g.g.g.g.g.h.h.g.g.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+++@+#+$+@+$+%+&+*+=+$+-+;+>+,+'+)+!+;+>+,+~+,+>+,+~+,+",
"$ {+N N f.f.f.f.h.h.h.g.f.f.h.h.h.h.g.f.f.h.h.h.h.]+^+/+(+h._+:+<+[+}+|+1+2+3+4+5+6+7+8+9+0+a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z+A+B+.+C+D+E+D+F+G+H+C+I+F+G+J+K+L+H+F+G+J+K+L+H+J+H+J+H+",
"{+{+N N M+M+h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.N+N+h.h.(+O+P+P+Q+R+S+T+U+V+W+X+Y+Z+`+ @.@+@@@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@]@^@/@(@_@:@<@[@[@y+}@|@1@A+1@2@3@ +2@4@2@5@C+D+6@D+7@5@C+D+6@I+C+D+6@I+",
"{+{+8@N M+M+h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.9@9@0@N+a@b@c@d@e@f@g@h@i@j@k@l@m@n@o@p@q@r@s@t@u@v@w@x@y@z@A@B@q+r+C@D@E@F@G@H@_@I@J@K@<@L@M@N@O@P@Q@R@S@T@A+A+U@V@W@W@A+2@U@V@W@W@U@V@W@W@",
"{+{+8@N f.M+h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.(+(+(+9@9@X@Y@Z@e@`@ #.#+#@###$#%#&#*#=#-#;#>#,#'#)#!#~#{#]#z@^#/#(#p+_#r+:#s+t+<#[#}#|#|#1#_@|#_@_@2#L@3#4#y+y+5#z+z+z+5#z+z+z+z+A+A+A+A+A+",
"{+{+8@8@f.f.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.(+6#7#8#9#0#a#b#c#d#e#f#g#h#i#j#k#l#m#n#o#&@p#q#r#s#t#u#v#w#x#x#y#y#z#A#B#C#D#E#E#F#G#H#F#H#H#u+v+I#J#K#L#J@J@M#N#O#P#M#M#M#N#M#Q#Q#R#",
"$ {+8@e.f.f.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.S#l.7#T#U#V#W#X#Y#Z#`# $f#g###.$+$@$#$$$$@%$&$*$=$-$;$>$,$'$)$!$~$~${$]$^$/$($($_$_$:$<$_$<$[$}$|$|$1$2$2$3$}#4$5$6$7$8$8$9$8$8$8$0$8$",
"$ {+a$e.f.f.h.h.h.h.h.h.h.h.h.b$h.c$c$c$c$c$d$c$c$c$c$c$c$c$c$c$c$e$e$7#f$g$h$i$X#j$k$l$m$n$o$p$q$r$l@s$t$u$v$w$x$y$z$A$B$C$D$E$F$G$G$H$I$J$J$K$K$J$L$L$L$L$L$M$N$O$P$Q$R$S$T$U$1$V$T$W$X$Y$1$V$Y$Z$`$ %",
"$ $ a$a$f.f.b$b$b$b$b$b$b$b$b$b$b$b$b$b$b$b$b$b$.%b$b$b$.%d$+%+%@%h.e$l.#%$%h$%%&%*%=%-%;%>%,%'%)%!% @ @~%{%]%^%/%(%w$_%:%<%[%}%|%D$1%2%3%4%5%4%4%6%5%5%4%4%4%5%7%5%8%9%L$0%a%a%a%P$b%P$P$z#z#z#P$c%c%c%",
"$ $ 8@e.f.f.d%b$b$b$b$b$d%b$b$b$b$b$b$e%f%b$b$b$b$b$g%h%b$.%i%i%j%k%l%m%X@n%h$o%&%p%q%`#r%s%t%u%v%w%x%y% @z%A%B%C%D%E%F%G%:%H%I%[%J%}%K%|%D$K%D$D$L%M%M%M%M%M%D$N%O%i+P%j+Q%R%S%T%0%U%V%W%W%W%W%X%X%X%X%",
"$ $ 8@8@f.f.d%d%b$b$b$b$d%d%b$b$b$h%Y%Z%Z%h%f%f%h%Y%`%`% &h%h%.&+&@&#&$&X@%&&&*&=&-&j$Z#+#;&>&,&'&)&)&!&~&{&]&^&/&(&^%_&(%:&<&[&}&|&1&A$A$2&3&4&4&5&B$6&7&B$7&8&9&6&7&0&a&a&i+i+i+b&a&a&j+U%c&U%j+U%c&U%",
"$ $ 8@8@d&e&d%d%d%d%d%d%d%d%d%d%d%`%d%d%d%d%`%`%`%d%d%d%d%`%`%f&g&h&j%i&j&k&l&m&=&X#Y#n&o&p&q&r&>&s&t&t&u&v&w&x&y&{&z&A&B&C&D&(%(%F%F%E&F&}&}&|&G&|&H&1&I%I&A$1&}&z$z$J&K&L&M&N&O&0&P&Q&0&a&R&a&a&a&R&a&",
"{+$ 8@8@e&e&d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%`%f&S&T&U&V&W&Y@X&Y&Z&`& *.*+*@*#*@*r&$*#*r&%*&***=*-*;*y&z%A%z&A&A&>*B&,*,*'*)*!*!*~*{*F&}&{*}&{*]*G%G%y$^*/*J&(*2&_*:*<*=$[*}*<*=$<*|*1*",
"{+{+8@2*e&e&d%d%d%d%d%d%d%d%d%e&3*4*4*4*4*4*5*4*4*4*4*4*4*4*4*4*`%f&6*6*7*8*9*0*a*b*c*d*e*f*g*h*i*j*+*k*h*l*m*n*m*o*p*q*r*s*t*u*v*w*x*y*y*z*A*B*C*D*E*F*G*E*G*F*H*G*F*~*]*{*I*x$J*K*L*G%K*M*o#o#I&N*O*O*",
"{+{+8@2*e&e&e&e&e&e&e&e&e&e&e&e&e&e&e&P*e&e&e&e&e&e&P*P*e&e&e&P*P*5*Q*R*S*T*U*V*W*X*Y*Z*`*d* =.=+=@=#=$=%=g@&=*===-=i*;=l*>=,=q*'=s*)=k@!=x*~={=]=^=/=(=_=:=(=<=<=]=[=}=|=]=]=1=2=3=|=4=5=2=2=2=3=6=6=6=",
"{+{+7=e.e&e&e&e&e&e&e&e&e&e&e&e&e&e&e&e&e&e&e&e&e&e&e&e&e&e&e&e&e&e&P*P*8=9=0=a=b=U*c=d=e=f=e@#=g=h=i=i=j=k=k=l=%===m=n=o=p=q=,=r=s=t=u=v=v*w=x=x=y=z=z=A=z=A=B=C=B=D=C=B=x=B=B=B=B=B=B=B=B=B=B=B=B=B=B=",
"{+{+7=7=e&e&e&e&E=E=e&e&e&e&E=E=E=e&e&e&e&E=E=E=e&e&e&e&E=E=e&e&e&e&E=E=E=F=d%G=G=H=I=J=K=L=M=R+}+N=O=P=Q=j=i=h=R=e@@=S=-=T=h@l*U=V=W=X=Y=Z=`= - - -.-+-@- -#-$-%-$-&-*-$-=-%-----C=$-%---------B=B=B=B=",
"{+{+7=7=;-;-E=E=E=E=E=E=E=E=E=E=E=E=E=E=E=E=E=E=E=E=E=E=E=E=E=E=E=E=E=E=E=E=>-,-'-)-!-6*~-{-{-]-^-/-/-(-_-:-N=<-[-}-|-1-2-3- =4-5-6-7-8-9-0-0-a-b-c-d-e-f-g-h-h-i-j-k-h-h-i-j-l-m-n-o-i-j-l-m-n-j-l-p-n-",
"{+{+7=7=;-;-E=E=E=E=E=E=E=E=q-r-s-t-t-u-u-v-v-v-u-w-x-u-u-u-u-u-u-u-u-v-v-u-u-u-u-u-v-v-u-u-u-u-v-v-u-y-z-A-B-C-D-E-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-U-V-W-V-e-X-Y-Z-`- ;.;Y-N N +;@;.;Y-N N N N N N N ",
"#;#;d&d&$;$;%;%;%;%;%;%;%;%;&;*;=;-;-;-;;;>;,;>;>;>;;;>;>;>;>;>;>;>;>;>;';);>;>;>;>;>;';>;>;>;>;>;';);!;~;{;];^;/;(;_;_;:;<;[;};};|;1;2;3;4;5;6;7;8;9;9;0;a;0;0;b;h.a;0;0;b;h.c;h.d;0;b;h.c;h.d;h.c;h.d;",
"#;#;;-;-$;$;e;e;e;e;e;e;e;e;e;e;e;f;f;f;f;e;e;e;f;f;f;f;f;f;f;f;f;f;f;f;g;%;f;f;f;f;f;g;f;f;f;f;f;g;%;h;i;j;k;l;m;n;o;p;q;r;r;s;t;u;v;w;x;y;z;A;B;C;6;D;E;F;G;G;H;I;F;G;G;H;I;J;J;K;G;H;I;J;J;K;I;J;J;K;",
"#;#;;-;-$;$;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;L;e;e;e;e;e;e;e;e;e;e;e;e;L;M;N;O;P;Q;i;i;k;R;S;T;U;q;q;V;W;X;{;Y;Z;`; >.>+>@>#>+>$>6;#>#>+>%>&>G;G;G;G;G;&>G;G;G;G;G;G;G;G;G;",
"#;#;d.;-$;$;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;*>e;e;e;e;e;e;e;e;e;e;e;e;*>=>->;>>>,>'>'>)>!>~>{>]>^>^>V;V;/>(>_>:><>[>}>|>1>2>3>2>4>5>6>7>8>9>0>G;G;G;G;9>0>G;G;G;G;G;G;G;G;",
"#;#;d.d.a>a>e;e;e;e;e;e;e;e;e;e;b>b>c>c>c>c>c>b>e;e;e;e;e;e;e;e;e;e;e;e;e;e;d>e>f>g>h>i>j>k>l>l>m>m>n>n>o>o>p>q>r>r>s>t>u>v>v>u>w>';x>y>z>t;A>B>C>D>E>E>F>G>F>H>H>I>F>Y;J>w;K>L>K>M>J>w;K>L>K>M>K>L>K>M>",
"#;#;d.d.a>a>N>e;N>O>O>O>N>e;N>O>O>P>Q>R>S>R>Q>O>O>O>N>e;N>O>O>O>N>e;N>N>O>T>e;e;e;U>U>U>U>f;V>W>o>o>o>o>X>X>Y>Y>n>n>Z>Z>`> ,.,t>t>u>u>w>+,@,#,$,%,A>&,*,=,B>[>-,w;<>C>[>-,w;w;w;w;w;-,w;w;w;w;w;w;w;w;w;",
"#;;,;-;-a>a>N>N>N>O>O>O>N>N>N>O>O>O>O>N>N>N>O>O>O>O>N>N>N>O>O>O>N>N>N>N>O>>,,,,,,,',g>),!,~,{,{,*>U>e;f;],o>%;o>^,^,/,/,l>q>(,_,t>u>:,<,v>[,},|,1,2,%,%,3,4,5,6,7,8,9,5,6,0,G>G>Y;G>6,0,G>G>Y;G>G>G>Y;G>",
";,;,;-;-O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>P>a,b,',',c,c,f>),e>d,e,{,{,U>U>f,f,U>U>g,g,*>g;h,^,^,`>`>q>i,t>j,k,k,l,w>m,n,o,p,q,r,s,t,p,u,v,w,x,y,z,u,v,w,x,y,z,w,x,y,z,",
";,;,b b O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>A,A,A,B,C,D,E,F,c,',g>G,!,H,~,e,{,I,J,J,K,K,U>f,f,J,L,M,N,L;O,i,P,.,l,Q,k,k,k,k,k,k,R,v,k,k,k,R,v,S,T,U,k,R,v,S,T,U,v,S,T,U,",
";,;,b V,W,W,X,X,O>X,X,X,X,X,O>X,X,X,X,X,X,O>X,X,X,X,X,X,O>X,X,X,X,X,O>X,X,O>O>O>O>B,B,B,B,Y,O>O>Z,`,T>T> '',g>.'+'e,{,{,e,+'+'e,e,{,J,K,e;@'N,O,#'$'%'%'j,%'j,&'k,k,%'j,&'k,k,k,k,k,&'k,k,k,k,k,k,k,k,k,",
";,;,b V,W,W,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,*'O>O>O>O>O>O>O>O>B,B,A,A,B,C,='-'`,;'>'>',''')'!'!'e>e>~'~'~,~,{'{,*>*>e;]']']']']']'^'/']']']'^'/':,(':,]'^'/':,(':,/':,(':,",
";,;,V,V,W,W,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,_':'<'['}'|'|'O>O>O>O>O>O>O>Y,Y,1'1'B,B,2'2'C,3'-'>'c,)')'!'),4'{'e;]'e;*>*>e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;",
";,;,5'5'W,W,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,W,6'6'6'7'8'9'0'a'b'c'd'd'}'}'O>O>O>O>O>O>O>O>Y,1'1'['['e'e'f'g'h'i'j'k'G,),!,l'j'm'n'b>b>),m'b>e;e;e;e;e;b>e;e;e;e;e;e;e;e;e;",
";,;,b b o'o'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'W,q'q'q'r's't'u'v'w'x'y'z'A'B'C'D'2'2'B,B,O>O>O>O>O>O>O>O>O>O>O>Y,Y,C,C,='='='E'F'3'3'3'G'Z,='F'F'G'H'I'J'F'F'G'H'I'J'G'H'I'J'",
";,;,b b K'K'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'W,W,W,W,W,L'L'q'r'M'N'O'P'u'N's'Q'R'S'A'T'U'C'V'9'0'W'D'}'X'|'O>O>B,B,O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>",
";,;,b b K'K'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'p'Y'Y'Y'Z'`' ).)+)+)+)W,W,W,W,L'L'q'q'r'r's'M'N'P'@)A'#)$)%)&)*)=)B,|'|'O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>O>",
"{+;,$ -);)K'p'p'o'p'p'p'p'p'o'p'p'p'p'p'p'o'p'p'p'p'p'p'o'p'p'p'p'p'o'o'p'p'p'p'p'p'p'p'p'p'>)>)Y'Y'>)Z',)')))!)~)+)W,W,W,W,W,W,W,W,W,W,W,L'L'{)s't'])^)/)])/)/)O>()])/)/)O>()O>_)O>/)O>()O>_)O>()O>_)O>",
":);,;,;)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)[)M M M M M M M M M M M M M M M M M M })})|)|)})M M 1)2)3)4)5)6)6)6)7)7)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)",
"9)#;;,;,$ -)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)<)0)a)a)a)b)c)d)e)f)g)h)i)i)j)j)M M M M M M M M M M M })})})})M k)k)M M k)l)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)",
"+ 9)m)n)$ #;#;#;#;#;#;#;#;#;#;#;#;#;#;#;#;#;#;#;#;#;#;#;#;#;#;#;#;#;#;#;#;o)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)p)",
"+ + 9)a m)q)r)s)r)s)r)s)r)s)r)r)s)r)s)r)s)r)r)s)r)s)r)s)r)s)r)s)r)s)r)s)r)t)u)v)w)x)x)w)y)z)A)A)B)B)B)B)w)w)C)C)w)w)B)B)B)B)B)w)w)w)w)B)B)B)B)B)B)B)B)B)B)B)B)B)B)B)B)B)B)B)B)B)D)B)B)B)B)B)D)B)B)B)D)B)",
". + + 9)9)9)q)E)q)E)q)E)q)E)q)q)E)q)E)q)E)q)q)E)q)E)q)E)q)E)q)E)q)E)q)E)q)F)G)H)E)I)J)K)H)L)L)L)L)L)L)L)H)H)M)M)H)H)L)L)G)L)L)H)H)H)H)L)L)L)L)L)L)L)L)L)L)L)L)L)L)L)L)L)L)L)L)L)N)L)L)L)L)L)N)L)L)L)N)L)",
". . 0 . + O)P)O)P)O)P)O)P)O)P)P)O)P)O)P)O)P)P)O)P)O)P)O)P)O)P)O)P)O)P)O)P)O)Q)R)S)T)U)V)W)X)W)W)V)V)V)V)V)V)V)V)Y)Y)Z)Z)Y)Z)Z)Y)Y)V)V)V)V)V)V)V)V)V)V)V)V)V)V)V)V)V)V)V)V)V)V)V)Y)V)V)V)V)V)Y)V)V)V)Y)V)",
". . . 0 0 0 . 0 0 0 + 0 + 0 + 0 + 0 + 0 + 0 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 0 `) !+ + + .! !`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)`)+!`)`)`)`)`)+!`)`)`)+!`)"};
static char * listviewhighcornerright_xpm[] = {
"100 46 780 2",
" c None",
". c #6A779D",
"+ c #6C789C",
"@ c #6C789D",
"# c #6B789D",
"$ c #6A779E",
"% c #66759E",
"& c #64749E",
"* c #63749E",
"= c #61739D",
"- c #576D9B",
"; c #556C9C",
"> c #4D679D",
", c #4A649D",
"' c #49629D",
") c #465E9C",
"! c #40579C",
"~ c #3B5394",
"{ c #2C4E97",
"] c #314993",
"^ c #2B4595",
"/ c #1B4296",
"( c #253D93",
"_ c #19418F",
": c #0F3C96",
"< c #42599E",
"[ c #758DC3",
"} c #E8EAE7",
"| c #EEF0ED",
"1 c #FBFBFC",
"2 c #6F7D9B",
"3 c #6F7D9A",
"4 c #6E7B9C",
"5 c #67759E",
"6 c #63739E",
"7 c #62739D",
"8 c #596F9C",
"9 c #4A639D",
"0 c #47609C",
"a c #445B9F",
"b c #3E5697",
"c c #2E509A",
"d c #2D509A",
"e c #2D4F99",
"f c #2D4F98",
"g c #28418A",
"h c #3E51A3",
"i c #D0D3DC",
"j c #A1B6EF",
"k c #A2B6F0",
"l c #A1B6F0",
"m c #A3B6F0",
"n c #A0B6EF",
"o c #9DB6EE",
"p c #9CB5EF",
"q c #9CB2F0",
"r c #9FB5EE",
"s c #9CB4EB",
"t c #9AB3EC",
"u c #9AB0EC",
"v c #9DB3EB",
"w c #9BB4EC",
"x c #9BB4EE",
"y c #9BB1EF",
"z c #9BB0F0",
"A c #90ACF0",
"B c #93ABEE",
"C c #91A8EB",
"D c #8BA3E8",
"E c #88A1E7",
"F c #809DE9",
"G c #7A99E8",
"H c #7491E5",
"I c #698AE4",
"J c #6184E3",
"K c #507EDC",
"L c #4E7CDB",
"M c #4F7DDC",
"N c #5479DA",
"O c #567BDC",
"P c #577CDD",
"Q c #5074DA",
"R c #5174DB",
"S c #5175DC",
"T c #5276DD",
"U c #4D71DE",
"V c #4C72D8",
"W c #3A6CE0",
"X c #2B49A6",
"Y c #E0E2DF",
"Z c #93AAE9",
"` c #94A9E8",
" . c #94AAE9",
".. c #93A9E9",
"+. c #92AAE9",
"@. c #8DA9E8",
"#. c #8CA7E9",
"$. c #92ABE9",
"%. c #8EAAE9",
"&. c #8EA9E9",
"*. c #8FAAE9",
"=. c #8CA8E9",
"-. c #8CA2E7",
";. c #86A1E6",
">. c #839EE9",
",. c #7F9CE9",
"'. c #7A97E8",
"). c #7693E7",
"!. c #6E8EE8",
"~. c #678AE9",
"{. c #5D84E3",
"]. c #577CDF",
"^. c #4E77DF",
"/. c #4A70DB",
"(. c #4870DB",
"_. c #4870DC",
":. c #4770E3",
"<. c #496FDC",
"[. c #486EDB",
"}. c #466FE4",
"|. c #466EE3",
"1. c #4167D9",
"2. c #4066D8",
"3. c #3F66D8",
"4. c #3D64D7",
"5. c #3960DA",
"6. c #476DD9",
"7. c #446EE5",
"8. c #305EC8",
"9. c #8EAAE8",
"0. c #8FAAE8",
"a. c #91AAE9",
"b. c #8FA9E8",
"c. c #8BA8E8",
"d. c #8AA7E9",
"e. c #8BA5EA",
"f. c #8AA7E8",
"g. c #87A2E6",
"h. c #859FE8",
"i. c #7F9DE8",
"j. c #7C9AE8",
"k. c #7B95E7",
"l. c #7090E8",
"m. c #6B8BE9",
"n. c #6386E6",
"o. c #5881E1",
"p. c #5479DE",
"q. c #4D74DE",
"r. c #476EDB",
"s. c #446EE1",
"t. c #446EE0",
"u. c #446EDF",
"v. c #446DE0",
"w. c #426ADF",
"x. c #3C64DA",
"y. c #4360CC",
"z. c #D3D5D2",
"A. c #E6E3E8",
"B. c #8DA2E7",
"C. c #8CA6EA",
"D. c #8DA3E9",
"E. c #88A2E7",
"F. c #87A1E7",
"G. c #8AA1E7",
"H. c #849EE9",
"I. c #7D9AE9",
"J. c #7B98E8",
"K. c #7796E5",
"L. c #7191E7",
"M. c #688CE9",
"N. c #6687E5",
"O. c #5C83E1",
"P. c #557BDE",
"Q. c #4F76DE",
"R. c #4C72DE",
"S. c #456EDF",
"T. c #426AD9",
"U. c #4269D9",
"V. c #4269D8",
"W. c #3D64D9",
"X. c #3A61DA",
"Y. c #345ED6",
"Z. c #335ECF",
"`. c #C6C3C8",
" + c #86A1E7",
".+ c #87A2E7",
"++ c #87A0E7",
"@+ c #859EE8",
"#+ c #849DE9",
"$+ c #7E9BE9",
"%+ c #7A99E9",
"&+ c #7A95E5",
"*+ c #7593E7",
"=+ c #6F8EE9",
"-+ c #668AE5",
";+ c #6386E0",
">+ c #5B82DF",
",+ c #5379DE",
"'+ c #5075DE",
")+ c #4B6FDC",
"!+ c #446AD7",
"~+ c #4269D6",
"{+ c #4269D5",
"]+ c #3E65D7",
"^+ c #C9CAC9",
"/+ c #869EE9",
"(+ c #859FE9",
"_+ c #849FE9",
":+ c #829DE8",
"<+ c #819DE8",
"[+ c #7B9AE9",
"}+ c #7A96E6",
"|+ c #7290E8",
"1+ c #698CE6",
"2+ c #6689E0",
"3+ c #5D84E0",
"4+ c #587FDF",
"5+ c #5377DD",
"6+ c #4B74DE",
"7+ c #496BD8",
"8+ c #7C9BE9",
"9+ c #7E9CE9",
"0+ c #7D9AEA",
"a+ c #7D9BEA",
"b+ c #7D98E8",
"c+ c #7C98E8",
"d+ c #7796E4",
"e+ c #7592E6",
"f+ c #7390E1",
"g+ c #698DE0",
"h+ c #6588DE",
"i+ c #5E84E0",
"j+ c #5880DF",
"k+ c #5479DC",
"l+ c #4F75DE",
"m+ c #4A6FDB",
"n+ c #436AD7",
"o+ c #3F65D7",
"p+ c #BAC3BE",
"q+ c #7B9AE8",
"r+ c #7B9AEA",
"s+ c #7A9AEA",
"t+ c #7B99E9",
"u+ c #7D97E7",
"v+ c #7D95E6",
"w+ c #7D95E5",
"x+ c #7C95E6",
"y+ c #7493E3",
"z+ c #7290DF",
"A+ c #6C8DDE",
"B+ c #6B89E1",
"C+ c #6486DF",
"D+ c #5D81DF",
"E+ c #567DDE",
"F+ c #4F73DE",
"G+ c #496EDA",
"H+ c #355ED6",
"I+ c #345ED5",
"J+ c #7E95E5",
"K+ c #7C97E8",
"L+ c #7C97E7",
"M+ c #7B94E6",
"N+ c #7A95E4",
"O+ c #7695E5",
"P+ c #7694E4",
"Q+ c #7994E6",
"R+ c #7995E4",
"S+ c #7594E4",
"T+ c #7391E2",
"U+ c #6E8EDE",
"V+ c #6B8ADE",
"W+ c #6688DF",
"X+ c #5F84E0",
"Y+ c #5980E0",
"Z+ c #4D72DD",
"`+ c #456BD7",
" @ c #4168D6",
".@ c #3C64D7",
"+@ c #335ED0",
"@@ c #4659C7",
"#@ c #7292E1",
"$@ c #7392E1",
"%@ c #7492E1",
"&@ c #718FDF",
"*@ c #6F8EDE",
"=@ c #6D8BDE",
"-@ c #6B88DF",
";@ c #597FDF",
">@ c #557ADD",
",@ c #5176DC",
"'@ c #4D74DD",
")@ c #496DDA",
"!@ c #3860D8",
"~@ c #7391E0",
"{@ c #7290DE",
"]@ c #6D8EDD",
"^@ c #6D8DDD",
"/@ c #7190E0",
"(@ c #6C8DDD",
"_@ c #6B89DF",
":@ c #6487E0",
"<@ c #6085DF",
"[@ c #5F81DE",
"}@ c #567EDE",
"|@ c #4F74D9",
"1@ c #466BD7",
"2@ c #4067D5",
"3@ c #3C63D7",
"4@ c #335ED3",
"5@ c #335ED1",
"6@ c #718EDD",
"7@ c #728EDD",
"8@ c #748EDD",
"9@ c #708EDD",
"0@ c #6F8DDD",
"a@ c #6E8DDD",
"b@ c #6C8ADE",
"c@ c #6C89DF",
"d@ c #6988DF",
"e@ c #6387DF",
"f@ c #6282DE",
"g@ c #5681E0",
"h@ c #577BDD",
"i@ c #5277DB",
"j@ c #4D73D8",
"k@ c #4A70D8",
"l@ c #436AD5",
"m@ c #3F66D6",
"n@ c #3C63D8",
"o@ c #3960D8",
"p@ c #3860D7",
"q@ c #335ED2",
"r@ c #345ED4",
"s@ c #6C88DF",
"t@ c #6D88DF",
"u@ c #6B89DE",
"v@ c #6888DF",
"w@ c #6587E0",
"x@ c #6989DF",
"y@ c #6687E0",
"z@ c #6287E0",
"A@ c #6281DD",
"B@ c #5881E0",
"C@ c #557ADB",
"D@ c #5176D9",
"E@ c #4E75D7",
"F@ c #4A6FD8",
"G@ c #476BD6",
"H@ c #4067D6",
"I@ c #3C62D7",
"J@ c #3C60D4",
"K@ c #365ED1",
"L@ c #345ED3",
"M@ c #6786DF",
"N@ c #5F85E0",
"O@ c #5F86E0",
"P@ c #6186DF",
"Q@ c #6286E0",
"R@ c #6284DF",
"S@ c #6384DF",
"T@ c #5B7FDE",
"U@ c #577DDC",
"V@ c #557BDA",
"W@ c #5278D8",
"X@ c #4E76D6",
"Y@ c #4C72D7",
"Z@ c #486DD8",
"`@ c #4469D6",
" # c #3F62D2",
".# c #3C60CF",
"+# c #345ECF",
"@# c #6086DF",
"## c #6085E0",
"$# c #6285DF",
"%# c #6383DD",
"&# c #6481DC",
"*# c #6380DD",
"=# c #6183DE",
"-# c #6083DD",
";# c #6081DC",
"># c #6080DD",
",# c #6083DE",
"'# c #6181DC",
")# c #6280DD",
"!# c #577EDB",
"~# c #557CD7",
"{# c #4F76D6",
"]# c #4E74D7",
"^# c #466CD7",
"/# c #3B64D6",
"(# c #4261CD",
"_# c #375FCE",
":# c #5A7FD8",
"<# c #6281DA",
"[# c #5F81D8",
"}# c #5C80D8",
"|# c #557DD7",
"1# c #577ED8",
"2# c #567ED7",
"3# c #587DD8",
"4# c #577DD8",
"5# c #587ED8",
"6# c #567DD8",
"7# c #5379D9",
"8# c #5177D7",
"9# c #4D74D5",
"0# c #486ED9",
"a# c #4068D4",
"b# c #3D65D2",
"c# c #4361CC",
"d# c #345ECE",
"e# c #325DCF",
"f# c #2C5AD1",
"g# c #3959C5",
"h# c #547BD8",
"i# c #567DD7",
"j# c #557BD8",
"k# c #5279D9",
"l# c #5278D9",
"m# c #4D74D6",
"n# c #4B71D8",
"o# c #496CD8",
"p# c #4669D7",
"q# c #3D66D3",
"r# c #3F62CF",
"s# c #4260CC",
"t# c #5379D8",
"u# c #4E75D4",
"v# c #4C73D7",
"w# c #476CD7",
"x# c #4869D0",
"y# c #4067D2",
"z# c #3D64D1",
"A# c #4261CC",
"B# c #395FCE",
"C# c #4F75D3",
"D# c #5074D2",
"E# c #5174D1",
"F# c #5175D1",
"G# c #4F74D3",
"H# c #4C73D5",
"I# c #4C73D4",
"J# c #4A72D1",
"K# c #4B70CF",
"L# c #506CCC",
"M# c #4D6BCE",
"N# c #4167D0",
"O# c #3D65D1",
"P# c #3F63CF",
"Q# c #3B5FCD",
"R# c #3159CD",
"S# c #4971D0",
"T# c #4870CF",
"U# c #4C6FCF",
"V# c #4E6CCE",
"W# c #4E6BCE",
"X# c #4769CF",
"Y# c #3D66D0",
"Z# c #3C65D1",
"`# c #4062CE",
" $ c #3D5FCD",
".$ c #365FCF",
"+$ c #325DCD",
"@$ c #2D5AD0",
"#$ c #3859C5",
"$$ c #355FCF",
"%$ c #355ECF",
"&$ c #335ECE",
"*$ c #305CCD",
"=$ c #2B5ACE",
"-$ c #3056C9",
";$ c #2553C6",
">$ c #2153C8",
",$ c #1F4FC7",
"'$ c #274CC5",
")$ c #214AC7",
"!$ c #1C48C8",
"~$ c #1244C9",
"{$ c #1043C9",
"]$ c #1144C9",
"^$ c #2A45BE",
"/$ c #2744B5",
"($ c #1D49C0",
"_$ c #2B58DE",
":$ c #002D94",
"<$ c #2B59CA",
"[$ c #2A59CA",
"}$ c #2E57C8",
"|$ c #3255C6",
"1$ c #3355C5",
"2$ c #1C52C8",
"3$ c #1D50C7",
"4$ c #234FC6",
"5$ c #264CC5",
"6$ c #1D48C7",
"7$ c #1245C8",
"8$ c #1F44C2",
"9$ c #2945BE",
"0$ c #2A45BD",
"a$ c #2040BF",
"b$ c #3156C7",
"c$ c #3056C7",
"d$ c #3354C5",
"e$ c #3355C6",
"f$ c #3255C5",
"g$ c #3254C5",
"h$ c #1952C7",
"i$ c #1951C8",
"j$ c #2050C7",
"k$ c #274CC4",
"l$ c #244CC6",
"m$ c #1F49C7",
"n$ c #1E47C5",
"o$ c #2045C3",
"p$ c #1C44BF",
"q$ c #2045BE",
"r$ c #2040B8",
"s$ c #3254C6",
"t$ c #3055C6",
"u$ c #2A54C6",
"v$ c #2353C7",
"w$ c #3054C5",
"x$ c #2F55C5",
"y$ c #2A54C5",
"z$ c #2553C5",
"A$ c #2F54C5",
"B$ c #3155C6",
"C$ c #2A54C7",
"D$ c #1A52C8",
"E$ c #204FC2",
"F$ c #264DC6",
"G$ c #234BC5",
"H$ c #1D48C1",
"I$ c #1E48BF",
"J$ c #2646BE",
"K$ c #2B45BD",
"L$ c #1E43BE",
"M$ c #2643BF",
"N$ c #2243BF",
"O$ c #3049BC",
"P$ c #1E50BE",
"Q$ c #1D50C0",
"R$ c #1D50BF",
"S$ c #1852C1",
"T$ c #1E51C0",
"U$ c #214FBF",
"V$ c #2050C0",
"W$ c #244EBF",
"X$ c #2151C0",
"Y$ c #234FBF",
"Z$ c #2350C0",
"`$ c #2351C0",
" % c #244FBF",
".% c #2250C0",
"+% c #2051C0",
"@% c #1E50C0",
"#% c #244DBE",
"$% c #274DBF",
"%% c #244CBF",
"&% c #1C48C0",
"*% c #2247BF",
"=% c #2C44BD",
"-% c #1C44BE",
";% c #1444BF",
">% c #1841BF",
",% c #1F40BF",
"'% c #254DBE",
")% c #224FBE",
"!% c #224FBF",
"~% c #234EBF",
"{% c #254CBD",
"]% c #244DBD",
"^% c #244CBD",
"/% c #264DBE",
"(% c #264DBD",
"_% c #214BC0",
":% c #1D48C0",
"<% c #2347BF",
"[% c #2B44BD",
"}% c #2444BE",
"|% c #0F42BF",
"1% c #0641BF",
"2% c #0F41BF",
"3% c #1741BE",
"4% c #1F40BD",
"5% c #234BBF",
"6% c #234CBE",
"7% c #214BBE",
"8% c #244CBE",
"9% c #214ABE",
"0% c #214ABF",
"a% c #1F48C0",
"b% c #2746BE",
"c% c #1F43BE",
"d% c #0941BE",
"e% c #0342BA",
"f% c #0242BC",
"g% c #1241B8",
"h% c #1F40B7",
"i% c #2F41AC",
"j% c #2644AE",
"k% c #2D49B4",
"l% c #2649B6",
"m% c #2949B7",
"n% c #2849B5",
"o% c #2149B8",
"p% c #1E49B9",
"q% c #1F48B8",
"r% c #1F49B9",
"s% c #2545B6",
"t% c #2744B7",
"u% c #2844B7",
"v% c #2043B8",
"w% c #1241B7",
"x% c #1340B8",
"y% c #0D41B8",
"z% c #1941B8",
"A% c #1F40B8",
"B% c #203FB8",
"C% c #2549B5",
"D% c #2648B6",
"E% c #2547B7",
"F% c #2248B7",
"G% c #2048B7",
"H% c #2346B6",
"I% c #2146B6",
"J% c #2247B7",
"K% c #2148B7",
"L% c #2743B4",
"M% c #2643B5",
"N% c #2542B6",
"O% c #1D42B7",
"P% c #0E42B8",
"Q% c #0C41B8",
"R% c #1341B8",
"S% c #1740B8",
"T% c #1C41B8",
"U% c #1F40B1",
"V% c #2644B5",
"W% c #2544B5",
"X% c #2544B4",
"Y% c #2444B5",
"Z% c #2444B4",
"`% c #2744B4",
" & c #2241B7",
".& c #1D41B8",
"+& c #0B42B8",
"@& c #0942B8",
"#& c #0C42B8",
"$& c #0F41B8",
"%& c #1641B8",
"&& c #2442B5",
"*& c #2543B3",
"=& c #2342B2",
"-& c #2341B4",
";& c #2141B3",
">& c #2141B5",
",& c #2140B5",
"'& c #2040B5",
")& c #1C40B7",
"!& c #1B41B3",
"~& c #0142B6",
"{& c #0E41B7",
"]& c #1141B7",
"^& c #1440B2",
"/& c #113FB0",
"(& c #1440B0",
"_& c #213EAF",
":& c #233DAE",
"<& c #223EAF",
"[& c #1E40B1",
"}& c #173EAD",
"|& c #1440AF",
"1& c #0D40AF",
"2& c #0941B0",
"3& c #0D3FAE",
"4& c #1B3CAC",
"5& c #233CAD",
"6& c #203FB0",
"7& c #273BAD",
"8& c #1D40B0",
"9& c #2040B1",
"0& c #1E40B0",
"a& c #1C40B0",
"b& c #1B3DAC",
"c& c #143DAC",
"d& c #193DAD",
"e& c #1B3DAD",
"f& c #173DAD",
"g& c #153DAC",
"h& c #1C3CAC",
"i& c #243CAD",
"j& c #213FB0",
"k& c #263BAA",
"l& c #253CAE",
"m& c #273AAC",
"n& c #273AAD",
"o& c #253BAD",
"p& c #1D3CAC",
"q& c #243BAD",
"r& c #1E3CAC",
"s& c #263BAD",
"t& c #1A3DAC",
"u& c #143DAB",
"v& c #163DAC",
"w& c #1A3CAC",
"x& c #1F3CAD",
"y& c #263BAB",
"z& c #263BA6",
"A& c #1E42A4",
"B& c #2D40A5",
"C& c #253BA6",
"D& c #253CA7",
"E& c #263AA5",
"F& c #253BA7",
"G& c #1E3BA6",
"H& c #193DA6",
"I& c #173DA5",
"J& c #143DA6",
"K& c #1A3DA7",
"L& c #133DA6",
"M& c #123DA5",
"N& c #1A3CA7",
"O& c #243BA6",
"P& c #263AA7",
"Q& c #273BA7",
"R& c #263AA6",
"S& c #223BA6",
"T& c #1D3BA6",
"U& c #173CA6",
"V& c #133DA5",
"W& c #1B3DA6",
"X& c #193DA5",
"Y& c #123DA4",
"Z& c #163CA5",
"`& c #213CA6",
" * c #273BA8",
".* c #263BA7",
"+* c #253BA5",
"@* c #263BA5",
"#* c #1C3BA6",
"$* c #1B3BA9",
"%* c #133BA8",
"&* c #0A3BA7",
"** c #083AA6",
"=* c #123CA5",
"-* c #0839A8",
";* c #0239A6",
">* c #123AA8",
",* c #1F49C8",
"'* c #2F4DA4",
")* c #2E4DA3",
"!* c #384CA4",
"~* c #3C4DA7",
"{* c #394EA7",
"]* c #3B4CA5",
"^* c #3C52B1",
"/* c #3551A8",
"(* c #3759BE",
"_* c #4161C7",
":* c #0033A8",
"<* c #596FA9",
"[* c #2F4DA3",
"}* c #2D4BA5",
"|* c #2E4CA4",
"1* c #2C4AA5",
"2* c #2D4BA4",
"3* c #354DA4",
"4* c #3A4BA4",
"5* c #394DA6",
"6* c #4056AD",
"7* c #445BBB",
"8* c #B5B7B4",
"9* c #1B2F85",
"0* c #242F79",
"a* c #B5B5B5",
"b* c #B5B2B6",
"c* c #C0C3C3",
"d* c #E3E3E4",
"e* c #EBEDEA",
". + @ + # $ % & # $ % & # $ % & # $ % & & * = - ; > , ' ) ! ~ { { { { { { { ] ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ / / / ( / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / _ _ / / : / < [ } | | | 1 1 ",
"2 2 2 2 3 2 4 @ 3 2 4 @ 3 2 4 @ 3 2 4 @ # 5 6 7 8 ; > 9 0 a b c d e f { { { ] ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ( ( ( ( ( ( ( ( ( / / / / / / / / / / / / / / / / / _ _ _ _ _ _ _ _ _ _ _ g g _ / / : : : h i } 1 | 1 ",
"j k l m n o p q n o p q r s t u v w x y z A B C D E F G H I J K L M N O P O O Q R S T T T T T T T T T T T T T T T T T T U U U U U U U U U U U U U U U U U U U U U U U U U U U U V V V U U W X : [ Y | | ",
"Z ` . ...+.@.#...+.@.#.Z $.%.&.Z $.*.=.-.;.>.,.'.).!.~.{.].^./.(._.:.<.[.}.|.1.2.3.4.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.6.7.8.: h Y } 1 ",
"9.0.a.b.c.c.d.e.f.c.d.e.f.c.d.e.f.c.d.e.g.h.i.j.k.l.m.n.o.p.q.r.s.s.t.u.u.v.w.x.4.4.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.y.5.7.6.: / z.A.} ",
"-.B.C.D.-.E.g.F.G.E.g.F.G.E.g.F.G.E.g.F.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.V.U.U.W.X.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Z.y.Y.7.7.: : `.z.} ",
" +.+g.;.++F.@+#+++F.@+#+++F.@+#+++F.@+#+$+%+&+*+=+-+;+>+,+'+)+!+~+{+]+{+{+4.4.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.Y.Y.5.5.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Z.Z.Z.y.y.5.7.7.: : ^+z.Y ",
"/+(+_+#+H.H.>.:+H.H.>.:+H.H.>.:+H.H.>.<+[+}+*+|+1+2+3+4+5+6+7+{+{+4.4.4.4.4.4.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.Y.Y.Y.Y.Y.Y.Y.5.Y.Y.Y.Y.Y.Y.Y.Y.5.Y.Y.5.5.5.5.Y.Y.Y.Y.Y.Y.Z.Z.Z.Z.y.y.y.y.y.y.7.7.: : ^+i } ",
"8+9+0+0+a+0+0+b+a+0+0+b+a+0+0+b+a+0+0+c+d+e+f+g+h+i+j+k+l+m+n+o+4.4.4.4.5.5.5.5.5.5.Y.Y.5.5.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Y.Y.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.7.7.: : p+z.Y ",
"q+r+r+s+t+u+v+w+t+u+v+w+t+u+v+w+t+u+x+&+y+z+A+B+C+D+E+5+F+G+~+4.4.4.4.5.5.5.5.5.H+Y.Y.Y.Y.Y.Y.Y.Y.I+Y.Z.Y.Y.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.7.7.: : `.z.A.",
"J+v+K+L+M+N+O+P+Q+R+O+P+Q+R+O+P+Q+R+O+S+T+U+V+W+X+Y+P.T Z+`+ @4.4..@5.5.5.5.5.5.Y.Y.Y.I+I+I+I+I++@+@Z.Z.Y.Y.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.@@Z.7.7.: : p+z.Y ",
"#@$@$@%@%@$@#@&@#@#@#@&@#@#@#@&@#@#@#@*@=@-@;+i+;@>@,@'@)@ @4.X.5.5.H+Y.Y.Y.!@Y.Y.I++@+@Z.Z.+@Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.y.Z.6.6.: : `.z.A.",
"#@$@~@~@~@{@]@^@/@{@]@^@/@{@]@^@/@{@]@(@_@:@<@[@}@k+|@V 1@2@3@5.5.5.Y.Y.I+4@I+5@+@Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.y.Z.6.6.: : p+z.Y ",
"6@7@8@9@0@a@b@c@a@a@b@c@a@a@b@c@a@a@b@d@e@<@f@g@h@i@j@k@l@m@n@o@o@p@Y.I+q@q@r@+@Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.y.Z.6.6.: : `.z.A.",
"s@t@u@_@_@v@w@w@x@v@w@w@x@v@y@y@x@v@:@z@A@B@P C@D@E@F@G@H@I@J@K@5@+@+@+@r@I+L@Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.@@Z.W W : : p+z.Y ",
"M@N@O@P@C+Q@Q@R@C+;+Q@R@C+;+;+S@C+Q@Q@R@T@U@V@W@X@Y@Z@`@4. #.#+#Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.8.Z.Z.Z.Z.8.8.Z.Z.y.@@@@W W : : `.z.A.",
"@#O@O@##$#%#&#*#=#-#;#>#,#-#;#>#,#-#'#)#!#~#W@{#]#k@^#H@/#(#_#Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.8.8.Z.Z.Z.Z.Z.Z.Z.8.8.8.8.8.8.8.8.8.8.8.Z.Z.y.y.@@W W : : p+z.Y ",
":#<#[#}#|#1#2#3#4#5#1#4#4#1#1#4#4#1#1#6#7#8#9#V 0#`+a#b#c#d#e#Z.Z.Z.f#Z.Z.Z.f#f#f#f#f#f#f#f#f#f#g#g#g#g#g#8.8.8.8.8.8.8.8.8.g#g#g#g#8.g#8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.y.y.@@W W : : `.z.A.",
"h#2#i#6#|#j#7#k#|#j#7#7#|#j#7#7#|#j#7#l#8#m#n#n#o#p#q#r#s#d#e#Z.Z.Z.f#f#f#f#Z.f#f#g#g#g#g#g#g#g#g#g#g#g#g#8.8.8.g#g#8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.y.y.y.y.8.8.8.y.y.@@W W : : p+z.Y ",
"l#7#7#l#7#7#7#W@7#7#7#W@7#7#k#W@t#7#7#W@u#v#n#w#x#y#z#A#B#Z.e#f#f#Z.f#f#f#Z.Z.g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#8.8.8.g#g#g#g#8.8.g#g#g#g#g#g#8.8.g#8.8.y.8.8.y.y.8.y.y.y.y.@@W W : : `.z.A.",
"C#D#E#F#G#H#I#J#G#H#I#J#G#H#I#J#G#H#I#J#K#L#M#N#O#P#s#Q#+#f#R#f#f#f#f#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#@@@@y.y.@@@@y.y.W W : : p+z.Y ",
"S#S#S#S#S#T#S#U#S#T#S#U#S#T#S#U#S#T#S#U#V#W#X#Y#Z#`# $.$+$@$#$g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#g#@@@@@@@@@@@@@@@@@@y.y.W W : : `.z.A.",
"+$Z..$$$%$+$&$*$%$+$&$*$%$+$&$*$%$+$&$*$=$-$;$>$,$'$)$!$~${$]$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$/$/$/$/$($($_$_$:$:$p+z.Y ",
"<$<$<$<$<$[$}$|$<$[$}$|$<$[$}$|$<$[$}$|$1$2$3$4$5$)$6$7$8$9$0$a$a$a$a$a$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$/$/$/$^$^$^$/$/$/$/$/$/$/$/$/$/$/$/$/$/$($($_$_$:$:$`.z.A.",
"b$c$c$c$d$e$e$f$g$|$|$1$d$e$e$1$d$e$e$1$h$i$j$k$l$m$n$o$p$9$q$a$a$a$a$a$a$a$a$^$a$a$^$^$^$^$^$^$a$r$r$r$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$^$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$($($_$_$:$:$p+z.Y ",
"e$1$s$s$1$t$u$v$w$x$y$z$A$x$u$v$g$B$C$>$D$E$F$G$H$I$J$K$L$M$N$a$a$a$a$a$a$a$a$^$r$r$a$^$^$^$a$r$r$r$r$r$/$^$r$^$^$^$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$O$($_$_$:$:$`.z.A.",
"P$Q$R$S$T$U$V$W$X$Y$Z$W$`$ %.%W$+%U$@%#%$%%%&%($*%=%-%;%>%>%,%r$r$r$r$r$a$a$a$/$/$/$r$r$r$r$r$r$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$O$($_$_$:$:$p+z.Y ",
"'%W$)%!%~%{%'%]%~%^%'%]%~%^%'%]%~%^%/%(%_%&%:%<%[%}%|%1%2%3%4%r$r$r$r$r$r$r$r$r$r$r$r$r$r$r$r$r$/$r$/$/$r$r$r$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$/$r$/$/$/$/$/$O$($_$_$:$:$`.z.A.",
"5%6%'%'%6%7%8%9%6%7%8%9%6%7%8%9%6%7%8%0%&%a%<%b%[%c%d%e%f%g%h%r$r$r$r$r$r$r$r$r$r$r$r$r$r$r$/$r$r$r$r$r$r$r$r$r$r$r$r$r$r$r$r$r$r$r$r$/$/$/$/$/$/$/$/$/$/$/$/$/$/$r$r$/$/$r$r$/$r$i%j%O$($_$_$:$:$p+z.Y ",
"k%l%m%n%o%o%p%q%o%o%r%q%o%o%r%q%o%o%p%q%s%t%/$u%v%w%x%y%z%A%B%r$r$r$r$r$r$r$r$r$r$r$r$r$r$r$r$r$r$r$r$r$r$/$/$/$/$/$/$/$r$r$i%i%i%r$r$i%i%i%i%i%i%i%i%i%i%i%i%r$/$/$j%j%j%j%j%j%j%j%j%O$($_$_$:$:$`.z.A.",
"C%D%E%F%G%H%I%J%K%H%I%J%K%H%I%J%K%H%I%J%L%M%N%O%P%Q%R%S%T%A%B%r$r$r$r$r$r$r$r$r$r$r$r$r$r$r$U%U%r$r$i%i%/$/$r$r$/$/$/$/$r$r$i%i%i%i%i%i%i%i%i%i%i%i%i%i%j%i%j%j%j%j%j%j%j%j%j%j%j%j%j%O$($_$_$:$:$p+z.Y ",
"/$/$/$/$V%V%W%X%W%Y%Y%Z%W%W%Y%Z%W%W%W%`%`% &B%.&+&@&#&$&%&A%B%r$r$r$U%U%U%U%r$U%U%U%U%U%U%U%U%U%U%i%i%i%i%i%i%i%i%/$/$/$i%i%i%i%i%i%i%i%i%j%j%j%j%i%i%i%i%i%j%j%j%i%i%j%j%j%j%j%j%j%j%O$($_$_$:$:$`.z.A.",
"&&*&=&-&=&;&>&,&=&;&>&,&=&;&>&,&=&;&>&'&)&!&~&{&]&^&/&(&_&:&<&U%U%U%U%U%U%U%U%U%U%U%U%U%i%i%U%U%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%O$($_$_$:$:$p+z.Y ",
"U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%U%[&}&|&1&2&3&4&5&_&6&U%7&U%U%U%U%U%U%U%U%i%i%U%U%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%O$O$_$_$:$:$`.z.A.",
"U%U%U%U%U%U%[&8&U%9&[&0&U%9&[&0&U%9&[&a&:&b&c&d&e&f&g&h&i&<&j&U%U%U%U%U%U%U%U%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%O$O$_$_$:$:$p+z.Y ",
"k&l&m&7&7&n&o&p&7&n&q&r&s&s&q&r&s&n&o&p&t&u&u&g&v&w&x&q&n&m&y&7&7&U%U%7&z&7&z&U%A&B&i%i%B&B&i%i%B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&i%B&O$O$_$_$:$:$`.z.A.",
"C&D&E&z&z&E&F&G&z&E&F&G&z&E&F&G&z&E&F&G&H&I&J&K&L&M&N&O&P&Q&z&z&z&z&z&z&z&z&z&z&z&z&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&O$O$_$_$:$:$p+z.Y ",
"z&z&z&z&R&S&T&U&R&S&T&U&R&S&T&U&R&S&T&U&V&V&W&X&Y&Z&`&C&R&z&z&z&z&z&z&z&z&z&z&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&O$O$_$_$:$:$^+z.A.",
"z& *.*+*@*#*$*%*@*#*$*%*@*#*$*%*@*#*$*%*&***=*-*;*>*k&P&+*z&z&z&z&z&z&z&z&z&z&z&z&z&z&z&z&z&z&z&z&z&z&z&z&z&z&z&z&z&z&z&B&B&B&B&z&z&z&B&B&B&z&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&B&/$O$O$@@_$,*:$/ ^+z.Y ",
"'*'*'*'*'*'*'*'*'*'*'*'*'*'*'*'*'*'*'*'*'*'*'*'*'*'*)*'*!*~*{*]*^*^*^*/*/*/*/*/*/*/*^*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*^*/*/*/*/*/*h h ^*h h ^*^*h h ^*^*^*^*h ^*^*^*^*h ^*^*^*(*_*_*_*_*_$:*:$<*`.z.} ",
"'*'*'*'*'*[*}*|*'*[*}*|*'*[*}*|*'*[*}*|*1*1*2*}*}*2*[*)*3*4*5*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*h h h h h h h h h h h h h h h h 6*7*_*_*_*_*^*:*:$: 8*z.Y } ",
"9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*0*( <*8*^+z.Y } 1 ",
"a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*8*b*8*b*8*b*8*b*b*8*b*8*b*8*b*8*b*8*b*8*b*8*b*8*b*8*b*8*b*8*b*8*b*8*b*8*b*8*b*8*b*8*b*8*b*8*b*8*b*8*b*8*b*8*b*8*b*8*8*8*8*b*8*`.z.A.Y | | ",
"c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*p+`.p+`.p+`.p+`.`.p+`.p+`.p+`.p+`.p+`.p+`.p+`.p+`.p+`.p+`.p+`.p+`.p+`.p+`.p+`.p+`.p+`.p+`.p+`.p+`.p+`.p+`.p+`.p+`.p+^+`.^+^+z.z.Y Y | | 1 ",
"d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*d*A.Y A.Y A.Y A.Y Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y A.Y } } | | | | 1 1 ",
"e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*e*} | } | } | } | | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | } | | | | 1 | | | 1 1 1 "};
static char * tabmiddle_xpm[] = {
"33 42 32 1",
" c None",
". c #CECFEF",
"+ c #CECBE7",
"@ c #C6C7E7",
"# c #C6CBE7",
"$ c #BDBEDE",
"% c #BDC3DE",
"& c #CECBEF",
"* c #B5B6D6",
"= c #ADAECE",
"- c #ADB2CE",
"; c #BDBAD6",
"> c #B5BAD6",
", c #C6C3DE",
"' c #ADAAC6",
") c #B5B2CE",
"! c #B5B6CE",
"~ c #A5A2BD",
"{ c #A5A6BD",
"] c #9C9EB5",
"^ c #9CA2BD",
"/ c #ADAEC6",
"( c #C6C3E7",
"_ c #9C9AB5",
": c #A5A6C6",
"< c #949AAD",
"[ c #A5AAC6",
"} c #9496AD",
"| c #BDBADE",
"1 c #BDBED6",
"2 c #9CA2B5",
"3 c #A5AABD",
"..........................+@.#.#.",
"........................$@%&#.#..",
"......................**$$@@&#.#.",
".....................=-;>,%+@.#..",
"....................'')!$$@@&#.#.",
"...................~{=)$$@@&#.#..",
"..................]^'/;;(%&#.#...",
"................._]:/*>,%&@.#.#..",
".................<{[)!$%+@.#.#...",
"................}~{=!$%@@.#......",
"................]^/-|$@@.#.......",
"................]'/*;@@&#........",
"...............<~[)>,%&#.#.......",
"...............]~=)$%+#.#........",
"...............]'/;1@@.#.........",
"...............~{)*,%&#..........",
"...............2/-$$@#...........",
"...............~[*>(@&#..........",
"...............^=)$%+#...........",
"...............{'*>(@.#..........",
"...............^=)$%+#...........",
"...............{'*>(@.#..........",
"...............^=)$%+#...........",
"...............{'*>(@.#..........",
"...............^=)$%+#...........",
"...............{'*>(@.#..........",
"...............^=)$%+#...........",
"...............{'*>@@.#..........",
"...............^=!$%&#...........",
"...............{/*;@@.#..........",
"...............{)!$%&#...........",
"..............]'/;1@@.#..........",
"..............23)>,%&#...........",
"..............~=-$$@@.#..........",
".............]{/*;@@.#...........",
"............<^[)>,%&#............",
"............]{/!$%@@.#...........",
"..........]^[-!$%@@.#............",
".........]^3/!>$@@.#.............",
".......<]^3/!>$@@&#..............",
".....<]2{[/!>$%@&#.#.............",
"}<<_]2{3/-!>$%@&#.#.............."};
static char * tabselectedbeginn_xpm[] = {
"33 39 28 1",
" c None",
". c #CECFEF",
"+ c #EFF3EF",
"@ c #FFFBFF",
"# c #F7FBF7",
"$ c #FFFFFF",
"% c #EFEFEF",
"& c #F7F7F7",
"* c #DEDFDE",
"= c #E7E7E7",
"- c #D6D3D6",
"; c #DEE3DE",
"> c #EFEBEF",
", c #F7F3F7",
"' c #CECBCE",
") c #CECFCE",
"! c #D6D7D6",
"~ c #DEDBDE",
"{ c #E7EBE7",
"] c #C6C7C6",
"^ c #E7E3E7",
"/ c #BDC3BD",
"( c #CED3CE",
"_ c #BDBABD",
": c #C6C3C6",
"< c #C6CBC6",
"[ c #D6DBD6",
"} c #BDBEBD",
"..........................+@#$#$$",
"........................%%&&@#$#$",
"......................*==%%&&@#$$",
"....................--*;>%,&@#$#$",
"...................')!~={,+@#$#$$",
"...................]-!^=%%&&@#$#$",
"................../'(~;>%&&@#$#$$",
"................._])!*={,&@#$#$$$",
"................_])~*>%&&$#$$$$$$",
"................:<!^{,&@#$$$$$$$$$$",
"..............])~;%+@#$$$$$$$$$$$",
"..............]-[={&&$#$$$$$$$$$$",
".............])!^=,&@#$$$$$$$$$$$",
"............:'-*^%+@#$$$$$$$$$$$$",
"............])~*>%&&$#$$$$$$$$$$$",
"...........:'!*={,&@#$$$$$$$$$$$$",
"..........:'-~^=,+@#$$$$$$$$$$$$$",
".......}]'-~^=%,&@#$$$$$$$$$$$$$$",
".....}:])-~^=%,+@#$#$$$$$$$$$$$$$",
"}}}:]')-!*^=%,&@#$#$$$$$$$$$$$$$$"};
static char * tabselectedend_xpm[] = {
"33 42 33 1",
" c None",
". c #FFFFFF",
"+ c #CECBE7",
"@ c #C6C7E7",
"# c #CECFEF",
"$ c #C6CBE7",
"% c #BDBEDE",
"& c #BDC3DE",
"* c #CECBEF",
"= c #B5B6D6",
"- c #ADAECE",
"; c #ADB2CE",
"> c #BDBAD6",
", c #B5BAD6",
"' c #C6C3DE",
") c #ADAAC6",
"! c #B5B2CE",
"~ c #B5B6CE",
"{ c #A5A2BD",
"] c #A5A6BD",
"^ c #9C9EB5",
"/ c #9CA2BD",
"( c #ADAEC6",
"_ c #C6C3E7",
": c #9C9AB5",
"< c #A5A6C6",
"[ c #949AAD",
"} c #A5AAC6",
"| c #9496AD",
"1 c #BDBADE",
"2 c #BDBED6",
"3 c #9CA2B5",
"4 c #A5AABD",
"..........................+@#$#$#",
"........................%@&*$#$##",
"......................==%%@@*$#$#",
".....................-;>,'&+@#$##",
"....................))!~%%@@*$#$#",
"...................{]-!%%@@*$#$##",
"..................^/)(>>_&*$#$###",
".................:^<(=,'&*@#$#$##",
".................[]}!~%&+@#$#$###",
"................|{]-~%&@@#$######",
"................^/(;1%@@#$#######",
"................^)(=>@@*$########",
"...............[{}!,'&*$#$#######",
"...............^{-!%&+$#$########",
"...............^)(>2@@#$#########",
"...............{]!='&*$##########",
"...............3(;%%@$###########",
"...............{}=,_@*$##########",
".............../-!%&+$###########",
"...............])=,_@#$##########",
".............../-!%&+$###########",
"...............])=,_@#$##########",
".............../-!%&+$###########",
"...............])=,_@#$##########",
".............../-!%&+$###########",
"...............])=,_@#$##########",
".............../-!%&+$###########",
"...............])=,@@#$##########",
".............../-~%&*$###########",
"...............](=>@@#$##########",
"...............]!~%&*$###########",
"..............^)(>2@@#$##########",
"..............34!,'&*$###########",
"..............{-;%%@@#$##########",
".............^](=>@@#$###########",
"............[/}!,'&*$############",
"............^](~%&@@#$###########",
"..........^/};~%&@@#$############",
".........^/4(~,%@@#$#############",
".......[^/4(~,%@@*$##############",
".....[^3]}(~,%&@*$#$#############",
"|[[:^3]4(;~,%&@*$#$##############"};
static char * tabend_xpm[] = {
"33 42 3 1",
" c None",
". c #CECFEF",
"+ c #FFFFFF",
"..........................+++++++",
"........................+++++++++",
"......................+++++++++++",
".....................++++++++++++",
"....................+++++++++++++",
"...................++++++++++++++",
"..................+++++++++++++++",
".................++++++++++++++++",
".................++++++++++++++++",
"................+++++++++++++++++",
"................+++++++++++++++++",
"................+++++++++++++++++",
"...............++++++++++++++++++",
"...............++++++++++++++++++",
"...............++++++++++++++++++",
"...............++++++++++++++++++",
"...............++++++++++++++++++",
"...............++++++++++++++++++",
"...............++++++++++++++++++",
"...............++++++++++++++++++",
"...............++++++++++++++++++",
"...............++++++++++++++++++",
"...............++++++++++++++++++",
"...............++++++++++++++++++",
"...............++++++++++++++++++",
"...............++++++++++++++++++",
"...............++++++++++++++++++",
"...............++++++++++++++++++",
"...............++++++++++++++++++",
"...............++++++++++++++++++",
"...............++++++++++++++++++",
"..............+++++++++++++++++++",
"..............+++++++++++++++++++",
"..............+++++++++++++++++++",
".............++++++++++++++++++++",
"............+++++++++++++++++++++",
"............+++++++++++++++++++++",
"..........+++++++++++++++++++++++",
".........++++++++++++++++++++++++",
".......++++++++++++++++++++++++++",
".....++++++++++++++++++++++++++++",
"+++++++++++++++++++++++++++++++++"};
QColor fromHsl(QColor c)
{
const qreal h = c.hueF();
const qreal s = c.saturationF();
const qreal l = c.valueF();
qreal ca[3] = {0, 0, 0};
if (s == 0 || h == 1) {
// achromatic case
ca[0] = ca[1] = ca[2] = l;
} else {
// chromatic case
qreal temp2;
if (l < qreal(0.5))
temp2 = l * (qreal(1.0) + s);
else
temp2 = l + s - (l * s);
const qreal temp1 = (qreal(2.0) * l) - temp2;
qreal temp3[3] = { h + (qreal(1.0) / qreal(3.0)),
h,
h - (qreal(1.0) / qreal(3.0)) };
for (int i = 0; i != 3; ++i) {
if (temp3[i] < qreal(0.0))
temp3[i] += qreal(1.0);
else if (temp3[i] > qreal(1.0))
temp3[i] -= qreal(1.0);
const qreal sixtemp3 = temp3[i] * qreal(6.0);
if (sixtemp3 < qreal(1.0))
ca[i] = ((temp1 + (temp2 - temp1) * sixtemp3));
else if ((temp3[i] * qreal(2.0)) < qreal(1.0))
ca[i] = (temp2);
else if ((temp3[i] * qreal(3.0)) < qreal(2.0))
ca[i] = temp1 + (temp2 -temp1) * (qreal(2.0) /qreal(3.0) - temp3[i]) * qreal(6.0);
else ca[i] = temp1;
}
}
return QColor::fromRgbF(ca[0], ca[1], ca[2]);
}
#define Q_MAX_3(a, b, c) ( ( a > b && a > c) ? a : (b > c ? b : c) )
#define Q_MIN_3(a, b, c) ( ( a < b && a < c) ? a : (b < c ? b : c) )
QColor toHsl(QColor c)
{
QColor color;
qreal h;
qreal s;
qreal l;
const qreal r = c.redF();
const qreal g = c.greenF();
const qreal b = c.blueF();
const qreal max = Q_MAX_3(r, g, b);
const qreal min = Q_MIN_3(r, g, b);
const qreal delta = max - min;
const qreal delta2 = max + min;
const qreal lightness = qreal(0.5) * delta2;
l = (lightness);
if (qFuzzyIsNull(delta)) {
// achromatic case, hue is undefined
h = 0;
s = 0;
} else {
// chromatic case
qreal hue = 0;
if (lightness < qreal(0.5))
s = ((delta / delta2));
else
s = ((delta / (qreal(2.0) - delta2)));
if (qFuzzyCompare(r, max)) {
hue = ((g - b) /delta);
} else if (qFuzzyCompare(g, max)) {
hue = (2.0 + (b - r) / delta);
} else if (qFuzzyCompare(b, max)) {
hue = (4.0 + (r - g) / delta);
} else {
Q_ASSERT_X(false, "QColor::toHsv", "internal error");
}
hue *= 60.0;
if (hue < 0.0)
hue += 360.0;
h = (hue * 100);
}
h = h / 36000;
return QColor::fromHsvF(h, s, l);
}
void tintColor(QColor &color, QColor tintColor, qreal _saturation)
{
tintColor = toHsl(tintColor);
color = toHsl(color);
qreal hue = tintColor.hueF();
qreal saturation = color.saturationF();
if (_saturation)
saturation = _saturation;
qreal lightness = color.valueF();
color.setHsvF(hue, saturation, lightness);
color = fromHsl(color);
color.toRgb();
}
void tintImagePal(QImage *image, QColor color, qreal saturation)
{
QVector<QRgb> colorTable = image->colorTable();
for (int i=2;i< colorTable.size();i++) {
QColor c(toHsl(colorTable.at(i)));
tintColor(c, color, saturation);
colorTable[i] = c.rgb();
}
image->setColorTable(colorTable);
}
void tintImage(QImage *image, QColor color, qreal saturation)
{
*image = image->convertToFormat(QImage::Format_RGB32);
for (int x = 0; x < image->width(); x++)
for (int y = 0; y < image->height(); y++) {
QColor c(image->pixel(x,y));
tintColor(c, color, saturation);
image->setPixel(x, y, c.rgb());
}
}
#endif //Q_WS_WINCE_WM
enum QSliderDirection { SliderUp, SliderDown, SliderLeft, SliderRight };
#ifdef Q_WS_WINCE_WM
void QWindowsMobileStylePrivate::tintImagesButton(QColor color)
{
if (currentTintButton == color)
return;
currentTintButton = color;
imageTabEnd = QImage(tabend_xpm);
imageTabSelectedEnd = QImage(tabselectedend_xpm);
imageTabSelectedBegin = QImage(tabselectedbeginn_xpm);
imageTabMiddle = QImage(tabmiddle_xpm);
tintImage(&imageTabEnd, color, 0.0);
tintImage(&imageTabSelectedEnd, color, 0.0);
tintImage(&imageTabSelectedBegin, color, 0.0);
tintImage(&imageTabMiddle, color, 0.0);
if (!doubleControls) {
int height = imageTabMiddle.height() / 2 + 1;
imageTabEnd = imageTabEnd.scaledToHeight(height);
imageTabMiddle = imageTabMiddle.scaledToHeight(height);
imageTabSelectedEnd = imageTabSelectedEnd.scaledToHeight(height);
imageTabSelectedBegin = imageTabSelectedBegin.scaledToHeight(height);
}
}
void QWindowsMobileStylePrivate::tintImagesHigh(QColor color)
{
if (currentTintHigh == color)
return;
currentTintHigh = color;
tintListViewHighlight(color);
imageScrollbarHandleUpHigh = imageScrollbarHandleUp;
imageScrollbarHandleDownHigh = imageScrollbarHandleDown;
tintImagePal(&imageScrollbarHandleDownHigh, color, qreal(0.8));
tintImagePal(&imageScrollbarHandleUpHigh, color, qreal(0.8));
}
void QWindowsMobileStylePrivate::tintListViewHighlight(QColor color)
{
imageListViewHighlightCornerRight = QImage(listviewhighcornerright_xpm);
tintImage(&imageListViewHighlightCornerRight, color, qreal(0.0));
imageListViewHighlightCornerLeft = QImage(listviewhighcornerleft_xpm);
tintImage(&imageListViewHighlightCornerLeft, color, qreal(0.0));
imageListViewHighlightMiddle = QImage(listviewhighmiddle_xpm);
tintImage(&imageListViewHighlightMiddle, color, qreal(0.0));
int height = imageListViewHighlightMiddle.height();
if (!doubleControls) {
height = height / 2;
imageListViewHighlightCornerRight = imageListViewHighlightCornerRight.scaledToHeight(height);
imageListViewHighlightCornerLeft = imageListViewHighlightCornerLeft.scaledToHeight(height);
imageListViewHighlightMiddle = imageListViewHighlightMiddle.scaledToHeight(height);
}
}
#endif //Q_WS_WINCE_WM
void QWindowsMobileStylePrivate::setupWindowsMobileStyle65()
{
#ifdef Q_WS_WINCE_WM
wm65 = qt_wince_is_windows_mobile_65();
if (wm65) {
imageScrollbarHandleUp = QImage(sbhandleup_xpm);
imageScrollbarHandleDown = QImage(sbhandledown_xpm);
imageScrollbarGripUp = QImage(sbgripup_xpm);
imageScrollbarGripDown = QImage(sbgripdown_xpm);
imageScrollbarGripMiddle = QImage(sbgripmiddle_xpm);
if (!doubleControls) {
imageScrollbarHandleUp = imageScrollbarHandleUp.scaledToHeight(imageScrollbarHandleUp.height() / 2);
imageScrollbarHandleDown = imageScrollbarHandleDown.scaledToHeight(imageScrollbarHandleDown.height() / 2);
imageScrollbarGripMiddle = imageScrollbarGripMiddle.scaledToHeight(imageScrollbarGripMiddle.height() / 2);
imageScrollbarGripUp = imageScrollbarGripUp.scaledToHeight(imageScrollbarGripUp.height() / 2);
imageScrollbarGripDown = imageScrollbarGripDown.scaledToHeight(imageScrollbarGripDown.height() / 2);
} else {
}
tintImagesHigh(Qt::blue);
}
#endif //Q_WS_WINCE_WM
}
void QWindowsMobileStylePrivate::drawTabBarTab(QPainter *painter, const QStyleOptionTab *tab)
{
#ifndef QT_NO_TABBAR
#ifdef Q_WS_WINCE_WM
if (wm65) {
tintImagesButton(tab->palette.button().color());
QRect r;
r.setTopLeft(tab->rect.topRight() - QPoint(imageTabMiddle.width(), 0));
r.setBottomRight(tab->rect.bottomRight());
if (tab->state & QStyle::State_Selected) {
painter->fillRect(tab->rect, tab->palette.window());
} else {
painter->fillRect(tab->rect, QColor(imageTabMiddle.pixel(0,0)));
}
if (tab->selectedPosition == QStyleOptionTab::NextIsSelected) {
painter->drawImage(r, imageTabSelectedBegin);
} else if (tab->position == QStyleOptionTab::End ||
tab->position == QStyleOptionTab::OnlyOneTab) {
if (!(tab->state & QStyle::State_Selected)) {
painter->drawImage(r, imageTabEnd);
}
} else if (tab->state & QStyle::State_Selected) {
painter->drawImage(r, imageTabSelectedEnd);
} else {
painter->drawImage(r, imageTabMiddle);
}
if (tab->position == QStyleOptionTab::Beginning && ! (tab->state & QStyle::State_Selected)) {
painter->drawImage(tab->rect.topLeft() - QPoint(imageTabMiddle.width() * 0.60, 0), imageTabSelectedEnd);
}
//imageTabBarBig
return;
}
#endif //Q_WS_WINCE_WM
painter->save();
painter->setPen(tab->palette.shadow().color());
if (doubleControls) {
QPen pen = painter->pen();
pen.setWidth(2);
pen.setCapStyle(Qt::FlatCap);
painter->setPen(pen);
}
if(tab->shape == QTabBar::RoundedNorth) {
if (tab->state & QStyle::State_Selected) {
painter->fillRect(tab->rect, tab->palette.light());
painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight());
}
else {
painter->fillRect(tab->rect, tab->palette.button());
painter->drawLine(tab->rect.bottomLeft() , tab->rect.bottomRight());
painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight());
}
}
else if(tab->shape == QTabBar::RoundedSouth) {
if (tab->state & QStyle::State_Selected) {
painter->fillRect(tab->rect.adjusted(0,-2,0,0), tab->palette.light());
painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight());
}
else {
painter->fillRect(tab->rect, tab->palette.button());
if (doubleControls)
painter->drawLine(tab->rect.topLeft() + QPoint(0,1), tab->rect.topRight() + QPoint(0,1));
else
painter->drawLine(tab->rect.topLeft(), tab->rect.topRight());
painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight());
}
}
else if(tab->shape == QTabBar::RoundedEast) {
if (tab->state & QStyle::State_Selected) {
painter->fillRect(tab->rect, tab->palette.light());
painter->drawLine(tab->rect.topLeft(), tab->rect.topRight());
}
else {
painter->fillRect(tab->rect, tab->palette.button());
painter->drawLine(tab->rect.topLeft(), tab->rect.bottomLeft());
painter->drawLine(tab->rect.topLeft(), tab->rect.topRight());
}
}
else if(tab->shape == QTabBar::RoundedWest) {
if (tab->state & QStyle::State_Selected) {
painter->fillRect(tab->rect, tab->palette.light());
painter->drawLine(tab->rect.bottomLeft(), tab->rect.bottomRight());
}
else {
painter->fillRect(tab->rect, tab->palette.button());
painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight());
painter->drawLine(tab->rect.bottomLeft(), tab->rect.bottomRight());
}
}
painter->restore();
#endif //QT_NO_TABBAR
}
void QWindowsMobileStylePrivate::drawPanelItemViewSelected(QPainter *painter, const QStyleOptionViewItemV4 *option, QRect rect)
{
#ifdef Q_WS_WINCE_WM
if (wm65) {
QRect r;
if (rect.isValid())
r = rect;
else
r = option->rect;
tintImagesHigh(option->palette.highlight().color());
painter->setPen(QColor(Qt::lightGray));
if (option->viewItemPosition == QStyleOptionViewItemV4::Middle) {
painter->drawImage(r, imageListViewHighlightMiddle);
} else if (option->viewItemPosition == QStyleOptionViewItemV4::Beginning) {
painter->drawImage(r.adjusted(10, 0, 0, 0), imageListViewHighlightMiddle);
} else if (option->viewItemPosition == QStyleOptionViewItemV4::End) {
painter->drawImage(r.adjusted(0, 0, -10, 0), imageListViewHighlightMiddle);
} else {
painter->drawImage(r.adjusted(10, 0, -10, 0), imageListViewHighlightMiddle);
}
QImage cornerLeft = imageListViewHighlightCornerLeft;
QImage cornerRight = imageListViewHighlightCornerRight;
int width = r.width() > cornerRight.width() ? r.width() : cornerRight.width();
if ((width * 2) > r.width()) {
width = (r.width() - 5) / 2;
}
cornerLeft = cornerLeft.scaled(width, r.height());
cornerRight = cornerRight.scaled(width, r.height());
if ((option->viewItemPosition == QStyleOptionViewItemV4::Beginning) || (option->viewItemPosition == QStyleOptionViewItemV4::OnlyOne) || !option->viewItemPosition) {
painter->drawImage(r.topLeft(), cornerLeft);
}
if ((option->viewItemPosition == QStyleOptionViewItemV4::End) || (option->viewItemPosition == QStyleOptionViewItemV4::OnlyOne) || !option->viewItemPosition) {
painter->drawImage(r.topRight() - QPoint(cornerRight.width(),0), cornerRight);
}
return;
}
#endif //Q_WS_WINCE_WM
QPalette::ColorGroup cg = option->state & QStyle::State_Enabled
? QPalette::Normal : QPalette::Disabled;
if (rect.isValid())
painter->fillRect(rect, option->palette.brush(cg, QPalette::Highlight));
else
painter->fillRect(option->rect, option->palette.brush(cg, QPalette::Highlight));
}
void QWindowsMobileStylePrivate::drawScrollbarGrip(QPainter *p, QStyleOptionSlider *newScrollbar, const QStyleOptionComplex *option, bool drawCompleteFrame)
{
#ifdef Q_WS_WINCE_WM
if (wm65) {
if (newScrollbar->orientation == Qt::Horizontal) {
QTransform transform;
transform.rotate(-90);
QRect r = newScrollbar->rect;
p->drawImage(r.adjusted(10, 0, -10, 0), imageScrollbarGripMiddle.transformed(transform));
p->drawImage(r.topLeft(), imageScrollbarGripUp.transformed(transform));
p->drawImage(r.topRight() - QPoint(imageScrollbarGripDown.height() - 1, 0), imageScrollbarGripDown.transformed(transform));
} else {
QRect r = newScrollbar->rect;
p->drawImage(r.adjusted(0, 10, 0, -10), imageScrollbarGripMiddle);
p->drawImage(r.topLeft(), imageScrollbarGripUp);
p->drawImage(r.bottomLeft() - QPoint(0, imageScrollbarGripDown.height() - 1), imageScrollbarGripDown);
}
return ;
}
#endif
if (newScrollbar->orientation == Qt::Horizontal) {
p->fillRect(newScrollbar->rect,option->palette.button());
QRect r = newScrollbar->rect;
p->drawLine(r.topLeft(), r.bottomLeft());
p->drawLine(r.topRight(), r.bottomRight());
if (smartphone) {
p->drawLine(r.topLeft(), r.topRight());
p->drawLine(r.bottomLeft(), r.bottomRight());
}
}
else {
p->fillRect(newScrollbar->rect,option->palette.button());
QRect r = newScrollbar->rect;
p->drawLine(r.topLeft(), r.topRight());
p->drawLine(r.bottomLeft(), r.bottomRight());
if (smartphone) {
p->drawLine(r.topLeft(), r.bottomLeft());
p->drawLine(r.topRight(), r.bottomRight());
}
}
if (newScrollbar->state & QStyle::State_HasFocus) {
QStyleOptionFocusRect fropt;
fropt.QStyleOption::operator=(*newScrollbar);
fropt.rect.setRect(newScrollbar->rect.x() + 2, newScrollbar->rect.y() + 2,
newScrollbar->rect.width() - 5,
newScrollbar->rect.height() - 5);
}
int gripMargin = doubleControls ? 4 : 2;
int doubleLines = doubleControls ? 2 : 1;
//If there is a frame around the scrollbar (abstractScrollArea),
//then the margin is different, because of the missing frame
int gripMarginFrame = doubleControls ? 3 : 1;
if (drawCompleteFrame)
gripMarginFrame = 0;
//draw grips
if (!smartphone)
if (newScrollbar->orientation == Qt::Horizontal) {
for (int i = -3; i < 3; i += 2) {
p->drawLine(
QPoint(newScrollbar->rect.center().x() + i * doubleLines + 1,
newScrollbar->rect.top() + gripMargin +gripMarginFrame),
QPoint(newScrollbar->rect.center().x() + i * doubleLines + 1,
newScrollbar->rect.bottom() - gripMargin));
}
} else {
for (int i = -2; i < 4 ; i += 2) {
p->drawLine(
QPoint(newScrollbar->rect.left() + gripMargin + gripMarginFrame ,
newScrollbar->rect.center().y() + 1 + i * doubleLines - 1),
QPoint(newScrollbar->rect.right() - gripMargin,
newScrollbar->rect.center().y() + 1 + i * doubleLines - 1));
}
}
if (!smartphone) {
QRect r;
if (doubleControls)
r = option->rect.adjusted(1, 1, -1, 0);
else
r = option->rect.adjusted(0, 0, -1, 0);
if (drawCompleteFrame && doubleControls)
r.adjust(0, 0, 0, -1);
//Check if the scrollbar is part of an abstractItemView and draw the frame according
if (drawCompleteFrame)
p->drawRect(r);
else
if (newScrollbar->orientation == Qt::Horizontal)
p->drawLine(r.topLeft(), r.topRight());
else
p->drawLine(r.topLeft(), r.bottomLeft());
}
}
void QWindowsMobileStylePrivate::drawScrollbarHandleUp(QPainter *p, QStyleOptionSlider *opt, bool completeFrame, bool )
{
#ifdef Q_WS_WINCE_WM
if (wm65) {
tintImagesHigh(opt->palette.highlight().color());
QRect r = opt->rect;
if (opt->orientation == Qt::Horizontal) {
QTransform transform;
transform.rotate(-90);
if (opt->state & QStyle::State_Sunken)
p->drawImage(r.topLeft(), imageScrollbarHandleUpHigh.transformed(transform));
else
p->drawImage(r.topLeft(), imageScrollbarHandleUp.transformed(transform));
} else {
if (opt->state & QStyle::State_Sunken)
p->drawImage(r.topLeft(), imageScrollbarHandleUpHigh);
else
p->drawImage(r.topLeft(), imageScrollbarHandleUp);
}
return ;
}
#endif //Q_WS_WINCE_WM
QBrush fill = opt->palette.button();
if (opt->state & QStyle::State_Sunken)
fill = opt->palette.shadow();
QStyleOption arrowOpt = *opt;
if (doubleControls)
arrowOpt.rect = opt->rect.adjusted(4, 6, -5, -3);
else
arrowOpt.rect = opt->rect.adjusted(5, 6, -4, -3);
bool horizontal = (opt->orientation == Qt::Horizontal);
if (horizontal) {
p->fillRect(opt->rect,fill);
QRect r = opt->rect.adjusted(0,0,1,0);
p->drawLine(r.topRight(), r.bottomRight());
if (doubleControls)
arrowOpt.rect.adjust(0, -2 ,0, -2);
q_func()->proxy()->drawPrimitive(QStyle::PE_IndicatorArrowLeft, &arrowOpt, p, 0);
} else {
p->fillRect(opt->rect,fill);
QRect r = opt->rect.adjusted(0, 0, 0, 1);
p->drawLine(r.bottomLeft(), r.bottomRight());
if (completeFrame)
arrowOpt.rect.adjust(-2, 0, -2, 0);
if (doubleControls)
arrowOpt.rect.adjust(0, -4 , 0, -4);
if (completeFrame && doubleControls)
arrowOpt.rect.adjust(2, 0, 2, 0);
q_func()->proxy()->drawPrimitive(QStyle::PE_IndicatorArrowUp, &arrowOpt, p, 0);
}
}
void QWindowsMobileStylePrivate::drawScrollbarHandleDown(QPainter *p, QStyleOptionSlider *opt, bool completeFrame, bool secondScrollBar)
{
#ifndef QT_NO_SCROLLBAR
#ifdef Q_WS_WINCE_WM
if (wm65) {
tintImagesHigh(opt->palette.highlight().color());
QRect r = opt->rect;
if (opt->orientation == Qt::Horizontal) {
QTransform transform;
transform.rotate(-90);
if (opt->state & QStyle::State_Sunken)
p->drawImage(r.topLeft(), imageScrollbarHandleDownHigh.transformed(transform));
else
p->drawImage(r.topLeft(), imageScrollbarHandleDown.transformed(transform));
} else {
if (opt->state & QStyle::State_Sunken)
p->drawImage(r.topLeft(), imageScrollbarHandleDownHigh);
else
p->drawImage(r.topLeft(), imageScrollbarHandleDown);
}
return ;
}
#endif //Q_WS_WINCE_WM
QBrush fill = opt->palette.button();
if (opt->state & QStyle::State_Sunken)
fill = opt->palette.shadow();
QStyleOption arrowOpt = *opt;
if (doubleControls)
arrowOpt.rect = opt->rect.adjusted(4, 0, -5, 3);
else
arrowOpt.rect = opt->rect.adjusted(5, 6, -4, -3);
bool horizontal = (opt->orientation == Qt::Horizontal);
if (horizontal) {
p->fillRect(opt->rect,fill);
QRect r = opt->rect.adjusted(0, 0, 0, 0);
p->drawLine(r.topLeft(), r.bottomLeft());
if (secondScrollBar)
p->drawLine(r.topRight(), r.bottomRight());
if (doubleControls)
arrowOpt.rect.adjust(0, 4, 0, 4 );
q_func()->proxy()->drawPrimitive(QStyle::PE_IndicatorArrowRight, &arrowOpt, p, 0);
} else {
p->fillRect(opt->rect,fill);
QRect r = opt->rect.adjusted(0, -1, 0, -1);
p->drawLine(r.topLeft(), r.topRight());
if (secondScrollBar)
p->drawLine(r.bottomLeft() + QPoint(0,1), r.bottomRight() + QPoint(0, 1));
if (completeFrame)
arrowOpt.rect.adjust(-2, 0, -2, 0);
if (doubleControls)
arrowOpt.rect.adjust(1, 0, 1, 0 );
if (completeFrame && doubleControls)
arrowOpt.rect.adjust(1, 0, 1, 0);
q_func()->proxy()->drawPrimitive(QStyle::PE_IndicatorArrowDown, &arrowOpt, p, 0);
}
#endif //QT_NO_SCROLLBAR
}
void QWindowsMobileStylePrivate::drawScrollbarGroove(QPainter *p,const QStyleOptionSlider *opt)
{
#ifndef QT_NO_SCROLLBAR
#ifdef Q_OS_WINCE_WM
if (wm65) {
p->fillRect(opt->rect, QColor(231, 231, 231));
return ;
}
#endif
QBrush fill;
if (smartphone) {
fill = opt->palette.light();
p->fillRect(opt->rect, fill);
fill = opt->palette.button();
QImage image;
#ifndef QT_NO_IMAGEFORMAT_XPM
if (opt->orientation == Qt::Horizontal)
image = QImage(vertlines_xpm);
else
image = QImage(horlines_xpm);
#endif
image.setColor(1, opt->palette.button().color().rgb());
fill.setTextureImage(image);
}
else {
fill = opt->palette.light();
}
p->fillRect(opt->rect, fill);
#endif //QT_NO_SCROLLBAR
}
QWindowsMobileStyle::QWindowsMobileStyle(QWindowsMobileStylePrivate &dd) : QWindowsStyle(dd) {
qApp->setEffectEnabled(Qt::UI_FadeMenu, false);
qApp->setEffectEnabled(Qt::UI_AnimateMenu, false);
}
QWindowsMobileStyle::QWindowsMobileStyle() : QWindowsStyle(*new QWindowsMobileStylePrivate) {
qApp->setEffectEnabled(Qt::UI_FadeMenu, false);
qApp->setEffectEnabled(Qt::UI_AnimateMenu, false);
}
QWindowsMobileStylePrivate::QWindowsMobileStylePrivate() :QWindowsStylePrivate() {
#ifdef Q_WS_WINCE
doubleControls = qt_wince_is_high_dpi();
smartphone = qt_wince_is_smartphone();
#else
doubleControls = false;
smartphone = false;
#endif //Q_WS_WINCE
#ifndef QT_NO_IMAGEFORMAT_XPM
imageArrowDown = QImage(arrowdown_xpm);
imageArrowUp = QImage(arrowdown_xpm).mirrored();
imageArrowLeft = QImage(arrowleft_xpm);
imageArrowRight = QImage(arrowleft_xpm).mirrored(true, false);
if (doubleControls) {
imageRadioButton = QImage(radiobutton_xpm);
imageRadioButtonChecked = QImage(radiochecked_xpm);
imageChecked = QImage(checkedlight_xpm);
imageCheckedBold = QImage(checkedbold_xpm);
imageRadioButtonHighlighted = QImage(highlightedradiobutton_xpm);
imageClose = QImage(cross_big_xpm);
imageMaximize = QImage(max_big_xpm);
imageMinimize = QImage(min_big_xpm);
imageNormalize = QImage(normal_big_xpm);
} else {
imageRadioButton = QImage(radiobutton_low_xpm);
imageRadioButtonChecked = QImage(radiochecked_low_xpm);
imageChecked = QImage(checkedlight_low_xpm);
imageCheckedBold = QImage(checkedbold_low_xpm);
imageRadioButtonHighlighted = QImage(highlightedradiobutton_low_xpm);
imageClose = QImage(cross_small_xpm);
imageMaximize = QImage(max_small_xpm);
imageMinimize = QImage(min_small_xpm);
imageNormalize = QImage(normal_small_xpm);
}
setupWindowsMobileStyle65();
imageArrowDownBig = QImage(arrowdown_big_xpm);
imageArrowUpBig = QImage(arrowdown_big_xpm).mirrored();
imageArrowLeftBig = QImage(arrowleft_big_xpm);
imageArrowRightBig = QImage(arrowleft_big_xpm).mirrored(true, false);
#endif
}
void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *option,
QPainter *painter, const QWidget *widget) const {
QWindowsMobileStylePrivate *d = const_cast<QWindowsMobileStylePrivate*>(d_func());
bool doRestore = false;
QRect rect = option->rect;
painter->setClipping(false);
switch (element) {
case PE_PanelButtonTool: {
int penSize = 1;
if (d->doubleControls)
penSize = 2;
if (widget)
if (QWidget *parent = widget->parentWidget())
#ifndef QT_NO_TABWIDGET
if (qobject_cast<QTabWidget *>(parent->parentWidget())) {
#else
if (false) {
#endif //QT_NO_TABBAR
rect.adjust(0,2*penSize,0,-1*penSize);
qDrawPlainRect(painter, rect, option->palette.shadow().color(), penSize, &option->palette.light());
if (option->state & (State_Sunken))
qDrawPlainRect(painter, rect, option->palette.shadow().color(), penSize, &option->palette.shadow());
}
else {
if (!(option->state & State_AutoRaise) || (option->state & (State_Sunken | State_On)))
qDrawPlainRect(painter,option->rect.adjusted(0, penSize, 0, -1 * penSize) ,
option->palette.button().color(), 0, &option->palette.button());
if (option->state & (State_Sunken)) {
qDrawPlainRect(painter, rect, option->palette.shadow().color(), penSize, &option->palette.light());
}
if (option->state & (State_On)){
QBrush fill = QBrush(option->palette.light().color());
painter->fillRect(rect.adjusted(windowsItemFrame , windowsItemFrame ,
-windowsItemFrame , -windowsItemFrame ), fill);
qDrawPlainRect(painter, rect, option->palette.shadow().color(), penSize, &option->palette.light());
}
}
break; }
case PE_IndicatorButtonDropDown:
if (d->doubleControls)
qDrawPlainRect(painter, option->rect, option->palette.shadow().color(), 2, &option->palette.button());
else
qDrawPlainRect(painter, option->rect, option->palette.shadow().color(), 1, &option->palette.button());
break;
#ifndef QT_NO_TABBAR
case PE_IndicatorTabTear:
if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) {
bool rtl = tab->direction == Qt::RightToLeft;
QRect rect = tab->rect;
QPainterPath path;
rect.setTop(rect.top() + ((tab->state & State_Selected) ? 1 : 3));
rect.setBottom(rect.bottom() - ((tab->state & State_Selected) ? 0 : 2));
path.moveTo(QPoint(rtl ? rect.right() : rect.left(), rect.top()));
int count = 3;
for(int jags = 1; jags <= count; ++jags, rtl = !rtl)
path.lineTo(QPoint(rtl ? rect.left() : rect.right(), rect.top() + jags * rect.height()/count));
painter->setPen(QPen(tab->palette.light(), qreal(.8)));
painter->setBrush(tab->palette.background());
painter->setRenderHint(QPainter::Antialiasing);
painter->drawPath(path);
}
break;
#endif //QT_NO_TABBAR
#ifndef QT_NO_TOOLBAR
case PE_IndicatorToolBarSeparator: {
painter->save();
QPoint p1, p2;
if (option->state & State_Horizontal) {
p1 = QPoint(option->rect.width()/2, 0);
p2 = QPoint(p1.x(), option->rect.height());
} else {
p1 = QPoint(0, option->rect.height()/2);
p2 = QPoint(option->rect.width(), p1.y());
}
painter->setPen(option->palette.mid().color());
if (d->doubleControls) {
QPen pen = painter->pen();
pen.setWidth(2);
pen.setCapStyle(Qt::FlatCap);
painter->setPen(pen);
}
painter->drawLine(p1, p2);
painter->restore();
break; }
#endif // QT_NO_TOOLBAR
case PE_IndicatorToolBarHandle:
painter->save();
painter->translate(option->rect.x(), option->rect.y());
if (option->state & State_Horizontal) {
int x = option->rect.width() / 2 - 4;
if (QApplication::layoutDirection() == Qt::RightToLeft)
x -= 2;
if (option->rect.height() > 4) {
qDrawWinButton(painter,x-1,0,7,option->rect.height(), option->palette, false, 0);
qDrawShadePanel(painter, x, 1, 3, option->rect.height() - 1,
option->palette, false, 0);
qDrawShadePanel(painter, x + 3, 1, 3, option->rect.height() - 1,
option->palette, false, 0);
painter->setPen(option->palette.button().color());
}
} else {
if (option->rect.width() > 4) {
int y = option->rect.height() / 2 - 4;
qDrawShadePanel(painter, 2, y, option->rect.width() - 2, 3,
option->palette, false, 0);
qDrawShadePanel(painter, 2, y + 3, option->rect.width() - 2, 3,
option->palette, false, 0);
}
}
painter->restore();
break;
#ifndef QT_NO_PROGRESSBAR
case PE_IndicatorProgressChunk: {
bool vertical = false;
if (const QStyleOptionProgressBarV2 *pb2 = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(option))
vertical = (pb2->orientation == Qt::Vertical);
if (!vertical) {
painter->fillRect(option->rect.x(), option->rect.y()+2, option->rect.width(), option->rect.height()-4,
option->palette.brush(QPalette::Highlight));
} else {
painter->fillRect(option->rect.x()+2, option->rect.y(), option->rect.width()-4, option->rect.height(),
option->palette.brush(QPalette::Highlight));
}
}
break;
#endif // QT_NO_PROGRESSBAR
case PE_FrameButtonTool: {
#ifndef QT_NO_DOCKWIDGET
if (widget && widget->inherits("QDockWidgetTitleButton")) {
if (const QDockWidget *dw = qobject_cast<const QDockWidget *>(widget->parent()))
if (dw->isFloating()){
qDrawPlainRect(painter,option->rect.adjusted(1, 1, 0, 0),
option->palette.shadow().color(),1,&option->palette.button());
return;
}
}
#endif // QT_NO_DOCKWIDGET
QBrush fill;
bool stippled;
bool panel = (element == PE_PanelButtonTool);
if ((!(option->state & State_Sunken ))
&& (!(option->state & State_Enabled)
|| ((option->state & State_Enabled ) && !(option->state & State_MouseOver)))
&& (option->state & State_On)) {
fill = QBrush(option->palette.light().color(), Qt::Dense4Pattern);
stippled = true;
} else {
fill = option->palette.brush(QPalette::Button);
stippled = false;
}
if (option->state & (State_Raised | State_Sunken | State_On)) {
if (option->state & State_AutoRaise) {
if(option->state & (State_Enabled | State_Sunken | State_On)){
if (panel)
qDrawPlainRect(painter, option->rect,option->palette.shadow().color(),d->doubleControls, &fill);
else
qDrawPlainRect(painter, option->rect,option->palette.shadow().color(),d->doubleControls, &fill);
}
if (stippled) {
painter->setPen(option->palette.button().color());
painter->drawRect(option->rect.adjusted(1, 1, -2, -2));
}
} else {
qDrawPlainRect(painter, option->rect,option->palette.shadow().color(),d->doubleControls, &fill);
}
} else {
painter->fillRect(option->rect, fill);
}
break; }
case PE_FrameFocusRect:
if (const QStyleOptionFocusRect *fropt = qstyleoption_cast<const QStyleOptionFocusRect *>(option)) {
//### check for d->alt_down
int penSize;
d->doubleControls ? penSize = 2 : penSize = 1;
bool alternateFocusStyle = false;
if (!widget)
alternateFocusStyle = true;
#ifndef QT_NO_COMBOBOX
if (qobject_cast<const QComboBox*>(widget))
alternateFocusStyle = true;
#endif
if (!(fropt->state & State_KeyboardFocusChange) && !styleHint(SH_UnderlineShortcut, option))
return;
QRect r = option->rect;
painter->save();
painter->setBackgroundMode(Qt::TransparentMode);
if (alternateFocusStyle) {
QColor bg_col = fropt->backgroundColor;
if (!bg_col.isValid())
bg_col = painter->background().color();
// Create an "XOR" color.
QColor patternCol((bg_col.red() ^ 0xff) & 0xff,
(bg_col.green() ^ 0xff) & 0xff,
(bg_col.blue() ^ 0xff) & 0xff);
painter->setBrush(QBrush(patternCol, Qt::Dense4Pattern));
painter->setBrushOrigin(r.topLeft());
}
else {
painter->setPen(option->palette.highlight().color());
painter->setBrush(option->palette.highlight());
}
painter->setPen(Qt::NoPen);
painter->setBrushOrigin(r.topLeft());
painter->drawRect(r.left(), r.top(), r.width(), penSize); // Top
painter->drawRect(r.left(), r.bottom(), r.width() + penSize - 1, penSize); // Bottom
painter->drawRect(r.left(), r.top(), penSize, r.height()); // Left
painter->drawRect(r.right(), r.top(), penSize, r.height()); // Right
painter->restore();
}
break;
case PE_PanelButtonBevel: {
QBrush fill;
bool panel = element != PE_FrameButtonBevel;
painter->setBrushOrigin(option->rect.topLeft());
if (!(option->state & State_Sunken) && (option->state & State_On))
fill = QBrush(option->palette.light().color(), Qt::Dense4Pattern);
else
fill = option->palette.brush(QPalette::Button);
if (option->state & (State_Raised | State_On | State_Sunken)) {
if (d->doubleControls)
qDrawPlainRect(painter, option->rect,option->palette.shadow().color(),2,&fill);
else
qDrawPlainRect(painter, option->rect,option->palette.shadow().color(),1,&fill);
} else {
if (panel)
painter->fillRect(option->rect, fill);
else
painter->drawRect(option->rect);
}
break; }
case PE_FrameGroupBox:
if (const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(option)) {
const QStyleOptionFrameV2 *frame2 = qstyleoption_cast<const QStyleOptionFrameV2 *>(option);
if (frame2 && !(frame2->features & QStyleOptionFrameV2::Flat)) {
QPen oldPen = painter->pen();
QRect r = frame->rect;
painter->setPen(frame->palette.shadow().color());
painter->fillRect(r.x(), r.y(), r.x() + r.width()-1,
r.y() + r.height() - windowsMobileFrameGroupBoxOffset,
frame->palette.light());
painter ->drawLine(r.topLeft() + QPoint(-2, 1), r.topRight()+ QPoint(0, 1));
if (d->doubleControls)
painter ->drawLine(r.topLeft() + QPoint(-2, 2), r.topRight()+ QPoint(0, 2));
painter->setPen(oldPen);
}
}
break;
case PE_IndicatorCheckBox: {
QBrush fill;
QRect r = d->doubleControls ? option->rect.adjusted(0,1,0,-1) : option->rect;
if (option->state & State_NoChange)
fill = QBrush(option->palette.shadow().color(), Qt::Dense4Pattern);
else if (option->state & State_Sunken)
fill = option->palette.button();
else if (option->state & State_Enabled)
fill = option->palette.base();
else
fill = option->palette.background();
painter->save();
doRestore = true;
if (d->doubleControls && (option->state & State_NoChange))
painter->fillRect(r, fill);
else
painter->fillRect(option->rect, fill);
painter->setPen(option->palette.shadow().color());
painter->drawLine(r.topLeft(), r.topRight());
painter->drawLine(r.topRight(), r.bottomRight());
painter->drawLine(r.bottomLeft(), r.bottomRight());
painter->drawLine(r.bottomLeft(), r.topLeft());
if (d->doubleControls) {
QRect r0 = r.adjusted(1, 1, -1, -1);
painter->drawLine(r0.topLeft(), r0.topRight());
painter->drawLine(r0.topRight(), r0.bottomRight());
painter->drawLine(r0.bottomLeft(), r0.bottomRight());
painter->drawLine(r0.bottomLeft(), r0.topLeft());
}
if (option->state & State_HasFocus) {
painter->setPen(option->palette.highlight().color());
QRect r2 = d->doubleControls ? r.adjusted(2, 2, -2, -2) : r.adjusted(1, 1, -1, -1);
painter->drawLine(r2.topLeft(), r2.topRight());
painter->drawLine(r2.topRight(), r2.bottomRight());
painter->drawLine(r2.bottomLeft(), r2.bottomRight());
painter->drawLine(r2.bottomLeft(), r2.topLeft());
if (d->doubleControls) {
QRect r3 = r2.adjusted(1, 1, -1, -1);
painter->drawLine(r3.topLeft(), r3.topRight());
painter->drawLine(r3.topRight(), r3.bottomRight());
painter->drawLine(r3.bottomLeft(), r3.bottomRight());
painter->drawLine(r3.bottomLeft(), r3.topLeft());
}
painter->setPen(option->palette.shadow().color());
}
//fall through...
}
case PE_IndicatorViewItemCheck:
case PE_Q3CheckListIndicator: {
if (!doRestore) {
painter->save();
doRestore = true;
}
if (element == PE_Q3CheckListIndicator || element == PE_IndicatorViewItemCheck) {
painter->setPen(option->palette.shadow().color());
if (option->state & State_NoChange)
painter->setBrush(option->palette.brush(QPalette::Button));
if (d->doubleControls) {
QRect r = QRect(option->rect.x(), option->rect.y(), windowsMobileitemViewCheckBoxSize * 2, windowsMobileitemViewCheckBoxSize * 2);
qDrawPlainRect(painter, r, option->palette.shadow().color(), 2);
} else {
QRect r = QRect(option->rect.x(), option->rect.y(), windowsMobileitemViewCheckBoxSize, windowsMobileitemViewCheckBoxSize);
qDrawPlainRect(painter, r, option->palette.shadow().color(), 1);
}
if (option->state & State_Enabled)
d->imageChecked.setColor(1, option->palette.shadow().color().rgba());
else
d->imageChecked.setColor(1, option->palette.dark().color().rgba());
if (!(option->state & State_Off)) {
if (d->doubleControls)
painter->drawImage(option->rect.x(), option->rect.y(), d->imageChecked);
else
painter->drawImage(option->rect.x() + 3, option->rect.y() + 3, d->imageChecked);
}
}
else {
if (option->state & State_NoChange)
d->imageCheckedBold.setColor(1, option->palette.dark().color().rgba());
else if (option->state & State_Enabled)
d->imageCheckedBold.setColor(1, option->palette.shadow().color().rgba());
else
d->imageCheckedBold.setColor(1, option->palette.dark().color().rgba());
if (!(option->state & State_Off)) {
if (d->doubleControls)
painter->drawImage(option->rect.x() + 2, option->rect.y(), d->imageCheckedBold);
else
painter->drawImage(option->rect.x() + 3, option->rect.y() + 3, d->imageCheckedBold);
}
}
if (doRestore)
painter->restore();
break; }
case PE_IndicatorRadioButton: {
painter->save();
if (option->state & State_HasFocus) {
d->imageRadioButtonHighlighted.setColor(1, option->palette.shadow().color().rgba());
d->imageRadioButtonHighlighted.setColor(2, option->palette.highlight().color().rgba());
painter->drawImage(option->rect.x(), option->rect.y(), d->imageRadioButtonHighlighted);
}
else {
d->imageRadioButton.setColor(1, option->palette.shadow().color().rgba());
painter->drawImage(option->rect.x(), option->rect.y(), d->imageRadioButton);
}
if (option->state & (State_Sunken | State_On)) {
if (option->state & State_Enabled)
d->imageRadioButtonChecked.setColor(1, option->palette.shadow().color().rgba());
else
d->imageRadioButtonChecked.setColor(1, option->palette.dark().color().rgba());
static const int offset = d->doubleControls ? 6 : 3;
painter->drawImage(option->rect.x() + offset, option->rect.y() + offset, d->imageRadioButtonChecked);
}
painter->restore();
break; }
case PE_PanelButtonCommand:
if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) {
QBrush fill;
State flags = option->state;
QPalette pal = option->palette;
QRect r = option->rect;
if ((flags & State_Sunken || flags & State_On) )
fill = pal.brush(QPalette::Shadow);
else
fill = pal.brush(QPalette::Button);
int singleLine = 1;
int doubleLine = 2;
if (d->doubleControls) {
singleLine = 2;
doubleLine = 4;
}
if (button->features & QStyleOptionButton::DefaultButton && flags & State_Sunken) {
if (d->doubleControls) {
qDrawPlainRect(painter, r, pal.shadow().color(), 1, &fill);
qDrawPlainRect(painter, r.adjusted(1, 1, -1, 1), pal.shadow().color(), 1, &fill);
}
else {
qDrawPlainRect(painter, r, pal.shadow().color(), 1, &fill);
}
} else if (flags & (State_Raised | State_Sunken | State_On | State_Sunken)) {
qDrawPlainRect(painter, r, pal.shadow().color(), singleLine, &fill);
} else {
painter->fillRect(r, fill);
}
}
break;
case PE_FrameDefaultButton: {
painter->save();
painter->setPen(option->palette.shadow().color());
QRect rect = option->rect;
if (d->doubleControls) {
rect.adjust(1, 1, -2, -2);
painter->drawRect(rect);
painter->drawRect(rect.adjusted(1, 1, -1, -1));
}
else {
rect.adjust(2, 2, -3, -3);
painter->drawRect(rect);
}
painter->restore();
break; }
case PE_IndicatorSpinPlus:
case PE_IndicatorSpinMinus: {
QRect r = option->rect;
int fw = proxy()->pixelMetric(PM_DefaultFrameWidth, option, widget)+2;
QRect br = r.adjusted(fw, fw, -fw, -fw);
int offset = (option->state & State_Sunken) ? 1 : 0;
int step = (br.width() + 4) / 5;
painter->fillRect(br.x() + offset, br.y() + offset +br.height() / 2 - step / 2,
br.width(), step, option->palette.buttonText());
if (element == PE_IndicatorSpinPlus)
painter->fillRect(br.x() + br.width() / 2 - step / 2 + offset, br.y() + offset+4,
step, br.height() - 7, option->palette.buttonText());
break; }
case PE_IndicatorSpinUp:
case PE_IndicatorSpinDown: {
painter->save();
QPoint points[7];
switch (element) {
case PE_IndicatorSpinUp:
points[0] = QPoint(-2, -4);
points[1] = QPoint(-2, 2);
points[2] = QPoint(-1, -3);
points[3] = QPoint(-1, 1);
points[4] = QPoint(0, -2);
points[5] = QPoint(0, 0);
points[6] = QPoint(1, -1);
break;
case PE_IndicatorSpinDown:
points[0] = QPoint(0, -4);
points[1] = QPoint(0, 2);
points[2] = QPoint(-1, -3);
points[3] = QPoint(-1, 1);
points[4] = QPoint(-2, -2);
points[5] = QPoint(-2, 0);
points[6] = QPoint(-3, -1);
break;
default:
break;
}
if (option->state & State_Sunken)
painter->translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal),
proxy()->pixelMetric(PM_ButtonShiftVertical));
if (option->state & State_Enabled) {
painter->translate(option->rect.x() + option->rect.width() / 2,
option->rect.y() + option->rect.height() / 2);
painter->setPen(option->palette.buttonText().color());
painter->drawLine(points[0], points[1]);
painter->drawLine(points[2], points[3]);
painter->drawLine(points[4], points[5]);
painter->drawPoint(points[6]);
} else {
painter->translate(option->rect.x() + option->rect.width() / 2 + 1,
option->rect.y() + option->rect.height() / 2 + 1);
painter->setPen(option->palette.light().color());
painter->drawLine(points[0], points[1]);
painter->drawLine(points[2], points[3]);
painter->drawLine(points[4], points[5]);
painter->drawPoint(points[6]);
painter->translate(-1, -1);
painter->setPen(option->palette.mid().color());
painter->drawLine(points[0], points[1]);
painter->drawLine(points[2], points[3]);
painter->drawLine(points[4], points[5]);
painter->drawPoint(points[6]);
}
painter->restore();
break; }
case PE_IndicatorArrowUpBig:
case PE_IndicatorArrowDownBig:
case PE_IndicatorArrowLeftBig:
case PE_IndicatorArrowRightBig:
case PE_IndicatorArrowUp:
case PE_IndicatorArrowDown:
case PE_IndicatorArrowRight:
case PE_IndicatorArrowLeft: {
painter->save();
if (d->doubleControls) {
QColor color;
if (option->state & State_Sunken)
color = option->palette.light().color();
else
color = option->palette.buttonText().color();
QImage image;
int xoffset, yoffset;
bool isTabBarArrow = widget && widget->parent()
&& widget->inherits("QToolButton")
&& widget->parent()->inherits("QTabBar");
switch (element) {
case PE_IndicatorArrowUp:
image = d->imageArrowUp;
xoffset = 1;
yoffset = 12;
break;
case PE_IndicatorArrowDown:
image = d->imageArrowDown;
xoffset = 1;
yoffset =12;
break;
case PE_IndicatorArrowLeft:
image = d->imageArrowLeft;
xoffset = 8;
yoffset = isTabBarArrow ? 12 : 2;
break;
case PE_IndicatorArrowRight:
image = d->imageArrowRight;
xoffset = 8;
yoffset = isTabBarArrow ? 12 : 2;
break;
case PE_IndicatorArrowUpBig:
image = d->imageArrowUpBig;
xoffset = 3;
yoffset = 12;
break;
case PE_IndicatorArrowDownBig:
image = d->imageArrowDownBig;
xoffset = 2;
yoffset =12;
break;
case PE_IndicatorArrowLeftBig:
image = d->imageArrowLeftBig;
xoffset = 8;
yoffset = 2;
break;
case PE_IndicatorArrowRightBig:
image = d->imageArrowRightBig;
xoffset = 8;
yoffset = 2;
break;
default:
break;
}
image.setColor(1, color.rgba());
painter->drawImage(option->rect.x() + xoffset, option->rect.y() + yoffset, image);
}
else {
QPoint points[7];
switch (element) {
case PE_IndicatorArrowUp:
case PE_IndicatorArrowUpBig:
points[0] = QPoint(-3, 1);
points[1] = QPoint(3, 1);
points[2] = QPoint(-2, 0);
points[3] = QPoint(2, 0);
points[4] = QPoint(-1, -1);
points[5] = QPoint(1, -1);
points[6] = QPoint(0, -2);
break;
case PE_IndicatorArrowDown:
case PE_IndicatorArrowDownBig:
points[0] = QPoint(-3, -1);
points[1] = QPoint(3, -1);
points[2] = QPoint(-2, 0);
points[3] = QPoint(2, 0);
points[4] = QPoint(-1, 1);
points[5] = QPoint(1, 1);
points[6] = QPoint(0, 2);
break;
case PE_IndicatorArrowRight:
case PE_IndicatorArrowRightBig:
points[0] = QPoint(-2, -3);
points[1] = QPoint(-2, 3);
points[2] = QPoint(-1, -2);
points[3] = QPoint(-1, 2);
points[4] = QPoint(0, -1);
points[5] = QPoint(0, 1);
points[6] = QPoint(1, 0);
break;
case PE_IndicatorArrowLeft:
case PE_IndicatorArrowLeftBig:
points[0] = QPoint(0, -3);
points[1] = QPoint(0, 3);
points[2] = QPoint(-1, -2);
points[3] = QPoint(-1, 2);
points[4] = QPoint(-2, -1);
points[5] = QPoint(-2, 1);
points[6] = QPoint(-3, 0);
break;
default:
break;
}
if (option->state & State_Sunken)
painter->setPen(option->palette.light().color());
else
painter->setPen(option->palette.buttonText().color());
if (option->state & State_Enabled) {
painter->translate(option->rect.x() + option->rect.width() / 2,
option->rect.y() + option->rect.height() / 2 - 1);
painter->drawLine(points[0], points[1]);
painter->drawLine(points[2], points[3]);
painter->drawLine(points[4], points[5]);
painter->drawPoint(points[6]);
} else {
painter->translate(option->rect.x() + option->rect.width() / 2,
option->rect.y() + option->rect.height() / 2 - 1);
painter->setPen(option->palette.mid().color());
painter->drawLine(points[0], points[1]);
painter->drawLine(points[2], points[3]);
painter->drawLine(points[4], points[5]);
painter->drawPoint(points[6]);
}
}
painter->restore();
break; }
#ifndef QT_NO_TABWIDGET
case PE_FrameTabWidget:
if (const QStyleOptionTabWidgetFrame *tab = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(option)) {
QRect rect = option->rect;
QPalette pal = option->palette;
painter->save();
QBrush fill = pal.light();
painter->fillRect(rect, fill);
painter->setPen(pal.shadow().color());
if (d->doubleControls) {
QPen pen = painter->pen();
pen.setWidth(2);
pen.setCapStyle(Qt::FlatCap);
painter->setPen(pen);
}
switch (tab->shape) {
case QTabBar::RoundedNorth:
#ifdef Q_WS_WINCE_WM
if (!d->wm65)
#endif
{
if (d->doubleControls)
painter->drawLine(rect.topLeft() + QPoint(0, 1), rect.topRight() + QPoint(0, 1));
else
painter->drawLine(rect.topLeft(), rect.topRight());
}
break;
case QTabBar::RoundedSouth:
#ifdef Q_WS_WINCE_WM
if (!d->wm65)
#endif
{
if (d->doubleControls)
painter->drawLine(rect.bottomLeft(), rect.bottomRight());
else
painter->drawLine(rect.bottomLeft(), rect.bottomRight());
}
break;
case QTabBar::RoundedEast:
#ifdef Q_WS_WINCE_WM
if (!d->wm65)
#endif
painter->drawLine(rect.topRight(), rect.bottomRight());
break;
case QTabBar::RoundedWest:
#ifdef Q_WS_WINCE_WM
if (!d->wm65)
#endif
painter->drawLine(rect.topLeft(), rect.bottomLeft());
break;
case QTabBar::TriangularWest:
case QTabBar::TriangularEast:
case QTabBar::TriangularSouth:
case QTabBar::TriangularNorth:
if (d->doubleControls)
qDrawPlainRect(painter, rect.adjusted(0,-2,0,0), option->palette.shadow().color(),2,&pal.light());
else
qDrawPlainRect(painter, rect, option->palette.shadow().color(),1,&pal.light());
break;
default:
break;
}
painter->restore();
}
break;
#endif //QT_NO_TABBAR
#ifndef QT_NO_ITEMVIEWS
case PE_PanelItemViewRow:
if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option)) {
QPalette::ColorGroup cg = vopt->state & QStyle::State_Enabled
? QPalette::Normal : QPalette::Disabled;
if (cg == QPalette::Normal && !(vopt->state & QStyle::State_Active))
cg = QPalette::Inactive;
if ((vopt->state & QStyle::State_Selected) && proxy()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected, option, widget))
d->drawPanelItemViewSelected(painter, vopt);
else if (vopt->features & QStyleOptionViewItemV2::Alternate)
painter->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::AlternateBase));
else if (!(vopt->state & QStyle::State_Enabled))
painter->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::Base));
}
break;
case PE_PanelItemViewItem:
if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option)) {
QPalette::ColorGroup cg = vopt->state & QStyle::State_Enabled
? QPalette::Normal : QPalette::Disabled;
if (cg == QPalette::Normal && !(vopt->state & QStyle::State_Active))
cg = QPalette::Inactive;
if (vopt->showDecorationSelected && (vopt->state & QStyle::State_Selected)) {
d->drawPanelItemViewSelected(painter, vopt);
} else {
if (vopt->backgroundBrush.style() != Qt::NoBrush) {
QPointF oldBO = painter->brushOrigin();
painter->setBrushOrigin(vopt->rect.topLeft());
painter->fillRect(vopt->rect, vopt->backgroundBrush);
painter->setBrushOrigin(oldBO);
}
if (vopt->state & QStyle::State_Selected) {
QRect textRect = proxy()->subElementRect(QStyle::SE_ItemViewItemText, option, widget);
d->drawPanelItemViewSelected(painter, vopt, textRect);
}
}
}
break;
#endif //QT_NO_ITEMVIEWS
case PE_FrameWindow: {
QPalette popupPal = option->palette;
popupPal.setColor(QPalette::Light, option->palette.background().color());
popupPal.setColor(QPalette::Midlight, option->palette.light().color());
if (d->doubleControls)
qDrawPlainRect(painter, option->rect, popupPal.shadow().color(),2,0);
else
qDrawPlainRect(painter, option->rect, popupPal.shadow().color(),1,0);
break; }
case PE_FrameTabBarBase: {
break; }
case PE_Widget:
break;
case PE_IndicatorMenuCheckMark: {
int markW = option->rect.width() > 7 ? 7 : option->rect.width();
int markH = markW;
if (d->doubleControls)
markW*=2;
markH*=2;
int posX = option->rect.x() + (option->rect.width() - markW)/2 + 1;
int posY = option->rect.y() + (option->rect.height() - markH)/2;
QVector<QLineF> a;
a.reserve(markH);
int i, xx, yy;
xx = posX;
yy = 3 + posY;
for (i = 0; i < markW/2; ++i) {
a << QLineF(xx, yy, xx, yy + 2);
++xx;
++yy;
}
yy -= 2;
for (; i < markH; ++i) {
a << QLineF(xx, yy, xx, yy + 2);
++xx;
--yy;
}
if (!(option->state & State_Enabled) && !(option->state & State_On)) {
int pnt;
painter->setPen(option->palette.highlightedText().color());
QPoint offset(1, 1);
for (pnt = 0; pnt < a.size(); ++pnt)
a[pnt].translate(offset.x(), offset.y());
painter->drawLines(a);
for (pnt = 0; pnt < a.size(); ++pnt)
a[pnt].translate(offset.x(), offset.y());
}
painter->setPen(option->palette.text().color());
painter->drawLines(a);
break; }
case PE_IndicatorBranch: {
// Copied from the Windows style.
static const int decoration_size = d->doubleControls ? 18 : 9;
static const int ofsA = d->doubleControls ? 4 : 2;
static const int ofsB = d->doubleControls ? 8 : 4;
static const int ofsC = d->doubleControls ? 12 : 6;
static const int ofsD = d->doubleControls ? 1 : 0;
int mid_h = option->rect.x() + option->rect.width() / 2;
int mid_v = option->rect.y() + option->rect.height() / 2;
int bef_h = mid_h;
int bef_v = mid_v;
int aft_h = mid_h;
int aft_v = mid_v;
if (option->state & State_Children) {
int delta = decoration_size / 2;
bef_h -= delta;
bef_v -= delta;
aft_h += delta;
aft_v += delta;
QPen oldPen = painter->pen();
QPen crossPen = oldPen;
crossPen.setWidth(2);
painter->setPen(crossPen);
painter->drawLine(bef_h + ofsA + ofsD, bef_v + ofsB + ofsD, bef_h + ofsC + ofsD, bef_v + ofsB + ofsD);
if (!(option->state & State_Open))
painter->drawLine(bef_h + ofsB + ofsD, bef_v + ofsA + ofsD, bef_h + ofsB + ofsD, bef_v + ofsC + ofsD);
painter->setPen(option->palette.dark().color());
painter->drawRect(bef_h, bef_v, decoration_size - 1, decoration_size - 1);
if (d->doubleControls)
painter->drawRect(bef_h + 1, bef_v + 1, decoration_size - 3, decoration_size - 3);
painter->setPen(oldPen);
}
QBrush brush(option->palette.dark().color(), Qt::Dense4Pattern);
if (option->state & State_Item) {
if (option->direction == Qt::RightToLeft)
painter->fillRect(option->rect.left(), mid_v, bef_h - option->rect.left(), 1, brush);
else
painter->fillRect(aft_h, mid_v, option->rect.right() - aft_h + 1, 1, brush);
}
if (option->state & State_Sibling)
painter->fillRect(mid_h, aft_v, 1, option->rect.bottom() - aft_v + 1, brush);
if (option->state & (State_Open | State_Children | State_Item | State_Sibling))
painter->fillRect(mid_h, option->rect.y(), 1, bef_v - option->rect.y(), brush);
break; }
case PE_Frame:
qDrawPlainRect(painter, option->rect, option->palette.shadow().color(),
d->doubleControls ? 2 : 1, &option->palette.background());
break;
case PE_FrameLineEdit:
case PE_FrameMenu:
if (d->doubleControls)
qDrawPlainRect(painter, option->rect, option->palette.shadow().color(),2);
else
qDrawPlainRect(painter, option->rect, option->palette.shadow().color(),1);
break;
case PE_FrameStatusBar:
if (d->doubleControls)
qDrawPlainRect(painter, option->rect, option->palette.shadow().color(),2,0);
else
qDrawPlainRect(painter, option->rect, option->palette.shadow().color(),1,0);
break;
default:
QWindowsStyle::drawPrimitive(element, option, painter, widget);
break;
}
}
void QWindowsMobileStyle::drawControl(ControlElement element, const QStyleOption *option,
QPainter *painter, const QWidget *widget) const {
QWindowsMobileStylePrivate *d = const_cast<QWindowsMobileStylePrivate*>(d_func());
painter->setClipping(false);
switch (element) {
case CE_MenuBarEmptyArea:
painter->setClipping(true);
QWindowsStyle::drawControl(element, option, painter, widget);
break;
case CE_PushButtonBevel:
if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) {
QRect br = button->rect;
int dbi = proxy()->pixelMetric(PM_ButtonDefaultIndicator, button, widget);
if (button->features & QStyleOptionButton::AutoDefaultButton)
br.setCoords(br.left() + dbi, br.top() + dbi, br.right() - dbi, br.bottom() - dbi);
QStyleOptionButton tmpBtn = *button;
tmpBtn.rect = br;
proxy()->drawPrimitive(PE_PanelButtonCommand, &tmpBtn, painter, widget);
if (button->features & QStyleOptionButton::HasMenu) {
int mbi = proxy()->pixelMetric(PM_MenuButtonIndicator, button, widget);
QRect ir = button->rect;
QStyleOptionButton newButton = *button;
if (d->doubleControls)
newButton.rect = QRect(ir.right() - mbi, ir.height() - 30, mbi, ir.height() - 4);
else
newButton.rect = QRect(ir.right() - mbi, ir.height() - 20, mbi, ir.height() - 4);
proxy()->drawPrimitive(PE_IndicatorArrowDown, &newButton, painter, widget);
}
if (button->features & QStyleOptionButton::DefaultButton)
proxy()->drawPrimitive(PE_FrameDefaultButton, option, painter, widget);
}
break;
case CE_RadioButton:
case CE_CheckBox:
if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) {
bool isRadio = (element == CE_RadioButton);
QStyleOptionButton subopt = *button;
subopt.rect = proxy()->subElementRect(isRadio ? SE_RadioButtonIndicator
: SE_CheckBoxIndicator, button, widget);
proxy()->drawPrimitive(isRadio ? PE_IndicatorRadioButton : PE_IndicatorCheckBox,
&subopt, painter, widget);
subopt.rect = proxy()->subElementRect(isRadio ? SE_RadioButtonContents
: SE_CheckBoxContents, button, widget);
proxy()->drawControl(isRadio ? CE_RadioButtonLabel : CE_CheckBoxLabel, &subopt, painter, widget);
if (button->state & State_HasFocus) {
QStyleOptionFocusRect fropt;
fropt.QStyleOption::operator=(*button);
fropt.rect = proxy()->subElementRect(isRadio ? SE_RadioButtonFocusRect
: SE_CheckBoxFocusRect, button, widget);
proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, painter, widget);
}
}
break;
case CE_RadioButtonLabel:
case CE_CheckBoxLabel:
if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) {
uint alignment = visualAlignment(button->direction, Qt::AlignLeft | Qt::AlignVCenter);
if (!styleHint(SH_UnderlineShortcut, button, widget))
alignment |= Qt::TextHideMnemonic;
QPixmap pix;
QRect textRect = button->rect;
if (!button->icon.isNull()) {
pix = button->icon.pixmap(button->iconSize, button->state & State_Enabled ? QIcon::Normal : QIcon::Disabled);
proxy()->drawItemPixmap(painter, button->rect, alignment, pix);
if (button->direction == Qt::RightToLeft)
textRect.setRight(textRect.right() - button->iconSize.width() - 4);
else
textRect.setLeft(textRect.left() + button->iconSize.width() + 4);
}
if (!button->text.isEmpty()){
if (button->state & State_Enabled)
proxy()->drawItemText(painter, textRect, alignment | Qt::TextShowMnemonic,
button->palette, false, button->text, QPalette::WindowText);
else
proxy()->drawItemText(painter, textRect, alignment | Qt::TextShowMnemonic,
button->palette, false, button->text, QPalette::Mid);
}
}
break;
#ifndef QT_NO_PROGRESSBAR
case CE_ProgressBarGroove:
if (d->doubleControls)
qDrawPlainRect(painter, option->rect, option->palette.shadow().color(), 2, &option->palette.brush(QPalette::Window));
else
qDrawPlainRect(painter, option->rect, option->palette.shadow().color(), 1, &option->palette.brush(QPalette::Window));
break;
#endif //QT_NO_PROGRESSBAR
#ifndef QT_NO_TABBAR
case CE_TabBarTab:
if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) {
proxy()->drawControl(CE_TabBarTabShape, tab, painter, widget);
proxy()->drawControl(CE_TabBarTabLabel, tab, painter, widget);
}
break;
case CE_TabBarTabShape:
if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) {
if (tab->shape == QTabBar::RoundedNorth || tab->shape == QTabBar::RoundedEast ||
tab->shape == QTabBar::RoundedSouth || tab->shape == QTabBar::RoundedWest) {
d->drawTabBarTab(painter, tab);
} else {
QCommonStyle::drawControl(element, option, painter, widget);
}
break; }
#endif // QT_NO_TABBAR
#ifndef QT_NO_TOOLBAR
case CE_ToolBar:
if (const QStyleOptionToolBar *toolBar = qstyleoption_cast<const QStyleOptionToolBar *>(option)) {
QRect rect = option->rect;
painter->save();
painter->setPen(option->palette.dark().color());
painter->fillRect(rect,option->palette.button());
if (d->doubleControls) {
QPen pen = painter->pen();
pen.setWidth(4);
painter->setPen(pen);
}
if (toolBar->toolBarArea == Qt::TopToolBarArea)
painter->drawLine(rect.bottomLeft(), rect.bottomRight());
else
painter->drawLine(rect.topLeft(), rect.topRight());
painter->restore();
break; }
#endif //QT_NO_TOOLBAR
case CE_Header:
if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) {
QRegion clipRegion = painter->clipRegion();
painter->setClipRect(option->rect);
proxy()->drawControl(CE_HeaderSection, header, painter, widget);
QStyleOptionHeader subopt = *header;
subopt.rect = proxy()->subElementRect(SE_HeaderLabel, header, widget);
if (header->state & State_Sunken)
subopt.palette.setColor(QPalette::ButtonText, header->palette.brightText().color());
subopt.state |= QStyle::State_On;
if (subopt.rect.isValid())
proxy()->drawControl(CE_HeaderLabel, &subopt, painter, widget);
if (header->sortIndicator != QStyleOptionHeader::None) {
subopt.rect = proxy()->subElementRect(SE_HeaderArrow, option, widget);
proxy()->drawPrimitive(PE_IndicatorHeaderArrow, &subopt, painter, widget);
}
painter->setClipRegion(clipRegion);
}
break;
case CE_HeaderSection:
if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) {
QBrush fill;
QColor color;
QRect rect = option->rect;
painter->setPen(option->palette.shadow().color());
int penSize = 1;
if (d->doubleControls) {
penSize = 2;
QPen pen = painter->pen();
pen.setWidth(2);
pen.setCapStyle(Qt::FlatCap);
painter->setPen(pen);
}
//fix Frame
if (header->position == QStyleOptionHeader::End
|| (header->position == QStyleOptionHeader::OnlyOneSection
&& !header->text.isEmpty()))
if (Qt::Horizontal == header->orientation )
rect.adjust(0, 0, penSize, 0);
else
rect.adjust(0, 0, 0, penSize);
if (option->state & State_Sunken) {
fill = option->palette.brush(QPalette::Shadow);
color = option->palette.light().color();
painter->drawLine(rect.bottomLeft(), rect.bottomRight());
painter->drawLine(rect.topRight(), rect.bottomRight());
rect.adjust(0, 0, -penSize, -penSize);
}
else {
fill = option->palette.brush(QPalette::Button);
color = option->palette.shadow().color();
if (Qt::Horizontal == header->orientation )
rect.adjust(-penSize, 0, 0, 0);
else
rect.adjust(0, -penSize, 0, 0);
}
if (Qt::Horizontal == header->orientation )
rect.adjust(0,-penSize,0,0);
else
rect.adjust(-penSize, 0, 0, 0);
if (option->state & State_Sunken) {
qDrawPlainRect(painter, rect, color, penSize, &fill);
} else {
//Corner
rect.adjust(-penSize, 0, 0, 0);
qDrawPlainRect(painter, rect, color, penSize, &fill);
}
//Hack to get rid of some double lines... StyleOptions need a clean flag for that
rect = option->rect;
#ifndef QT_NO_SCROLLAREA
if (const QAbstractScrollArea *abstractScrollArea = qobject_cast<const QAbstractScrollArea *> (widget) ) {
QRect rectScrollArea = abstractScrollArea->geometry();
if (Qt::Horizontal == header->orientation )
if ((rectScrollArea.right() - rect.right() ) > 1)
painter->drawLine(rect.topRight(), rect.bottomRight());
else ;
else
if ((rectScrollArea.bottom() - rect.bottom() ) > 1)
painter->drawLine(rect.bottomLeft(), rect.bottomRight());
}
#endif // QT_NO_SCROLLAREA
break;
}
#ifndef QT_NO_COMBOBOX
case CE_ComboBoxLabel:
// This is copied from qcommonstyle.cpp with the difference, that
// the editRect isn't adjusted when calling drawItemText.
if (const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(option)) {
QRect editRect = proxy()->subControlRect(CC_ComboBox, cb, SC_ComboBoxEditField, widget);
painter->save();
painter->setClipRect(editRect);
if (!cb->currentIcon.isNull()) {
QIcon::Mode mode = cb->state & State_Enabled ? QIcon::Normal
: QIcon::Disabled;
QPixmap pixmap = cb->currentIcon.pixmap(cb->iconSize, mode);
QRect iconRect(editRect);
iconRect.setWidth(cb->iconSize.width() + 4);
iconRect = alignedRect(cb->direction,
Qt::AlignLeft | Qt::AlignVCenter,
iconRect.size(), editRect);
if (cb->editable)
painter->fillRect(iconRect, option->palette.brush(QPalette::Base));
proxy()->drawItemPixmap(painter, iconRect, Qt::AlignCenter, pixmap);
if (cb->direction == Qt::RightToLeft)
editRect.translate(-4 - cb->iconSize.width(), 0);
else
editRect.translate(cb->iconSize.width() + 4, 0);
}
if (!cb->currentText.isEmpty() && !cb->editable) {
proxy()->drawItemText(painter, editRect,
visualAlignment(cb->direction, Qt::AlignLeft | Qt::AlignVCenter),
cb->palette, cb->state & State_Enabled, cb->currentText);
}
painter->restore();
}
break;
#endif // QT_NO_COMBOBOX
#ifndef QT_NO_DOCKWIDGET
case CE_DockWidgetTitle:
if (const QStyleOptionDockWidget *dwOpt = qstyleoption_cast<const QStyleOptionDockWidget *>(option)) {
const QStyleOptionDockWidgetV2 *v2
= qstyleoption_cast<const QStyleOptionDockWidgetV2*>(option);
bool verticalTitleBar = v2 == 0 ? false : v2->verticalTitleBar;
QRect rect = dwOpt->rect;
QRect r = rect;
if (verticalTitleBar) {
QSize s = r.size();
s.transpose();
r.setSize(s);
painter->save();
painter->translate(r.left(), r.top() + r.width());
painter->rotate(-90);
painter->translate(-r.left(), -r.top());
}
bool floating = false;
bool active = dwOpt->state & State_Active;
int menuOffset = 0; //used to center text when floated
QColor inactiveCaptionTextColor = option->palette.highlightedText().color();
if (dwOpt->movable) {
QColor left, right;
//Titlebar gradient
if (widget && widget->isWindow()) {
floating = true;
if (active) {
right = option->palette.highlight().color();
left = right.lighter(125);
} else {
left = option->palette.highlight().color().lighter(125);
right = QColor(0xff, 0xff, 0xff);
}
menuOffset = 2;
QBrush fillBrush(left);
if (left != right) {
QPoint p1(r.x(), r.top() + r.height()/2);
QPoint p2(rect.right(), r.top() + r.height()/2);
QLinearGradient lg(p1, p2);
lg.setColorAt(0, left);
lg.setColorAt(1, right);
fillBrush = lg;
}
painter->fillRect(r.adjusted(0, 0, 0, -3), fillBrush);
} else {
painter->fillRect(r.adjusted(0, 0, 0, -3), option->palette.button().color());
}
painter->setPen(dwOpt->palette.color(QPalette::Light));
if (!widget || !widget->isWindow()) {
painter->drawLine(r.topLeft(), r.topRight());
painter->setPen(dwOpt->palette.color(QPalette::Dark));
painter->drawLine(r.bottomLeft(), r.bottomRight()); }
}
if (!dwOpt->title.isEmpty()) {
QFont oldFont = painter->font();
QFont newFont = oldFont;
if (newFont.pointSize() > 2)
newFont.setPointSize(newFont.pointSize() - 2);
if (floating)
newFont.setBold(true);
painter->setFont(newFont);
QPalette palette = dwOpt->palette;
palette.setColor(QPalette::Window, inactiveCaptionTextColor);
QRect titleRect = proxy()->subElementRect(SE_DockWidgetTitleBarText, option, widget);
if (verticalTitleBar) {
titleRect = QRect(r.left() + rect.bottom()
- titleRect.bottom(),
r.top() + titleRect.left() - rect.left(),
titleRect.height(), titleRect.width());
}
proxy()->drawItemText(painter, titleRect,
Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic, palette,
dwOpt->state & State_Enabled, dwOpt->title,
floating ? (active ? QPalette::BrightText : QPalette::Window) : QPalette::WindowText);
painter->setFont(oldFont);
}
if (verticalTitleBar)
painter->restore();
}
return;
#endif // QT_NO_DOCKWIDGET
case CE_PushButtonLabel:
if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) {
painter->save();
QRect ir = button->rect;
QPalette::ColorRole colorRole;
uint tf = Qt::AlignVCenter | Qt::TextShowMnemonic;
if (!styleHint(SH_UnderlineShortcut, button, widget))
tf |= Qt::TextHideMnemonic;
if (button->state & (State_On | State_Sunken))
colorRole = QPalette::Light;
else
colorRole = QPalette::ButtonText;
if (!button->icon.isNull()) {
QIcon::Mode mode = button->state & State_Enabled ? QIcon::Normal
: QIcon::Disabled;
if (mode == QIcon::Normal && button->state & State_HasFocus)
mode = QIcon::Active;
QIcon::State state = QIcon::Off;
if (button->state & State_On)
state = QIcon::On;
QPixmap pixmap = button->icon.pixmap(button->iconSize, mode, state);
int pixw = pixmap.width();
int pixh = pixmap.height();
//Center the icon if there is no text
QPoint point;
if (button->text.isEmpty()) {
point = QPoint(ir.x() + ir.width() / 2 - pixw / 2,
ir.y() + ir.height() / 2 - pixh / 2);
} else {
point = QPoint(ir.x() + 2, ir.y() + ir.height() / 2 - pixh / 2);
}
if (button->direction == Qt::RightToLeft)
point.rx() += pixw;
if ((button->state & (State_On | State_Sunken)) && button->direction == Qt::RightToLeft)
point.rx() -= proxy()->pixelMetric(PM_ButtonShiftHorizontal, option, widget) * 2;
painter->drawPixmap(visualPos(button->direction, button->rect, point), pixmap);
if (button->direction == Qt::RightToLeft)
ir.translate(-4, 0);
else
ir.translate(pixw + 4, 0);
ir.setWidth(ir.width() - (pixw + 4));
// left-align text if there is
if (!button->text.isEmpty())
tf |= Qt::AlignLeft;
} else {
tf |= Qt::AlignHCenter;
}
if (button->state & State_Enabled)
proxy()->drawItemText(painter, ir, tf, button->palette, true, button->text, colorRole);
else
proxy()->drawItemText(painter, ir, tf, button->palette, true, button->text, QPalette::Mid);
painter->restore();
}
break;
default:
QWindowsStyle::drawControl(element, option, painter, widget);
break;
}
}
void QWindowsMobileStyle::drawComplexControl(ComplexControl control, const QStyleOptionComplex *option,
QPainter *painter, const QWidget *widget) const {
painter->setClipping(false);
QWindowsMobileStylePrivate *d = const_cast<QWindowsMobileStylePrivate*>(d_func());
switch (control) {
#ifndef QT_NO_SLIDER
case CC_Slider:
if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option)) {
int thickness = proxy()->pixelMetric(PM_SliderControlThickness, slider, widget);
int len = proxy()->pixelMetric(PM_SliderLength, slider, widget);
int ticks = slider->tickPosition;
QRect groove = proxy()->subControlRect(CC_Slider, slider, SC_SliderGroove, widget);
QRect handle = proxy()->subControlRect(CC_Slider, slider, SC_SliderHandle, widget);
if ((slider->subControls & SC_SliderGroove) && groove.isValid()) {
int mid = thickness / 2;
if (ticks & QSlider::TicksAbove)
mid += len / 8;
if (ticks & QSlider::TicksBelow)
mid -= len / 8;
painter->setPen(slider->palette.shadow().color());
if (slider->orientation == Qt::Horizontal) {
qDrawPlainRect(painter, groove.x(), groove.y() + mid - 2,
groove.width(), 4, option->palette.shadow().color(),1,0);
} else {
qDrawPlainRect(painter, groove.x()+mid-2, groove.y(),
4, groove.height(), option->palette.shadow().color(),1,0);
}
}
if (slider->subControls & SC_SliderTickmarks) {
QStyleOptionSlider tmpSlider = *slider;
tmpSlider.subControls = SC_SliderTickmarks;
QCommonStyle::drawComplexControl(control, &tmpSlider, painter, widget);
}
if (slider->subControls & SC_SliderHandle) {
const QColor c0 = slider->palette.shadow().color();
const QColor c1 = slider->palette.dark().color();
const QColor c3 = slider->palette.midlight().color();
const QColor c4 = slider->palette.dark().color();
QBrush handleBrush;
if (slider->state & State_Enabled) {
handleBrush = slider->palette.color(QPalette::Light);
} else {
handleBrush = QBrush(slider->palette.color(QPalette::Shadow),
Qt::Dense4Pattern);
}
int x = handle.x(), y = handle.y(),
wi = handle.width(), he = handle.height();
int x1 = x;
int x2 = x+wi-1;
int y1 = y;
int y2 = y+he-1;
Qt::Orientation orient = slider->orientation;
bool tickAbove = slider->tickPosition == QSlider::TicksAbove;
bool tickBelow = slider->tickPosition == QSlider::TicksBelow;
if (slider->state & State_HasFocus) {
QStyleOptionFocusRect fropt;
fropt.QStyleOption::operator=(*slider);
fropt.rect = proxy()->subElementRect(SE_SliderFocusRect, slider, widget);
proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, painter, widget);
}
if ((tickAbove && tickBelow) || (!tickAbove && !tickBelow)) {
Qt::BGMode oldMode = painter->backgroundMode();
painter->setBackgroundMode(Qt::OpaqueMode);
qDrawPlainRect(painter, QRect(x, y, wi, he)
,slider->palette.shadow().color(),1,&handleBrush);
painter->setBackgroundMode(oldMode);
QBrush fill = QBrush(option->palette.light().color(), Qt::Dense4Pattern);
if (slider->state & State_Sunken)
painter->fillRect(QRectF(x1 + 2, y1 + 2, x2 - x1 - 3, y2 - y1 - 3),fill);
return;
}
QSliderDirection dir;
if (orient == Qt::Horizontal)
if (tickAbove)
dir = SliderUp;
else
dir = SliderDown;
else
if (tickAbove)
dir = SliderLeft;
else
dir = SliderRight;
QPolygon polygon;
int d = 0;
switch (dir) {
case SliderUp:
x2++;
y1 = y1 + wi / 2;
d = (wi + 1) / 2 - 1;
polygon.setPoints(5, x1, y1, x1, y2, x2, y2, x2, y1, x1 + d,y1 - d);
break;
case SliderDown:
x2++;
y2 = y2 - wi/2;
d = (wi + 1) / 2 - 1;
polygon.setPoints(5, x1, y1, x1, y2, x1 + d,y2 + d, x2, y2, x2, y1);
break;
case SliderLeft:
d = (he + 1) / 2 - 1;
x1 = x1 + he/2;
polygon.setPoints(5, x1, y1, x1 - d, y1 + d, x1,y2, x2, y2, x2, y1);
y1--;
break;
case SliderRight:
d = (he + 1) / 2 - 1;
x2 = x2 - he/2;
polygon.setPoints(5, x1, y1, x1, y2, x2,y2, x2 + d, y1 + d, x2, y1);
y1--;
break;
}
QBrush oldBrush = painter->brush();
painter->setPen(Qt::NoPen);
painter->setBrush(handleBrush);
Qt::BGMode oldMode = painter->backgroundMode();
painter->setBackgroundMode(Qt::OpaqueMode);
painter->drawRect(x1, y1, x2-x1+1, y2-y1+1);
painter->drawPolygon(polygon);
QBrush fill = QBrush(option->palette.button().color(), Qt::Dense4Pattern);
painter->setBrush(oldBrush);
painter->setBackgroundMode(oldMode);
if (slider->state & State_Sunken)
painter->fillRect(QRectF(x1, y1, x2 - x1 + 1, y2 - y1 + 1),fill);
if (dir != SliderUp) {
painter->setPen(c0);
painter->drawLine(x1, y1, x2, y1);
}
if (dir != SliderLeft) {
painter->setPen(c0);
painter->drawLine(x1, y1, x1, y2);
}
if (dir != SliderRight) {
painter->setPen(c0);
painter->drawLine(x2, y1, x2, y2);
}
if (dir != SliderDown) {
painter->setPen(c0);
painter->drawLine(x1, y2, x2, y2);
}
switch (dir) {
case SliderUp:
if (slider->state & State_Sunken)
painter->fillRect(QRectF(x1 + 3, y1 - d + 2, x2 - x1 - 4, y1),fill);
painter->setPen(c0);
painter->drawLine(x1, y1, x1 + d, y1 - d);
d = wi - d - 1;
painter->drawLine(x2, y1, x2 -d , y1 -d );
d--;
break;
case SliderDown:
if (slider->state & State_Sunken)
painter->fillRect(QRectF(x1+3, y2 - d, x2 - x1 -4,y2 - 8),fill);
painter->setPen(c0);
painter->drawLine(x1, y2, x1 + d, y2 + d);
d = wi - d - 1;
painter->drawLine(x2, y2, x2 - d, y2 + d);
d--;
break;
case SliderLeft:
if (slider->state & State_Sunken)
painter->fillRect(QRectF(x1 - d + 2, y1 + 2, x1, y2 - y1 - 3),fill);
painter->setPen(c0);
painter->drawLine(x1, y1, x1 - d, y1 + d);
d = he - d - 1;
painter->drawLine(x1, y2, x1 - d, y2 - d);
d--;
break;
case SliderRight:
if (slider->state & State_Sunken)
painter->fillRect(QRectF(x2 - d - 4, y1 + 2, x2 - 4, y2 - y1 - 3),fill);
painter->setPen(c0);
painter->drawLine(x2, y1, x2 + d, y1 + d);
painter->setPen(c0);
d = he - d - 1;
painter->drawLine(x2, y2, x2 + d, y2 - d);
d--;
break;
}
}
}
break;
#endif //QT_NO_SLIDER
#ifndef QT_NO_SCROLLBAR
case CC_ScrollBar:
painter->save();
painter->setPen(option->palette.shadow().color());
if (d->doubleControls) {
QPen pen = painter->pen();
pen.setWidth(2);
pen.setCapStyle(Qt::SquareCap);
painter->setPen(pen);
}
if (const QStyleOptionSlider *scrollbar = qstyleoption_cast<const QStyleOptionSlider *>(option)) {
d->drawScrollbarGroove(painter, scrollbar);
// Make a copy here and reset it for each primitive.
QStyleOptionSlider newScrollbar = *scrollbar;
State saveFlags = scrollbar->state;
//Check if the scrollbar is part of an abstractItemView and draw the frame according
bool drawCompleteFrame = true;
bool secondScrollBar = false;
if (widget)
if (QWidget *parent = widget->parentWidget()) {
if (QAbstractScrollArea *abstractScrollArea = qobject_cast<QAbstractScrollArea *>(parent->parentWidget())) {
drawCompleteFrame = (abstractScrollArea->frameStyle() == QFrame::NoFrame) || (abstractScrollArea->frameStyle() == QFrame::StyledPanel);
secondScrollBar = (abstractScrollArea->horizontalScrollBar()->isVisible()
&& abstractScrollArea->verticalScrollBar()->isVisible()) ;
}
#ifndef QT_NO_LISTVIEW
if (QListView *listView = qobject_cast<QListView *>(parent->parentWidget()))
drawCompleteFrame = false;
#endif
}
if (scrollbar->minimum == scrollbar->maximum)
saveFlags |= State_Enabled;
if (scrollbar->subControls & SC_ScrollBarSubLine) {
newScrollbar.state = saveFlags;
newScrollbar.rect = proxy()->subControlRect(control, &newScrollbar, SC_ScrollBarSubLine, widget);
if (newScrollbar.rect.isValid()) {
if (!(scrollbar->activeSubControls & SC_ScrollBarSubLine))
newScrollbar.state &= ~(State_Sunken | State_MouseOver);
d->drawScrollbarHandleUp(painter, &newScrollbar, drawCompleteFrame, secondScrollBar);
}
}
if (scrollbar->subControls & SC_ScrollBarAddLine) {
newScrollbar.rect = scrollbar->rect;
newScrollbar.state = saveFlags;
newScrollbar.rect = proxy()->subControlRect(control, &newScrollbar, SC_ScrollBarAddLine, widget);
if (newScrollbar.rect.isValid()) {
if (!(scrollbar->activeSubControls & SC_ScrollBarAddLine))
newScrollbar.state &= ~(State_Sunken | State_MouseOver);
d->drawScrollbarHandleDown(painter, &newScrollbar, drawCompleteFrame, secondScrollBar);
}
}
if (scrollbar->subControls & SC_ScrollBarSlider) {
newScrollbar.rect = scrollbar->rect;
newScrollbar.state = saveFlags;
newScrollbar.rect = proxy()->subControlRect(control, &newScrollbar, SC_ScrollBarSlider, widget);
if (newScrollbar.rect.isValid()) {
if (!(scrollbar->activeSubControls & SC_ScrollBarSlider))
newScrollbar.state &= ~(State_Sunken | State_MouseOver);
d->drawScrollbarGrip(painter, &newScrollbar, option, drawCompleteFrame);
}
}
}
painter->restore();
break;
#endif // QT_NO_SCROLLBAR
case CC_ToolButton:
if (const QStyleOptionToolButton *toolbutton
= qstyleoption_cast<const QStyleOptionToolButton *>(option)) {
QRect button, menuarea;
bool isTabWidget = false;
#ifndef QT_NO_TABWIDGET
if (widget)
if (QWidget *parent = widget->parentWidget())
isTabWidget = (qobject_cast<QTabWidget *>(parent->parentWidget()));
#endif //QT_NO_TABWIDGET
button = proxy()->subControlRect(control, toolbutton, SC_ToolButton, widget);
menuarea = proxy()->subControlRect(control, toolbutton, SC_ToolButtonMenu, widget);
State buttonFlags = toolbutton->state;
if (buttonFlags & State_AutoRaise) {
if (!(buttonFlags & State_MouseOver)) {
buttonFlags &= ~State_Raised;
}
}
State menuFlags = buttonFlags;
if (toolbutton->activeSubControls & SC_ToolButton)
buttonFlags |= State_Sunken;
if (toolbutton->activeSubControls & SC_ToolButtonMenu)
menuFlags |= State_On;
QStyleOption tool(0);
tool.palette = toolbutton->palette;
if (toolbutton->subControls & SC_ToolButton) {
tool.rect = button;
tool.state = buttonFlags;
proxy()->drawPrimitive(PE_PanelButtonTool, &tool, painter, widget);
}
if (toolbutton->subControls & SC_ToolButtonMenu) {
tool.rect = menuarea;
tool.state = buttonFlags & State_Enabled;
QStyleOption toolMenu(0);
toolMenu = *toolbutton;
toolMenu.state = menuFlags;
if (buttonFlags & State_Sunken)
proxy()->drawPrimitive(PE_PanelButtonTool, &toolMenu, painter, widget);
QStyleOption arrowOpt(0);
arrowOpt.rect = tool.rect;
arrowOpt.palette = tool.palette;
State flags = State_None;
if (menuFlags & State_Enabled)
flags |= State_Enabled;
if ((menuFlags & State_On) && !(buttonFlags & State_Sunken)) {
flags |= State_Sunken;
painter->fillRect(menuarea, option->palette.shadow());
}
arrowOpt.state = flags;
proxy()->drawPrimitive(PE_IndicatorArrowDown, &arrowOpt, painter, widget);
}
if (toolbutton->state & State_HasFocus) {
QStyleOptionFocusRect focusRect;
focusRect.QStyleOption::operator=(*toolbutton);
focusRect.rect.adjust(3, 3, -3, -3);
if (toolbutton->features & QStyleOptionToolButton::Menu)
focusRect.rect.adjust(0, 0, -proxy()->pixelMetric(QStyle::PM_MenuButtonIndicator,
toolbutton, widget), 0);
proxy()->drawPrimitive(PE_FrameFocusRect, &focusRect, painter, widget);
}
QStyleOptionToolButton label = *toolbutton;
if (isTabWidget)
label.state = toolbutton->state;
else
label.state = toolbutton->state & State_Enabled;
int fw = proxy()->pixelMetric(PM_DefaultFrameWidth, option, widget);
label.rect = button.adjusted(fw, fw, -fw, -fw);
proxy()->drawControl(CE_ToolButtonLabel, &label, painter, widget);
}
break;
#ifndef QT_NO_GROUPBOX
case CC_GroupBox:
if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(option)) {
// Draw frame
painter->save();
QFont font = painter->font();
font.setBold(true);
painter->setFont(font);
QStyleOptionGroupBox groupBoxFont = *groupBox;
groupBoxFont.fontMetrics = QFontMetrics(font);
QRect textRect = proxy()->subControlRect(CC_GroupBox, &groupBoxFont, SC_GroupBoxLabel, widget);
QRect checkBoxRect = proxy()->subControlRect(CC_GroupBox, option, SC_GroupBoxCheckBox, widget).adjusted(0,0,0,0);
if (groupBox->subControls & QStyle::SC_GroupBoxFrame) {
QStyleOptionFrameV2 frame;
frame.QStyleOption::operator=(*groupBox);
frame.features = groupBox->features;
frame.lineWidth = groupBox->lineWidth;
frame.midLineWidth = groupBox->midLineWidth;
frame.rect = proxy()->subControlRect(CC_GroupBox, option, SC_GroupBoxFrame, widget);
painter->save();
QRegion region(groupBox->rect);
if (!groupBox->text.isEmpty()) {
bool ltr = groupBox->direction == Qt::LeftToRight;
QRect finalRect = checkBoxRect.united(textRect);
if (groupBox->subControls & QStyle::SC_GroupBoxCheckBox)
finalRect.adjust(ltr ? -4 : 0, 0, ltr ? 0 : 4, 0);
region -= finalRect;
}
proxy()->drawPrimitive(PE_FrameGroupBox, &frame, painter, widget);
painter->restore();
}
// Draw checkbox
if (groupBox->subControls & SC_GroupBoxCheckBox) {
QStyleOptionButton box;
box.QStyleOption::operator=(*groupBox);
box.rect = checkBoxRect;
proxy()->drawPrimitive(PE_IndicatorCheckBox, &box, painter, widget);
}
// Draw title
if ((groupBox->subControls & QStyle::SC_GroupBoxLabel) && !groupBox->text.isEmpty()) {
QColor textColor = groupBox->textColor;
if (textColor.isValid())
painter->setPen(textColor);
else
painter->setPen(groupBox->palette.link().color());
painter->setPen(groupBox->palette.link().color());
int alignment = int(groupBox->textAlignment);
if (!styleHint(QStyle::SH_UnderlineShortcut, option, widget))
alignment |= Qt::TextHideMnemonic;
if (groupBox->state & State_Enabled)
proxy()->drawItemText(painter, textRect, Qt::TextShowMnemonic | Qt::AlignHCenter | alignment,
groupBox->palette, true, groupBox->text,
textColor.isValid() ? QPalette::NoRole : QPalette::Link);
else
proxy()->drawItemText(painter, textRect, Qt::TextShowMnemonic | Qt::AlignHCenter | alignment,
groupBox->palette, true, groupBox->text, QPalette::Mid);
if (groupBox->state & State_HasFocus) {
QStyleOptionFocusRect fropt;
fropt.QStyleOption::operator=(*groupBox);
fropt.rect = textRect;
proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, painter, widget);
}
}
painter->restore();
}
break;
#endif //QT_NO_GROUPBOX
#ifndef QT_NO_COMBOBOX
case CC_ComboBox:
if (const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(option)) {
QBrush editBrush = cmb->palette.brush(QPalette::Base);
if ((cmb->subControls & SC_ComboBoxFrame) && cmb->frame)
qDrawPlainRect(painter, option->rect, option->palette.shadow().color(), proxy()->pixelMetric(PM_ComboBoxFrameWidth, option, widget), &editBrush);
else
painter->fillRect(option->rect, editBrush);
State flags = State_None;
QRect ar = proxy()->subControlRect(CC_ComboBox, cmb, SC_ComboBoxArrow, widget);
if ((option->state & State_On)) {
painter->fillRect(ar.adjusted(0, 0, 1, 1),cmb->palette.brush(QPalette::Shadow));
}
if (d->doubleControls)
ar.adjust(5, 0, 5, 0);
else
ar.adjust(2, 0, -2, 0);
if (option->state & State_Enabled)
flags |= State_Enabled;
if (option->state & State_On)
flags |= State_Sunken;
QStyleOption arrowOpt(0);
arrowOpt.rect = ar;
arrowOpt.palette = cmb->palette;
arrowOpt.state = flags;
proxy()->drawPrimitive(PrimitiveElement(PE_IndicatorArrowDownBig), &arrowOpt, painter, widget);
if (cmb->subControls & SC_ComboBoxEditField) {
QRect re = proxy()->subControlRect(CC_ComboBox, cmb, SC_ComboBoxEditField, widget);
if (cmb->state & State_HasFocus && !cmb->editable)
painter->fillRect(re.x(), re.y(), re.width(), re.height(),
cmb->palette.brush(QPalette::Highlight));
if (cmb->state & State_HasFocus) {
painter->setPen(cmb->palette.highlightedText().color());
painter->setBackground(cmb->palette.highlight());
} else {
painter->setPen(cmb->palette.text().color());
painter->setBackground(cmb->palette.background());
}
if (cmb->state & State_HasFocus && !cmb->editable) {
QStyleOptionFocusRect focus;
focus.QStyleOption::operator=(*cmb);
focus.rect = proxy()->subElementRect(SE_ComboBoxFocusRect, cmb, widget);
focus.state |= State_FocusAtBorder;
focus.backgroundColor = cmb->palette.highlight().color();
if ((option->state & State_On))
proxy()->drawPrimitive(PE_FrameFocusRect, &focus, painter, widget);
}
}
}
break;
#endif // QT_NO_COMBOBOX
#ifndef QT_NO_SPINBOX
case CC_SpinBox:
if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
QStyleOptionSpinBox copy = *spinBox;
//PrimitiveElement primitiveElement;
int primitiveElement;
if (spinBox->frame && (spinBox->subControls & SC_SpinBoxFrame)) {
QRect r = proxy()->subControlRect(CC_SpinBox, spinBox, SC_SpinBoxFrame, widget);
qDrawPlainRect(painter, r, option->palette.shadow().color(), proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget),0);
}
QPalette shadePal(option->palette);
shadePal.setColor(QPalette::Button, option->palette.light().color());
shadePal.setColor(QPalette::Light, option->palette.base().color());
if (spinBox->subControls & SC_SpinBoxUp) {
copy.subControls = SC_SpinBoxUp;
QPalette pal2 = spinBox->palette;
if (!(spinBox->stepEnabled & QAbstractSpinBox::StepUpEnabled)) {
pal2.setCurrentColorGroup(QPalette::Disabled);
copy.state &= ~State_Enabled;
}
copy.palette = pal2;
if (spinBox->activeSubControls == SC_SpinBoxUp && (spinBox->state & State_Sunken)) {
copy.state |= State_On;
copy.state |= State_Sunken;
} else {
copy.state |= State_Raised;
copy.state &= ~State_Sunken;
}
primitiveElement = (spinBox->buttonSymbols == QAbstractSpinBox::PlusMinus ? PE_IndicatorArrowUpBig
: PE_IndicatorArrowUpBig);
copy.rect = proxy()->subControlRect(CC_SpinBox, spinBox, SC_SpinBoxUp, widget);
if (copy.state & (State_Sunken | State_On))
qDrawPlainRect(painter, copy.rect, option->palette.shadow().color(), proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget), ©.palette.brush(QPalette::Shadow));
else
qDrawPlainRect(painter, copy.rect, option->palette.shadow().color(), proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget), ©.palette.brush(QPalette::Base));
copy.rect.adjust(proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget), 0, -pixelMetric(PM_SpinBoxFrameWidth, option, widget), 0);
proxy()->drawPrimitive(PrimitiveElement(primitiveElement), ©, painter, widget);
}
if (spinBox->subControls & SC_SpinBoxDown) {
copy.subControls = SC_SpinBoxDown;
copy.state = spinBox->state;
QPalette pal2 = spinBox->palette;
if (!(spinBox->stepEnabled & QAbstractSpinBox::StepDownEnabled)) {
pal2.setCurrentColorGroup(QPalette::Disabled);
copy.state &= ~State_Enabled;
}
copy.palette = pal2;
if (spinBox->activeSubControls == SC_SpinBoxDown && (spinBox->state & State_Sunken)) {
copy.state |= State_On;
copy.state |= State_Sunken;
} else {
copy.state |= State_Raised;
copy.state &= ~State_Sunken;
}
primitiveElement = (spinBox->buttonSymbols == QAbstractSpinBox::PlusMinus ? PE_IndicatorArrowDownBig
: PE_IndicatorArrowDownBig);
copy.rect = proxy()->subControlRect(CC_SpinBox, spinBox, SC_SpinBoxDown, widget);
qDrawPlainRect(painter, copy.rect, option->palette.shadow().color(), proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget), ©.palette.brush(QPalette::Base));
if (copy.state & (State_Sunken | State_On))
qDrawPlainRect(painter, copy.rect, option->palette.shadow().color(), proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget), ©.palette.brush(QPalette::Shadow));
else
qDrawPlainRect(painter, copy.rect, option->palette.shadow().color(), proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget), ©.palette.brush(QPalette::Base));
copy.rect.adjust(3, 0, -4, 0);
if (primitiveElement == PE_IndicatorArrowUp || primitiveElement == PE_IndicatorArrowDown) {
int frameWidth = proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget);
copy.rect = copy.rect.adjusted(frameWidth, frameWidth, -frameWidth, -frameWidth);
proxy()->drawPrimitive(PrimitiveElement(primitiveElement), ©, painter, widget);
}
else {
proxy()->drawPrimitive(PrimitiveElement(primitiveElement), ©, painter, widget);
}
if (spinBox->frame && (spinBox->subControls & SC_SpinBoxFrame)) {
QRect r = proxy()->subControlRect(CC_SpinBox, spinBox, SC_SpinBoxEditField, widget);
}
}
}
break;
#endif // QT_NO_SPINBOX
default:
QWindowsStyle::drawComplexControl(control, option, painter, widget);
break;
}
}
QSize QWindowsMobileStyle::sizeFromContents(ContentsType type, const QStyleOption *option,
const QSize &size, const QWidget *widget) const {
QSize newSize = QWindowsStyle::sizeFromContents(type, option, size, widget);
switch (type) {
case CT_PushButton:
if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) {
newSize = QCommonStyle::sizeFromContents(type, option, size, widget);
int w = newSize.width(),
h = newSize.height();
int defwidth = 0;
if (button->features & QStyleOptionButton::AutoDefaultButton)
defwidth = 2 * proxy()->pixelMetric(PM_ButtonDefaultIndicator, button, widget);
int minwidth = int(QStyleHelper::dpiScaled(55.0f));
int minheight = int(QStyleHelper::dpiScaled(19.0f));
if (w < minwidth + defwidth && button->icon.isNull())
w = minwidth + defwidth;
if (h < minheight + defwidth)
h = minheight + defwidth;
newSize = QSize(w + 4, h + 4);
}
break;
#ifndef QT_NO_GROUPBOX
case CT_GroupBox:
if (const QGroupBox *grb = static_cast<const QGroupBox *>(widget)) {
newSize = size + QSize(!grb->isFlat() ? 16 : 0, !grb->isFlat() ? 16 : 0);
}
break;
#endif // QT_NO_GROUPBOX
case CT_RadioButton:
case CT_CheckBox:
newSize = size;
if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) {
bool isRadio = (type == CT_RadioButton);
QRect irect = visualRect(button->direction, button->rect,
proxy()->subElementRect(isRadio ? SE_RadioButtonIndicator
: SE_CheckBoxIndicator, button, widget));
int h = proxy()->pixelMetric(isRadio ? PM_ExclusiveIndicatorHeight
: PM_IndicatorHeight, button, widget);
int margins = (!button->icon.isNull() && button->text.isEmpty()) ? 0 : 10;
if (d_func()->doubleControls)
margins *= 2;
newSize += QSize(irect.right() + margins, 1);
newSize.setHeight(qMax(newSize.height(), h));
}
break;
#ifndef QT_NO_COMBOBOX
case CT_ComboBox:
if (const QStyleOptionComboBox *comboBox = qstyleoption_cast<const QStyleOptionComboBox *>(option)) {
int fw = comboBox->frame ? proxy()->pixelMetric(PM_ComboBoxFrameWidth, option, widget) * 2 : 0;
newSize = QSize(newSize.width() + fw + 9, newSize.height() + fw); //Nine is a magic Number - See CommonStyle for real magic (23)
}
break;
#endif
#ifndef QT_NO_SPINBOX
case CT_SpinBox:
if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
int fw = spinBox->frame ? proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget) * 2 : 0;
newSize = QSize(newSize.width() + fw-5, newSize.height() + fw-6);
}
break;
#endif
#ifndef QT_NO_LINEEDIT
case CT_LineEdit:
newSize += QSize(0,1);
break;
#endif
case CT_ToolButton:
newSize = QSize(newSize.width() + 1, newSize.height());
break;
case CT_TabBarTab:
if (d_func()->doubleControls)
newSize = QSize(newSize.width(), 42);
else
newSize = QSize(newSize.width(), 21);
break;
case CT_HeaderSection:
newSize += QSize(4, 2);
break;
#ifndef QT_NO_ITEMVIEWS
#ifdef Q_WS_WINCE_WM
case CT_ItemViewItem:
if (d_func()->wm65)
if (d_func()->doubleControls)
newSize.setHeight(46);
else
newSize.setHeight(23);
break;
#endif //Q_WS_WINCE_WM
#endif //QT_NO_ITEMVIEWS
default:
break;
}
return newSize;
}
QRect QWindowsMobileStyle::subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const {
QWindowsMobileStylePrivate *d = const_cast<QWindowsMobileStylePrivate*>(d_func());
QRect rect = QWindowsStyle::subElementRect(element, option, widget);
switch (element) {
#ifndef QT_NO_TABWIDGET
case SE_TabWidgetTabBar:
if (d->doubleControls)
rect.adjust(-2, 0, 2, 0);
else
rect.adjust(-2, 0, 2, 0);
break;
#endif //QT_NO_TABWIDGET
case SE_CheckBoxFocusRect:
rect.adjust(1,0,-2,-1);
break;
case SE_RadioButtonFocusRect:
rect.adjust(1,1,-2,-2);
break;
default:
break;
#ifndef QT_NO_SLIDER
case SE_SliderFocusRect:
if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option)) {
rect = slider->rect;
}
break;
case SE_PushButtonFocusRect:
if (d->doubleControls)
rect.adjust(-1, -1, 0, 0);
break;
#endif // QT_NO_SLIDER
#ifndef QT_NO_ITEMVIEWS
case SE_ItemViewItemFocusRect:
#ifdef Q_WS_WINCE_WM
if (d->wm65)
rect = QRect();
#endif
break;
#endif //QT_NO_ITEMVIEWS
}
return rect;
}
QRect QWindowsMobileStyle::subControlRect(ComplexControl control, const QStyleOptionComplex *option,
SubControl subControl, const QWidget *widget) const {
QWindowsMobileStylePrivate *d = const_cast<QWindowsMobileStylePrivate*>(d_func());
QRect rect = QCommonStyle::subControlRect(control, option, subControl, widget);
switch (control) {
#ifndef QT_NO_SCROLLBAR
case CC_ScrollBar:
if (const QStyleOptionSlider *scrollbar = qstyleoption_cast<const QStyleOptionSlider *>(option)) {
int sliderButtonExtent = proxy()->pixelMetric(PM_ScrollBarExtent, scrollbar, widget);
float stretchFactor = 1.4f;
int sliderButtonExtentDir = int (sliderButtonExtent * stretchFactor);
#ifdef Q_WS_WINCE_WM
if (d->wm65)
{
sliderButtonExtent = d->imageScrollbarHandleUp.width();
sliderButtonExtentDir = d->imageScrollbarHandleUp.height();
}
#endif //Q_WS_WINCE_WM
int sliderlen;
int maxlen = ((scrollbar->orientation == Qt::Horizontal) ?
scrollbar->rect.width() : scrollbar->rect.height()) - (sliderButtonExtentDir * 2);
// calculate slider length
if (scrollbar->maximum != scrollbar->minimum) {
uint range = scrollbar->maximum - scrollbar->minimum;
sliderlen = (qint64(scrollbar->pageStep) * maxlen) / (range + scrollbar->pageStep);
int slidermin = proxy()->pixelMetric(PM_ScrollBarSliderMin, scrollbar, widget);
if (sliderlen < slidermin || range > INT_MAX / 2)
sliderlen = slidermin;
if (sliderlen > maxlen)
sliderlen = maxlen;
} else {
sliderlen = maxlen;
}
int sliderstart = sliderButtonExtentDir + sliderPositionFromValue(scrollbar->minimum,
scrollbar->maximum,
scrollbar->sliderPosition,
maxlen - sliderlen,
scrollbar->upsideDown);
if (d->smartphone) {
sliderstart -= sliderButtonExtentDir;
sliderlen += 2*sliderButtonExtent;
}
switch (subControl) {
case SC_ScrollBarSubLine: // top/left button
if (scrollbar->orientation == Qt::Horizontal) {
int buttonWidth = qMin(scrollbar->rect.width() / 2, sliderButtonExtentDir );
rect.setRect(0, 0, buttonWidth, sliderButtonExtent);
} else {
int buttonHeight = qMin(scrollbar->rect.height() / 2, sliderButtonExtentDir);
rect.setRect(0, 0, sliderButtonExtent, buttonHeight);
}
if (d->smartphone)
rect.setRect(0, 0, 0, 0);
break;
case SC_ScrollBarAddLine: // bottom/right button
if (scrollbar->orientation == Qt::Horizontal) {
int buttonWidth = qMin(scrollbar->rect.width()/2, sliderButtonExtentDir);
rect.setRect(scrollbar->rect.width() - buttonWidth, 0, buttonWidth, sliderButtonExtent);
} else {
int buttonHeight = qMin(scrollbar->rect.height()/2, sliderButtonExtentDir );
rect.setRect(0, scrollbar->rect.height() - buttonHeight, sliderButtonExtent, buttonHeight);
}
if (d->smartphone)
rect.setRect(0, 0, 0, 0);
break;
case SC_ScrollBarSubPage: // between top/left button and slider
if (scrollbar->orientation == Qt::Horizontal)
if (d->smartphone)
rect.setRect(0, 0, sliderstart, sliderButtonExtent);
else
rect.setRect(sliderButtonExtent, 0, sliderstart - sliderButtonExtent, sliderButtonExtent);
else
if (d->smartphone)
rect.setRect(0, 0, sliderButtonExtent, sliderstart);
else
rect.setRect(0, sliderButtonExtent, sliderButtonExtent, sliderstart - sliderButtonExtent);
break;
case SC_ScrollBarAddPage: // between bottom/right button and slider
if (scrollbar->orientation == Qt::Horizontal)
if (d->smartphone)
rect.setRect(sliderstart + sliderlen, 0,
maxlen - sliderstart - sliderlen + 2*sliderButtonExtent, sliderButtonExtent);
else
rect.setRect(sliderstart + sliderlen, 0,
maxlen - sliderstart - sliderlen + sliderButtonExtent, sliderButtonExtent);
else
if (d->smartphone)
rect.setRect(0, sliderstart + sliderlen, sliderButtonExtent,
maxlen - sliderstart - sliderlen + 2*sliderButtonExtent);
else
rect.setRect(0, sliderstart + sliderlen, sliderButtonExtent,
maxlen - sliderstart - sliderlen + sliderButtonExtent);
break;
case SC_ScrollBarGroove:
if (scrollbar->orientation == Qt::Horizontal)
rect.setRect(sliderButtonExtent, 0, scrollbar->rect.width() - sliderButtonExtent * 2,
scrollbar->rect.height());
else
rect.setRect(0, sliderButtonExtent, scrollbar->rect.width(),
scrollbar->rect.height() - sliderButtonExtent * 2);
break;
case SC_ScrollBarSlider:
if (scrollbar->orientation == Qt::Horizontal)
rect.setRect(sliderstart, 0, sliderlen, sliderButtonExtent);
else
rect.setRect(0, sliderstart, sliderButtonExtent, sliderlen);
break;
default:
break;
}
rect = visualRect(scrollbar->direction, scrollbar->rect, rect);
}
break;
#endif // QT_NO_SCROLLBAR
#ifndef QT_NO_TOOLBUTTON
case CC_ToolButton:
if (const QStyleOptionToolButton *toolButton = qstyleoption_cast<const QStyleOptionToolButton *>(option)) {
int mbi = proxy()->pixelMetric(PM_MenuButtonIndicator, toolButton, widget);
rect = toolButton->rect;
switch (subControl) {
case SC_ToolButton:
if ((toolButton->features
& (QStyleOptionToolButton::Menu | QStyleOptionToolButton::PopupDelay))
== QStyleOptionToolButton::Menu)
rect.adjust(0, 0, -mbi, 0);
break;
case SC_ToolButtonMenu:
if ((toolButton->features
& (QStyleOptionToolButton::Menu | QStyleOptionToolButton::PopupDelay))
== QStyleOptionToolButton::Menu)
rect.adjust(rect.width() - mbi, 1, 0, 1);
break;
default:
break;
}
rect = visualRect(toolButton->direction, toolButton->rect, rect);
}
break;
#endif // QT_NO_TOOLBUTTON
#ifndef QT_NO_SLIDER
case CC_Slider:
if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option)) {
int tickOffset = proxy()->pixelMetric(PM_SliderTickmarkOffset, slider, widget);
int thickness = proxy()->pixelMetric(PM_SliderControlThickness, slider, widget);
switch (subControl) {
case SC_SliderHandle: {
int sliderPos = 0;
int len = proxy()->pixelMetric(PM_SliderLength, slider, widget);
bool horizontal = slider->orientation == Qt::Horizontal;
sliderPos = sliderPositionFromValue(slider->minimum, slider->maximum,
slider->sliderPosition,
(horizontal ? slider->rect.width()
: slider->rect.height()) - len,
slider->upsideDown);
if (horizontal)
rect.setRect(slider->rect.x() + sliderPos, slider->rect.y() + tickOffset, len, thickness);
else
rect.setRect(slider->rect.x() + tickOffset, slider->rect.y() + sliderPos, thickness, len);
break; }
default:
break;
}
rect = visualRect(slider->direction, slider->rect, rect);
}
break;
#endif //QT_NO_SLIDER
#ifndef QT_NO_COMBOBOX
case CC_ComboBox:
if (const QStyleOptionComboBox *comboBox = qstyleoption_cast<const QStyleOptionComboBox *>(option)) {
int x = comboBox->rect.x(),
y = comboBox->rect.y(),
wi = comboBox->rect.width(),
he = comboBox->rect.height();
int xpos = x;
int margin = comboBox->frame ? (d->doubleControls ? 2 : 1) : 0;
int bmarg = comboBox->frame ? (d->doubleControls ? 2 : 1) : 0;
if (subControl == SC_ComboBoxArrow)
xpos += wi - int((he - 2*bmarg)*0.9) - bmarg;
else
xpos += wi - (he - 2*bmarg) - bmarg;
switch (subControl) {
case SC_ComboBoxArrow:
rect.setRect(xpos, y + bmarg, he - 2*bmarg, he - 2*bmarg);
break;
case SC_ComboBoxEditField:
rect.setRect(x + margin, y + margin, wi - 2 * margin - int((he - 2*bmarg) * 0.84f), he - 2 * margin);
if (d->doubleControls) {
if (comboBox->editable)
rect.adjust(2, 0, 0, 0);
else
rect.adjust(4, 2, 0, -2);
} else if (!comboBox->editable) {
rect.adjust(2, 1, 0, -1);
}
break;
case SC_ComboBoxFrame:
rect = comboBox->rect;
break;
default:
break;
}
}
#endif //QT_NO_COMBOBOX
#ifndef QT_NO_SPINBOX
case CC_SpinBox:
if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
QSize bs;
int fw = spinBox->frame ? proxy()->pixelMetric(PM_SpinBoxFrameWidth, spinBox, widget) : 0;
bs.setHeight(qMax(d->doubleControls ? 28 : 14, (spinBox->rect.height())));
// 1.6 -approximate golden mean
bs.setWidth(qMax(d->doubleControls ? 28 : 14, qMin((bs.height()*7/8), (spinBox->rect.width() / 8))));
bs = bs.expandedTo(QApplication::globalStrut());
int x, lx, rx;
x = spinBox->rect.width() - bs.width()*2;
lx = fw;
rx = x - fw;
switch (subControl) {
case SC_SpinBoxUp:
rect = QRect(x + proxy()->pixelMetric(PM_SpinBoxFrameWidth, option, widget), 0 , bs.width(), bs.height());
break;
case SC_SpinBoxDown:
rect = QRect(x + bs.width(), 0, bs.width(), bs.height());
break;
case SC_SpinBoxEditField:
if (spinBox->buttonSymbols == QAbstractSpinBox::NoButtons) {
rect = QRect(lx, fw, spinBox->rect.width() - 2*fw - 2, spinBox->rect.height() - 2*fw);
} else {
rect = QRect(lx, fw, rx-2, spinBox->rect.height() - 2*fw);
}
break;
case SC_SpinBoxFrame:
rect = spinBox->rect;
default:
break;
}
rect = visualRect(spinBox->direction, spinBox->rect, rect);
}
break;
#endif // Qt_NO_SPINBOX
#ifndef QT_NO_GROUPBOX
case CC_GroupBox: {
if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(option)) {
switch (subControl) {
case SC_GroupBoxFrame:
// FALL THROUGH
case SC_GroupBoxContents: {
int topMargin = 0;
int topHeight = 0;
int bottomMargin = 0;
int labelMargin = 2;
QRect frameRect = groupBox->rect;
int verticalAlignment = styleHint(SH_GroupBox_TextLabelVerticalAlignment, groupBox, widget);
if (groupBox->text.size()) {
topHeight = groupBox->fontMetrics.height();
if (verticalAlignment & Qt::AlignVCenter)
topMargin = topHeight+5;
else if (verticalAlignment & Qt::AlignTop)
topMargin = -topHeight+5;
}
if (subControl == SC_GroupBoxFrame) {
frameRect.setTop(topMargin);
frameRect.setBottom(frameRect.height() + bottomMargin);
rect = frameRect;
break;
}
int frameWidth = 0;
if (groupBox->text.size()) {
frameWidth = proxy()->pixelMetric(PM_DefaultFrameWidth, groupBox, widget);
rect = frameRect.adjusted(frameWidth, frameWidth + topHeight + labelMargin, -frameWidth, -frameWidth);
}
else {
rect = groupBox->rect;
}
break;
}
case SC_GroupBoxCheckBox:
// FALL THROUGH
case SC_GroupBoxLabel: {
QFontMetrics fontMetrics = groupBox->fontMetrics;
int h = fontMetrics.height();
int textWidth = fontMetrics.size(Qt::TextShowMnemonic, groupBox->text + QLatin1Char(' ')).width();
int margX = (groupBox->features & QStyleOptionFrameV2::Flat) ? 0 : 2;
int margY = (groupBox->features & QStyleOptionFrameV2::Flat) ? 0 : 2;
rect = groupBox->rect.adjusted(margX, margY, -margX, 0);
if (groupBox->text.size())
rect.setHeight(h);
else
rect.setHeight(0);
int indicatorWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget);
int indicatorSpace = proxy()->pixelMetric(PM_CheckBoxLabelSpacing, option, widget) - 1;
bool hasCheckBox = groupBox->subControls & QStyle::SC_GroupBoxCheckBox;
int checkBoxSize = hasCheckBox ? (indicatorWidth + indicatorSpace) : 0;
// Adjusted rect for label + indicatorWidth + indicatorSpace
QRect totalRect = alignedRect(groupBox->direction, groupBox->textAlignment,
QSize(textWidth + checkBoxSize, h), rect);
// Adjust totalRect if checkbox is set
if (hasCheckBox) {
bool ltr = groupBox->direction == Qt::LeftToRight;
int left = 2;
// Adjust for check box
if (subControl == SC_GroupBoxCheckBox) {
int indicatorHeight = proxy()->pixelMetric(PM_IndicatorHeight, option, widget);
left = ltr ? totalRect.left() : (totalRect.right() - indicatorWidth);
int top = totalRect.top() + (fontMetrics.height() - indicatorHeight) / 2;
totalRect.setRect(left, top, indicatorWidth, indicatorHeight);
// Adjust for label
} else {
left = ltr ? (totalRect.left() + checkBoxSize - 2) : totalRect.left();
totalRect.setRect(left, totalRect.top(),
totalRect.width() - checkBoxSize, totalRect.height());
}
}
if ((subControl== SC_GroupBoxLabel))
totalRect.adjust(-2,0,6,0);
rect = totalRect;
break;
}
default:
break;
}
}
break;
}
#endif // QT_NO_GROUPBOX
default:
break;
}
return rect;
}
QPalette QWindowsMobileStyle::standardPalette() const {
QPalette palette (Qt::black,QColor(198, 195, 198), QColor(222, 223, 222 ),
QColor(132, 130, 132), QColor(198, 195, 198), Qt::black, Qt::white, Qt::white, QColor(198, 195, 198));
palette.setColor(QPalette::Window, QColor(206, 223, 239));
palette.setColor(QPalette::Link, QColor(8,77,123)); //Alternate TextColor for labels...
palette.setColor(QPalette::Base, Qt::white);
palette.setColor(QPalette::Button, QColor(206, 223, 239));
palette.setColor(QPalette::Highlight, QColor(49, 146, 214));
palette.setColor(QPalette::Light, Qt::white);
palette.setColor(QPalette::Text, Qt::black);
palette.setColor(QPalette::ButtonText, Qt::black);
palette.setColor(QPalette::Midlight, QColor(222, 223, 222 ));
palette.setColor(QPalette::Dark, QColor(132, 130, 132));
palette.setColor(QPalette::Mid, QColor(189, 190, 189));
palette.setColor(QPalette::Shadow, QColor(0, 0, 0));
palette.setColor(QPalette::BrightText, QColor(33, 162, 33)); //color for ItemView checked indicator (arrow)
return palette;
}
/*! \reimp */
void QWindowsMobileStyle::polish(QApplication *application) {
QWindowsStyle::polish(application);
}
/*! \reimp */
void QWindowsMobileStyle::polish(QWidget *widget) {
#ifndef QT_NO_TOOLBAR
if (QToolBar *toolBar = qobject_cast<QToolBar*>(widget)) {
QPalette pal = toolBar->palette();
pal.setColor(QPalette::Background, pal.button().color());
toolBar->setPalette(pal);
}
else
#endif //QT_NO_TOOLBAR
QWindowsStyle::polish(widget);
}
void QWindowsMobileStyle::unpolish(QWidget *widget)
{
QWindowsStyle::unpolish(widget);
}
void QWindowsMobileStyle::unpolish(QApplication *app)
{
QWindowsStyle::unpolish(app);
}
/*! \reimp */
void QWindowsMobileStyle::polish(QPalette &palette) {
QWindowsStyle::polish(palette);
}
int QWindowsMobileStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, const QWidget *widget) const {
QWindowsMobileStylePrivate *d = const_cast<QWindowsMobileStylePrivate*>(d_func());
int ret;
switch (pm) {
case PM_DefaultTopLevelMargin:
ret =0;
break;
case PM_DefaultLayoutSpacing:
d->doubleControls ? ret = 8 : ret = 4;
break;
case PM_HeaderMargin:
d->doubleControls ? ret = 2 : ret = 1;
break;
case PM_DefaultChildMargin:
d->doubleControls ? ret = 10 : ret = 5;
break;
case PM_ToolBarSeparatorExtent:
d->doubleControls ? ret = 6 : ret = 3;
break;
case PM_DefaultFrameWidth:
d->doubleControls ? ret = 2 : ret = 1;
break;
case PM_MenuVMargin:
ret = 1;
break;
case PM_MenuHMargin:
ret = 1;
break;
case PM_MenuButtonIndicator:
ret = d->doubleControls ? 24 : 14;
break;
case PM_ComboBoxFrameWidth:
d->doubleControls ? ret = 2 : ret = 1;
break;
case PM_SpinBoxFrameWidth:
d->doubleControls ? ret = 2 : ret = 1;
break;
case PM_ButtonDefaultIndicator:
case PM_ButtonShiftHorizontal:
case PM_ButtonShiftVertical:
d->doubleControls ? ret = 2 : ret = 1;
break;
#ifndef QT_NO_TABBAR
case PM_TabBarTabShiftHorizontal:
ret = 0;
break;
case PM_TabBarTabShiftVertical:
ret = 0;
break;
#endif
case PM_MaximumDragDistance:
ret = 60;
break;
case PM_TabBarTabVSpace:
ret = d->doubleControls ? 12 : 6;
break;
case PM_TabBarBaseHeight:
ret = 0;
break;
case PM_IndicatorWidth:
ret = d->doubleControls ? windowsMobileIndicatorSize * 2 : windowsMobileIndicatorSize;
break;
case PM_IndicatorHeight:
ret = d->doubleControls ? windowsMobileIndicatorSize * 2 : windowsMobileIndicatorSize;
break;
case PM_ExclusiveIndicatorWidth:
ret = d->doubleControls ? windowsMobileExclusiveIndicatorSize * 2 + 4: windowsMobileExclusiveIndicatorSize + 2;
break;
case PM_ExclusiveIndicatorHeight:
ret = d->doubleControls ? windowsMobileExclusiveIndicatorSize * 2 + 4: windowsMobileExclusiveIndicatorSize + 2;
break;
#ifndef QT_NO_SLIDER
case PM_SliderLength:
ret = d->doubleControls ? 16 : 8;
break;
case PM_FocusFrameHMargin:
ret = d->doubleControls ? 1 : 2;
break;
case PM_SliderThickness:
ret = d->doubleControls ? windowsMobileSliderThickness * 2: windowsMobileSliderThickness;
break;
case PM_TabBarScrollButtonWidth:
ret = d->doubleControls ? 14 * 2 : 18;
break;
case PM_CheckBoxLabelSpacing:
case PM_RadioButtonLabelSpacing:
ret = d->doubleControls ? 6 * 2 : 6;
break;
// Returns the number of pixels to use for the business part of the
// slider (i.e., the non-tickmark portion). The remaining space is shared
// equally between the tickmark regions.
case PM_SliderControlThickness:
if (const QStyleOptionSlider *sl = qstyleoption_cast<const QStyleOptionSlider *>(opt)) {
int space = (sl->orientation == Qt::Horizontal) ? sl->rect.height() : sl->rect.width();
int ticks = sl->tickPosition;
int n = 0;
if (ticks & QSlider::TicksAbove)
++n;
if (ticks & QSlider::TicksBelow)
++n;
if (!n) {
ret = space;
break;
}
int thick = 8;
if (ticks != QSlider::TicksBothSides && ticks != QSlider::NoTicks)
thick += proxy()->pixelMetric(PM_SliderLength, sl, widget) / 4;
space -= thick;
if (space > 0)
thick += (space * 2) / (n + 2);
ret = thick;
} else {
ret = 0;
}
break;
#endif // QT_NO_SLIDER
#ifndef QT_NO_MENU
case PM_SmallIconSize:
d->doubleControls ? ret = windowsMobileIconSize * 2 : ret = windowsMobileIconSize;
break;
case PM_ButtonMargin:
d->doubleControls ? ret = 8 : ret = 4;
break;
case PM_LargeIconSize:
d->doubleControls ? ret = 64 : ret = 32;
break;
case PM_IconViewIconSize:
ret = proxy()->pixelMetric(PM_LargeIconSize, opt, widget);
break;
case PM_ToolBarIconSize:
d->doubleControls ? ret = 2 * windowsMobileIconSize : ret = windowsMobileIconSize;
break;
case PM_DockWidgetTitleMargin:
ret = 2;
break;
#if defined(Q_WS_WIN)
#else
case PM_DockWidgetFrameWidth:
ret = 4;
break;
#endif // Q_WS_WIN
break;
#endif // QT_NO_MENU
case PM_TitleBarHeight:
d->doubleControls ? ret = 42 : ret = 21;
break;
case PM_ScrollBarSliderMin:
#ifdef Q_WS_WINCE_WM
if (d->wm65)
#else
if (false)
#endif
{
d->doubleControls ? ret = 68 : ret = 34;
} else {
d->doubleControls ? ret = 36 : ret = 18;
}
break;
case PM_ScrollBarExtent: {
if (d->smartphone)
ret = 9;
else
d->doubleControls ? ret = 25 : ret = 13;
#ifdef Q_WS_WINCE_WM
if (d->wm65)
#else
if (false)
#endif
{
d->doubleControls ? ret = 26 : ret = 13;
break;
}
#ifndef QT_NO_SCROLLAREA
//Check if the scrollbar is part of an abstractItemView and set size according
if (widget)
if (QWidget *parent = widget->parentWidget())
if (qobject_cast<QAbstractScrollArea *>(parent->parentWidget()))
if (d->smartphone)
ret = 8;
else
d->doubleControls ? ret = 24 : ret = 12;
#endif
}
break;
case PM_SplitterWidth:
ret = qMax(4, QApplication::globalStrut().width());
break;
#if defined(Q_WS_WIN)
case PM_MDIFrameWidth:
ret = 1;
break;
#endif
case PM_ToolBarExtensionExtent:
d->doubleControls ? ret = 32 : ret = 16;
break;
case PM_ToolBarItemMargin:
d->doubleControls ? ret = 2 : ret = 1;
break;
case PM_ToolBarItemSpacing:
d->doubleControls ? ret = 2 : ret = 1;
break;
case PM_ToolBarHandleExtent:
d->doubleControls ? ret = 16 : ret = 8;
break;
case PM_ButtonIconSize:
d->doubleControls ? ret = 32 : ret = 16;
break;
case PM_TextCursorWidth:
ret = 2;
break;
case PM_TabBar_ScrollButtonOverlap:
ret = 0;
break;
default:
ret = QWindowsStyle::pixelMetric(pm, opt, widget);
break;
}
return ret;
}
int QWindowsMobileStyle::styleHint(StyleHint hint, const QStyleOption *opt, const QWidget *widget,
QStyleHintReturn *returnData) const {
int ret;
switch (hint) {
case SH_Menu_MouseTracking:
case SH_ComboBox_ListMouseTracking:
case SH_EtchDisabledText:
ret = 0;
break;
case SH_DitherDisabledText:
ret = 0;
break;
case SH_ItemView_ShowDecorationSelected:
ret = 0;
break;
#ifndef QT_NO_TABWIDGET
case SH_TabWidget_DefaultTabPosition:
ret = QTabWidget::South;
break;
#endif
case SH_ToolBar_Movable:
ret = false;
break;
case SH_ScrollBar_ContextMenu:
ret = false;
break;
case SH_MenuBar_AltKeyNavigation:
ret = false;
break;
case SH_RequestSoftwareInputPanel:
ret = RSIP_OnMouseClick;
break;
default:
ret = QWindowsStyle::styleHint(hint, opt, widget, returnData);
break;
}
return ret;
}
QPixmap QWindowsMobileStyle::standardPixmap(StandardPixmap sp, const QStyleOption *option,
const QWidget *widget) const {
QWindowsMobileStylePrivate *d = const_cast<QWindowsMobileStylePrivate*>(d_func());
switch (sp) {
#ifndef QT_NO_IMAGEFORMAT_XPM
case SP_ToolBarHorizontalExtensionButton: {
QPixmap pixmap = QCommonStyle::standardPixmap(sp, option, widget);
if (d->doubleControls)
return pixmap.scaledToHeight(pixmap.height() * 2);
else
return pixmap;
}
case SP_TitleBarMaxButton:
case SP_TitleBarCloseButton:
case SP_TitleBarNormalButton:
case SP_TitleBarMinButton: {
QImage image;
switch (sp) {
case SP_TitleBarMaxButton:
image = d->imageMaximize;
break;
case SP_TitleBarCloseButton:
image = d->imageClose;
break;
case SP_TitleBarNormalButton:
image = d->imageNormalize;
break;
case SP_TitleBarMinButton:
image = d->imageMinimize;
break;
default:
break;
}
if (option) {
image.setColor(0, option->palette.shadow().color().rgba());
image.setColor(1, option->palette.highlight().color().rgba());
image.setColor(2, option->palette.highlight().color().lighter(150).rgba());
image.setColor(3, option->palette.highlightedText().color().rgba());
}
return QPixmap::fromImage(image);
}
#endif
default:
return QWindowsStyle::standardPixmap(sp, option, widget);
}
}
QPixmap QWindowsMobileStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap,
const QStyleOption *option) const {
switch (iconMode) {
case QIcon::Selected: {
#ifdef Q_WS_WINCE_WM
if (d_func()->wm65)
return pixmap;
#endif //Q_WS_WINCE_WM
QImage img = pixmap.toImage().convertToFormat(QImage::Format_ARGB32);
int imgh = img.height();
int imgw = img.width();
for (int y = 0; y < imgh; y += 2) {
for (int x = 0; x < imgw; x += 2) {
QColor c = option->palette.highlight().color().rgb();
c.setAlpha( qAlpha(img.pixel(x, y)));
QRgb pixel = c.rgba();
img.setPixel(x, y, pixel);
}
}
return QPixmap::fromImage(img);
}
default:
break;
}
return QWindowsStyle::generatedIconPixmap(iconMode, pixmap, option);
}
bool QWindowsMobileStyle::doubleControls() const {
QWindowsMobileStylePrivate *d = const_cast<QWindowsMobileStylePrivate*>(d_func());
return d->doubleControls;
}
void QWindowsMobileStyle::setDoubleControls(bool doubleControls) {
QWindowsMobileStylePrivate *d = const_cast<QWindowsMobileStylePrivate*>(d_func());
d->doubleControls = doubleControls;
}
QT_END_NAMESPACE
#endif // QT_NO_STYLE_WINDOWSMOBILE
| sunblithe/qt-everywhere-opensource-src-4.7.1 | src/gui/styles/qwindowsmobilestyle.cpp | C++ | lgpl-2.1 | 238,464 |
/**
*/
package org.w3._2001.smil20.language;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.w3._2001.smil20.Smil20Package;
/**
* <!-- begin-user-doc -->
* The <b>Package</b> for the model.
* It contains accessors for the meta objects to represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
* <li>each operation of each class,</li>
* <li>each enum,</li>
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
*
* <div xmlns="http://www.w3.org/1999/xhtml">
* <h1>About the XML namespace</h1>
*
* <div class="bodytext">
* <p>
* This schema document describes the XML namespace, in a form
* suitable for import by other schema documents.
* </p>
* <p>
* See <a href="http://www.w3.org/XML/1998/namespace.html">
* http://www.w3.org/XML/1998/namespace.html</a> and
* <a href="http://www.w3.org/TR/REC-xml">
* http://www.w3.org/TR/REC-xml</a> for information
* about this namespace.
* </p>
* <p>
* Note that local names in this namespace are intended to be
* defined only by the World Wide Web Consortium or its subgroups.
* The names currently defined in this namespace are listed below.
* They should not be used with conflicting semantics by any Working
* Group, specification, or document instance.
* </p>
* <p>
* See further below in this document for more information about <a href="#usage">how to refer to this schema document from your own
* XSD schema documents</a> and about <a href="#nsversioning">the
* namespace-versioning policy governing this schema document</a>.
* </p>
* </div>
* </div>
*
*
* <div xmlns="http://www.w3.org/1999/xhtml">
*
* <h3>Father (in any context at all)</h3>
*
* <div class="bodytext">
* <p>
* denotes Jon Bosak, the chair of
* the original XML Working Group. This name is reserved by
* the following decision of the W3C XML Plenary and
* XML Coordination groups:
* </p>
* <blockquote>
* <p>
* In appreciation for his vision, leadership and
* dedication the W3C XML Plenary on this 10th day of
* February, 2000, reserves for Jon Bosak in perpetuity
* the XML name "xml:Father".
* </p>
* </blockquote>
* </div>
* </div>
*
*
* <div id="usage" xml:id="usage" xmlns="http://www.w3.org/1999/xhtml">
* <h2>
* <a name="usage">About this schema document</a>
* </h2>
*
* <div class="bodytext">
* <p>
* This schema defines attributes and an attribute group suitable
* for use by schemas wishing to allow <code>xml:base</code>,
* <code>xml:lang</code>, <code>xml:space</code> or
* <code>xml:id</code> attributes on elements they define.
* </p>
* <p>
* To enable this, such a schema must import this schema for
* the XML namespace, e.g. as follows:
* </p>
* <pre>
* <schema . . .>
* . . .
* <import namespace="http://www.w3.org/XML/1998/namespace"
* schemaLocation="http://www.w3.org/2001/xml.xsd"/>
* </pre>
* <p>
* or
* </p>
* <pre>
* <import namespace="http://www.w3.org/XML/1998/namespace"
* schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
* </pre>
* <p>
* Subsequently, qualified reference to any of the attributes or the
* group defined below will have the desired effect, e.g.
* </p>
* <pre>
* <type . . .>
* . . .
* <attributeGroup ref="xml:specialAttrs"/>
* </pre>
* <p>
* will define a type which will schema-validate an instance element
* with any of those attributes.
* </p>
* </div>
* </div>
*
*
* <div id="nsversioning" xml:id="nsversioning" xmlns="http://www.w3.org/1999/xhtml">
* <h2>
* <a name="nsversioning">Versioning policy for this schema document</a>
* </h2>
* <div class="bodytext">
* <p>
* In keeping with the XML Schema WG's standard versioning
* policy, this schema document will persist at
* <a href="http://www.w3.org/2009/01/xml.xsd">
* http://www.w3.org/2009/01/xml.xsd</a>.
* </p>
* <p>
* At the date of issue it can also be found at
* <a href="http://www.w3.org/2001/xml.xsd">
* http://www.w3.org/2001/xml.xsd</a>.
* </p>
* <p>
* The schema document at that URI may however change in the future,
* in order to remain compatible with the latest version of XML
* Schema itself, or with the XML namespace itself. In other words,
* if the XML Schema or XML namespaces change, the version of this
* document at <a href="http://www.w3.org/2001/xml.xsd">
* http://www.w3.org/2001/xml.xsd
* </a>
* will change accordingly; the version at
* <a href="http://www.w3.org/2009/01/xml.xsd">
* http://www.w3.org/2009/01/xml.xsd
* </a>
* will not change.
* </p>
* <p>
* Previous dated (and unchanging) versions of this schema
* document are at:
* </p>
* <ul>
* <li>
* <a href="http://www.w3.org/2009/01/xml.xsd">
* http://www.w3.org/2009/01/xml.xsd</a>
* </li>
* <li>
* <a href="http://www.w3.org/2007/08/xml.xsd">
* http://www.w3.org/2007/08/xml.xsd</a>
* </li>
* <li>
* <a href="http://www.w3.org/2004/10/xml.xsd">
* http://www.w3.org/2004/10/xml.xsd</a>
* </li>
* <li>
* <a href="http://www.w3.org/2001/03/xml.xsd">
* http://www.w3.org/2001/03/xml.xsd</a>
* </li>
* </ul>
* </div>
* </div>
*
* <!-- end-model-doc -->
* @see org.w3._2001.smil20.language.LanguageFactory
* @model kind="package"
* @generated
*/
public interface LanguagePackage extends EPackage {
/**
* The package name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNAME = "language";
/**
* The package namespace URI.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNS_URI = "http://www.w3.org/2001/SMIL20/Language";
/**
* The package namespace name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNS_PREFIX = "language";
/**
* The singleton instance of the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
LanguagePackage eINSTANCE = org.w3._2001.smil20.language.impl.LanguagePackageImpl.init();
/**
* The meta object id for the '{@link org.w3._2001.smil20.language.impl.AnimateColorTypeImpl <em>Animate Color Type</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.w3._2001.smil20.language.impl.AnimateColorTypeImpl
* @see org.w3._2001.smil20.language.impl.LanguagePackageImpl#getAnimateColorType()
* @generated
*/
int ANIMATE_COLOR_TYPE = 0;
/**
* The feature id for the '<em><b>Accumulate</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__ACCUMULATE = Smil20Package.ANIMATE_COLOR_PROTOTYPE__ACCUMULATE;
/**
* The feature id for the '<em><b>Additive</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__ADDITIVE = Smil20Package.ANIMATE_COLOR_PROTOTYPE__ADDITIVE;
/**
* The feature id for the '<em><b>Attribute Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__ATTRIBUTE_NAME = Smil20Package.ANIMATE_COLOR_PROTOTYPE__ATTRIBUTE_NAME;
/**
* The feature id for the '<em><b>Attribute Type</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__ATTRIBUTE_TYPE = Smil20Package.ANIMATE_COLOR_PROTOTYPE__ATTRIBUTE_TYPE;
/**
* The feature id for the '<em><b>By</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__BY = Smil20Package.ANIMATE_COLOR_PROTOTYPE__BY;
/**
* The feature id for the '<em><b>From</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__FROM = Smil20Package.ANIMATE_COLOR_PROTOTYPE__FROM;
/**
* The feature id for the '<em><b>To</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__TO = Smil20Package.ANIMATE_COLOR_PROTOTYPE__TO;
/**
* The feature id for the '<em><b>Values</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__VALUES = Smil20Package.ANIMATE_COLOR_PROTOTYPE__VALUES;
/**
* The feature id for the '<em><b>Group</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__GROUP = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Any</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__ANY = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Alt</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__ALT = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Begin</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__BEGIN = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Calc Mode</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__CALC_MODE = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Class</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__CLASS = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 5;
/**
* The feature id for the '<em><b>Dur</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__DUR = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 6;
/**
* The feature id for the '<em><b>End</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__END = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 7;
/**
* The feature id for the '<em><b>Fill</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__FILL = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 8;
/**
* The feature id for the '<em><b>Fill Default</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__FILL_DEFAULT = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 9;
/**
* The feature id for the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__ID = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 10;
/**
* The feature id for the '<em><b>Lang</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__LANG = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 11;
/**
* The feature id for the '<em><b>Longdesc</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__LONGDESC = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 12;
/**
* The feature id for the '<em><b>Max</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__MAX = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 13;
/**
* The feature id for the '<em><b>Min</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__MIN = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 14;
/**
* The feature id for the '<em><b>Repeat</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__REPEAT = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 15;
/**
* The feature id for the '<em><b>Repeat Count</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__REPEAT_COUNT = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 16;
/**
* The feature id for the '<em><b>Repeat Dur</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__REPEAT_DUR = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 17;
/**
* The feature id for the '<em><b>Restart</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__RESTART = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 18;
/**
* The feature id for the '<em><b>Restart Default</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__RESTART_DEFAULT = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 19;
/**
* The feature id for the '<em><b>Skip Content</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__SKIP_CONTENT = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 20;
/**
* The feature id for the '<em><b>Sync Behavior</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__SYNC_BEHAVIOR = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 21;
/**
* The feature id for the '<em><b>Sync Behavior Default</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__SYNC_BEHAVIOR_DEFAULT = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 22;
/**
* The feature id for the '<em><b>Sync Tolerance</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__SYNC_TOLERANCE = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 23;
/**
* The feature id for the '<em><b>Sync Tolerance Default</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__SYNC_TOLERANCE_DEFAULT = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 24;
/**
* The feature id for the '<em><b>Target Element</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__TARGET_ELEMENT = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 25;
/**
* The feature id for the '<em><b>Any Attribute</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE__ANY_ATTRIBUTE = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 26;
/**
* The number of structural features of the '<em>Animate Color Type</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE_FEATURE_COUNT = Smil20Package.ANIMATE_COLOR_PROTOTYPE_FEATURE_COUNT + 27;
/**
* The number of operations of the '<em>Animate Color Type</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_COLOR_TYPE_OPERATION_COUNT = Smil20Package.ANIMATE_COLOR_PROTOTYPE_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link org.w3._2001.smil20.language.impl.AnimateMotionTypeImpl <em>Animate Motion Type</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.w3._2001.smil20.language.impl.AnimateMotionTypeImpl
* @see org.w3._2001.smil20.language.impl.LanguagePackageImpl#getAnimateMotionType()
* @generated
*/
int ANIMATE_MOTION_TYPE = 1;
/**
* The feature id for the '<em><b>Accumulate</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__ACCUMULATE = Smil20Package.ANIMATE_MOTION_PROTOTYPE__ACCUMULATE;
/**
* The feature id for the '<em><b>Additive</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__ADDITIVE = Smil20Package.ANIMATE_MOTION_PROTOTYPE__ADDITIVE;
/**
* The feature id for the '<em><b>By</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__BY = Smil20Package.ANIMATE_MOTION_PROTOTYPE__BY;
/**
* The feature id for the '<em><b>From</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__FROM = Smil20Package.ANIMATE_MOTION_PROTOTYPE__FROM;
/**
* The feature id for the '<em><b>Origin</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__ORIGIN = Smil20Package.ANIMATE_MOTION_PROTOTYPE__ORIGIN;
/**
* The feature id for the '<em><b>To</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__TO = Smil20Package.ANIMATE_MOTION_PROTOTYPE__TO;
/**
* The feature id for the '<em><b>Values</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__VALUES = Smil20Package.ANIMATE_MOTION_PROTOTYPE__VALUES;
/**
* The feature id for the '<em><b>Group</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__GROUP = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Any</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__ANY = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Alt</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__ALT = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Begin</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__BEGIN = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Calc Mode</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__CALC_MODE = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Class</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__CLASS = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 5;
/**
* The feature id for the '<em><b>Dur</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__DUR = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 6;
/**
* The feature id for the '<em><b>End</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__END = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 7;
/**
* The feature id for the '<em><b>Fill</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__FILL = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 8;
/**
* The feature id for the '<em><b>Fill Default</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__FILL_DEFAULT = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 9;
/**
* The feature id for the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__ID = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 10;
/**
* The feature id for the '<em><b>Lang</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__LANG = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 11;
/**
* The feature id for the '<em><b>Longdesc</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__LONGDESC = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 12;
/**
* The feature id for the '<em><b>Max</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__MAX = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 13;
/**
* The feature id for the '<em><b>Min</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__MIN = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 14;
/**
* The feature id for the '<em><b>Repeat</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__REPEAT = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 15;
/**
* The feature id for the '<em><b>Repeat Count</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__REPEAT_COUNT = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 16;
/**
* The feature id for the '<em><b>Repeat Dur</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__REPEAT_DUR = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 17;
/**
* The feature id for the '<em><b>Restart</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__RESTART = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 18;
/**
* The feature id for the '<em><b>Restart Default</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__RESTART_DEFAULT = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 19;
/**
* The feature id for the '<em><b>Skip Content</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__SKIP_CONTENT = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 20;
/**
* The feature id for the '<em><b>Sync Behavior</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__SYNC_BEHAVIOR = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 21;
/**
* The feature id for the '<em><b>Sync Behavior Default</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__SYNC_BEHAVIOR_DEFAULT = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 22;
/**
* The feature id for the '<em><b>Sync Tolerance</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__SYNC_TOLERANCE = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 23;
/**
* The feature id for the '<em><b>Sync Tolerance Default</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__SYNC_TOLERANCE_DEFAULT = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 24;
/**
* The feature id for the '<em><b>Target Element</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__TARGET_ELEMENT = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 25;
/**
* The feature id for the '<em><b>Any Attribute</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE__ANY_ATTRIBUTE = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 26;
/**
* The number of structural features of the '<em>Animate Motion Type</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE_FEATURE_COUNT = Smil20Package.ANIMATE_MOTION_PROTOTYPE_FEATURE_COUNT + 27;
/**
* The number of operations of the '<em>Animate Motion Type</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_MOTION_TYPE_OPERATION_COUNT = Smil20Package.ANIMATE_MOTION_PROTOTYPE_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link org.w3._2001.smil20.language.impl.AnimateTypeImpl <em>Animate Type</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.w3._2001.smil20.language.impl.AnimateTypeImpl
* @see org.w3._2001.smil20.language.impl.LanguagePackageImpl#getAnimateType()
* @generated
*/
int ANIMATE_TYPE = 2;
/**
* The feature id for the '<em><b>Accumulate</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__ACCUMULATE = Smil20Package.ANIMATE_PROTOTYPE__ACCUMULATE;
/**
* The feature id for the '<em><b>Additive</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__ADDITIVE = Smil20Package.ANIMATE_PROTOTYPE__ADDITIVE;
/**
* The feature id for the '<em><b>Attribute Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__ATTRIBUTE_NAME = Smil20Package.ANIMATE_PROTOTYPE__ATTRIBUTE_NAME;
/**
* The feature id for the '<em><b>Attribute Type</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__ATTRIBUTE_TYPE = Smil20Package.ANIMATE_PROTOTYPE__ATTRIBUTE_TYPE;
/**
* The feature id for the '<em><b>By</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__BY = Smil20Package.ANIMATE_PROTOTYPE__BY;
/**
* The feature id for the '<em><b>From</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__FROM = Smil20Package.ANIMATE_PROTOTYPE__FROM;
/**
* The feature id for the '<em><b>To</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__TO = Smil20Package.ANIMATE_PROTOTYPE__TO;
/**
* The feature id for the '<em><b>Values</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__VALUES = Smil20Package.ANIMATE_PROTOTYPE__VALUES;
/**
* The feature id for the '<em><b>Group</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__GROUP = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Any</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__ANY = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Alt</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__ALT = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Begin</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__BEGIN = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Calc Mode</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__CALC_MODE = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Class</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__CLASS = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 5;
/**
* The feature id for the '<em><b>Dur</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__DUR = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 6;
/**
* The feature id for the '<em><b>End</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__END = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 7;
/**
* The feature id for the '<em><b>Fill</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__FILL = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 8;
/**
* The feature id for the '<em><b>Fill Default</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__FILL_DEFAULT = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 9;
/**
* The feature id for the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__ID = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 10;
/**
* The feature id for the '<em><b>Lang</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__LANG = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 11;
/**
* The feature id for the '<em><b>Longdesc</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__LONGDESC = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 12;
/**
* The feature id for the '<em><b>Max</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__MAX = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 13;
/**
* The feature id for the '<em><b>Min</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__MIN = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 14;
/**
* The feature id for the '<em><b>Repeat</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__REPEAT = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 15;
/**
* The feature id for the '<em><b>Repeat Count</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__REPEAT_COUNT = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 16;
/**
* The feature id for the '<em><b>Repeat Dur</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__REPEAT_DUR = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 17;
/**
* The feature id for the '<em><b>Restart</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__RESTART = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 18;
/**
* The feature id for the '<em><b>Restart Default</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__RESTART_DEFAULT = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 19;
/**
* The feature id for the '<em><b>Skip Content</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__SKIP_CONTENT = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 20;
/**
* The feature id for the '<em><b>Sync Behavior</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__SYNC_BEHAVIOR = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 21;
/**
* The feature id for the '<em><b>Sync Behavior Default</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__SYNC_BEHAVIOR_DEFAULT = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 22;
/**
* The feature id for the '<em><b>Sync Tolerance</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__SYNC_TOLERANCE = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 23;
/**
* The feature id for the '<em><b>Sync Tolerance Default</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__SYNC_TOLERANCE_DEFAULT = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 24;
/**
* The feature id for the '<em><b>Target Element</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__TARGET_ELEMENT = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 25;
/**
* The feature id for the '<em><b>Any Attribute</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE__ANY_ATTRIBUTE = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 26;
/**
* The number of structural features of the '<em>Animate Type</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE_FEATURE_COUNT = Smil20Package.ANIMATE_PROTOTYPE_FEATURE_COUNT + 27;
/**
* The number of operations of the '<em>Animate Type</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ANIMATE_TYPE_OPERATION_COUNT = Smil20Package.ANIMATE_PROTOTYPE_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link org.w3._2001.smil20.language.impl.DocumentRootImpl <em>Document Root</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.w3._2001.smil20.language.impl.DocumentRootImpl
* @see org.w3._2001.smil20.language.impl.LanguagePackageImpl#getDocumentRoot()
* @generated
*/
int DOCUMENT_ROOT = 3;
/**
* The feature id for the '<em><b>Mixed</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int DOCUMENT_ROOT__MIXED = 0;
/**
* The feature id for the '<em><b>XMLNS Prefix Map</b></em>' map.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int DOCUMENT_ROOT__XMLNS_PREFIX_MAP = 1;
/**
* The feature id for the '<em><b>XSI Schema Location</b></em>' map.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = 2;
/**
* The feature id for the '<em><b>Animate</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int DOCUMENT_ROOT__ANIMATE = 3;
/**
* The feature id for the '<em><b>Animate Color</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int DOCUMENT_ROOT__ANIMATE_COLOR = 4;
/**
* The feature id for the '<em><b>Animate Motion</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int DOCUMENT_ROOT__ANIMATE_MOTION = 5;
/**
* The feature id for the '<em><b>Set</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int DOCUMENT_ROOT__SET = 6;
/**
* The number of structural features of the '<em>Document Root</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int DOCUMENT_ROOT_FEATURE_COUNT = 7;
/**
* The number of operations of the '<em>Document Root</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int DOCUMENT_ROOT_OPERATION_COUNT = 0;
/**
* The meta object id for the '{@link org.w3._2001.smil20.language.impl.SetTypeImpl <em>Set Type</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.w3._2001.smil20.language.impl.SetTypeImpl
* @see org.w3._2001.smil20.language.impl.LanguagePackageImpl#getSetType()
* @generated
*/
int SET_TYPE = 4;
/**
* The feature id for the '<em><b>Attribute Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__ATTRIBUTE_NAME = Smil20Package.SET_PROTOTYPE__ATTRIBUTE_NAME;
/**
* The feature id for the '<em><b>Attribute Type</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__ATTRIBUTE_TYPE = Smil20Package.SET_PROTOTYPE__ATTRIBUTE_TYPE;
/**
* The feature id for the '<em><b>To</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__TO = Smil20Package.SET_PROTOTYPE__TO;
/**
* The feature id for the '<em><b>Group</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__GROUP = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Any</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__ANY = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Alt</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__ALT = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Begin</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__BEGIN = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Class</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__CLASS = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Dur</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__DUR = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 5;
/**
* The feature id for the '<em><b>End</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__END = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 6;
/**
* The feature id for the '<em><b>Fill</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__FILL = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 7;
/**
* The feature id for the '<em><b>Fill Default</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__FILL_DEFAULT = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 8;
/**
* The feature id for the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__ID = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 9;
/**
* The feature id for the '<em><b>Lang</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__LANG = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 10;
/**
* The feature id for the '<em><b>Longdesc</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__LONGDESC = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 11;
/**
* The feature id for the '<em><b>Max</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__MAX = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 12;
/**
* The feature id for the '<em><b>Min</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__MIN = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 13;
/**
* The feature id for the '<em><b>Repeat</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__REPEAT = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 14;
/**
* The feature id for the '<em><b>Repeat Count</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__REPEAT_COUNT = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 15;
/**
* The feature id for the '<em><b>Repeat Dur</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__REPEAT_DUR = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 16;
/**
* The feature id for the '<em><b>Restart</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__RESTART = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 17;
/**
* The feature id for the '<em><b>Restart Default</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__RESTART_DEFAULT = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 18;
/**
* The feature id for the '<em><b>Skip Content</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__SKIP_CONTENT = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 19;
/**
* The feature id for the '<em><b>Sync Behavior</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__SYNC_BEHAVIOR = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 20;
/**
* The feature id for the '<em><b>Sync Behavior Default</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__SYNC_BEHAVIOR_DEFAULT = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 21;
/**
* The feature id for the '<em><b>Sync Tolerance</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__SYNC_TOLERANCE = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 22;
/**
* The feature id for the '<em><b>Sync Tolerance Default</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__SYNC_TOLERANCE_DEFAULT = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 23;
/**
* The feature id for the '<em><b>Target Element</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__TARGET_ELEMENT = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 24;
/**
* The feature id for the '<em><b>Any Attribute</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE__ANY_ATTRIBUTE = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 25;
/**
* The number of structural features of the '<em>Set Type</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE_FEATURE_COUNT = Smil20Package.SET_PROTOTYPE_FEATURE_COUNT + 26;
/**
* The number of operations of the '<em>Set Type</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int SET_TYPE_OPERATION_COUNT = Smil20Package.SET_PROTOTYPE_OPERATION_COUNT + 0;
/**
* Returns the meta object for class '{@link org.w3._2001.smil20.language.AnimateColorType <em>Animate Color Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Animate Color Type</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType
* @generated
*/
EClass getAnimateColorType();
/**
* Returns the meta object for the attribute list '{@link org.w3._2001.smil20.language.AnimateColorType#getGroup <em>Group</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Group</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getGroup()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_Group();
/**
* Returns the meta object for the attribute list '{@link org.w3._2001.smil20.language.AnimateColorType#getAny <em>Any</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Any</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getAny()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_Any();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getAlt <em>Alt</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Alt</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getAlt()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_Alt();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getBegin <em>Begin</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Begin</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getBegin()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_Begin();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getCalcMode <em>Calc Mode</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Calc Mode</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getCalcMode()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_CalcMode();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getClass_ <em>Class</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Class</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getClass_()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_Class();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getDur <em>Dur</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Dur</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getDur()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_Dur();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getEnd <em>End</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>End</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getEnd()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_End();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getFill <em>Fill</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Fill</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getFill()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_Fill();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getFillDefault <em>Fill Default</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Fill Default</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getFillDefault()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_FillDefault();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getId <em>Id</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Id</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getId()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_Id();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getLang <em>Lang</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Lang</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getLang()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_Lang();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getLongdesc <em>Longdesc</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Longdesc</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getLongdesc()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_Longdesc();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getMax <em>Max</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Max</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getMax()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_Max();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getMin <em>Min</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Min</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getMin()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_Min();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getRepeat <em>Repeat</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Repeat</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getRepeat()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_Repeat();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getRepeatCount <em>Repeat Count</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Repeat Count</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getRepeatCount()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_RepeatCount();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getRepeatDur <em>Repeat Dur</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Repeat Dur</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getRepeatDur()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_RepeatDur();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getRestart <em>Restart</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Restart</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getRestart()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_Restart();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getRestartDefault <em>Restart Default</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Restart Default</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getRestartDefault()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_RestartDefault();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#isSkipContent <em>Skip Content</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Skip Content</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#isSkipContent()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_SkipContent();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getSyncBehavior <em>Sync Behavior</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Sync Behavior</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getSyncBehavior()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_SyncBehavior();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getSyncBehaviorDefault <em>Sync Behavior Default</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Sync Behavior Default</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getSyncBehaviorDefault()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_SyncBehaviorDefault();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getSyncTolerance <em>Sync Tolerance</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Sync Tolerance</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getSyncTolerance()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_SyncTolerance();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getSyncToleranceDefault <em>Sync Tolerance Default</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Sync Tolerance Default</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getSyncToleranceDefault()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_SyncToleranceDefault();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateColorType#getTargetElement <em>Target Element</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Target Element</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getTargetElement()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_TargetElement();
/**
* Returns the meta object for the attribute list '{@link org.w3._2001.smil20.language.AnimateColorType#getAnyAttribute <em>Any Attribute</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Any Attribute</em>'.
* @see org.w3._2001.smil20.language.AnimateColorType#getAnyAttribute()
* @see #getAnimateColorType()
* @generated
*/
EAttribute getAnimateColorType_AnyAttribute();
/**
* Returns the meta object for class '{@link org.w3._2001.smil20.language.AnimateMotionType <em>Animate Motion Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Animate Motion Type</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType
* @generated
*/
EClass getAnimateMotionType();
/**
* Returns the meta object for the attribute list '{@link org.w3._2001.smil20.language.AnimateMotionType#getGroup <em>Group</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Group</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getGroup()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_Group();
/**
* Returns the meta object for the attribute list '{@link org.w3._2001.smil20.language.AnimateMotionType#getAny <em>Any</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Any</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getAny()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_Any();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getAlt <em>Alt</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Alt</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getAlt()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_Alt();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getBegin <em>Begin</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Begin</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getBegin()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_Begin();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getCalcMode <em>Calc Mode</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Calc Mode</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getCalcMode()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_CalcMode();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getClass_ <em>Class</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Class</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getClass_()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_Class();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getDur <em>Dur</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Dur</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getDur()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_Dur();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getEnd <em>End</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>End</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getEnd()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_End();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getFill <em>Fill</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Fill</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getFill()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_Fill();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getFillDefault <em>Fill Default</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Fill Default</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getFillDefault()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_FillDefault();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getId <em>Id</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Id</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getId()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_Id();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getLang <em>Lang</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Lang</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getLang()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_Lang();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getLongdesc <em>Longdesc</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Longdesc</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getLongdesc()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_Longdesc();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getMax <em>Max</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Max</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getMax()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_Max();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getMin <em>Min</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Min</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getMin()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_Min();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getRepeat <em>Repeat</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Repeat</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getRepeat()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_Repeat();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getRepeatCount <em>Repeat Count</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Repeat Count</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getRepeatCount()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_RepeatCount();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getRepeatDur <em>Repeat Dur</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Repeat Dur</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getRepeatDur()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_RepeatDur();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getRestart <em>Restart</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Restart</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getRestart()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_Restart();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getRestartDefault <em>Restart Default</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Restart Default</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getRestartDefault()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_RestartDefault();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#isSkipContent <em>Skip Content</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Skip Content</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#isSkipContent()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_SkipContent();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getSyncBehavior <em>Sync Behavior</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Sync Behavior</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getSyncBehavior()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_SyncBehavior();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getSyncBehaviorDefault <em>Sync Behavior Default</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Sync Behavior Default</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getSyncBehaviorDefault()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_SyncBehaviorDefault();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getSyncTolerance <em>Sync Tolerance</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Sync Tolerance</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getSyncTolerance()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_SyncTolerance();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getSyncToleranceDefault <em>Sync Tolerance Default</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Sync Tolerance Default</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getSyncToleranceDefault()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_SyncToleranceDefault();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getTargetElement <em>Target Element</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Target Element</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getTargetElement()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_TargetElement();
/**
* Returns the meta object for the attribute list '{@link org.w3._2001.smil20.language.AnimateMotionType#getAnyAttribute <em>Any Attribute</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Any Attribute</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getAnyAttribute()
* @see #getAnimateMotionType()
* @generated
*/
EAttribute getAnimateMotionType_AnyAttribute();
/**
* Returns the meta object for class '{@link org.w3._2001.smil20.language.AnimateType <em>Animate Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Animate Type</em>'.
* @see org.w3._2001.smil20.language.AnimateType
* @generated
*/
EClass getAnimateType();
/**
* Returns the meta object for the attribute list '{@link org.w3._2001.smil20.language.AnimateType#getGroup <em>Group</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Group</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getGroup()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_Group();
/**
* Returns the meta object for the attribute list '{@link org.w3._2001.smil20.language.AnimateType#getAny <em>Any</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Any</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getAny()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_Any();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getAlt <em>Alt</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Alt</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getAlt()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_Alt();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getBegin <em>Begin</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Begin</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getBegin()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_Begin();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getCalcMode <em>Calc Mode</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Calc Mode</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getCalcMode()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_CalcMode();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getClass_ <em>Class</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Class</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getClass_()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_Class();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getDur <em>Dur</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Dur</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getDur()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_Dur();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getEnd <em>End</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>End</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getEnd()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_End();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getFill <em>Fill</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Fill</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getFill()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_Fill();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getFillDefault <em>Fill Default</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Fill Default</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getFillDefault()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_FillDefault();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getId <em>Id</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Id</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getId()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_Id();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getLang <em>Lang</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Lang</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getLang()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_Lang();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getLongdesc <em>Longdesc</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Longdesc</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getLongdesc()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_Longdesc();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getMax <em>Max</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Max</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getMax()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_Max();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getMin <em>Min</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Min</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getMin()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_Min();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getRepeat <em>Repeat</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Repeat</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getRepeat()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_Repeat();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getRepeatCount <em>Repeat Count</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Repeat Count</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getRepeatCount()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_RepeatCount();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getRepeatDur <em>Repeat Dur</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Repeat Dur</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getRepeatDur()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_RepeatDur();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getRestart <em>Restart</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Restart</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getRestart()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_Restart();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getRestartDefault <em>Restart Default</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Restart Default</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getRestartDefault()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_RestartDefault();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#isSkipContent <em>Skip Content</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Skip Content</em>'.
* @see org.w3._2001.smil20.language.AnimateType#isSkipContent()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_SkipContent();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getSyncBehavior <em>Sync Behavior</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Sync Behavior</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getSyncBehavior()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_SyncBehavior();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getSyncBehaviorDefault <em>Sync Behavior Default</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Sync Behavior Default</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getSyncBehaviorDefault()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_SyncBehaviorDefault();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getSyncTolerance <em>Sync Tolerance</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Sync Tolerance</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getSyncTolerance()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_SyncTolerance();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getSyncToleranceDefault <em>Sync Tolerance Default</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Sync Tolerance Default</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getSyncToleranceDefault()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_SyncToleranceDefault();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateType#getTargetElement <em>Target Element</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Target Element</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getTargetElement()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_TargetElement();
/**
* Returns the meta object for the attribute list '{@link org.w3._2001.smil20.language.AnimateType#getAnyAttribute <em>Any Attribute</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Any Attribute</em>'.
* @see org.w3._2001.smil20.language.AnimateType#getAnyAttribute()
* @see #getAnimateType()
* @generated
*/
EAttribute getAnimateType_AnyAttribute();
/**
* Returns the meta object for class '{@link org.w3._2001.smil20.language.DocumentRoot <em>Document Root</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Document Root</em>'.
* @see org.w3._2001.smil20.language.DocumentRoot
* @generated
*/
EClass getDocumentRoot();
/**
* Returns the meta object for the attribute list '{@link org.w3._2001.smil20.language.DocumentRoot#getMixed <em>Mixed</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Mixed</em>'.
* @see org.w3._2001.smil20.language.DocumentRoot#getMixed()
* @see #getDocumentRoot()
* @generated
*/
EAttribute getDocumentRoot_Mixed();
/**
* Returns the meta object for the map '{@link org.w3._2001.smil20.language.DocumentRoot#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the map '<em>XMLNS Prefix Map</em>'.
* @see org.w3._2001.smil20.language.DocumentRoot#getXMLNSPrefixMap()
* @see #getDocumentRoot()
* @generated
*/
EReference getDocumentRoot_XMLNSPrefixMap();
/**
* Returns the meta object for the map '{@link org.w3._2001.smil20.language.DocumentRoot#getXSISchemaLocation <em>XSI Schema Location</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the map '<em>XSI Schema Location</em>'.
* @see org.w3._2001.smil20.language.DocumentRoot#getXSISchemaLocation()
* @see #getDocumentRoot()
* @generated
*/
EReference getDocumentRoot_XSISchemaLocation();
/**
* Returns the meta object for the containment reference '{@link org.w3._2001.smil20.language.DocumentRoot#getAnimate <em>Animate</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Animate</em>'.
* @see org.w3._2001.smil20.language.DocumentRoot#getAnimate()
* @see #getDocumentRoot()
* @generated
*/
EReference getDocumentRoot_Animate();
/**
* Returns the meta object for the containment reference '{@link org.w3._2001.smil20.language.DocumentRoot#getAnimateColor <em>Animate Color</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Animate Color</em>'.
* @see org.w3._2001.smil20.language.DocumentRoot#getAnimateColor()
* @see #getDocumentRoot()
* @generated
*/
EReference getDocumentRoot_AnimateColor();
/**
* Returns the meta object for the containment reference '{@link org.w3._2001.smil20.language.DocumentRoot#getAnimateMotion <em>Animate Motion</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Animate Motion</em>'.
* @see org.w3._2001.smil20.language.DocumentRoot#getAnimateMotion()
* @see #getDocumentRoot()
* @generated
*/
EReference getDocumentRoot_AnimateMotion();
/**
* Returns the meta object for the containment reference '{@link org.w3._2001.smil20.language.DocumentRoot#getSet <em>Set</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Set</em>'.
* @see org.w3._2001.smil20.language.DocumentRoot#getSet()
* @see #getDocumentRoot()
* @generated
*/
EReference getDocumentRoot_Set();
/**
* Returns the meta object for class '{@link org.w3._2001.smil20.language.SetType <em>Set Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Set Type</em>'.
* @see org.w3._2001.smil20.language.SetType
* @generated
*/
EClass getSetType();
/**
* Returns the meta object for the attribute list '{@link org.w3._2001.smil20.language.SetType#getGroup <em>Group</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Group</em>'.
* @see org.w3._2001.smil20.language.SetType#getGroup()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_Group();
/**
* Returns the meta object for the attribute list '{@link org.w3._2001.smil20.language.SetType#getAny <em>Any</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Any</em>'.
* @see org.w3._2001.smil20.language.SetType#getAny()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_Any();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getAlt <em>Alt</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Alt</em>'.
* @see org.w3._2001.smil20.language.SetType#getAlt()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_Alt();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getBegin <em>Begin</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Begin</em>'.
* @see org.w3._2001.smil20.language.SetType#getBegin()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_Begin();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getClass_ <em>Class</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Class</em>'.
* @see org.w3._2001.smil20.language.SetType#getClass_()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_Class();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getDur <em>Dur</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Dur</em>'.
* @see org.w3._2001.smil20.language.SetType#getDur()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_Dur();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getEnd <em>End</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>End</em>'.
* @see org.w3._2001.smil20.language.SetType#getEnd()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_End();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getFill <em>Fill</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Fill</em>'.
* @see org.w3._2001.smil20.language.SetType#getFill()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_Fill();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getFillDefault <em>Fill Default</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Fill Default</em>'.
* @see org.w3._2001.smil20.language.SetType#getFillDefault()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_FillDefault();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getId <em>Id</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Id</em>'.
* @see org.w3._2001.smil20.language.SetType#getId()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_Id();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getLang <em>Lang</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Lang</em>'.
* @see org.w3._2001.smil20.language.SetType#getLang()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_Lang();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getLongdesc <em>Longdesc</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Longdesc</em>'.
* @see org.w3._2001.smil20.language.SetType#getLongdesc()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_Longdesc();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getMax <em>Max</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Max</em>'.
* @see org.w3._2001.smil20.language.SetType#getMax()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_Max();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getMin <em>Min</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Min</em>'.
* @see org.w3._2001.smil20.language.SetType#getMin()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_Min();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getRepeat <em>Repeat</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Repeat</em>'.
* @see org.w3._2001.smil20.language.SetType#getRepeat()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_Repeat();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getRepeatCount <em>Repeat Count</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Repeat Count</em>'.
* @see org.w3._2001.smil20.language.SetType#getRepeatCount()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_RepeatCount();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getRepeatDur <em>Repeat Dur</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Repeat Dur</em>'.
* @see org.w3._2001.smil20.language.SetType#getRepeatDur()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_RepeatDur();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getRestart <em>Restart</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Restart</em>'.
* @see org.w3._2001.smil20.language.SetType#getRestart()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_Restart();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getRestartDefault <em>Restart Default</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Restart Default</em>'.
* @see org.w3._2001.smil20.language.SetType#getRestartDefault()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_RestartDefault();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#isSkipContent <em>Skip Content</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Skip Content</em>'.
* @see org.w3._2001.smil20.language.SetType#isSkipContent()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_SkipContent();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getSyncBehavior <em>Sync Behavior</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Sync Behavior</em>'.
* @see org.w3._2001.smil20.language.SetType#getSyncBehavior()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_SyncBehavior();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getSyncBehaviorDefault <em>Sync Behavior Default</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Sync Behavior Default</em>'.
* @see org.w3._2001.smil20.language.SetType#getSyncBehaviorDefault()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_SyncBehaviorDefault();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getSyncTolerance <em>Sync Tolerance</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Sync Tolerance</em>'.
* @see org.w3._2001.smil20.language.SetType#getSyncTolerance()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_SyncTolerance();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getSyncToleranceDefault <em>Sync Tolerance Default</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Sync Tolerance Default</em>'.
* @see org.w3._2001.smil20.language.SetType#getSyncToleranceDefault()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_SyncToleranceDefault();
/**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.SetType#getTargetElement <em>Target Element</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Target Element</em>'.
* @see org.w3._2001.smil20.language.SetType#getTargetElement()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_TargetElement();
/**
* Returns the meta object for the attribute list '{@link org.w3._2001.smil20.language.SetType#getAnyAttribute <em>Any Attribute</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Any Attribute</em>'.
* @see org.w3._2001.smil20.language.SetType#getAnyAttribute()
* @see #getSetType()
* @generated
*/
EAttribute getSetType_AnyAttribute();
/**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the factory that creates the instances of the model.
* @generated
*/
LanguageFactory getLanguageFactory();
/**
* <!-- begin-user-doc -->
* Defines literals for the meta objects that represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
* <li>each operation of each class,</li>
* <li>each enum,</li>
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
* @generated
*/
interface Literals {
/**
* The meta object literal for the '{@link org.w3._2001.smil20.language.impl.AnimateColorTypeImpl <em>Animate Color Type</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.w3._2001.smil20.language.impl.AnimateColorTypeImpl
* @see org.w3._2001.smil20.language.impl.LanguagePackageImpl#getAnimateColorType()
* @generated
*/
EClass ANIMATE_COLOR_TYPE = eINSTANCE.getAnimateColorType();
/**
* The meta object literal for the '<em><b>Group</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__GROUP = eINSTANCE.getAnimateColorType_Group();
/**
* The meta object literal for the '<em><b>Any</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__ANY = eINSTANCE.getAnimateColorType_Any();
/**
* The meta object literal for the '<em><b>Alt</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__ALT = eINSTANCE.getAnimateColorType_Alt();
/**
* The meta object literal for the '<em><b>Begin</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__BEGIN = eINSTANCE.getAnimateColorType_Begin();
/**
* The meta object literal for the '<em><b>Calc Mode</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__CALC_MODE = eINSTANCE.getAnimateColorType_CalcMode();
/**
* The meta object literal for the '<em><b>Class</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__CLASS = eINSTANCE.getAnimateColorType_Class();
/**
* The meta object literal for the '<em><b>Dur</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__DUR = eINSTANCE.getAnimateColorType_Dur();
/**
* The meta object literal for the '<em><b>End</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__END = eINSTANCE.getAnimateColorType_End();
/**
* The meta object literal for the '<em><b>Fill</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__FILL = eINSTANCE.getAnimateColorType_Fill();
/**
* The meta object literal for the '<em><b>Fill Default</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__FILL_DEFAULT = eINSTANCE.getAnimateColorType_FillDefault();
/**
* The meta object literal for the '<em><b>Id</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__ID = eINSTANCE.getAnimateColorType_Id();
/**
* The meta object literal for the '<em><b>Lang</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__LANG = eINSTANCE.getAnimateColorType_Lang();
/**
* The meta object literal for the '<em><b>Longdesc</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__LONGDESC = eINSTANCE.getAnimateColorType_Longdesc();
/**
* The meta object literal for the '<em><b>Max</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__MAX = eINSTANCE.getAnimateColorType_Max();
/**
* The meta object literal for the '<em><b>Min</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__MIN = eINSTANCE.getAnimateColorType_Min();
/**
* The meta object literal for the '<em><b>Repeat</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__REPEAT = eINSTANCE.getAnimateColorType_Repeat();
/**
* The meta object literal for the '<em><b>Repeat Count</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__REPEAT_COUNT = eINSTANCE.getAnimateColorType_RepeatCount();
/**
* The meta object literal for the '<em><b>Repeat Dur</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__REPEAT_DUR = eINSTANCE.getAnimateColorType_RepeatDur();
/**
* The meta object literal for the '<em><b>Restart</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__RESTART = eINSTANCE.getAnimateColorType_Restart();
/**
* The meta object literal for the '<em><b>Restart Default</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__RESTART_DEFAULT = eINSTANCE.getAnimateColorType_RestartDefault();
/**
* The meta object literal for the '<em><b>Skip Content</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__SKIP_CONTENT = eINSTANCE.getAnimateColorType_SkipContent();
/**
* The meta object literal for the '<em><b>Sync Behavior</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__SYNC_BEHAVIOR = eINSTANCE.getAnimateColorType_SyncBehavior();
/**
* The meta object literal for the '<em><b>Sync Behavior Default</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__SYNC_BEHAVIOR_DEFAULT = eINSTANCE.getAnimateColorType_SyncBehaviorDefault();
/**
* The meta object literal for the '<em><b>Sync Tolerance</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__SYNC_TOLERANCE = eINSTANCE.getAnimateColorType_SyncTolerance();
/**
* The meta object literal for the '<em><b>Sync Tolerance Default</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__SYNC_TOLERANCE_DEFAULT = eINSTANCE.getAnimateColorType_SyncToleranceDefault();
/**
* The meta object literal for the '<em><b>Target Element</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__TARGET_ELEMENT = eINSTANCE.getAnimateColorType_TargetElement();
/**
* The meta object literal for the '<em><b>Any Attribute</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_COLOR_TYPE__ANY_ATTRIBUTE = eINSTANCE.getAnimateColorType_AnyAttribute();
/**
* The meta object literal for the '{@link org.w3._2001.smil20.language.impl.AnimateMotionTypeImpl <em>Animate Motion Type</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.w3._2001.smil20.language.impl.AnimateMotionTypeImpl
* @see org.w3._2001.smil20.language.impl.LanguagePackageImpl#getAnimateMotionType()
* @generated
*/
EClass ANIMATE_MOTION_TYPE = eINSTANCE.getAnimateMotionType();
/**
* The meta object literal for the '<em><b>Group</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__GROUP = eINSTANCE.getAnimateMotionType_Group();
/**
* The meta object literal for the '<em><b>Any</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__ANY = eINSTANCE.getAnimateMotionType_Any();
/**
* The meta object literal for the '<em><b>Alt</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__ALT = eINSTANCE.getAnimateMotionType_Alt();
/**
* The meta object literal for the '<em><b>Begin</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__BEGIN = eINSTANCE.getAnimateMotionType_Begin();
/**
* The meta object literal for the '<em><b>Calc Mode</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__CALC_MODE = eINSTANCE.getAnimateMotionType_CalcMode();
/**
* The meta object literal for the '<em><b>Class</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__CLASS = eINSTANCE.getAnimateMotionType_Class();
/**
* The meta object literal for the '<em><b>Dur</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__DUR = eINSTANCE.getAnimateMotionType_Dur();
/**
* The meta object literal for the '<em><b>End</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__END = eINSTANCE.getAnimateMotionType_End();
/**
* The meta object literal for the '<em><b>Fill</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__FILL = eINSTANCE.getAnimateMotionType_Fill();
/**
* The meta object literal for the '<em><b>Fill Default</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__FILL_DEFAULT = eINSTANCE.getAnimateMotionType_FillDefault();
/**
* The meta object literal for the '<em><b>Id</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__ID = eINSTANCE.getAnimateMotionType_Id();
/**
* The meta object literal for the '<em><b>Lang</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__LANG = eINSTANCE.getAnimateMotionType_Lang();
/**
* The meta object literal for the '<em><b>Longdesc</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__LONGDESC = eINSTANCE.getAnimateMotionType_Longdesc();
/**
* The meta object literal for the '<em><b>Max</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__MAX = eINSTANCE.getAnimateMotionType_Max();
/**
* The meta object literal for the '<em><b>Min</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__MIN = eINSTANCE.getAnimateMotionType_Min();
/**
* The meta object literal for the '<em><b>Repeat</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__REPEAT = eINSTANCE.getAnimateMotionType_Repeat();
/**
* The meta object literal for the '<em><b>Repeat Count</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__REPEAT_COUNT = eINSTANCE.getAnimateMotionType_RepeatCount();
/**
* The meta object literal for the '<em><b>Repeat Dur</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__REPEAT_DUR = eINSTANCE.getAnimateMotionType_RepeatDur();
/**
* The meta object literal for the '<em><b>Restart</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__RESTART = eINSTANCE.getAnimateMotionType_Restart();
/**
* The meta object literal for the '<em><b>Restart Default</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__RESTART_DEFAULT = eINSTANCE.getAnimateMotionType_RestartDefault();
/**
* The meta object literal for the '<em><b>Skip Content</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__SKIP_CONTENT = eINSTANCE.getAnimateMotionType_SkipContent();
/**
* The meta object literal for the '<em><b>Sync Behavior</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__SYNC_BEHAVIOR = eINSTANCE.getAnimateMotionType_SyncBehavior();
/**
* The meta object literal for the '<em><b>Sync Behavior Default</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__SYNC_BEHAVIOR_DEFAULT = eINSTANCE.getAnimateMotionType_SyncBehaviorDefault();
/**
* The meta object literal for the '<em><b>Sync Tolerance</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__SYNC_TOLERANCE = eINSTANCE.getAnimateMotionType_SyncTolerance();
/**
* The meta object literal for the '<em><b>Sync Tolerance Default</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__SYNC_TOLERANCE_DEFAULT = eINSTANCE.getAnimateMotionType_SyncToleranceDefault();
/**
* The meta object literal for the '<em><b>Target Element</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__TARGET_ELEMENT = eINSTANCE.getAnimateMotionType_TargetElement();
/**
* The meta object literal for the '<em><b>Any Attribute</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_MOTION_TYPE__ANY_ATTRIBUTE = eINSTANCE.getAnimateMotionType_AnyAttribute();
/**
* The meta object literal for the '{@link org.w3._2001.smil20.language.impl.AnimateTypeImpl <em>Animate Type</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.w3._2001.smil20.language.impl.AnimateTypeImpl
* @see org.w3._2001.smil20.language.impl.LanguagePackageImpl#getAnimateType()
* @generated
*/
EClass ANIMATE_TYPE = eINSTANCE.getAnimateType();
/**
* The meta object literal for the '<em><b>Group</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__GROUP = eINSTANCE.getAnimateType_Group();
/**
* The meta object literal for the '<em><b>Any</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__ANY = eINSTANCE.getAnimateType_Any();
/**
* The meta object literal for the '<em><b>Alt</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__ALT = eINSTANCE.getAnimateType_Alt();
/**
* The meta object literal for the '<em><b>Begin</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__BEGIN = eINSTANCE.getAnimateType_Begin();
/**
* The meta object literal for the '<em><b>Calc Mode</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__CALC_MODE = eINSTANCE.getAnimateType_CalcMode();
/**
* The meta object literal for the '<em><b>Class</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__CLASS = eINSTANCE.getAnimateType_Class();
/**
* The meta object literal for the '<em><b>Dur</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__DUR = eINSTANCE.getAnimateType_Dur();
/**
* The meta object literal for the '<em><b>End</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__END = eINSTANCE.getAnimateType_End();
/**
* The meta object literal for the '<em><b>Fill</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__FILL = eINSTANCE.getAnimateType_Fill();
/**
* The meta object literal for the '<em><b>Fill Default</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__FILL_DEFAULT = eINSTANCE.getAnimateType_FillDefault();
/**
* The meta object literal for the '<em><b>Id</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__ID = eINSTANCE.getAnimateType_Id();
/**
* The meta object literal for the '<em><b>Lang</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__LANG = eINSTANCE.getAnimateType_Lang();
/**
* The meta object literal for the '<em><b>Longdesc</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__LONGDESC = eINSTANCE.getAnimateType_Longdesc();
/**
* The meta object literal for the '<em><b>Max</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__MAX = eINSTANCE.getAnimateType_Max();
/**
* The meta object literal for the '<em><b>Min</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__MIN = eINSTANCE.getAnimateType_Min();
/**
* The meta object literal for the '<em><b>Repeat</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__REPEAT = eINSTANCE.getAnimateType_Repeat();
/**
* The meta object literal for the '<em><b>Repeat Count</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__REPEAT_COUNT = eINSTANCE.getAnimateType_RepeatCount();
/**
* The meta object literal for the '<em><b>Repeat Dur</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__REPEAT_DUR = eINSTANCE.getAnimateType_RepeatDur();
/**
* The meta object literal for the '<em><b>Restart</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__RESTART = eINSTANCE.getAnimateType_Restart();
/**
* The meta object literal for the '<em><b>Restart Default</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__RESTART_DEFAULT = eINSTANCE.getAnimateType_RestartDefault();
/**
* The meta object literal for the '<em><b>Skip Content</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__SKIP_CONTENT = eINSTANCE.getAnimateType_SkipContent();
/**
* The meta object literal for the '<em><b>Sync Behavior</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__SYNC_BEHAVIOR = eINSTANCE.getAnimateType_SyncBehavior();
/**
* The meta object literal for the '<em><b>Sync Behavior Default</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__SYNC_BEHAVIOR_DEFAULT = eINSTANCE.getAnimateType_SyncBehaviorDefault();
/**
* The meta object literal for the '<em><b>Sync Tolerance</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__SYNC_TOLERANCE = eINSTANCE.getAnimateType_SyncTolerance();
/**
* The meta object literal for the '<em><b>Sync Tolerance Default</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__SYNC_TOLERANCE_DEFAULT = eINSTANCE.getAnimateType_SyncToleranceDefault();
/**
* The meta object literal for the '<em><b>Target Element</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__TARGET_ELEMENT = eINSTANCE.getAnimateType_TargetElement();
/**
* The meta object literal for the '<em><b>Any Attribute</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ANIMATE_TYPE__ANY_ATTRIBUTE = eINSTANCE.getAnimateType_AnyAttribute();
/**
* The meta object literal for the '{@link org.w3._2001.smil20.language.impl.DocumentRootImpl <em>Document Root</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.w3._2001.smil20.language.impl.DocumentRootImpl
* @see org.w3._2001.smil20.language.impl.LanguagePackageImpl#getDocumentRoot()
* @generated
*/
EClass DOCUMENT_ROOT = eINSTANCE.getDocumentRoot();
/**
* The meta object literal for the '<em><b>Mixed</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute DOCUMENT_ROOT__MIXED = eINSTANCE.getDocumentRoot_Mixed();
/**
* The meta object literal for the '<em><b>XMLNS Prefix Map</b></em>' map feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference DOCUMENT_ROOT__XMLNS_PREFIX_MAP = eINSTANCE.getDocumentRoot_XMLNSPrefixMap();
/**
* The meta object literal for the '<em><b>XSI Schema Location</b></em>' map feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = eINSTANCE.getDocumentRoot_XSISchemaLocation();
/**
* The meta object literal for the '<em><b>Animate</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference DOCUMENT_ROOT__ANIMATE = eINSTANCE.getDocumentRoot_Animate();
/**
* The meta object literal for the '<em><b>Animate Color</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference DOCUMENT_ROOT__ANIMATE_COLOR = eINSTANCE.getDocumentRoot_AnimateColor();
/**
* The meta object literal for the '<em><b>Animate Motion</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference DOCUMENT_ROOT__ANIMATE_MOTION = eINSTANCE.getDocumentRoot_AnimateMotion();
/**
* The meta object literal for the '<em><b>Set</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference DOCUMENT_ROOT__SET = eINSTANCE.getDocumentRoot_Set();
/**
* The meta object literal for the '{@link org.w3._2001.smil20.language.impl.SetTypeImpl <em>Set Type</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.w3._2001.smil20.language.impl.SetTypeImpl
* @see org.w3._2001.smil20.language.impl.LanguagePackageImpl#getSetType()
* @generated
*/
EClass SET_TYPE = eINSTANCE.getSetType();
/**
* The meta object literal for the '<em><b>Group</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__GROUP = eINSTANCE.getSetType_Group();
/**
* The meta object literal for the '<em><b>Any</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__ANY = eINSTANCE.getSetType_Any();
/**
* The meta object literal for the '<em><b>Alt</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__ALT = eINSTANCE.getSetType_Alt();
/**
* The meta object literal for the '<em><b>Begin</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__BEGIN = eINSTANCE.getSetType_Begin();
/**
* The meta object literal for the '<em><b>Class</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__CLASS = eINSTANCE.getSetType_Class();
/**
* The meta object literal for the '<em><b>Dur</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__DUR = eINSTANCE.getSetType_Dur();
/**
* The meta object literal for the '<em><b>End</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__END = eINSTANCE.getSetType_End();
/**
* The meta object literal for the '<em><b>Fill</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__FILL = eINSTANCE.getSetType_Fill();
/**
* The meta object literal for the '<em><b>Fill Default</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__FILL_DEFAULT = eINSTANCE.getSetType_FillDefault();
/**
* The meta object literal for the '<em><b>Id</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__ID = eINSTANCE.getSetType_Id();
/**
* The meta object literal for the '<em><b>Lang</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__LANG = eINSTANCE.getSetType_Lang();
/**
* The meta object literal for the '<em><b>Longdesc</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__LONGDESC = eINSTANCE.getSetType_Longdesc();
/**
* The meta object literal for the '<em><b>Max</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__MAX = eINSTANCE.getSetType_Max();
/**
* The meta object literal for the '<em><b>Min</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__MIN = eINSTANCE.getSetType_Min();
/**
* The meta object literal for the '<em><b>Repeat</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__REPEAT = eINSTANCE.getSetType_Repeat();
/**
* The meta object literal for the '<em><b>Repeat Count</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__REPEAT_COUNT = eINSTANCE.getSetType_RepeatCount();
/**
* The meta object literal for the '<em><b>Repeat Dur</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__REPEAT_DUR = eINSTANCE.getSetType_RepeatDur();
/**
* The meta object literal for the '<em><b>Restart</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__RESTART = eINSTANCE.getSetType_Restart();
/**
* The meta object literal for the '<em><b>Restart Default</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__RESTART_DEFAULT = eINSTANCE.getSetType_RestartDefault();
/**
* The meta object literal for the '<em><b>Skip Content</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__SKIP_CONTENT = eINSTANCE.getSetType_SkipContent();
/**
* The meta object literal for the '<em><b>Sync Behavior</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__SYNC_BEHAVIOR = eINSTANCE.getSetType_SyncBehavior();
/**
* The meta object literal for the '<em><b>Sync Behavior Default</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__SYNC_BEHAVIOR_DEFAULT = eINSTANCE.getSetType_SyncBehaviorDefault();
/**
* The meta object literal for the '<em><b>Sync Tolerance</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__SYNC_TOLERANCE = eINSTANCE.getSetType_SyncTolerance();
/**
* The meta object literal for the '<em><b>Sync Tolerance Default</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__SYNC_TOLERANCE_DEFAULT = eINSTANCE.getSetType_SyncToleranceDefault();
/**
* The meta object literal for the '<em><b>Target Element</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__TARGET_ELEMENT = eINSTANCE.getSetType_TargetElement();
/**
* The meta object literal for the '<em><b>Any Attribute</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute SET_TYPE__ANY_ATTRIBUTE = eINSTANCE.getSetType_AnyAttribute();
}
} //LanguagePackage
| geotools/geotools | modules/ogc/net.opengis.wmts/src/org/w3/_2001/smil20/language/LanguagePackage.java | Java | lgpl-2.1 | 137,841 |
/*!
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software
* Foundation.
*
* You should have received a copy of the GNU Lesser General Public License along with this
* program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
* or from the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* Copyright (c) 2002-2017 Hitachi Vantara.. All rights reserved.
*/
package org.pentaho.reporting.engine.classic.core.layout.output;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.pentaho.reporting.engine.classic.core.event.ReportProgressEvent;
import org.pentaho.reporting.engine.classic.core.event.ReportProgressListener;
import org.pentaho.reporting.libraries.base.util.MemoryUsageMessage;
import org.pentaho.reporting.libraries.formatting.FastMessageFormat;
public class PerformanceProgressLogger implements ReportProgressListener {
private static final Log logger = LogFactory.getLog( PerformanceProgressLogger.class );
private static final int ROW_PROGRESS = 5000;
private int lastPage;
private int lastRow;
private int lastStage;
private int lastActivity;
private long startTime;
private int rowCount;
private boolean logPageProgress;
private boolean logLevelProgress;
private boolean logRowProgress;
public PerformanceProgressLogger() {
this( true, true, true );
}
public PerformanceProgressLogger( final boolean logLevelProgress, final boolean logPageProgress,
final boolean logRowProgress ) {
this.logLevelProgress = logLevelProgress;
this.logPageProgress = logPageProgress;
this.logRowProgress = logRowProgress;
}
/**
* Receives a notification that the report processing has started.
*
* @param event
* the start event.
*/
public void reportProcessingStarted( final ReportProgressEvent event ) {
if ( logger.isInfoEnabled() == false ) {
return;
}
rowCount = -1;
startTime = System.currentTimeMillis();
logger.info( new MemoryUsageMessage( "[" + Thread.currentThread().getName() + "] Report Processing started. " ) );
}
/**
* Receives a notification that the report processing made some progress.
*
* @param event
* the update event.
*/
public void reportProcessingUpdate( final ReportProgressEvent event ) {
if ( logger.isInfoEnabled() == false ) {
return;
}
rowCount = event.getMaximumRow();
boolean print = false;
if ( lastStage != event.getLevel() || lastActivity != event.getActivity() ) {
lastStage = event.getLevel();
lastActivity = event.getActivity();
lastRow = 0;
if ( logLevelProgress ) {
print = true;
}
}
if ( lastPage != event.getPage() ) {
lastPage = event.getPage();
if ( logPageProgress ) {
print = true;
}
}
final int modRow = ( event.getRow() - lastRow );
if ( modRow > ROW_PROGRESS ) {
lastRow = ( event.getRow() / ROW_PROGRESS ) * ROW_PROGRESS;
if ( logRowProgress ) {
print = true;
}
}
if ( print ) {
logger.info( new MemoryUsageMessage( "[" + Thread.currentThread().getName() + "] Activity: "
+ event.getActivity() + " Level: " + +lastStage + " Processing page: " + lastPage + " Row: " + lastRow
+ " Time: " + ( System.currentTimeMillis() - startTime ) + "ms " ) );
}
}
/**
* Receives a notification that the report processing was finished.
*
* @param event
* the finish event.
*/
public void reportProcessingFinished( final ReportProgressEvent event ) {
if ( logger.isInfoEnabled() == false ) {
return;
}
final FastMessageFormat messageFormat =
new FastMessageFormat( "[{0}] Report Processing Finished: {1}ms - {2,number,0.000} rows/sec - " );
final long processTime = System.currentTimeMillis() - startTime;
final double rowsPerSecond = rowCount * 1000.0f / ( processTime );
logger.info( new MemoryUsageMessage( messageFormat.format( new Object[] { Thread.currentThread().getName(),
new Long( processTime ), new Double( rowsPerSecond ) } ) ) );
}
}
| mbatchelor/pentaho-reporting | engine/core/src/main/java/org/pentaho/reporting/engine/classic/core/layout/output/PerformanceProgressLogger.java | Java | lgpl-2.1 | 4,599 |
/* Copyright (C) 2006-2008 Jeff Epler <jepler@unpythonic.net>
* Copyright (C) 2012-2014 Michael Haberler <license@mah.priv.at>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
* TODO: on setuid and capabilites(7)
*
* right now this program runs as setuid root
* it might be possible to drop the wholesale root privs by using
* capabilites(7). in particular:
*
* CAP_SYS_RAWIO open /dev/mem and /dev/kmem & Perform I/O port operations
* CAP_SYS_NICE set real-time scheduling policies, set CPU affinity
* CAP_SYS_MODULE Load and unload kernel modules
*
* NB: Capabilities are a per-thread attribute,
* so this might need to be done on a per-thread basis
* see also CAP_SETPCAP, CAP_INHERITABLE and 'inheritable set'
*
* see also:
* http://stackoverflow.com/questions/13183327/drop-root-uid-while-retaining-cap-sys-nice
* http://stackoverflow.com/questions/12141420/losing-capabilities-after-setuid
*/
#include "config.h"
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <uuid/uuid.h>
#include <dlfcn.h>
#include <signal.h>
#include <sys/signalfd.h>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
#include <sys/resource.h>
#include <linux/capability.h>
#include <sys/io.h>
#include <stdlib.h>
#include <stdio.h>
#include <getopt.h>
#include <errno.h>
#include <malloc.h>
#include <assert.h>
#include <syslog_async.h>
#include <limits.h>
#include <sys/prctl.h>
#include <inifile.h>
#include <czmq.h>
#include <google/protobuf/text_format.h>
#include <machinetalk/generated/message.pb.h>
using namespace google::protobuf;
typedef ::google::protobuf::RepeatedPtrField< ::std::string> pbstringarray_t;
#include "rtapi.h"
#include "rtapi_global.h"
#include "rtapi_compat.h"
#include "hal.h"
#include "hal_priv.h"
#include "rtapi/shmdrv/shmdrv.h"
#include "mk-backtrace.h"
#include "setup_signals.h"
#include "mk-zeroconf.hh"
#include "select_interface.h"
#define BACKGROUND_TIMER 1000
using namespace std;
/* Pre-allocation size. Must be enough for the whole application life to avoid
* pagefaults by new memory requested from the system. */
#define PRE_ALLOC_SIZE (30 * 1024 * 1024)
template<class T> T DLSYM(void *handle, const string &name) {
return (T)(dlsym(handle, name.c_str()));
}
template<class T> T DLSYM(void *handle, const char *name) {
return (T)(dlsym(handle, name));
}
static std::map<string, void*> modules;
static std::vector<string> loading_order;
static void remove_module(std::string name);
static struct rusage rusage;
static unsigned long minflt, majflt;
static int instance_id;
flavor_ptr flavor;
static int use_drivers = 0;
static int foreground;
static int debug;
static int signal_fd;
static bool interrupted;
int shmdrv_loaded;
long page_size;
static const char *progname;
static const char *z_uri;
static int z_port;
static pb::Container command, reply;
static uuid_t process_uuid;
static char process_uuid_str[40];
static register_context_t *rtapi_publisher;
static const char *service_uuid;
#ifdef NOTYET
static int remote = 0; // announce and bind a TCP socket
static const char *ipaddr = "127.0.0.1";
static const char *z_uri_dsn;
#endif
static const char *interfaces;
static const char *inifile;
static FILE *inifp;
#ifdef NOTYET
static AvahiCzmqPoll *av_loop;
#endif
// the following two variables, despite extern, are in fact private to rtapi_app
// in the sense that they are not visible in the RT space (the namespace
// of dlopen'd modules); these are supposed to be 'ships in the night'
// relative to any symbols exported by rtapi_app.
//
// global_data is set in attach_global_segment() which was already
// created by rtapi_msgd
// rtapi_switch is set once rtapi.so has been loaded by calling the
// rtapi_get_handle() method in rtapi.so.
// Once set, rtapi methods in rtapi.so can be called normally through
// the rtapi_switch redirection (see rtapi.h).
// NB: do _not_ call any rtapi_* methods before these variables are set
// except for rtapi_msg* and friends (those do not go through the rtapi_switch).
rtapi_switch_t *rtapi_switch;
global_data_t *global_data;
static int init_actions(int instance);
static void exit_actions(int instance);
static int harden_rt(void);
static void rtapi_app_msg_handler(msg_level_t level, const char *fmt, va_list ap);
static void stderr_rtapi_msg_handler(msg_level_t level, const char *fmt, va_list ap);
static int do_one_item(char item_type_char, const string ¶m_name,
const string ¶m_value, void *vitem, int idx=0)
{
char *endp;
switch(item_type_char) {
case 'l': {
long *litem = *(long**) vitem;
litem[idx] = strtol(param_value.c_str(), &endp, 0);
if(*endp) {
rtapi_print_msg(RTAPI_MSG_ERR,
"`%s' invalid for parameter `%s'",
param_value.c_str(), param_name.c_str());
return -1;
}
return 0;
}
case 'i': {
int *iitem = *(int**) vitem;
iitem[idx] = strtol(param_value.c_str(), &endp, 0);
if(*endp) {
rtapi_print_msg(RTAPI_MSG_ERR,
"`%s' invalid for parameter `%s'",
param_value.c_str(), param_name.c_str());
return -1;
}
return 0;
}
case 's': {
char **sitem = *(char***) vitem;
sitem[idx] = strdup(param_value.c_str());
return 0;
}
default:
rtapi_print_msg(RTAPI_MSG_ERR,
"%s: Invalid type character `%c'\n",
param_name.c_str(), item_type_char);
return -1;
}
return 0;
}
void remove_quotes(string &s)
{
s.erase(remove_copy(s.begin(), s.end(), s.begin(), '"'), s.end());
}
static int do_comp_args(void *module, pbstringarray_t args)
{
for(int i = 0; i < args.size(); i++) {
string s(args.Get(i));
remove_quotes(s);
size_t idx = s.find('=');
if(idx == string::npos) {
rtapi_print_msg(RTAPI_MSG_ERR, "Invalid parameter `%s'\n",
s.c_str());
return -1;
}
string param_name(s, 0, idx);
string param_value(s, idx+1);
void *item=DLSYM<void*>(module, "rtapi_info_address_" + param_name);
if(!item) {
rtapi_print_msg(RTAPI_MSG_ERR,
"Unknown parameter `%s'\n", s.c_str());
return -1;
}
char **item_type=DLSYM<char**>(module, "rtapi_info_type_" + param_name);
if(!item_type || !*item_type) {
rtapi_print_msg(RTAPI_MSG_ERR,
"Unknown parameter `%s' (type information missing)\n",
s.c_str());
return -1;
}
string item_type_string = *item_type;
if(item_type_string.size() > 1) {
int a, b;
char item_type_char;
int r = sscanf(item_type_string.c_str(), "%d-%d%c",
&a, &b, &item_type_char);
if(r != 3) {
rtapi_print_msg(RTAPI_MSG_ERR,
"Unknown parameter `%s'"
" (corrupt array type information): %s\n",
s.c_str(), item_type_string.c_str());
return -1;
}
size_t idx = 0;
int i = 0;
while(idx != string::npos) {
if(i == b) {
rtapi_print_msg(RTAPI_MSG_ERR,
"%s: can only take %d arguments\n",
s.c_str(), b);
return -1;
}
size_t idx1 = param_value.find(",", idx);
string substr(param_value, idx, idx1 - idx);
int result = do_one_item(item_type_char, s, substr, item, i);
if(result != 0) return result;
i++;
idx = idx1 == string::npos ? idx1 : idx1 + 1;
}
} else {
char item_type_char = item_type_string[0];
int result = do_one_item(item_type_char, s, param_value, item);
if(result != 0) return result;
}
}
return 0;
}
static void pbconcat(string &s, const pbstringarray_t &args)
{
for (int i = 0; i < args.size(); i++) {
s += args.Get(i);
if (i < args.size()-1)
s += " ";
}
}
static inline bool kernel_threads(flavor_ptr f) {
assert(f);
return (f->flags & FLAVOR_KERNEL_BUILD) != 0;
}
static int do_load_cmd(int instance, string name, pbstringarray_t args)
{
void *w = modules[name];
char module_name[PATH_MAX];
void *module;
int retval;
if (w == NULL) {
if (kernel_threads(flavor)) {
string cmdargs;
pbconcat(cmdargs, args);
retval = run_module_helper("insert %s %s", name.c_str(), cmdargs.c_str());
if (retval) {
rtapi_print_msg(RTAPI_MSG_ERR, "couldnt insmod %s - see dmesg\n",
name.c_str());
} else {
modules[name] = (void *) -1; // so 'if (modules[name])' works
loading_order.push_back(name);
}
return retval;
} else {
strncpy(module_name, (name + flavor->mod_ext).c_str(),
PATH_MAX);
module = modules[name] = dlopen(module_name, RTLD_GLOBAL |RTLD_NOW);
if (!module) {
rtapi_print_msg(RTAPI_MSG_ERR, "%s: dlopen: %s\n",
name.c_str(), dlerror());
return -1;
}
// retrieve the address of rtapi_switch_struct
// so rtapi functions can be called and members
// accessed
if (rtapi_switch == NULL) {
rtapi_get_handle_t rtapi_get_handle;
dlerror();
rtapi_get_handle = (rtapi_get_handle_t) dlsym(module,
"rtapi_get_handle");
if (rtapi_get_handle != NULL) {
rtapi_switch = rtapi_get_handle();
assert(rtapi_switch != NULL);
}
}
/// XXX handle arguments
int (*start)(void) = DLSYM<int(*)(void)>(module, "rtapi_app_main");
if(!start) {
rtapi_print_msg(RTAPI_MSG_ERR, "%s: dlsym: %s\n",
name.c_str(), dlerror());
return -1;
}
int result;
result = do_comp_args(module, args);
if(result < 0) { dlclose(module); return -1; }
// need to call rtapi_app_main with as root
// RT thread creation and hardening requires this
if ((result = start()) < 0) {
rtapi_print_msg(RTAPI_MSG_ERR, "rtapi_app_main(%s): %d %s\n",
name.c_str(), result, strerror(-result));
modules.erase(modules.find(name));
return result;
}
loading_order.push_back(name);
rtapi_print_msg(RTAPI_MSG_DBG, "%s: loaded from %s\n",
name.c_str(), module_name);
return 0;
}
} else {
rtapi_print_msg(RTAPI_MSG_ERR, "%s: already loaded\n", name.c_str());
return -1;
}
}
static int do_unload_cmd(int instance, string name)
{
void *w = modules[name];
int retval = 0;
if (w == NULL) {
rtapi_print_msg(RTAPI_MSG_ERR, "unload: '%s' not loaded\n",
name.c_str());
return -1;
} else {
if (kernel_threads(flavor)) {
retval = run_module_helper("remove %s", name.c_str());
if (retval) {
rtapi_print_msg(RTAPI_MSG_ERR, "couldnt rmmod %s - see dmesg\n",
name.c_str());
return retval;
} else {
modules.erase(modules.find(name));
remove_module(name);
}
} else {
int (*stop)(void) = DLSYM<int(*)(void)>(w, "rtapi_app_exit");
if (stop)
stop();
modules.erase(modules.find(name));
remove_module(name);
dlclose(w);
}
}
rtapi_print_msg(RTAPI_MSG_DBG, " '%s' unloaded\n", name.c_str());
return retval;
}
// shut down the stack in reverse loading order
static void exit_actions(int instance)
{
size_t index = loading_order.size() - 1;
for(std::vector<std::string>::reverse_iterator rit = loading_order.rbegin();
rit != loading_order.rend(); ++rit, --index) {
do_unload_cmd(instance, *rit);
}
}
static int init_actions(int instance)
{
int retval;
char modules[PATH_MAX];
get_rtapi_config(modules,"MODULES",PATH_MAX);
if (kernel_threads(flavor)) {
// kthreads cant possibly run without shmdrv, so bail
// also, cannot load it here because rtapi_msgd already needs this
// so it'd be too late here
if (!is_module_loaded("shmdrv")) {
rtapi_print_msg(RTAPI_MSG_ERR, "shmdrv not loaded");
return -1;
}
// leftovers or running session?
if (is_module_loaded("rtapi")) {
rtapi_print_msg(RTAPI_MSG_ERR, "rtapi already loaded");
return -1;
}
if (is_module_loaded("hal_lib")) {
rtapi_print_msg(RTAPI_MSG_ERR, "hal_lib already loaded");
return -1;
}
char *m = strtok(modules, "\t ");
while (m != NULL) {
char cmdline[PATH_MAX];
if (!strcmp(m, "rtapi")) {
snprintf(cmdline, sizeof(cmdline),
"insert %s rtapi_instance=%d", m, instance_id);
} else {
snprintf(cmdline, sizeof(cmdline), "insert %s", m);
}
rtapi_print_msg(RTAPI_MSG_DBG, "running '%s'", cmdline);
retval = run_module_helper(cmdline);
if (retval) {
rtapi_print_msg(RTAPI_MSG_ERR,
"linuxcnc_module_helper '%s' failed - see dmesg\n",
cmdline);
return retval;
} else
rtapi_print_msg(RTAPI_MSG_DBG, "'%s' loaded\n", m);
m = strtok(NULL, "\t ");
}
}
retval = do_load_cmd(instance, "rtapi", pbstringarray_t());
if (retval)
return retval;
return do_load_cmd(instance, "hal_lib", pbstringarray_t());
}
static int attach_global_segment()
{
int retval = 0;
int globalkey = OS_KEY(GLOBAL_KEY, instance_id);
int size = 0;
int tries = 10; // 5 sec deadline for msgd/globaldata to come up
shm_common_init();
do {
retval = shm_common_new(globalkey, &size,
instance_id, (void **) &global_data, 0);
if (retval < 0) {
tries--;
if (tries == 0) {
syslog_async(LOG_ERR,
"rtapi_app:%d: ERROR: cannot attach global segment key=0x%x %s\n",
instance_id, globalkey, strerror(-retval));
return retval;
}
struct timespec ts = {0, 500 * 1000 * 1000}; //ms
nanosleep(&ts, NULL);
}
} while (retval < 0);
if (size != sizeof(global_data_t)) {
syslog_async(LOG_ERR,
"rtapi_app:%d global segment size mismatch: expect %zu got %d\n",
instance_id, sizeof(global_data_t), size);
return -EINVAL;
}
tries = 10;
while (global_data->magic != GLOBAL_READY) {
tries--;
if (tries == 0) {
syslog_async(LOG_ERR,
"rtapi_app:%d: ERROR: global segment magic not changing to ready: magic=0x%x\n",
instance_id, global_data->magic);
return -EINVAL;
}
struct timespec ts = {0, 500 * 1000 * 1000}; //ms
nanosleep(&ts, NULL);
}
return retval;
}
// handle commands from zmq socket
static int rtapi_request(zloop_t *loop, zmq_pollitem_t *poller, void *arg)
{
zmsg_t *r = zmsg_recv(poller->socket);
char *origin = zmsg_popstr (r);
zframe_t *request_frame = zmsg_pop (r);
static bool force_exit = false;
pb::Container pbreq, pbreply;
if (!pbreq.ParseFromArray(zframe_data(request_frame),
zframe_size(request_frame))) {
rtapi_print_msg(RTAPI_MSG_ERR, "cant decode request from %s (size %zu)",
origin ? origin : "NULL",
zframe_size(request_frame));
zmsg_destroy(&r);
return 0;
}
if (debug) {
string buffer;
if (TextFormat::PrintToString(pbreq, &buffer)) {
fprintf(stderr, "request: %s\n",buffer.c_str());
}
}
pbreply.set_type(pb::MT_RTAPI_APP_REPLY);
switch (pbreq.type()) {
case pb::MT_RTAPI_APP_PING:
char buffer[LINELEN];
snprintf(buffer, sizeof(buffer),
"pid=%d flavor=%s gcc=%s git=%s",
getpid(),flavor->name, __VERSION__, GIT_VERSION);
pbreply.add_note(buffer);
pbreply.set_retcode(0);
break;
case pb::MT_RTAPI_APP_EXIT:
assert(pbreq.has_rtapicmd());
exit_actions(pbreq.rtapicmd().instance());
force_exit = true;
pbreply.set_retcode(0);
break;
case pb::MT_RTAPI_APP_LOADRT:
assert(pbreq.has_rtapicmd());
assert(pbreq.rtapicmd().has_modname());
assert(pbreq.rtapicmd().has_instance());
pbreply.set_retcode(do_load_cmd(pbreq.rtapicmd().instance(),
pbreq.rtapicmd().modname(),
pbreq.rtapicmd().argv()));
break;
case pb::MT_RTAPI_APP_UNLOADRT:
assert(pbreq.rtapicmd().has_modname());
assert(pbreq.rtapicmd().has_instance());
pbreply.set_retcode(do_unload_cmd(pbreq.rtapicmd().instance(),
pbreq.rtapicmd().modname()));
break;
case pb::MT_RTAPI_APP_LOG:
assert(pbreq.has_rtapicmd());
if (pbreq.rtapicmd().has_rt_msglevel()) {
global_data->rt_msg_level = pbreq.rtapicmd().rt_msglevel();
}
if (pbreq.rtapicmd().has_user_msglevel()) {
global_data->user_msg_level = pbreq.rtapicmd().user_msglevel();
}
pbreply.set_retcode(0);
break;
#if DEPRECATED
case pb::MT_RTAPI_APP_NEWINST:
pbreply.set_retcode(0);
break;
#endif
case pb::MT_RTAPI_APP_NEWTHREAD:
assert(pbreq.has_rtapicmd());
assert(pbreq.rtapicmd().has_threadname());
assert(pbreq.rtapicmd().has_threadperiod());
assert(pbreq.rtapicmd().has_cpu());
assert(pbreq.rtapicmd().has_use_fp());
assert(pbreq.rtapicmd().has_instance());
if (kernel_threads(flavor)) {
int retval = procfs_threadcmd("newthread %s %d %d %d",
pbreq.rtapicmd().threadname().c_str(),
pbreq.rtapicmd().threadperiod(),
pbreq.rtapicmd().use_fp(),
pbreq.rtapicmd().cpu());
pbreply.set_retcode(retval < 0 ? retval:0);
} else {
void *w = modules["hal_lib"];
if (w == NULL) {
pbreply.add_note("hal_lib not loaded");
pbreply.set_retcode(-1);
break;
}
int (*create_thread)(const char *, unsigned long,int, int) =
DLSYM<int(*)(const char *, unsigned long,int, int)>(w,
"hal_create_thread");
if (create_thread == NULL) {
pbreply.add_note("symbol 'hal_create_thread' not found in hal_lib");
pbreply.set_retcode(-1);
break;
}
int retval = create_thread(pbreq.rtapicmd().threadname().c_str(),
pbreq.rtapicmd().threadperiod(),
pbreq.rtapicmd().use_fp(),
pbreq.rtapicmd().cpu());
pbreply.set_retcode(retval);
}
break;
case pb::MT_RTAPI_APP_DELTHREAD:
assert(pbreq.has_rtapicmd());
assert(pbreq.rtapicmd().has_threadname());
assert(pbreq.rtapicmd().has_instance());
if (kernel_threads(flavor)) {
int retval = procfs_threadcmd("delthread %s",
pbreq.rtapicmd().threadname().c_str());
pbreply.set_retcode(retval < 0 ? retval:0);
} else {
void *w = modules["hal_lib"];
if (w == NULL) {
pbreply.add_note("hal_lib not loaded");
pbreply.set_retcode(-1);
break;
}
int (*delete_thread)(const char *) =
DLSYM<int(*)(const char *)>(w,"hal_thread_delete");
if (delete_thread == NULL) {
pbreply.add_note("symbol 'hal_thread_delete' not found in hal_lib");
pbreply.set_retcode(-1);
break;
}
int retval = delete_thread(pbreq.rtapicmd().threadname().c_str());
pbreply.set_retcode(retval);
}
break;
default:
rtapi_print_msg(RTAPI_MSG_ERR,
"unkown command type %d)",
(int) pbreq.type());
zmsg_destroy(&r);
return 0;
}
// TODO: extract + attach error message
size_t reply_size = pbreply.ByteSize();
zframe_t *reply = zframe_new (NULL, reply_size);
if (!pbreply.SerializeWithCachedSizesToArray(zframe_data (reply))) {
zframe_destroy(&reply);
rtapi_print_msg(RTAPI_MSG_ERR,
"cant serialize to %s (type %d size %zu)",
origin ? origin : "NULL",
pbreply.type(),
reply_size);
} else {
if (debug) {
string buffer;
if (TextFormat::PrintToString(pbreply, &buffer)) {
fprintf(stderr, "reply: %s\n",buffer.c_str());
}
}
assert(zstr_sendm (poller->socket, origin) == 0);
if (zframe_send (&reply, poller->socket, 0)) {
rtapi_print_msg(RTAPI_MSG_ERR,
"cant serialize to %s (type %d size %zu)",
origin ? origin : "NULL",
pbreply.type(),
zframe_size(reply));
}
}
free(origin);
zmsg_destroy(&r);
if (force_exit) // terminate the zloop
return -1;
return 0;
}
static void btprint(const char *prefix, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
rtapi_msg_handler_t print = rtapi_get_msg_handler();
print(RTAPI_MSG_ERR, fmt, args);
va_end(args);
}
// handle signals delivered via sigaction - not all signals
// can be dealt with through signalfd(2)
// log, try to do something sane, and dump core
static void sigaction_handler(int sig, siginfo_t *si, void *uctx)
{
switch (sig) {
case SIGXCPU:
// should not happen - must be handled in RTAPI if enabled
rtapi_print_msg(RTAPI_MSG_ERR, "rtapi_app: BUG: SIGXCPU should be handled in RTAPI");
// NB: fall through
default:
rtapi_print_msg(RTAPI_MSG_ERR,
"signal %d - '%s' received, dumping core (current dir=%s)",
sig, strsignal(sig), get_current_dir_name());
backtrace("", "rtapi_app", btprint, 3);
if (global_data)
global_data->rtapi_app_pid = 0;
closelog_async(); // let syslog_async drain
sleep(1);
// reset handler for current signal to default
signal(sig, SIG_DFL);
// and re-raise so we get a proper core dump and stacktrace
kill(getpid(), sig);
sleep(1);
break;
}
// not reached
}
// handle signals delivered synchronously in the event loop
// by polling signal_fd
// log, start shutdown and flag end of the event loop
static int s_handle_signal(zloop_t *loop, zmq_pollitem_t *poller, void *arg)
{
struct signalfd_siginfo fdsi;
ssize_t s;
s = read(signal_fd, &fdsi, sizeof(struct signalfd_siginfo));
if (s != sizeof(struct signalfd_siginfo)) {
rtapi_print_msg(RTAPI_MSG_ERR,
"BUG: read(signal_fd): %s", strerror(errno));
return 0;
}
switch (fdsi.ssi_signo) {
// see machinetalk/lib/setup_signals for handled signals
case SIGINT:
case SIGQUIT:
case SIGKILL:
case SIGTERM:
rtapi_print_msg(RTAPI_MSG_INFO,
"signal %d - '%s' received, exiting",
fdsi.ssi_signo, strsignal(fdsi.ssi_signo));
exit_actions(instance_id);
interrupted = true; // make mainloop exit
if (global_data)
global_data->rtapi_app_pid = 0;
return -1;
default:
// this should be handled either above or in sigaction_handler
rtapi_print_msg(RTAPI_MSG_ERR, "BUG: unhandled signal %d - '%s' received\n",
fdsi.ssi_signo, strsignal(fdsi.ssi_signo));
}
return 0;
}
static int
s_handle_timer(zloop_t *loop, int timer_id, void *args)
{
if (global_data->rtapi_msgd_pid == 0) {
// cant log this via rtapi_print, since msgd is gone
syslog_async(LOG_ERR,"rtapi_msgd went away, exiting\n");
exit_actions(instance_id);
if (global_data)
global_data->rtapi_app_pid = 0;
exit(EXIT_FAILURE);
}
return 0;
}
static int mainloop(size_t argc, char **argv)
{
int retval;
unsigned i;
static char proctitle[20];
// set new process name
snprintf(proctitle, sizeof(proctitle), "rtapi:%d",instance_id);
size_t argv0_len = strlen(argv[0]);
size_t procname_len = strlen(proctitle);
size_t max_procname_len = (argv0_len > procname_len) ?
(procname_len) : (argv0_len);
strncpy(argv[0], proctitle, max_procname_len);
memset(&argv[0][max_procname_len], '\0', argv0_len - max_procname_len);
for (i = 1; i < argc; i++)
memset(argv[i], '\0', strlen(argv[i]));
backtrace_init(proctitle);
// set this thread's name so it can be identified in ps/top as
// rtapi:<instance>
if (prctl(PR_SET_NAME, argv[0]) < 0) {
syslog_async(LOG_ERR, "rtapi_app: prctl(PR_SETNAME,%s) failed: %s\n",
argv[0], strerror(errno));
}
// attach global segment which rtapi_msgd already prepared
if ((retval = attach_global_segment()) != 0) {
syslog_async(LOG_ERR, "%s: FATAL - failed to attach to global segment\n",
argv[0]);
exit(retval);
}
// make sure rtapi_msgd's pid is valid and msgd is running,
// in case we caught a leftover shmseg
// otherwise log messages would vanish
if ((global_data->rtapi_msgd_pid == 0) ||
kill(global_data->rtapi_msgd_pid, 0) != 0) {
syslog_async(LOG_ERR,"%s: rtapi_msgd pid invalid: %d, exiting\n",
argv[0], global_data->rtapi_msgd_pid);
exit(EXIT_FAILURE);
}
// from here on it is safe to use rtapi_print() and friends as
// the error ring is now set up and msgd is logging it
rtapi_set_logtag("rtapi_app");
rtapi_set_msg_level(global_data->rt_msg_level);
// obtain handle on flavor descriptor as detected by rtapi_msgd
flavor = flavor_byid(global_data->rtapi_thread_flavor);
if (flavor == NULL) {
rtapi_print_msg(RTAPI_MSG_ERR,
"FATAL - invalid flavor id: %d\n",
global_data->rtapi_thread_flavor);
global_data->rtapi_app_pid = 0;
exit(EXIT_FAILURE);
}
// make sure we're setuid root when we need to
if (use_drivers || (flavor->flags & FLAVOR_DOES_IO)) {
if (geteuid() != 0) {
rtapi_print_msg(RTAPI_MSG_ERR,
"rtapi_app:%d need to"
" 'sudo make setuid' to access I/O?\n",
instance_id);
global_data->rtapi_app_pid = 0;
exit(EXIT_FAILURE);
}
}
// assorted RT incantations - memory locking, prefaulting etc
if ((retval = harden_rt())) {
rtapi_print_msg(RTAPI_MSG_ERR,
"rtapi_app:%d failed to setup "
"realtime environment - 'sudo make setuid' missing?\n",
instance_id);
global_data->rtapi_app_pid = 0;
exit(retval);
}
// load rtapi and hal_lib
if (init_actions(instance_id)) {
rtapi_print_msg(RTAPI_MSG_ERR,
"init_actions() failed\n");
global_data->rtapi_app_pid = 0;
exit(1);
}
// block all signal delivery through signal handler
// since we're using signalfd()
// do this here so child threads inherit the sigmask
signal_fd = setup_signals(sigaction_handler, SIGINT, SIGQUIT, SIGKILL, SIGTERM, -1);
assert(signal_fd > -1);
// suppress default handling of signals in zctx_new()
// since we're using signalfd()
zsys_handler_set(NULL);
zctx_t *z_context = zctx_new ();
void *z_command = zsocket_new (z_context, ZMQ_ROUTER);
{
char z_ident[30];
snprintf(z_ident, sizeof(z_ident), "rtapi_app%d", getpid());
zsocket_set_identity(z_command, z_ident);
zsocket_set_linger(z_command, 1000); // wait for last reply to drain
}
#ifdef NOTYET
// determine interface to bind to if remote option set
if ((remote || z_uri) && interfaces) {
char ifname[LINELEN], ip[LINELEN];
// rtapi_print_msg(RTAPI_MSG_INFO, "rtapi_app: ifpref='%s'\n",interfaces);
if (parse_interface_prefs(interfaces, ifname, ip, NULL) == 0) {
rtapi_print_msg(RTAPI_MSG_INFO, "rtapi_app: using preferred interface %s/%s\n",
ifname, ip);
ipaddr = strdup(ip);
} else {
rtapi_print_msg(RTAPI_MSG_ERR, "rtapi_app: INTERFACES='%s'"
" - cant determine preferred interface, using %s/%s\n",
interfaces, ifname, ipaddr);
}
if (z_uri == NULL) { // not given on command line - finalize the URI
char uri[LINELEN];
snprintf(uri, sizeof(uri), "tcp://%s:*" , ipaddr);
z_uri = strdup(uri);
}
if ((z_port = zsocket_bind(z_command, z_uri)) == -1) {
rtapi_print_msg(RTAPI_MSG_ERR, "cannot bind '%s' - %s\n",
z_uri, strerror(errno));
global_data->rtapi_app_pid = 0;
exit(EXIT_FAILURE);
} else {
z_uri_dsn = zsocket_last_endpoint(z_command);
rtapi_print_msg(RTAPI_MSG_DBG, "rtapi_app: command RPC socket on '%s'\n",
z_uri_dsn);
}
}
#endif
{ // always bind the IPC socket
char uri[LINELEN];
snprintf(uri, sizeof(uri), ZMQIPC_FORMAT,
RUNDIR, instance_id, "rtapi", service_uuid);
mode_t prev = umask(S_IROTH | S_IWOTH | S_IXOTH);
if ((z_port = zsocket_bind(z_command, uri )) < 0) {
rtapi_print_msg(RTAPI_MSG_ERR, "cannot bind IPC socket '%s' - %s\n",
uri, strerror(errno));
global_data->rtapi_app_pid = 0;
exit(EXIT_FAILURE);
}
rtapi_print_msg(RTAPI_MSG_ERR,"accepting commands at %s\n",uri);
umask(prev);
}
zloop_t *z_loop = zloop_new();
assert(z_loop);
zloop_set_verbose(z_loop, debug);
zmq_pollitem_t signal_poller = { 0, signal_fd, ZMQ_POLLIN };
zloop_poller (z_loop, &signal_poller, s_handle_signal, NULL);
zmq_pollitem_t command_poller = { z_command, 0, ZMQ_POLLIN };
zloop_poller(z_loop, &command_poller, rtapi_request, NULL);
zloop_timer (z_loop, BACKGROUND_TIMER, 0, s_handle_timer, NULL);
#ifdef NOTYET
// no remote rtapi service yet
if (remote) {
if (!(av_loop = avahi_czmq_poll_new(z_loop))) {
rtapi_print_msg(RTAPI_MSG_ERR, "rtapi_app:%d: zeroconf: Failed to create avahi event loop object.",
instance_id);
return -1;
} else {
char name[255];
snprintf(name, sizeof(name), "RTAPI service on %s pid %d", ipaddr, getpid());
rtapi_publisher = zeroconf_service_announce(name,
MACHINEKIT_DNSSD_SERVICE_TYPE,
RTAPI_DNSSD_SUBTYPE,
z_port,
(char *)z_uri_dsn,
service_uuid,
process_uuid_str,
"rtapi", NULL,
av_loop);
if (rtapi_publisher == NULL) {
rtapi_print_msg(RTAPI_MSG_ERR, "rtapi_app:%d: failed to start zeroconf publisher",
instance_id);
return -1;
}
}
}
#endif
// report success
rtapi_print_msg(RTAPI_MSG_INFO, "rtapi_app:%d ready flavor=%s gcc=%s git=%s",
instance_id, flavor->name, __VERSION__, GIT_VERSION);
// the RT stack is now set up and good for use
global_data->rtapi_app_pid = getpid();
// main loop
do {
retval = zloop_start(z_loop);
} while (!(retval || interrupted));
rtapi_print_msg(RTAPI_MSG_INFO,
"exiting mainloop (%s)\n",
interrupted ? "interrupted": "by remote command");
// stop the service announcement
zeroconf_service_withdraw(rtapi_publisher);
// shutdown zmq context
zctx_destroy(&z_context);
// exiting, so deregister our pid, which will make rtapi_msgd exit too
global_data->rtapi_app_pid = 0;
return 0;
}
static int configure_memory(void)
{
unsigned int i, pagesize;
char *buf;
if (global_data->rtapi_thread_flavor != RTAPI_POSIX_ID) {
// Realtime tweak requires privs
/* Lock all memory. This includes all current allocations (BSS/data)
* and future allocations. */
if (mlockall(MCL_CURRENT | MCL_FUTURE)) {
rtapi_print_msg(RTAPI_MSG_WARN,
"mlockall() failed: %d '%s'\n",
errno,strerror(errno));
rtapi_print_msg(RTAPI_MSG_WARN,
"For more information, see "
"http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?LockedMemory\n");
return 1;
}
}
/* Turn off malloc trimming.*/
if (!mallopt(M_TRIM_THRESHOLD, -1)) {
rtapi_print_msg(RTAPI_MSG_WARN,
"mallopt(M_TRIM_THRESHOLD, -1) failed\n");
return 1;
}
/* Turn off mmap usage. */
if (!mallopt(M_MMAP_MAX, 0)) {
rtapi_print_msg(RTAPI_MSG_WARN,
"mallopt(M_MMAP_MAX, -1) failed\n");
return 1;
}
buf = static_cast<char *>(malloc(PRE_ALLOC_SIZE));
if (buf == NULL) {
rtapi_print_msg(RTAPI_MSG_WARN, "malloc(PRE_ALLOC_SIZE) failed\n");
return 1;
}
pagesize = sysconf(_SC_PAGESIZE);
/* Touch each page in this piece of memory to get it mapped into RAM */
for (i = 0; i < PRE_ALLOC_SIZE; i += pagesize) {
/* Each write to this buffer will generate a pagefault.
* Once the pagefault is handled a page will be locked in
* memory and never given back to the system. */
buf[i] = 0;
}
/* buffer will now be released. As Glibc is configured such that it
* never gives back memory to the kernel, the memory allocated above is
* locked for this process. All malloc() and new() calls come from
* the memory pool reserved and locked above. Issuing free() and
* delete() does NOT make this locking undone. So, with this locking
* mechanism we can build C++ applications that will never run into
* a major/minor pagefault, even with swapping enabled. */
free(buf);
return 0;
}
static void
exit_handler(void)
{
struct rusage rusage;
getrusage(RUSAGE_SELF, &rusage);
if ((rusage.ru_majflt - majflt) > 0) {
// RTAPI already shut down here
rtapi_print_msg(RTAPI_MSG_WARN,
"rtapi_app_main %d: %ld page faults, %ld page reclaims\n",
getpid(), rusage.ru_majflt - majflt,
rusage.ru_minflt - minflt);
}
}
static int harden_rt()
{
// enable core dumps
struct rlimit core_limit;
core_limit.rlim_cur = RLIM_INFINITY;
core_limit.rlim_max = RLIM_INFINITY;
if (setrlimit(RLIMIT_CORE, &core_limit) < 0)
rtapi_print_msg(RTAPI_MSG_WARN,
"setrlimit: %s - core dumps may be truncated or non-existant\n",
strerror(errno));
// even when setuid root
// note this may not be enough
// echo 1 >
// might be needed to have setuid programs dump core
if (prctl(PR_SET_DUMPABLE, 1) < 0)
rtapi_print_msg(RTAPI_MSG_WARN,
"prctl(PR_SET_DUMPABLE) failed: no core dumps will be created - %d - %s\n",
errno, strerror(errno));
FILE *fd;
if ((fd = fopen("/proc/sys/fs/suid_dumpable","r")) != NULL) {
int flag;
if ((fscanf(fd, "%d", &flag) == 1) && (flag == 0)) {
rtapi_print_msg(RTAPI_MSG_WARN,
"rtapi:%d: cannot create core dumps - /proc/sys/fs/suid_dumpable contains 0",
instance_id);
rtapi_print_msg(RTAPI_MSG_WARN,
"you might have to run 'echo 1 > /proc/sys/fs/suid_dumpable'"
" as root to enable rtapi_app core dumps");
}
fclose(fd);
}
configure_memory();
if (getrusage(RUSAGE_SELF, &rusage)) {
rtapi_print_msg(RTAPI_MSG_WARN,
"getrusage(RUSAGE_SELF) failed: %d '%s'\n",
errno,strerror(errno));
} else {
minflt = rusage.ru_minflt;
majflt = rusage.ru_majflt;
if (atexit(exit_handler)) {
rtapi_print_msg(RTAPI_MSG_WARN,
"atexit() failed: %d '%s'\n",
errno,strerror(errno));
}
}
if (flavor->id == RTAPI_XENOMAI_ID) {
int retval = user_in_xenomai_group();
switch (retval) {
case 1:
// {
// gid_t xg = xenomai_gid();
// do_setuid();
// if (setegid(xg))
// rtapi_print_msg(RTAPI_MSG_ERR,
// "setegid(%d): %s", xg, strerror(errno));
// undo_setuid();
// rtapi_print_msg(RTAPI_MSG_ERR,
// "xg=%d egid now %d", xg, getegid());
// }
break;
case 0:
rtapi_print_msg(RTAPI_MSG_ERR,
"this user is not member of group xenomai");
rtapi_print_msg(RTAPI_MSG_ERR,
"please 'sudo adduser <username> xenomai',"
" logout and login again");
return -1;
default:
rtapi_print_msg(RTAPI_MSG_ERR,
"cannot determine if this user is a member of group xenomai: %s",
strerror(-retval));
return -1;
}
}
#if defined(__x86_64__) || defined(__i386__)
// this is a bit of a shotgun approach and should be made more selective
// however, due to serial invocations of rtapi_app during setup it is not
// guaranteed the process executing e.g. hal_parport's rtapi_app_main is
// the same process which starts the RT threads, causing hal_parport
// thread functions to fail on inb/outb
if (use_drivers || (flavor->flags & FLAVOR_DOES_IO)) {
if (iopl(3) < 0) {
rtapi_print_msg(RTAPI_MSG_ERR,
"cannot gain I/O privileges - "
"forgot 'sudo make setuid'?\n");
return -EPERM;
}
}
#endif
return 0;
}
static void usage(int argc, char **argv)
{
printf("Usage: %s [options]\n", argv[0]);
}
static struct option long_options[] = {
{"help", no_argument, 0, 'h'},
{"foreground", no_argument, 0, 'F'},
{"instance", required_argument, 0, 'I'},
{"ini", required_argument, 0, 'i'}, // default: getenv(INI_FILE_NAME)
{"drivers", required_argument, 0, 'D'},
{"uri", required_argument, 0, 'U'},
{"debug", no_argument, 0, 'd'},
{"svcuuid", required_argument, 0, 'R'},
{"interfaces", required_argument, 0, 'n'},
{0, 0, 0, 0}
};
int main(int argc, char **argv)
{
int c;
progname = argv[0];
inifile = getenv("MACHINEKIT_INI");
uuid_generate_time(process_uuid);
uuid_unparse(process_uuid, process_uuid_str);
rtapi_set_msg_handler(rtapi_app_msg_handler);
openlog_async(argv[0], LOG_NDELAY, LOG_LOCAL1);
setlogmask_async(LOG_UPTO(LOG_DEBUG));
// max out async syslog buffers for slow system in debug mode
tunelog_async(99,1000);
while (1) {
int option_index = 0;
int curind = optind;
c = getopt_long (argc, argv, "hH:m:I:f:r:U:NFdR:n:i:",
long_options, &option_index);
if (c == -1)
break;
switch (c) {
case 'd':
debug++;
break;
case 'D':
use_drivers = 1;
break;
case 'F':
foreground = 1;
rtapi_set_msg_handler(stderr_rtapi_msg_handler);
break;
case 'i':
inifile = strdup(optarg);
break;
case 'I':
instance_id = atoi(optarg);
break;
case 'f':
if ((flavor = flavor_byname(optarg)) == NULL) {
fprintf(stderr, "no such flavor: '%s' -- valid flavors are:\n",
optarg);
flavor_ptr f = flavors;
while (f->name) {
fprintf(stderr, "\t%s\n", f->name);
f++;
}
exit(1);
}
break;
case 'U':
z_uri = optarg;
break;
case 'n':
interfaces = strdup(optarg);
break;
case 'R':
service_uuid = strdup(optarg);
break;
case '?':
if (optopt) fprintf(stderr, "bad short opt '%c'\n", optopt);
else fprintf(stderr, "bad long opt \"%s\"\n", argv[curind]);
//usage(argc, argv);
exit(1);
break;
default:
usage(argc, argv);
exit(0);
}
}
if (inifile && ((inifp = fopen(inifile,"r")) == NULL)) {
fprintf(stderr,"rtapi_app: cant open inifile '%s'\n", inifile);
}
// must have a MKUUID one way or the other
if (service_uuid == NULL) {
const char *s;
if ((s = iniFind(inifp, "MKUUID", "MACHINEKIT"))) {
service_uuid = strdup(s);
}
}
if (service_uuid == NULL) {
fprintf(stderr, "rtapi: no service UUID (-R <uuid> or environment MKUUID) present\n");
exit(-1);
}
#ifdef NOTYET
iniFindInt(inifp, "REMOTE", "MACHINEKIT", &remote);
if (remote && (interfaces == NULL)) {
const char *s;
if ((s = iniFind(inifp, "INTERFACES", "MACHINEKIT"))) {
interfaces = strdup(s);
}
}
#endif
// the actual checking for setuid happens in harden_rt() (if needed)
if (getuid() != 0) {
pid_t pid1;
pid_t pid2;
int status;
if ((pid1 = fork())) {
waitpid(pid1, &status, 0);
exit(status);
} else if (!pid1) {
if ((pid2 = fork())) {
exit(0);
} else if (!pid2) {
setsid(); // Detach from the parent session
} else {
exit(1);
}
} else {
exit(1);
}
} else {
// dont run as root XXX
}
exit(mainloop(argc, argv));
}
// normally rtapi_app will log through the message ringbuffer in the
// global data segment. This isnt available initially, and during shutdown,
// so switch to direct syslog during these time windows so we dont
// loose log messages, even if they cant go through the ringbuffer
static void rtapi_app_msg_handler(msg_level_t level, const char *fmt,
va_list ap)
{
// during startup the global segment might not be
// available yet, so use stderr until then
if (global_data) {
vs_ring_write(level, fmt, ap);
} else {
vsyslog_async(rtapi2syslog(level), fmt, ap);
}
}
// use this handler if -F/--foreground was given
static void stderr_rtapi_msg_handler(msg_level_t level,
const char *fmt, va_list ap)
{
vfprintf(stderr, fmt, ap);
}
static void remove_module(std::string name)
{
std::vector<string>::iterator invalid;
invalid = remove( loading_order.begin(), loading_order.end(), name );
}
| EqAfrica/machinekit | src/rtapi/rtapi_app.cc | C++ | lgpl-2.1 | 39,588 |
#include "attr-path.hh"
#include "util.hh"
namespace nix {
// !!! Shouldn't we return a pointer to a Value?
void findAlongAttrPath(EvalState & state, const string & attrPath,
Bindings & autoArgs, Expr * e, Value & v)
{
Strings tokens = tokenizeString(attrPath, ".");
Error attrError =
Error(format("attribute selection path `%1%' does not match expression") % attrPath);
string curPath;
state.mkThunk_(v, e);
foreach (Strings::iterator, i, tokens) {
if (!curPath.empty()) curPath += ".";
curPath += *i;
/* Is *i an index (integer) or a normal attribute name? */
enum { apAttr, apIndex } apType = apAttr;
string attr = *i;
int attrIndex = -1;
if (string2Int(attr, attrIndex)) apType = apIndex;
/* Evaluate the expression. */
Value vTmp;
state.autoCallFunction(autoArgs, v, vTmp);
v = vTmp;
state.forceValue(v);
/* It should evaluate to either an attribute set or an
expression, according to what is specified in the
attrPath. */
if (apType == apAttr) {
if (v.type != tAttrs)
throw TypeError(
format("the expression selected by the selection path `%1%' should be an attribute set but is %2%")
% curPath % showType(v));
Bindings::iterator a = v.attrs->find(state.symbols.create(attr));
if (a == v.attrs->end())
throw Error(format("attribute `%1%' in selection path `%2%' not found") % attr % curPath);
v = *a->value;
}
else if (apType == apIndex) {
if (v.type != tList)
throw TypeError(
format("the expression selected by the selection path `%1%' should be a list but is %2%")
% curPath % showType(v));
if (attrIndex >= v.list.length)
throw Error(format("list index %1% in selection path `%2%' is out of range") % attrIndex % curPath);
v = *v.list.elems[attrIndex];
}
}
}
}
| tianyicui/nix | src/libexpr/attr-path.cc | C++ | lgpl-2.1 | 2,128 |
/*
* $Id$
*
Copyright (c) 2001 Stephane Conversy, Jean-Daniel Fekete and Ecole des
Mines de Nantes.
All rights reserved.
This software is proprietary information of Stephane Conversy,
Jean-Daniel Fekete and Ecole des Mines de Nantes. You shall use it
only in accordance with the terms of the license agreement you
accepted when downloading this software. The license is available in
the file license.txt and at the following URL:
http://www.emn.fr/info/image/Themes/Indigo/licence.html
*/
#include <w3c/svg/GetSVGDocument.hpp>
#include <w3c/svg/SVGColor.hpp>
#include <w3c/svg/SVGPaint.hpp>
#include <w3c/svg/SVGAngle.hpp>
#include <w3c/svg/SVGPoint.hpp>
#include <w3c/dom/DOMException.hpp>
namespace svg {
SVGDocument*
GetSVGDocument::getSVGDocument ( )
{
throw dom::DOMException(dom::DOMException::NOT_SUPPORTED_ERR);
return 0;
}
void
SVGColor::setRGBColor ( const DOMString& rgbColor )
{
throw dom::DOMException(dom::DOMException::NOT_SUPPORTED_ERR);
}
void
SVGColor::setRGBColorICCColor ( const DOMString& rgbColor, const DOMString& iccColor )
{
throw dom::DOMException(dom::DOMException::NOT_SUPPORTED_ERR);
}
void
SVGPaint::setUri ( const DOMString& uri )
{
throw dom::DOMException(dom::DOMException::NOT_SUPPORTED_ERR);
}
void
SVGPaint::setPaint ( unsigned short paintType, const DOMString& uri, const DOMString& rgbColor, const DOMString& iccColor )
{
throw dom::DOMException(dom::DOMException::NOT_SUPPORTED_ERR);
}
void
SVGAngle::newValueSpecifiedUnits ( unsigned short unitType, float valueInSpecifiedUnits )
{
throw dom::DOMException(dom::DOMException::NOT_SUPPORTED_ERR);
}
void
SVGAngle::convertToSpecifiedUnits ( unsigned short unitType )
{
throw dom::DOMException(dom::DOMException::NOT_SUPPORTED_ERR);
}
SVGPoint*
SVGPoint::matrixTransform ( const SVGMatrix& matrix )
{
throw dom::DOMException(dom::DOMException::NOT_SUPPORTED_ERR);
}
}
| rev22/svgl | src/w3c/svg/SVGMisc.cpp | C++ | lgpl-2.1 | 1,895 |
// Copyright Benoit Blanchon 2014-2015
// MIT License
//
// Arduino JSON library
// https://github.com/bblanchon/ArduinoJson
#pragma once
#include "../Arduino/Print.hpp"
namespace ArduinoJson {
namespace Internals {
class Encoding {
public:
// Optimized for code size on a 8-bit AVR
static char escapeChar(char c) {
const char *p = _escapeTable;
while (p[0] && p[1] != c) {
p += 2;
}
return p[0];
}
// Optimized for code size on a 8-bit AVR
static char unescapeChar(char c) {
const char *p = _escapeTable + 4;
for (;;) {
if (p[0] == '\0') return c;
if (p[0] == c) return p[1];
p += 2;
}
}
private:
static const char _escapeTable[];
};
}
}
| Pillar1989/Grove-for-linux | Arduino/libraries/ArduinoJson/include/ArduinoJson/Internals/Encoding.hpp | C++ | lgpl-2.1 | 750 |
//
// (c) Copyright 2017 DESY,ESS
// 2021 Eugen Wintersberger <eugen.wintersberger@gmail.com>
//
// This file is part of h5cpp.
//
// This library is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
// License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this library; if not, write to the
// Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
// Boston, MA 02110-1301 USA
// ===========================================================================
//
// Author: Eugen Wintersberger <eugen.wintersberger@gmail.com>
// Created on: Oct 24, 2017
//
#include <catch2/catch.hpp>
#include <h5cpp/hdf5.hpp>
using namespace hdf5;
SCENARIO("testing bool IO") {
auto f = file::create("DatasetBoolIO.h5", file::AccessFlags::Truncate);
auto r = f.root();
auto type = hdf5::datatype::create<bool>();
hdf5::dataspace::Scalar space;
GIVEN("a dataset of type bool") {
auto d = node::Dataset(r, Path("data"), type, space);
THEN("we can write a boolean value to it") {
bool write = true;
REQUIRE_NOTHROW(d.write(write));
AND_THEN("we can read the value back") {
bool read = false;
REQUIRE_NOTHROW(d.read(read));
REQUIRE(read);
}
}
}
}
| ess-dmsc/h5cpp | test/node/dataset_bool_io.cpp | C++ | lgpl-2.1 | 1,708 |
/**********************************************************************
* $Id: WKBReader.cpp 2022 2007-09-14 15:25:29Z csavage $
*
* GEOS - Geometry Engine Open Source
* http://geos.refractions.net
*
* Copyright (C) 2005-2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************/
#include <geos/io/WKBReader.h>
#include <geos/io/WKBConstants.h>
#include <geos/io/ByteOrderValues.h>
#include <geos/io/ParseException.h>
#include <geos/geom/GeometryFactory.h>
#include <geos/geom/Coordinate.h>
#include <geos/geom/Point.h>
#include <geos/geom/LinearRing.h>
#include <geos/geom/LineString.h>
#include <geos/geom/Polygon.h>
#include <geos/geom/MultiPoint.h>
#include <geos/geom/MultiLineString.h>
#include <geos/geom/MultiPolygon.h>
#include <geos/geom/CoordinateSequenceFactory.h>
#include <geos/geom/CoordinateSequence.h>
#include <geos/geom/PrecisionModel.h>
#include <iomanip>
#include <ostream>
#include <sstream>
#include <string>
//#define DEBUG_WKB_READER 1
using namespace std;
using namespace geos::geom;
namespace geos {
namespace io { // geos.io
string WKBReader::BAD_GEOM_TYPE_MSG = "bad geometry type encountered in ";
WKBReader::WKBReader()
:
factory(*(GeometryFactory::getDefaultInstance()))
{}
ostream &
WKBReader::printHEX(istream &is, ostream &os)
{
static const char hex[] = "0123456789ABCDEF";
long pos = is.tellg(); // take note of input stream get pointer
is.seekg(0, ios::beg); // rewind input stream
char each=0;
while(is.read(&each, 1))
{
const unsigned char c=each;
int low = (c & 0x0F);
int high = (c >> 4);
os << hex[high] << hex[low];
}
is.clear(); // clear input stream eof flag
is.seekg(pos); // reset input stream position
return os;
}
Geometry *
WKBReader::readHEX(istream &is)
{
// setup input/output stream
stringstream os(ios_base::binary|ios_base::in|ios_base::out);
unsigned char high, low, result_high, result_low, value;
while(!is.eof())//readsome(&str[0], 2))
{
// get the high part of the byte
is >> high;
// geth the low part of the byte
is >> low;
switch (high)
{
case '0' :
result_high = 0;
break;
case '1' :
result_high = 1;
break;
case '2' :
result_high = 2;
break;
case '3' :
result_high = 3;
break;
case '4' :
result_high = 4;
break;
case '5' :
result_high = 5;
break;
case '6' :
result_high = 6;
break;
case '7' :
result_high = 7;
break;
case '8' :
result_high = 8;
break;
case '9' :
result_high = 9;
break;
case 'A' :
result_high = 10;
break;
case 'B' :
result_high = 11;
break;
case 'C' :
result_high = 12;
break;
case 'D' :
result_high = 13;
break;
case 'E' :
result_high = 14;
break;
case 'F' :
result_high = 15;
break;
default:
throw ParseException("Invalid HEX char");
}
switch (low)
{
case '0' :
result_low = 0;
break;
case '1' :
result_low = 1;
break;
case '2' :
result_low = 2;
break;
case '3' :
result_low = 3;
break;
case '4' :
result_low = 4;
break;
case '5' :
result_low = 5;
break;
case '6' :
result_low = 6;
break;
case '7' :
result_low = 7;
break;
case '8' :
result_low = 8;
break;
case '9' :
result_low = 9;
break;
case 'A' :
result_low = 10;
break;
case 'B' :
result_low = 11;
break;
case 'C' :
result_low = 12;
break;
case 'D' :
result_low = 13;
break;
case 'E' :
result_low = 14;
break;
case 'F' :
result_low = 15;
break;
default:
throw ParseException("Invalid HEX char");
}
value = (result_high<<4) + result_low;
#if DEBUG_HEX_READER
cout<<"HEX "<<high<<low<<" -> DEC "<<(int)value<<endl;
#endif
// write the value to the output stream
os << value;
}
// now call read to convert the geometry
return this->read(os);
}
Geometry *
WKBReader::read(istream &is)
{
dis.setInStream(&is); // will default to machine endian
return readGeometry();
}
Geometry *
WKBReader::readGeometry()
{
// determine byte order
unsigned char byteOrder = dis.readByte();
#if DEBUG_WKB_READER
cout<<"WKB byteOrder: "<<(int)byteOrder<<endl;
#endif
// default is machine endian
if (byteOrder == WKBConstants::wkbNDR)
dis.setOrder(ByteOrderValues::ENDIAN_LITTLE);
else if (byteOrder == WKBConstants::wkbXDR)
dis.setOrder(ByteOrderValues::ENDIAN_BIG);
int typeInt = dis.readInt();
int geometryType = typeInt & 0xff;
#if DEBUG_WKB_READER
cout<<"WKB geometryType: "<<geometryType<<endl;
#endif
bool hasZ = ((typeInt & 0x80000000) != 0);
if (hasZ) inputDimension = 3;
else inputDimension = 2; // doesn't handle M currently
#if DEBUG_WKB_READER
cout<<"WKB hasZ: "<<hasZ<<endl;
#endif
#if DEBUG_WKB_READER
cout<<"WKB dimensions: "<<inputDimension<<endl;
#endif
bool hasSRID = ((typeInt & 0x20000000) != 0);
#if DEBUG_WKB_READER
cout<<"WKB hasSRID: "<<hasZ<<endl;
#endif
int SRID = 0;
if (hasSRID) SRID = dis.readInt(); // read SRID
// allocate space for ordValues
if ( ordValues.size() < inputDimension )
ordValues.resize(inputDimension);
Geometry *result;
switch (geometryType) {
case WKBConstants::wkbPoint :
result = readPoint();
break;
case WKBConstants::wkbLineString :
result = readLineString();
break;
case WKBConstants::wkbPolygon :
result = readPolygon();
break;
case WKBConstants::wkbMultiPoint :
result = readMultiPoint();
break;
case WKBConstants::wkbMultiLineString :
result = readMultiLineString();
break;
case WKBConstants::wkbMultiPolygon :
result = readMultiPolygon();
break;
case WKBConstants::wkbGeometryCollection :
result = readGeometryCollection();
break;
default:
stringstream err;
err << "Unknown WKB type " << geometryType;
throw ParseException(err.str());
}
result->setSRID(SRID);
return result;
}
Point *
WKBReader::readPoint()
{
readCoordinate();
return factory.createPoint(Coordinate(ordValues[0], ordValues[1]));
}
LineString *
WKBReader::readLineString()
{
int size = dis.readInt();
#if DEBUG_WKB_READER
cout<<"WKB npoints: "<<size<<endl;
#endif
CoordinateSequence *pts = readCoordinateSequence(size);
return factory.createLineString(pts);
}
LinearRing *
WKBReader::readLinearRing()
{
int size = dis.readInt();
#if DEBUG_WKB_READER
cout<<"WKB npoints: "<<size<<endl;
#endif
CoordinateSequence *pts = readCoordinateSequence(size);
return factory.createLinearRing(pts);
}
Polygon *
WKBReader::readPolygon()
{
int numRings = dis.readInt();
#if DEBUG_WKB_READER
cout<<"WKB numRings: "<<numRings<<endl;
#endif
LinearRing *shell = NULL;
if( numRings > 0 )
shell = readLinearRing();
vector<Geometry *>*holes=NULL;
if ( numRings > 1 )
{
try {
holes = new vector<Geometry *>(numRings-1);
for (int i=0; i<numRings-1; i++)
(*holes)[i] = (Geometry *)readLinearRing();
} catch (...) {
for (unsigned int i=0; i<holes->size(); i++)
delete (*holes)[i];
delete holes;
delete shell;
throw;
}
}
return factory.createPolygon(shell, holes);
}
MultiPoint *
WKBReader::readMultiPoint()
{
int numGeoms = dis.readInt();
vector<Geometry *> *geoms = new vector<Geometry *>(numGeoms);
try {
for (int i=0; i<numGeoms; i++)
{
Geometry *g = readGeometry();
if (!dynamic_cast<Point *>(g))
{
stringstream err;
err << BAD_GEOM_TYPE_MSG << " MultiPoint";
throw ParseException(err.str());
}
(*geoms)[i] = g;
}
} catch (...) {
for (unsigned int i=0; i<geoms->size(); i++)
delete (*geoms)[i];
delete geoms;
throw;
}
return factory.createMultiPoint(geoms);
}
MultiLineString *
WKBReader::readMultiLineString()
{
int numGeoms = dis.readInt();
vector<Geometry *> *geoms = new vector<Geometry *>(numGeoms);
try {
for (int i=0; i<numGeoms; i++)
{
Geometry *g = readGeometry();
if (!dynamic_cast<LineString *>(g))
{
stringstream err;
err << BAD_GEOM_TYPE_MSG << " LineString";
throw ParseException(err.str());
}
(*geoms)[i] = g;
}
} catch (...) {
for (unsigned int i=0; i<geoms->size(); i++)
delete (*geoms)[i];
delete geoms;
throw;
}
return factory.createMultiLineString(geoms);
}
MultiPolygon *
WKBReader::readMultiPolygon()
{
int numGeoms = dis.readInt();
vector<Geometry *> *geoms = new vector<Geometry *>(numGeoms);
try {
for (int i=0; i<numGeoms; i++)
{
Geometry *g = readGeometry();
if (!dynamic_cast<Polygon *>(g))
{
stringstream err;
err << BAD_GEOM_TYPE_MSG << " Polygon";
throw ParseException(err.str());
}
(*geoms)[i] = g;
}
} catch (...) {
for (unsigned int i=0; i<geoms->size(); i++)
delete (*geoms)[i];
delete geoms;
throw;
}
return factory.createMultiPolygon(geoms);
}
GeometryCollection *
WKBReader::readGeometryCollection()
{
int numGeoms = dis.readInt();
vector<Geometry *> *geoms = new vector<Geometry *>(numGeoms);
try {
for (int i=0; i<numGeoms; i++)
(*geoms)[i] = (readGeometry());
} catch (...) {
for (unsigned int i=0; i<geoms->size(); i++)
delete (*geoms)[i];
delete geoms;
throw;
}
return factory.createGeometryCollection(geoms);
}
CoordinateSequence *
WKBReader::readCoordinateSequence(int size)
{
CoordinateSequence *seq = factory.getCoordinateSequenceFactory()->create(size, inputDimension);
unsigned int targetDim = seq->getDimension();
if ( targetDim > inputDimension )
targetDim = inputDimension;
for (int i=0; i<size; i++) {
readCoordinate();
for (unsigned int j=0; j<targetDim; j++) {
seq->setOrdinate(i, j, ordValues[j]);
}
}
return seq;
}
void
WKBReader::readCoordinate()
{
const PrecisionModel &pm = *factory.getPrecisionModel();
for (unsigned int i=0; i<inputDimension; ++i)
{
if ( i <= 1 ) ordValues[i] = pm.makePrecise(dis.readDouble());
else ordValues[i] = dis.readDouble();
}
#if DEBUG_WKB_READER
cout<<"WKB coordinate: "<<ordValues[0]<<","<<ordValues[1]<<endl;
#endif
}
} // namespace geos.io
} // namespace geos
| asapnet/geos | source/io/WKBReader.cpp | C++ | lgpl-2.1 | 10,322 |
package fr.toss.FF7Weapons;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.item.Item;
import com.google.common.collect.Multimap;
public class Druidmace extends FF7weapon
{
private float field_150934_a;
private final Item.ToolMaterial field_150933_b;
public Druidmace(Item.ToolMaterial p_i45356_1_)
{
super();
this.field_150933_b = p_i45356_1_;
setUnlocalizedName("Druid_mace");
this.field_150934_a = 26F + p_i45356_1_.getDamageVsEntity();
}
public float func_150931_i()
{
return this.field_150933_b.getDamageVsEntity();
}
public String getToolMaterialName()
{
return this.field_150933_b.toString();
}
public Multimap getItemAttributeModifiers()
{
Multimap multimap = super.getItemAttributeModifiers();
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Weapon modifier", (double)this.field_150934_a, 0));
return multimap;
}
}
| GhostMonk3408/MidgarCrusade | src/main/java/fr/toss/FF7Weapons/Druidmace.java | Java | lgpl-2.1 | 1,059 |
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.protocol.sip;
import gov.nist.core.*;
import gov.nist.javax.sip.*;
import gov.nist.javax.sip.message.*;
import java.io.*;
import java.net.*;
import java.util.*;
import javax.sip.*;
import net.java.sip.communicator.util.*;
import org.jitsi.service.packetlogging.*;
/**
* This class passes log calls from JAIN-SIP to log4j, so that it is possible
* to change the log level for the JAIN-SIP stack in logging.properties
*
* @author Sebastien Mazy
*/
public class SipLogger
implements StackLogger,
ServerLogger
{
/**
* All messages will be passed to this logger.
*/
private static final Logger logger
= Logger.getLogger(SipLogger.class);
/**
* SipStack to use.
*/
private SipStack sipStack;
/*
* Implementation of StackLogger
*/
/**
* logs a stack trace. This helps to look at the stack frame.
*/
public void logStackTrace()
{
if (logger.isTraceEnabled())
logger.trace("JAIN-SIP stack trace", new Throwable());
}
/**
* logs a stack trace. This helps to look at the stack frame.
*
* @param traceLevel currently unused.
*/
public void logStackTrace(int traceLevel)
{
if (logger.isTraceEnabled())
logger.trace("JAIN-SIP stack trace", new Throwable());
}
/**
* Get the line count in the log stream.
*
* @return line count
*/
public int getLineCount()
{
return 0;
}
/**
* Log an exception.
*
* @param ex the exception that we are to log.
*/
public void logException(Throwable ex)
{
logger.warn("Exception in the JAIN-SIP stack: " + ex.getMessage());
if (logger.isInfoEnabled())
logger.info("JAIN-SIP exception stack trace is", ex);
}
/**
* Log a message into the log file.
*
* @param message
* message to log into the log file.
*/
public void logDebug(String message)
{
if (logger.isDebugEnabled())
logger.debug("Debug output from the JAIN-SIP stack: " + message);
}
/**
* Log an error message.
*
* @param message --
* error message to log.
*/
public void logFatalError(String message)
{
if (logger.isTraceEnabled())
logger.trace("Fatal error from the JAIN-SIP stack: " + message);
}
/**
* Log an error message.
*
* @param message error message to log.
*/
public void logError(String message)
{
logger.error("Error from the JAIN-SIP stack: " + message);
}
/**
* Determines whether logging is enabled.
*
* @return flag to indicate if logging is enabled.
*/
public boolean isLoggingEnabled()
{
return true;
}
/**
* Return true/false if logging is enabled at a given level.
*
* @param logLevel the level that we'd like to check loggability for.
*
* @return always <tt>true</tt> regardless of <tt>logLevel</tt>'s value.
*/
public boolean isLoggingEnabled(int logLevel)
{
// always enable trace messages so we can receive packets
// and log them to packet logging service
if (logLevel == TRACE_DEBUG)
return logger.isDebugEnabled();
if (logLevel == TRACE_MESSAGES) // same as TRACE_INFO
return true;
if (logLevel == TRACE_NONE)
return false;
return true;
}
/**
* Logs an exception and an error message error message.
*
* @param message that message that we'd like to log.
* @param ex the exception that we'd like to log.
*/
public void logError(String message, Exception ex)
{
logger.error("Error from the JAIN-SIP stack: " + message, ex);
}
/**
* Log a warning message.
*
* @param string the warning that we'd like to log
*/
public void logWarning(String string)
{
logger.warn("Warning from the JAIN-SIP stack" + string);
}
/**
* Log an info message.
*
* @param string the message that we'd like to log.
*/
public void logInfo(String string)
{
if (logger.isInfoEnabled())
logger.info("Info from the JAIN-SIP stack: " + string);
}
/**
* Disable logging altogether.
*
*/
public void disableLogging() {}
/**
* Enable logging (globally).
*/
public void enableLogging() {}
/**
* Logs the build time stamp of the jain-sip reference implementation.
*
* @param buildTimeStamp the build time stamp of the jain-sip reference
* implementation.
*/
public void setBuildTimeStamp(String buildTimeStamp)
{
if (logger.isTraceEnabled())
logger.trace("JAIN-SIP RI build " + buildTimeStamp);
}
/**
* Dummy implementation for {@link ServerLogger#setStackProperties(
* Properties)}
*/
public void setStackProperties(Properties stackProperties) {}
/**
* Dummy implementation for {@link ServerLogger#closeLogFile()}
*/
public void closeLogFile() {}
/**
* Logs the specified message and details.
*
* @param message the message to log
* @param from the message sender
* @param to the message addressee
* @param sender determines whether we are the origin of this message.
* @param time the date this message was received at.
*/
public void logMessage(SIPMessage message, String from, String to,
boolean sender, long time)
{
logMessage(message, from, to, null, sender, time);
}
/**
* Logs the specified message and details.
*
* @param message the message to log
* @param from the message sender
* @param to the message addressee
* @param status message status
* @param sender determines whether we are the origin of this message.
* @param time the date this message was received at.
*/
public void logMessage(SIPMessage message, String from, String to,
String status, boolean sender, long time)
{
try
{
logPacket(message, sender);
}
catch(Throwable e)
{
logger.error("Error logging packet", e);
}
}
/**
* Logs the specified message and details to the packet logging service
* if enabled.
*
* @param message the message to log
* @param sender determines whether we are the origin of this message.
*/
private void logPacket(SIPMessage message, boolean sender)
{
try
{
PacketLoggingService packetLogging = SipActivator.getPacketLogging();
if( packetLogging == null
|| !packetLogging.isLoggingEnabled(
PacketLoggingService.ProtocolName.SIP)
/* Via not present in CRLF packet on TCP - causes NPE */
|| message.getTopmostVia() == null )
return;
String transport = message.getTopmostVia().getTransport();
boolean isTransportUDP = transport.equalsIgnoreCase("UDP");
byte[] srcAddr;
int srcPort;
byte[] dstAddr;
int dstPort;
// if addresses are not set use empty byte array with length
// equals to the other address or just empty
// byte array with length 4 (ipv4 0.0.0.0)
if(sender)
{
if(!isTransportUDP)
{
InetSocketAddress localAddress =
getLocalAddressForDestination(
message.getRemoteAddress(),
message.getRemotePort(),
message.getLocalAddress(),
transport);
if (localAddress != null)
{
srcPort = localAddress.getPort();
srcAddr = localAddress.getAddress().getAddress();
}
else
{
logger.warn("Could not obtain source address for "
+ " packet. Writing source as 0.0.0.0:0");
srcPort = 0;
srcAddr = new byte[] { 0, 0, 0, 0 };
}
}
else
{
srcPort = message.getLocalPort();
if(message.getLocalAddress() != null)
srcAddr = message.getLocalAddress().getAddress();
else if(message.getRemoteAddress() != null)
srcAddr = new byte[
message.getRemoteAddress().getAddress().length];
else
srcAddr = new byte[4];
}
dstPort = message.getRemotePort();
if(message.getRemoteAddress() != null)
dstAddr = message.getRemoteAddress().getAddress();
else
dstAddr = new byte[srcAddr.length];
}
else
{
if(!isTransportUDP)
{
InetSocketAddress dstAddress =
getLocalAddressForDestination(
message.getRemoteAddress(),
message.getRemotePort(),
message.getLocalAddress(),
transport);
dstPort = dstAddress.getPort();
dstAddr = dstAddress.getAddress().getAddress();
}
else
{
dstPort = message.getLocalPort();
if(message.getLocalAddress() != null)
dstAddr = message.getLocalAddress().getAddress();
else if(message.getRemoteAddress() != null)
dstAddr = new byte[
message.getRemoteAddress().getAddress().length];
else
dstAddr = new byte[4];
}
srcPort = message.getRemotePort();
if(message.getRemoteAddress() != null)
srcAddr = message.getRemoteAddress().getAddress();
else
srcAddr = new byte[dstAddr.length];
}
byte[] msg = null;
if(message instanceof SIPRequest)
{
SIPRequest req = (SIPRequest)message;
if(req.getMethod().equals(SIPRequest.MESSAGE)
&& message.getContentTypeHeader() != null
&& message.getContentTypeHeader()
.getContentType().equalsIgnoreCase("text"))
{
int len = req.getContentLength().getContentLength();
if(len > 0)
{
SIPRequest newReq = (SIPRequest)req.clone();
byte[] newContent = new byte[len];
Arrays.fill(newContent, (byte)'.');
newReq.setMessageContent(newContent);
msg = newReq.toString().getBytes("UTF-8");
}
}
}
if(msg == null)
{
msg = message.toString().getBytes("UTF-8");
}
packetLogging.logPacket(
PacketLoggingService.ProtocolName.SIP,
srcAddr, srcPort,
dstAddr, dstPort,
isTransportUDP ? PacketLoggingService.TransportName.UDP :
PacketLoggingService.TransportName.TCP,
sender, msg);
}
catch(Throwable e)
{
logger.error("Cannot obtain message body", e);
}
}
/**
* Logs the specified message and details.
*
* @param message the message to log
* @param from the message sender
* @param to the message addressee
* @param status message status
* @param sender determines whether we are the origin of this message.
*/
public void logMessage(SIPMessage message, String from, String to,
String status, boolean sender)
{
if (!logger.isInfoEnabled())
return;
String msgHeader;
if(sender)
msgHeader = "JAIN-SIP sent a message from=\"";
else
msgHeader = "JAIN-SIP received a message from=\"";
if (logger.isInfoEnabled())
logger.info(msgHeader + from + "\" to=\"" + to + "\" (status: "
+ status + "):\n" + message);
}
/**
* Prints the specified <tt>exception</tt> as a warning.
*
* @param exception the <tt>Exception</tt> we are passed from jain-sip.
*/
public void logException(Exception exception)
{
logger.warn("the following exception occured in JAIN-SIP: "
+ exception, exception);
}
/**
* A dummy implementation.
*
* @param sipStack ignored;
*/
public void setSipStack(SipStack sipStack)
{
this.sipStack = sipStack;
}
/**
* Returns a logger name.
*
* @return a logger name.
*/
public String getLoggerName()
{
return "SIP Communicator JAIN SIP logger.";
}
/**
* Logs the specified trace with a debuf level.
*
* @param message the trace to log.
*/
public void logTrace(String message)
{
if (logger.isDebugEnabled())
logger.debug(message);
}
/**
* Returns a local address to use with the specified TCP destination.
* The method forces the JAIN-SIP stack to create
* s and binds (if necessary)
* and return a socket connected to the specified destination address and
* port and then return its local address.
*
* @param dst the destination address that the socket would need to connect
* to.
* @param dstPort the port number that the connection would be established
* with.
* @param localAddress the address that we would like to bind on
* (null for the "any" address).
* @param transport the transport that will be used TCP ot TLS
*
* @return the SocketAddress that this handler would use when connecting to
* the specified destination address and port.
*
* @throws IOException if we fail binding the local socket
*/
public java.net.InetSocketAddress getLocalAddressForDestination(
java.net.InetAddress dst,
int dstPort,
java.net.InetAddress localAddress,
String transport)
throws IOException
{
if(ListeningPoint.TLS.equalsIgnoreCase(transport))
return (java.net.InetSocketAddress)(((SipStackImpl)this.sipStack)
.getLocalAddressForTlsDst(dst, dstPort, localAddress));
else
return (java.net.InetSocketAddress)(((SipStackImpl)this.sipStack)
.getLocalAddressForTcpDst(dst, dstPort, localAddress, 0));
}
}
| 0xbb/jitsi | src/net/java/sip/communicator/impl/protocol/sip/SipLogger.java | Java | lgpl-2.1 | 15,615 |
#!/usr/bin/python
"""Test of tree output using Firefox."""
from macaroon.playback import *
import utils
sequence = MacroSequence()
sequence.append(PauseAction(3000))
sequence.append(KeyComboAction("<Alt>b"))
sequence.append(KeyComboAction("Return"))
sequence.append(KeyComboAction("Tab"))
sequence.append(KeyComboAction("Tab"))
sequence.append(KeyComboAction("Up"))
sequence.append(KeyComboAction("Up"))
sequence.append(KeyComboAction("Up"))
sequence.append(KeyComboAction("Tab"))
sequence.append(PauseAction(3000))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Shift>Tab"))
sequence.append(utils.AssertPresentationAction(
"1. Shift Tab for tree",
["BRAILLE LINE: 'Firefox application Library frame All Bookmarks expanded TREE LEVEL 1'",
" VISIBLE: 'All Bookmarks expanded TREE LEVE', cursor=1",
"SPEECH OUTPUT: 'All Bookmarks.'",
"SPEECH OUTPUT: 'expanded.'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(utils.AssertPresentationAction(
"2. Down Arrow in tree",
["BRAILLE LINE: 'Firefox application Library frame Bookmarks Toolbar TREE LEVEL 2'",
" VISIBLE: 'Bookmarks Toolbar TREE LEVEL 2', cursor=1",
"SPEECH OUTPUT: 'Bookmarks Toolbar.'",
"SPEECH OUTPUT: 'tree level 2'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(utils.AssertPresentationAction(
"3. Down Arrow in tree",
["BRAILLE LINE: 'Firefox application Library frame Bookmarks Menu collapsed TREE LEVEL 2'",
" VISIBLE: 'Bookmarks Menu collapsed TREE LE', cursor=1",
"SPEECH OUTPUT: 'Bookmarks Menu.'",
"SPEECH OUTPUT: 'collapsed.'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(utils.AssertPresentationAction(
"4. Basic Where Am I",
["BRAILLE LINE: 'Firefox application Library frame Bookmarks Menu collapsed TREE LEVEL 2'",
" VISIBLE: 'Bookmarks Menu collapsed TREE LE', cursor=1",
"SPEECH OUTPUT: 'Bookmarks Menu tree item.'",
"SPEECH OUTPUT: '2 of 3.'",
"SPEECH OUTPUT: 'collapsed tree level 2'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Right"))
sequence.append(utils.AssertPresentationAction(
"5. Right Arrow to expand folder",
["BRAILLE LINE: 'Firefox application Library frame Bookmarks Menu expanded TREE LEVEL 2'",
" VISIBLE: 'Bookmarks Menu expanded TREE LEV', cursor=1",
"SPEECH OUTPUT: 'expanded'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(utils.AssertPresentationAction(
"6. Basic Where Am I",
["BRAILLE LINE: 'Firefox application Library frame Bookmarks Menu expanded TREE LEVEL 2'",
" VISIBLE: 'Bookmarks Menu expanded TREE LEV', cursor=1",
"SPEECH OUTPUT: 'Bookmarks Menu tree item.'",
"SPEECH OUTPUT: '2 of 3.'",
"SPEECH OUTPUT: 'expanded tree level 2'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(utils.AssertPresentationAction(
"7. Down Arrow in tree",
["BRAILLE LINE: 'Firefox application Library frame GNOME TREE LEVEL 3'",
" VISIBLE: 'GNOME TREE LEVEL 3', cursor=1",
"SPEECH OUTPUT: 'GNOME.'",
"SPEECH OUTPUT: 'tree level 3'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("KP_Enter"))
sequence.append(utils.AssertPresentationAction(
"8. Basic Where Am I",
["BRAILLE LINE: 'Firefox application Library frame GNOME TREE LEVEL 3'",
" VISIBLE: 'GNOME TREE LEVEL 3', cursor=1",
"SPEECH OUTPUT: 'GNOME tree item.'",
"SPEECH OUTPUT: '1 of 2.'",
"SPEECH OUTPUT: 'tree level 3'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(utils.AssertPresentationAction(
"9. Up Arrow in tree",
["BRAILLE LINE: 'Firefox application Library frame Bookmarks Menu expanded TREE LEVEL 2'",
" VISIBLE: 'Bookmarks Menu expanded TREE LEV', cursor=1",
"SPEECH OUTPUT: 'Bookmarks Menu.'",
"SPEECH OUTPUT: 'expanded.'",
"SPEECH OUTPUT: 'tree level 2'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Left"))
sequence.append(utils.AssertPresentationAction(
"10. Left Arrow to collapse folder",
["BRAILLE LINE: 'Firefox application Library frame Bookmarks Menu collapsed TREE LEVEL 2'",
" VISIBLE: 'Bookmarks Menu collapsed TREE LE', cursor=1",
"SPEECH OUTPUT: 'collapsed'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(utils.AssertPresentationAction(
"11. Up Arrow in tree",
["BRAILLE LINE: 'Firefox application Library frame Bookmarks Toolbar TREE LEVEL 2'",
" VISIBLE: 'Bookmarks Toolbar TREE LEVEL 2', cursor=1",
"SPEECH OUTPUT: 'Bookmarks Toolbar.'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(utils.AssertPresentationAction(
"12. Up Arrow in tree",
["BRAILLE LINE: 'Firefox application Library frame All Bookmarks expanded TREE LEVEL 1'",
" VISIBLE: 'All Bookmarks expanded TREE LEVE', cursor=1",
"SPEECH OUTPUT: 'All Bookmarks.'",
"SPEECH OUTPUT: 'expanded.'",
"SPEECH OUTPUT: 'tree level 1'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Tab"))
sequence.append(utils.AssertPresentationAction(
"13. Tab back to tree table",
["BRAILLE LINE: 'Firefox application Library frame tree table Bookmarks Toolbar table row TREE LEVEL 1'",
" VISIBLE: 'Bookmarks Toolbar table row TR', cursor=1",
"SPEECH OUTPUT: 'Bookmarks Toolbar '"]))
sequence.append(KeyComboAction("<Alt>F4"))
sequence.append(utils.AssertionSummaryAction())
sequence.start()
| GNOME/orca | test/keystrokes/firefox/ui_role_tree.py | Python | lgpl-2.1 | 5,957 |
import { FutureResult } from '@ephox/katamari';
import { ResponseBodyDataTypes, RequestBody, ResponseBody } from './HttpData';
import { HttpError } from './HttpError';
export const enum HttpMethod {
Get = 'get',
Post = 'post',
Delete = 'delete',
Patch = 'patch',
Put = 'put'
}
export type ProgressFunction = (loaded: number, total: number) => void;
export type LoadedProgressFunction = (loaded: number) => void;
export interface HttpRequest<T extends ResponseBodyDataTypes> {
responseType: T;
body: RequestBody;
url: string;
method: HttpMethod;
query?: Record<string, string>;
progress?: ProgressFunction;
headers?: Record<string, string>;
credentials?: boolean;
}
export interface HttpResponse<T extends ResponseBody> {
headers: Record<string, string>;
statusCode: number;
body: T;
}
export type JwtToken = string;
export type JwtTokenFactory = (fresh: boolean) => FutureResult<JwtToken, HttpError>;
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
export type PostPutInit <T extends ResponseBodyDataTypes> = Omit<HttpRequest<T>, 'method'>;
export type GetDelInit <T extends ResponseBodyDataTypes> = Omit<HttpRequest<T>, 'method' | 'body'>;
export interface DownloadHttpRequest {
url: string;
progress?: LoadedProgressFunction;
headers?: Record<string, string>;
credentials?: boolean;
}
| FernCreek/tinymce | modules/jax/src/main/ts/ephox/jax/core/HttpTypes.ts | TypeScript | lgpl-2.1 | 1,335 |
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtQuick module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qquickrectangle_p.h"
#include "qquickrectangle_p_p.h"
#include <QtQuick/private/qsgcontext_p.h>
#include <private/qsgadaptationlayer_p.h>
#include <QtGui/qpixmapcache.h>
#include <QtCore/qstringbuilder.h>
#include <QtCore/qmath.h>
#include <QtCore/qmetaobject.h>
QT_BEGIN_NAMESPACE
// XXX todo - should we change rectangle to draw entirely within its width/height?
/*!
\internal
\class QQuickPen
\brief For specifying a pen used for drawing rectangle borders on a QQuickView
By default, the pen is invalid and nothing is drawn. You must either set a color (then the default
width is 1) or a width (then the default color is black).
A width of 1 indicates is a single-pixel line on the border of the item being painted.
Example:
\qml
Rectangle {
border.width: 2
border.color: "red"
}
\endqml
*/
QQuickPen::QQuickPen(QObject *parent)
: QObject(parent)
, m_width(1)
, m_color("#000000")
, m_aligned(true)
, m_valid(false)
{
}
qreal QQuickPen::width() const
{
return m_width;
}
void QQuickPen::setWidth(qreal w)
{
if (m_width == w && m_valid)
return;
m_width = w;
m_valid = m_color.alpha() && (qRound(m_width) >= 1 || (!m_aligned && m_width > 0));
emit penChanged();
}
QColor QQuickPen::color() const
{
return m_color;
}
void QQuickPen::setColor(const QColor &c)
{
m_color = c;
m_valid = m_color.alpha() && (qRound(m_width) >= 1 || (!m_aligned && m_width > 0));
emit penChanged();
}
bool QQuickPen::pixelAligned() const
{
return m_aligned;
}
void QQuickPen::setPixelAligned(bool aligned)
{
if (aligned == m_aligned)
return;
m_aligned = aligned;
m_valid = m_color.alpha() && (qRound(m_width) >= 1 || (!m_aligned && m_width > 0));
emit penChanged();
}
bool QQuickPen::isValid() const
{
return m_valid;
}
/*!
\qmltype GradientStop
\instantiates QQuickGradientStop
\inqmlmodule QtQuick
\ingroup qtquick-visual-utility
\brief Defines the color at a position in a Gradient
\sa Gradient
*/
/*!
\qmlproperty real QtQuick::GradientStop::position
\qmlproperty color QtQuick::GradientStop::color
The position and color properties describe the color used at a given
position in a gradient, as represented by a gradient stop.
The default position is 0.0; the default color is black.
\sa Gradient
*/
QQuickGradientStop::QQuickGradientStop(QObject *parent)
: QObject(parent)
{
}
qreal QQuickGradientStop::position() const
{
return m_position;
}
void QQuickGradientStop::setPosition(qreal position)
{
m_position = position; updateGradient();
}
QColor QQuickGradientStop::color() const
{
return m_color;
}
void QQuickGradientStop::setColor(const QColor &color)
{
m_color = color; updateGradient();
}
void QQuickGradientStop::updateGradient()
{
if (QQuickGradient *grad = qobject_cast<QQuickGradient*>(parent()))
grad->doUpdate();
}
/*!
\qmltype Gradient
\instantiates QQuickGradient
\inqmlmodule QtQuick
\ingroup qtquick-visual-utility
\brief Defines a gradient fill
A gradient is defined by two or more colors, which will be blended seamlessly.
The colors are specified as a set of GradientStop child items, each of
which defines a position on the gradient from 0.0 to 1.0 and a color.
The position of each GradientStop is defined by setting its
\l{GradientStop::}{position} property; its color is defined using its
\l{GradientStop::}{color} property.
A gradient without any gradient stops is rendered as a solid white fill.
Note that this item is not a visual representation of a gradient. To display a
gradient, use a visual item (like \l Rectangle) which supports the use
of gradients.
\section1 Example Usage
\div {class="float-right"}
\inlineimage qml-gradient.png
\enddiv
The following example declares a \l Rectangle item with a gradient starting
with red, blending to yellow at one third of the height of the rectangle,
and ending with green:
\snippet qml/gradient.qml code
\clearfloat
\section1 Performance and Limitations
Calculating gradients can be computationally expensive compared to the use
of solid color fills or images. Consider using gradients for static items
in a user interface.
In Qt 5.0, only vertical, linear gradients can be applied to items. If you
need to apply different orientations of gradients, a combination of rotation
and clipping will need to be applied to the relevant items. This can
introduce additional performance requirements for your application.
The use of animations involving gradient stops may not give the desired
result. An alternative way to animate gradients is to use pre-generated
images or SVG drawings containing gradients.
\sa GradientStop
*/
/*!
\qmlproperty list<GradientStop> QtQuick::Gradient::stops
\default
This property holds the gradient stops describing the gradient.
By default, this property contains an empty list.
To set the gradient stops, define them as children of the Gradient.
*/
QQuickGradient::QQuickGradient(QObject *parent)
: QObject(parent)
{
}
QQuickGradient::~QQuickGradient()
{
}
QQmlListProperty<QQuickGradientStop> QQuickGradient::stops()
{
return QQmlListProperty<QQuickGradientStop>(this, m_stops);
}
QGradientStops QQuickGradient::gradientStops() const
{
QGradientStops stops;
for (int i = 0; i < m_stops.size(); ++i){
int j = 0;
while (j < stops.size() && stops.at(j).first < m_stops[i]->position())
j++;
stops.insert(j, QGradientStop(m_stops.at(i)->position(), m_stops.at(i)->color()));
}
return stops;
}
void QQuickGradient::doUpdate()
{
emit updated();
}
int QQuickRectanglePrivate::doUpdateSlotIdx = -1;
/*!
\qmltype Rectangle
\instantiates QQuickRectangle
\inqmlmodule QtQuick
\inherits Item
\ingroup qtquick-visual
\brief Paints a filled rectangle with an optional border
Rectangle items are used to fill areas with solid color or gradients, and/or
to provide a rectangular border.
\section1 Appearance
Each Rectangle item is painted using either a solid fill color, specified using
the \l color property, or a gradient, defined using a Gradient type and set
using the \l gradient property. If both a color and a gradient are specified,
the gradient is used.
You can add an optional border to a rectangle with its own color and thickness
by setting the \l border.color and \l border.width properties. Set the color
to "transparent" to paint a border without a fill color.
You can also create rounded rectangles using the \l radius property. Since this
introduces curved edges to the corners of a rectangle, it may be appropriate to
set the \l Item::antialiasing property to improve its appearance.
\section1 Example Usage
\div {class="float-right"}
\inlineimage declarative-rect.png
\enddiv
The following example shows the effects of some of the common properties on a
Rectangle item, which in this case is used to create a square:
\snippet qml/rectangle/rectangle.qml document
\clearfloat
\section1 Performance
Using the \l Item::antialiasing property improves the appearance of a rounded rectangle at
the cost of rendering performance. You should consider unsetting this property
for rectangles in motion, and only set it when they are stationary.
\sa Image
*/
QQuickRectangle::QQuickRectangle(QQuickItem *parent)
: QQuickItem(*(new QQuickRectanglePrivate), parent)
{
setFlag(ItemHasContents);
}
void QQuickRectangle::doUpdate()
{
update();
}
/*!
\qmlproperty bool QtQuick::Rectangle::antialiasing
Used to decide if the Rectangle should use antialiasing or not.
\l {Antialiasing} provides information on the performance implications
of this property.
The default is true for Rectangles with a radius, and false otherwise.
*/
/*!
\qmlpropertygroup QtQuick::Rectangle::border
\qmlproperty int QtQuick::Rectangle::border.width
\qmlproperty color QtQuick::Rectangle::border.color
The width and color used to draw the border of the rectangle.
A width of 1 creates a thin line. For no line, use a width of 0 or a transparent color.
\note The width of the rectangle's border does not affect the geometry of the
rectangle itself or its position relative to other items if anchors are used.
The border is rendered within the rectangle's boundaries.
*/
QQuickPen *QQuickRectangle::border()
{
Q_D(QQuickRectangle);
return d->getPen();
}
/*!
\qmlproperty Gradient QtQuick::Rectangle::gradient
The gradient to use to fill the rectangle.
This property allows for the construction of simple vertical gradients.
Other gradients may by formed by adding rotation to the rectangle.
\div {class="float-left"}
\inlineimage declarative-rect_gradient.png
\enddiv
\snippet qml/rectangle/rectangle-gradient.qml rectangles
\clearfloat
If both a gradient and a color are specified, the gradient will be used.
\sa Gradient, color
*/
QQuickGradient *QQuickRectangle::gradient() const
{
Q_D(const QQuickRectangle);
return d->gradient;
}
void QQuickRectangle::setGradient(QQuickGradient *gradient)
{
Q_D(QQuickRectangle);
if (d->gradient == gradient)
return;
static int updatedSignalIdx = -1;
if (updatedSignalIdx < 0)
updatedSignalIdx = QMetaMethod::fromSignal(&QQuickGradient::updated).methodIndex();
if (d->doUpdateSlotIdx < 0)
d->doUpdateSlotIdx = QQuickRectangle::staticMetaObject.indexOfSlot("doUpdate()");
if (d->gradient)
QMetaObject::disconnect(d->gradient, updatedSignalIdx, this, d->doUpdateSlotIdx);
d->gradient = gradient;
if (d->gradient)
QMetaObject::connect(d->gradient, updatedSignalIdx, this, d->doUpdateSlotIdx);
update();
}
void QQuickRectangle::resetGradient()
{
setGradient(0);
}
/*!
\qmlproperty real QtQuick::Rectangle::radius
This property holds the corner radius used to draw a rounded rectangle.
If radius is non-zero, the rectangle will be painted as a rounded rectangle, otherwise it will be
painted as a normal rectangle. The same radius is used by all 4 corners; there is currently
no way to specify different radii for different corners.
*/
qreal QQuickRectangle::radius() const
{
Q_D(const QQuickRectangle);
return d->radius;
}
void QQuickRectangle::setRadius(qreal radius)
{
Q_D(QQuickRectangle);
if (d->radius == radius)
return;
d->radius = radius;
d->setImplicitAntialiasing(radius != 0.0);
update();
emit radiusChanged();
}
/*!
\qmlproperty color QtQuick::Rectangle::color
This property holds the color used to fill the rectangle.
The default color is white.
\div {class="float-right"}
\inlineimage rect-color.png
\enddiv
The following example shows rectangles with colors specified
using hexadecimal and named color notation:
\snippet qml/rectangle/rectangle-colors.qml rectangles
\clearfloat
If both a gradient and a color are specified, the gradient will be used.
\sa gradient
*/
QColor QQuickRectangle::color() const
{
Q_D(const QQuickRectangle);
return d->color;
}
void QQuickRectangle::setColor(const QColor &c)
{
Q_D(QQuickRectangle);
if (d->color == c)
return;
d->color = c;
update();
emit colorChanged();
}
QSGNode *QQuickRectangle::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data)
{
Q_UNUSED(data);
Q_D(QQuickRectangle);
if (width() <= 0 || height() <= 0
|| (d->color.alpha() == 0 && (!d->pen || d->pen->width() == 0 || d->pen->color().alpha() == 0))) {
delete oldNode;
return 0;
}
QSGRectangleNode *rectangle = static_cast<QSGRectangleNode *>(oldNode);
if (!rectangle) rectangle = d->sceneGraphContext()->createRectangleNode();
rectangle->setRect(QRectF(0, 0, width(), height()));
rectangle->setColor(d->color);
if (d->pen && d->pen->isValid()) {
rectangle->setPenColor(d->pen->color());
rectangle->setPenWidth(d->pen->width());
rectangle->setAligned(d->pen->pixelAligned());
} else {
rectangle->setPenWidth(0);
}
rectangle->setRadius(d->radius);
rectangle->setAntialiasing(antialiasing());
QGradientStops stops;
if (d->gradient) {
stops = d->gradient->gradientStops();
}
rectangle->setGradientStops(stops);
rectangle->update();
return rectangle;
}
QT_END_NAMESPACE
| qmlc/qtdeclarative | src/quick/items/qquickrectangle.cpp | C++ | lgpl-2.1 | 14,735 |
// The libMesh Finite Element Library.
// Copyright (C) 2002-2012 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// Local includes
#include "quadrature_clough.h"
#include "quadrature_gauss.h"
namespace libMesh
{
void QClough::init_2D(const ElemType _type,
unsigned int p)
{
#if LIBMESH_DIM > 1
QGauss gauss_rule(2, _order);
gauss_rule.init(TRI6, p);
//-----------------------------------------------------------------------
// 2D quadrature rules
switch (_type)
{
//---------------------------------------------
// Triangle quadrature rules
case TRI3:
case TRI6:
{
std::vector<Point> &gausspoints = gauss_rule.get_points();
std::vector<Real> &gaussweights = gauss_rule.get_weights();
unsigned int numgausspts = gausspoints.size();
_points.resize(numgausspts*3);
_weights.resize(numgausspts*3);
for (unsigned int i = 0; i != numgausspts; ++i)
{
_points[3*i](0) = gausspoints[i](0) +
gausspoints[i](1) / 3.;
_points[3*i](1) = gausspoints[i](1) / 3.;
_points[3*i+1](0) = gausspoints[i](1) / 3.;
_points[3*i+1](1) = gausspoints[i](0) +
gausspoints[i](1) / 3.;
_points[3*i+2](0) = 1./3. +
gausspoints[i](0) * 2./3. -
gausspoints[i](1) / 3.;
_points[3*i+2](1) = 1./3. -
gausspoints[i](0) / 3. +
gausspoints[i](1) * 2./3.;
_weights[3*i] = gaussweights[i] / 3.;
_weights[3*i+1] = _weights[3*i];
_weights[3*i+2] = _weights[3*i];
}
return;
}
//---------------------------------------------
// Unsupported type
default:
{
libMesh::err << "Element type not supported!:" << _type << std::endl;
libmesh_error();
}
}
libmesh_error();
return;
#endif
}
} // namespace libMesh
| certik/libmesh | src/quadrature/quadrature_clough_2D.C | C++ | lgpl-2.1 | 2,537 |
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
/**
*
*/
package org.hibernate.spatial.testing.dialects.h2geodb;
import org.hibernate.spatial.testing.AbstractExpectationsFactory;
import org.hibernate.spatial.testing.NativeSQLStatement;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.Point;
import org.geolatte.geom.ByteBuffer;
import org.geolatte.geom.codec.Wkb;
import org.geolatte.geom.jts.JTS;
/**
* A Factory class that generates expected {@link org.hibernate.spatial.testing.NativeSQLStatement}s for GeoDB
* version < 0.4. These versions don't support storage of the SRID value with
* the geometry.
*
* @author Jan Boonen, Geodan IT b.v.
*/
@Deprecated //Class no longer used. Remove.
public class GeoDBNoSRIDExpectationsFactory extends AbstractExpectationsFactory {
public GeoDBNoSRIDExpectationsFactory(GeoDBDataSourceUtils dataSourceUtils) {
super( dataSourceUtils );
}
@Override
protected NativeSQLStatement createNativeAsBinaryStatement() {
return createNativeSQLStatement( "select id, ST_AsEWKB(geom) from GEOMTEST" );
}
@Override
protected NativeSQLStatement createNativeAsTextStatement() {
return createNativeSQLStatement( "select id, ST_AsText(geom) from GEOMTEST" );
}
@Override
protected NativeSQLStatement createNativeBoundaryStatement() {
throw new UnsupportedOperationException(
"Method ST_Bounday() is not implemented in the current version of GeoDB."
);
}
@Override
protected NativeSQLStatement createNativeBufferStatement(Double distance) {
return createNativeSQLStatement(
"select t.id, ST_Buffer(t.geom,?) from GEOMTEST t where ST_SRID(t.geom) = 4326",
new Object[] { distance }
);
}
@Override
protected NativeSQLStatement createNativeContainsStatement(Geometry geom) {
return createNativeSQLStatementAllWKTParams(
"select t.id, ST_Contains(t.geom, ST_GeomFromText(?, 4326)) from GEOMTEST t where ST_Contains(t.geom, ST_GeomFromText(?, 4326)) = 1",
geom.toText()
);
}
@Override
protected NativeSQLStatement createNativeConvexHullStatement(Geometry geom) {
throw new UnsupportedOperationException(
"Method ST_ConvexHull() is not implemented in the current version of GeoDB."
);
}
@Override
protected NativeSQLStatement createNativeCrossesStatement(Geometry geom) {
return createNativeSQLStatementAllWKTParams(
"select t.id, ST_Crosses(t.geom, ST_GeomFromText(?, 4326)) from GEOMTEST t where ST_Crosses(t.geom, ST_GeomFromText(?, 4326)) = 1",
geom.toText()
);
}
@Override
protected NativeSQLStatement createNativeDifferenceStatement(Geometry geom) {
throw new UnsupportedOperationException(
"Method ST_Difference() is not implemented in the current version of GeoDB."
);
}
@Override
protected NativeSQLStatement createNativeDimensionSQL() {
throw new UnsupportedOperationException(
"Method ST_Dimension() is not implemented in the current version of GeoDB."
);
}
@Override
protected NativeSQLStatement createNativeDisjointStatement(Geometry geom) {
return createNativeSQLStatementAllWKTParams(
"select t.id, ST_Disjoint(t.geom, ST_GeomFromText(?, 4326)) from GEOMTEST t where ST_Disjoint(t.geom, ST_GeomFromText(?, 4326)) = 1",
geom.toText()
);
}
@Override
protected NativeSQLStatement createNativeTransformStatement(int epsg) {
throw new UnsupportedOperationException();
}
@Override
protected NativeSQLStatement createNativeHavingSRIDStatement(int srid) {
return createNativeSQLStatement( "select t.id, (st_srid(t.geom) = " + srid + ") from GeomTest t where ST_SRID(t.geom) = " + srid );
}
@Override
protected NativeSQLStatement createNativeDistanceStatement(Geometry geom) {
return createNativeSQLStatementAllWKTParams(
"select t.id, st_distance(t.geom, ST_GeomFromText(?, 4326)) from GeomTest t where ST_SRID(t.geom) = 4326",
geom.toText()
);
}
@Override
protected NativeSQLStatement createNativeEnvelopeStatement() {
return createNativeSQLStatement( "select id, ST_Envelope(geom) from GEOMTEST" );
}
@Override
protected NativeSQLStatement createNativeEqualsStatement(Geometry geom) {
return createNativeSQLStatementAllWKTParams(
"select t.id, ST_Equals(t.geom, ST_GeomFromText(?, 4326)) from GEOMTEST t where ST_Equals(t.geom, ST_GeomFromText(?, 4326)) = 1",
geom.toText()
);
}
@Override
protected NativeSQLStatement createNativeFilterStatement(Geometry geom) {
throw new UnsupportedOperationException(
"Method ST_MBRIntersects() is not implemented in the current version of GeoDB."
);
}
@Override
protected NativeSQLStatement createNativeGeomUnionStatement(Geometry geom) {
throw new UnsupportedOperationException(
"Method ST_GeomUnion() is not implemented in the current version of GeoDB."
);
}
@Override
protected NativeSQLStatement createNativeGeometryTypeStatement() {
return createNativeSQLStatement( "select id, GeometryType(geom) from GEOMTEST" );
}
@Override
protected NativeSQLStatement createNativeIntersectionStatement(Geometry geom) {
throw new UnsupportedOperationException(
"Method ST_Intersection() is not implemented in the current version of GeoDB."
);
}
@Override
protected NativeSQLStatement createNativeIntersectsStatement(Geometry geom) {
return createNativeSQLStatementAllWKTParams(
"select t.id, ST_Intersects(t.geom, ST_GeomFromText(?, 4326)) from GEOMTEST t where ST_Intersects(t.geom, ST_GeomFromText(?, 4326)) = 1",
geom.toText()
);
}
@Override
protected NativeSQLStatement createNativeIsEmptyStatement() {
return createNativeSQLStatement( "select id, ST_IsEmpty(geom) from GEOMTEST" );
}
@Override
protected NativeSQLStatement createNativeIsNotEmptyStatement() {
return createNativeSQLStatement( "select id, not ST_IsEmpty(geom) from GEOMTEST" );
}
@Override
protected NativeSQLStatement createNativeIsSimpleStatement() {
return createNativeSQLStatement( "select id, ST_IsSimple(geom) from GEOMTEST" );
}
@Override
protected NativeSQLStatement createNativeOverlapsStatement(Geometry geom) {
return createNativeSQLStatementAllWKTParams(
"select t.id, ST_Overlaps(t.geom, ST_GeomFromText(?, 4326)) from GEOMTEST t where ST_Overlaps(t.geom, ST_GeomFromText(?, 4326)) = 1",
geom.toText()
);
}
@Override
protected NativeSQLStatement createNativeRelateStatement(Geometry geom,
String matrix) {
throw new UnsupportedOperationException(
"Method ST_Relate() is not implemented in the current version of GeoDB."
);
}
@Override
protected NativeSQLStatement createNativeDwithinStatement(Point geom, double distance) {
String sql = "select t.id, st_dwithin(t.geom, ST_GeomFromText(?, 4326), " + distance + " ) from GeomTest t where st_dwithin(t.geom, ST_GeomFromText(?, 4326), " + distance + ") = 'true' and ST_SRID(t.geom) = 4326";
return createNativeSQLStatementAllWKTParams( sql, geom.toText() );
}
/*
* (non-Javadoc)
*
* @seeorg.hibernatespatial.test.AbstractExpectationsFactory#
* createNativeSridStatement()
*/
@Override
protected NativeSQLStatement createNativeSridStatement() {
return createNativeSQLStatement( "select id, ST_SRID(geom) from GEOMTEST" );
}
@Override
protected NativeSQLStatement createNativeSymDifferenceStatement(
Geometry geom) {
throw new UnsupportedOperationException(
"Method ST_SymDifference() is not implemented in the current version of GeoDB."
);
}
@Override
protected NativeSQLStatement createNativeTouchesStatement(Geometry geom) {
return createNativeSQLStatementAllWKTParams(
"select t.id, ST_Touches(t.geom, ST_GeomFromText(?, 4326)) from GEOMTEST t where ST_Touches(t.geom, ST_GeomFromText(?, 4326)) = 1",
geom.toText()
);
}
@Override
protected NativeSQLStatement createNativeWithinStatement(
Geometry testPolygon) {
return createNativeSQLStatementAllWKTParams(
"select t.id, ST_Within(t.geom, ST_GeomFromText(?, 4326)) from GEOMTEST t where ST_Within(t.geom, ST_GeomFromText(?, 4326)) = 1 and ST_SRID(t.geom) = 4326",
testPolygon.toText()
);
}
@Override
protected Geometry decode(Object o) {
return JTS.to( Wkb.fromWkb( ByteBuffer.from( (byte[]) o ) ) );
}
}
| 1fechner/FeatureExtractor | sources/FeatureExtractor/lib/hibernate-release-5.1.0.Final/project/hibernate-spatial/src/test/java/org/hibernate/spatial/testing/dialects/h2geodb/GeoDBNoSRIDExpectationsFactory.java | Java | lgpl-2.1 | 8,367 |
// in all regexp "\" must be replaced by "\\"
var datas= {
"default": { // the name of this definition group. It's posisble to have different rules inside the same definition file
"REGEXP": { "before_word": "[^a-zA-Z0-9_]|^" // \\s|\\.|
,"possible_words_letters": "[a-zA-Z0-9_]+"
,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$"
,"prefix_separator": "\\.|->"
}
,"CASE_SENSITIVE": true
,"MAX_TEXT_LENGTH": 100 // the length of the text being analyzed before the cursor position
,"KEYWORDS": [
// [
// 0 : the keyword the user is typing
// 1 : the string inserted in code ("{_@_}" being the new position of the cursor)
// 2 : the needed prefix
// 3 : the text the appear in the suggestion box (if empty, the string to insert will be displayed
['Array', 'Array()', '', 'alert( String message )']
,['alert', 'alert({_@_})', '', 'alert(message)']
,['ascrollTo', 'scrollTo({_@_})', '', 'scrollTo(x,y)']
,['alert', 'alert({_@_},bouh);', '', 'alert(message, message2)']
,['aclose', 'close({_@_})', '', 'alert(message)']
,['aconfirm', 'confirm({_@_})', '', 'alert(message)']
,['aonfocus', 'onfocus', '', '']
,['aonerror', 'onerror', '', 'blabla']
,['aonerror', 'onerror', '', '']
,['window', '', '', '']
,['location', 'location', 'window', '']
,['document', 'document', 'window', '']
,['href', 'href', 'location', '']
]
}
};
// the second identifier must be the same as the one of the syntax coloring definition file
EditArea_autocompletion._load_auto_complete_file( datas, "php" ); | cdolivet/EditArea | _devel/old_autocompletion/autocompletion_files/php.js | JavaScript | lgpl-2.1 | 1,656 |
# This file is part of the GOsa framework.
#
# http://gosa-project.org
#
# Copyright:
# (C) 2016 GONICUS GmbH, Germany, http://www.gonicus.de
#
# See the LICENSE file in the project's top-level directory for details.
import pkg_resources
from gosa.common.components import PluginRegistry
from gosa.common.utils import N_
from gosa.common.error import GosaErrorHandler as C
# Register the errors handled by us
C.register_codes(dict(
BACKEND_NOT_FOUND=N_("Backend '%(topic)s' not found"),
))
class ObjectBackendRegistry(object):
instance = None
backends = {}
uuidAttr = "entryUUID"
__index = None
def __init__(self):
# Load available backends
for entry in pkg_resources.iter_entry_points("gosa.object.backend"):
clazz = entry.load()
ObjectBackendRegistry.backends[clazz.__name__] = clazz()
def dn2uuid(self, backend, dn, from_db_only=False):
uuid = ObjectBackendRegistry.backends[backend].dn2uuid(dn)
if uuid is None and from_db_only is True:
# fallback to db
if self.__index is None:
self.__index = PluginRegistry.getInstance("ObjectIndex")
res = self.__index.search({'dn': dn}, {'uuid': 1})
if len(res) == 1:
uuid = res[0]['_uuid']
return uuid
def uuid2dn(self, backend, uuid, from_db_only=False):
dn = ObjectBackendRegistry.backends[backend].uuid2dn(uuid)
if dn is None and from_db_only is True:
# fallback to db
if self.__index is None:
self.__index = PluginRegistry.getInstance("ObjectIndex")
res = self.__index.search({'uuid': uuid}, {'dn': 1})
if len(res) == 1:
dn = res[0]['dn']
return dn
def get_timestamps(self, backend, dn):
return ObjectBackendRegistry.backends[backend].get_timestamps(dn)
@staticmethod
def getInstance():
if not ObjectBackendRegistry.instance:
ObjectBackendRegistry.instance = ObjectBackendRegistry()
return ObjectBackendRegistry.instance
@staticmethod
def getBackend(name):
if not name in ObjectBackendRegistry.backends:
raise ValueError(C.make_error("BACKEND_NOT_FOUND", name))
return ObjectBackendRegistry.backends[name]
| gonicus/gosa | backend/src/gosa/backend/objects/backend/registry.py | Python | lgpl-2.1 | 2,337 |
/*
* Created on 17-dic-2005
*
* TODO To change the template for this generated file go to Window -
* Preferences - Java - Code Style - Code Templates
*/
package org.herac.tuxguitar.gui.actions.transport;
import org.eclipse.swt.events.TypedEvent;
import org.herac.tuxguitar.gui.TuxGuitar;
import org.herac.tuxguitar.gui.actions.Action;
/**
* @author julian
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class TransportStopAction extends Action {
public static final String NAME = "action.transport.stop";
public TransportStopAction() {
super(NAME, AUTO_LOCK | AUTO_UNLOCK | AUTO_UPDATE | KEY_BINDING_AVAILABLE);
}
protected int execute(TypedEvent e) {
TuxGuitar.instance().getTransport().stop();
return 0;
}
}
| jfinkels/tuxguitar | src/main/java/org/herac/tuxguitar/gui/actions/transport/TransportStopAction.java | Java | lgpl-2.1 | 857 |
<?php
// Only one consumer per queue is allowed.
// Set $queue name to test exclusiveness
include(__DIR__ . '/config.php');
use PhpAmqpLib\Connection\AMQPStreamConnection;
$exchange = 'fanout_exclusive_example_exchange';
$queue = ''; // if empty let RabbitMQ create a queue name
// set a queue name and run multiple instances
// to test exclusiveness
$consumerTag = 'consumer' . getmypid();
$connection = new AMQPStreamConnection(HOST, PORT, USER, PASS, VHOST);
$channel = $connection->channel();
/*
name: $queue // should be unique in fanout exchange. Let RabbitMQ create
// a queue name for us
passive: false // don't check if a queue with the same name exists
durable: false // the queue will not survive server restarts
exclusive: true // the queue can not be accessed by other channels
auto_delete: true //the queue will be deleted once the channel is closed.
*/
list($queueName, ,) = $channel->queue_declare($queue, false, false, true, true);
/*
name: $exchange
type: direct
passive: false // don't check if a exchange with the same name exists
durable: false // the exchange will not survive server restarts
auto_delete: true //the exchange will be deleted once the channel is closed.
*/
$channel->exchange_declare($exchange, 'fanout', false, false, true);
$channel->queue_bind($queueName, $exchange);
/**
* @param \PhpAmqpLib\Message\AMQPMessage $message
*/
function process_message($message)
{
echo "\n--------\n";
echo $message->body;
echo "\n--------\n";
$message->delivery_info['channel']->basic_ack($message->delivery_info['delivery_tag']);
// Send a message with the string "quit" to cancel the consumer.
if ($message->body === 'quit') {
$message->delivery_info['channel']->basic_cancel($message->delivery_info['consumer_tag']);
}
}
/*
queue: Queue from where to get the messages
consumer_tag: Consumer identifier
no_local: Don't receive messages published by this consumer.
no_ack: Tells the server if the consumer will acknowledge the messages.
exclusive: Request exclusive consumer access, meaning only this consumer can access the queue
nowait: don't wait for a server response. In case of error the server will raise a channel
exception
callback: A PHP Callback
*/
$channel->basic_consume($queueName, $consumerTag, false, false, true, false, 'process_message');
/**
* @param \PhpAmqpLib\Channel\AMQPChannel $channel
* @param \PhpAmqpLib\Connection\AbstractConnection $connection
*/
function shutdown($channel, $connection)
{
$channel->close();
$connection->close();
}
register_shutdown_function('shutdown', $channel, $connection);
// Loop as long as the channel has callbacks registered
while (count($channel->callbacks)) {
$channel->wait();
}
| revinate/php-amqplib | demo/amqp_consumer_exclusive.php | PHP | lgpl-2.1 | 2,836 |
// <copyright file="AcmlLinearAlgebraProvider.float.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
// http://mathnetnumerics.codeplex.com
//
// Copyright (c) 2009-2011 Math.NET
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
// </copyright>
namespace MathNet.Numerics.Algorithms.LinearAlgebra.Acml
{
using System;
using System.Security;
using Properties;
/// <summary>
/// AMD Core Math Library (ACML) linear algebra provider.
/// </summary>
public partial class AcmlLinearAlgebraProvider
{
/// <summary>
/// Computes the dot product of x and y.
/// </summary>
/// <param name="x">The vector x.</param>
/// <param name="y">The vector y.</param>
/// <returns>The dot product of x and y.</returns>
/// <remarks>This is equivalent to the DOT BLAS routine.</remarks>
[SecuritySafeCritical]
public override float DotProduct(float[] x, float[] y)
{
if (y == null)
{
throw new ArgumentNullException("y");
}
if (x == null)
{
throw new ArgumentNullException("x");
}
if (x.Length != y.Length)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength);
}
return SafeNativeMethods.s_dot_product(x.Length, x, y);
}
/// <summary>
/// Adds a scaled vector to another: <c>result = y + alpha*x</c>.
/// </summary>
/// <param name="y">The vector to update.</param>
/// <param name="alpha">The value to scale <paramref name="x"/> by.</param>
/// <param name="x">The vector to add to <paramref name="y"/>.</param>
/// <param name="result">The result of the addition.</param>
/// <remarks>This is similar to the AXPY BLAS routine.</remarks>
[SecuritySafeCritical]
public override void AddVectorToScaledVector(float[] y, float alpha, float[] x, float[] result)
{
if (y == null)
{
throw new ArgumentNullException("y");
}
if (x == null)
{
throw new ArgumentNullException("x");
}
if (y.Length != x.Length)
{
throw new ArgumentException(Resources.ArgumentVectorsSameLength);
}
if (!ReferenceEquals(y, result))
{
Array.Copy(y, 0, result, 0, y.Length);
}
if (alpha == 0.0f)
{
return;
}
SafeNativeMethods.s_axpy(y.Length, alpha, x, result);
}
/// <summary>
/// Scales an array. Can be used to scale a vector and a matrix.
/// </summary>
/// <param name="alpha">The scalar.</param>
/// <param name="x">The values to scale.</param>
/// <param name="result">This result of the scaling.</param>
/// <remarks>This is similar to the SCAL BLAS routine.</remarks>
[SecuritySafeCritical]
public override void ScaleArray(float alpha, float[] x, float[] result)
{
if (x == null)
{
throw new ArgumentNullException("x");
}
if (!ReferenceEquals(x, result))
{
Array.Copy(x, 0, result, 0, x.Length);
}
if (alpha == 1.0f)
{
return;
}
SafeNativeMethods.s_scale(x.Length, alpha, result);
}
/// <summary>
/// Multiples two matrices. <c>result = x * y</c>
/// </summary>
/// <param name="x">The x matrix.</param>
/// <param name="rowsX">The number of rows in the x matrix.</param>
/// <param name="columnsX">The number of columns in the x matrix.</param>
/// <param name="y">The y matrix.</param>
/// <param name="rowsY">The number of rows in the y matrix.</param>
/// <param name="columnsY">The number of columns in the y matrix.</param>
/// <param name="result">Where to store the result of the multiplication.</param>
/// <remarks>This is a simplified version of the BLAS GEMM routine with alpha
/// set to 1.0f and beta set to 0.0f, and x and y are not transposed.</remarks>
public override void MatrixMultiply(float[] x, int rowsX, int columnsX, float[] y, int rowsY, int columnsY, float[] result)
{
MatrixMultiplyWithUpdate(Transpose.DontTranspose, Transpose.DontTranspose, 1.0f, x, rowsX, columnsX, y, rowsY, columnsY, 0.0f, result);
}
/// <summary>
/// Multiplies two matrices and updates another with the result. <c>c = alpha*op(a)*op(b) + beta*c</c>
/// </summary>
/// <param name="transposeA">How to transpose the <paramref name="a"/> matrix.</param>
/// <param name="transposeB">How to transpose the <paramref name="b"/> matrix.</param>
/// <param name="alpha">The value to scale <paramref name="a"/> matrix.</param>
/// <param name="a">The a matrix.</param>
/// <param name="rowsA">The number of rows in the <paramref name="a"/> matrix.</param>
/// <param name="columnsA">The number of columns in the <paramref name="a"/> matrix.</param>
/// <param name="b">The b matrix</param>
/// <param name="rowsB">The number of rows in the <paramref name="b"/> matrix.</param>
/// <param name="columnsB">The number of columns in the <paramref name="b"/> matrix.</param>
/// <param name="beta">The value to scale the <paramref name="c"/> matrix.</param>
/// <param name="c">The c matrix.</param>
[SecuritySafeCritical]
public override void MatrixMultiplyWithUpdate(Transpose transposeA, Transpose transposeB, float alpha, float[] a, int rowsA, int columnsA, float[] b, int rowsB, int columnsB, float beta, float[] c)
{
if (a == null)
{
throw new ArgumentNullException("a");
}
if (b == null)
{
throw new ArgumentNullException("b");
}
if (c == null)
{
throw new ArgumentNullException("c");
}
var m = transposeA == Transpose.DontTranspose ? rowsA : columnsA;
var n = transposeB == Transpose.DontTranspose ? columnsB : rowsB;
var k = transposeA == Transpose.DontTranspose ? columnsA : rowsA;
var l = transposeB == Transpose.DontTranspose ? rowsB : columnsB;
if (c.Length != m * n)
{
throw new ArgumentException(Resources.ArgumentMatrixDimensions);
}
if (k != l)
{
throw new ArgumentException(Resources.ArgumentMatrixDimensions);
}
SafeNativeMethods.s_matrix_multiply(transposeA, transposeB, m, n, k, alpha, a, b, beta, c);
}
/// <summary>
/// Computes the LUP factorization of A. P*A = L*U.
/// </summary>
/// <param name="data">An <paramref name="order"/> by <paramref name="order"/> matrix. The matrix is overwritten with the
/// the LU factorization on exit. The lower triangular factor L is stored in under the diagonal of <paramref name="data"/> (the diagonal is always 1.0f
/// for the L factor). The upper triangular factor U is stored on and above the diagonal of <paramref name="data"/>.</param>
/// <param name="order">The order of the square matrix <paramref name="data"/>.</param>
/// <param name="ipiv">On exit, it contains the pivot indices. The size of the array must be <paramref name="order"/>.</param>
/// <remarks>This is equivalent to the GETRF LAPACK routine.</remarks>
[SecuritySafeCritical]
public override void LUFactor(float[] data, int order, int[] ipiv)
{
if (data == null)
{
throw new ArgumentNullException("data");
}
if (ipiv == null)
{
throw new ArgumentNullException("ipiv");
}
if (data.Length != order * order)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "data");
}
if (ipiv.Length != order)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "ipiv");
}
SafeNativeMethods.s_lu_factor(order, data, ipiv);
}
/// <summary>
/// Computes the inverse of matrix using LU factorization.
/// </summary>
/// <param name="a">The N by N matrix to invert. Contains the inverse On exit.</param>
/// <param name="order">The order of the square matrix <paramref name="a"/>.</param>
/// <remarks>This is equivalent to the GETRF and GETRI LAPACK routines.</remarks>
[SecuritySafeCritical]
public override void LUInverse(float[] a, int order)
{
if (a == null)
{
throw new ArgumentNullException("a");
}
if (a.Length != order * order)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "a");
}
var work = new float[order];
SafeNativeMethods.s_lu_inverse(order, a, work, work.Length);
}
/// <summary>
/// Computes the inverse of a previously factored matrix.
/// </summary>
/// <param name="a">The LU factored N by N matrix. Contains the inverse On exit.</param>
/// <param name="order">The order of the square matrix <paramref name="a"/>.</param>
/// <param name="ipiv">The pivot indices of <paramref name="a"/>.</param>
/// <remarks>This is equivalent to the GETRI LAPACK routine.</remarks>
[SecuritySafeCritical]
public override void LUInverseFactored(float[] a, int order, int[] ipiv)
{
if (a == null)
{
throw new ArgumentNullException("a");
}
if (ipiv == null)
{
throw new ArgumentNullException("ipiv");
}
if (a.Length != order * order)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "a");
}
if (ipiv.Length != order)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "ipiv");
}
var work = new float[order];
SafeNativeMethods.s_lu_inverse_factored(order, a, ipiv, work, order);
}
/// <summary>
/// Computes the inverse of matrix using LU factorization.
/// </summary>
/// <param name="a">The N by N matrix to invert. Contains the inverse On exit.</param>
/// <param name="order">The order of the square matrix <paramref name="a"/>.</param>
/// <param name="work">The work array. The array must have a length of at least N,
/// but should be N*blocksize. The blocksize is machine dependent. On exit, work[0] contains the optimal
/// work size value.</param>
/// <remarks>This is equivalent to the GETRF and GETRI LAPACK routines.</remarks>
[SecuritySafeCritical]
public override void LUInverse(float[] a, int order, float[] work)
{
if (a == null)
{
throw new ArgumentNullException("a");
}
if (a.Length != order * order)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "a");
}
if (work == null)
{
throw new ArgumentNullException("work");
}
if (work.Length < order)
{
throw new ArgumentException(Resources.WorkArrayTooSmall, "work");
}
SafeNativeMethods.s_lu_inverse(order, a, work, work.Length);
}
/// <summary>
/// Computes the inverse of a previously factored matrix.
/// </summary>
/// <param name="a">The LU factored N by N matrix. Contains the inverse On exit.</param>
/// <param name="order">The order of the square matrix <paramref name="a"/>.</param>
/// <param name="ipiv">The pivot indices of <paramref name="a"/>.</param>
/// <param name="work">The work array. The array must have a length of at least N,
/// but should be N*blocksize. The blocksize is machine dependent. On exit, work[0] contains the optimal
/// work size value.</param>
/// <remarks>This is equivalent to the GETRI LAPACK routine.</remarks>
[SecuritySafeCritical]
public override void LUInverseFactored(float[] a, int order, int[] ipiv, float[] work)
{
if (a == null)
{
throw new ArgumentNullException("a");
}
if (ipiv == null)
{
throw new ArgumentNullException("ipiv");
}
if (a.Length != order * order)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "a");
}
if (ipiv.Length != order)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "ipiv");
}
if (work == null)
{
throw new ArgumentNullException("work");
}
if (work.Length < order)
{
throw new ArgumentException(Resources.WorkArrayTooSmall, "work");
}
SafeNativeMethods.s_lu_inverse_factored(order, a, ipiv, work, order);
}
/// <summary>
/// Solves A*X=B for X using LU factorization.
/// </summary>
/// <param name="columnsOfB">The number of columns of B.</param>
/// <param name="a">The square matrix A.</param>
/// <param name="order">The order of the square matrix <paramref name="a"/>.</param>
/// <param name="b">On entry the B matrix; on exit the X matrix.</param>
/// <remarks>This is equivalent to the GETRF and GETRS LAPACK routines.</remarks>
[SecuritySafeCritical]
public override void LUSolve(int columnsOfB, float[] a, int order, float[] b)
{
if (a == null)
{
throw new ArgumentNullException("a");
}
if (a.Length != order * order)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "a");
}
if (b.Length != columnsOfB * order)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "b");
}
if (ReferenceEquals(a, b))
{
throw new ArgumentException(Resources.ArgumentReferenceDifferent);
}
SafeNativeMethods.s_lu_solve(order, columnsOfB, a, b);
}
/// <summary>
/// Solves A*X=B for X using a previously factored A matrix.
/// </summary>
/// <param name="columnsOfB">The number of columns of B.</param>
/// <param name="a">The factored A matrix.</param>
/// <param name="order">The order of the square matrix <paramref name="a"/>.</param>
/// <param name="ipiv">The pivot indices of <paramref name="a"/>.</param>
/// <param name="b">On entry the B matrix; on exit the X matrix.</param>
/// <remarks>This is equivalent to the GETRS LAPACK routine.</remarks>
[SecuritySafeCritical]
public override void LUSolveFactored(int columnsOfB, float[] a, int order, int[] ipiv, float[] b)
{
if (a == null)
{
throw new ArgumentNullException("a");
}
if (ipiv == null)
{
throw new ArgumentNullException("ipiv");
}
if (a.Length != order * order)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "a");
}
if (ipiv.Length != order)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "ipiv");
}
if (b.Length != columnsOfB * order)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "b");
}
if (ReferenceEquals(a, b))
{
throw new ArgumentException(Resources.ArgumentReferenceDifferent);
}
SafeNativeMethods.s_lu_solve_factored(order, columnsOfB, a, ipiv, b);
}
/// <summary>
/// Computes the Cholesky factorization of A.
/// </summary>
/// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the
/// the Cholesky factorization.</param>
/// <param name="order">The number of rows or columns in the matrix.</param>
/// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks>
[SecuritySafeCritical]
public override void CholeskyFactor(float[] a, int order)
{
if (a == null)
{
throw new ArgumentNullException("a");
}
if (order < 1)
{
throw new ArgumentException(Resources.ArgumentMustBePositive, "order");
}
if (a.Length != order * order)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "a");
}
var info = SafeNativeMethods.s_cholesky_factor(order, a);
if (info > 0)
{
throw new ArgumentException(Resources.ArgumentMatrixPositiveDefinite);
}
}
/// <summary>
/// Solves A*X=B for X using Cholesky factorization.
/// </summary>
/// <param name="a">The square, positive definite matrix A.</param>
/// <param name="orderA">The number of rows and columns in A.</param>
/// <param name="b">On entry the B matrix; on exit the X matrix.</param>
/// <param name="columnsB">The number of columns in the B matrix.</param>
/// <remarks>This is equivalent to the POTRF add POTRS LAPACK routines.
/// </remarks>
[SecuritySafeCritical]
public override void CholeskySolve(float[] a, int orderA, float[] b, int columnsB)
{
if (a == null)
{
throw new ArgumentNullException("a");
}
if (b == null)
{
throw new ArgumentNullException("b");
}
if (b.Length != orderA * columnsB)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "b");
}
if (ReferenceEquals(a, b))
{
throw new ArgumentException(Resources.ArgumentReferenceDifferent);
}
SafeNativeMethods.s_cholesky_solve(orderA, columnsB, a, b);
}
/// <summary>
/// Solves A*X=B for X using a previously factored A matrix.
/// </summary>
/// <param name="a">The square, positive definite matrix A.</param>
/// <param name="orderA">The number of rows and columns in A.</param>
/// <param name="b">On entry the B matrix; on exit the X matrix.</param>
/// <param name="columnsB">The number of columns in the B matrix.</param>
/// <remarks>This is equivalent to the POTRS LAPACK routine.</remarks>
[SecuritySafeCritical]
public override void CholeskySolveFactored(float[] a, int orderA, float[] b, int columnsB)
{
if (a == null)
{
throw new ArgumentNullException("a");
}
if (b == null)
{
throw new ArgumentNullException("b");
}
if (b.Length != orderA * columnsB)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "b");
}
if (ReferenceEquals(a, b))
{
throw new ArgumentException(Resources.ArgumentReferenceDifferent);
}
SafeNativeMethods.s_cholesky_solve_factored(orderA, columnsB, a, b);
}
/// <summary>
/// Computes the QR factorization of A.
/// </summary>
/// <param name="r">On entry, it is the M by N A matrix to factor. On exit,
/// it is overwritten with the R matrix of the QR factorization. </param>
/// <param name="rowsR">The number of rows in the A matrix.</param>
/// <param name="columnsR">The number of columns in the A matrix.</param>
/// <param name="q">On exit, A M by M matrix that holds the Q matrix of the
/// QR factorization.</param>
/// <param name="tau">A min(m,n) vector. On exit, contains additional information
/// to be used by the QR solve routine.</param>
/// <remarks>This is similar to the GEQRF and ORGQR LAPACK routines.</remarks>
[SecuritySafeCritical]
public override void QRFactor(float[] r, int rowsR, int columnsR, float[] q, float[] tau)
{
if (r == null)
{
throw new ArgumentNullException("r");
}
if (q == null)
{
throw new ArgumentNullException("q");
}
if (r.Length != rowsR * columnsR)
{
throw new ArgumentException(string.Format(Resources.ArgumentArrayWrongLength, "rowsR * columnsR"), "r");
}
if (tau.Length < Math.Min(rowsR, columnsR))
{
throw new ArgumentException(string.Format(Resources.ArrayTooSmall, "min(m,n)"), "tau");
}
if (q.Length != rowsR * rowsR)
{
throw new ArgumentException(string.Format(Resources.ArgumentArrayWrongLength, "rowsR * rowsR"), "q");
}
var work = new float[columnsR * Control.BlockSize];
SafeNativeMethods.s_qr_factor(rowsR, columnsR, r, tau, q, work, work.Length);
}
/// <summary>
/// Computes the QR factorization of A.
/// </summary>
/// <param name="r">On entry, it is the M by N A matrix to factor. On exit,
/// it is overwritten with the R matrix of the QR factorization. </param>
/// <param name="rowsR">The number of rows in the A matrix.</param>
/// <param name="columnsR">The number of columns in the A matrix.</param>
/// <param name="q">On exit, A M by M matrix that holds the Q matrix of the
/// QR factorization.</param>
/// <param name="tau">A min(m,n) vector. On exit, contains additional information
/// to be used by the QR solve routine.</param>
/// <param name="work">The work array. The array must have a length of at least N,
/// but should be N*blocksize. The blocksize is machine dependent. On exit, work[0] contains the optimal
/// work size value.</param>
/// <remarks>This is similar to the GEQRF and ORGQR LAPACK routines.</remarks>
[SecuritySafeCritical]
public override void QRFactor(float[] r, int rowsR, int columnsR, float[] q, float[] tau, float[] work)
{
if (r == null)
{
throw new ArgumentNullException("r");
}
if (q == null)
{
throw new ArgumentNullException("q");
}
if (work == null)
{
throw new ArgumentNullException("work");
}
if (r.Length != rowsR * columnsR)
{
throw new ArgumentException(string.Format(Resources.ArgumentArrayWrongLength, "rowsR * columnsR"), "r");
}
if (tau.Length < Math.Min(rowsR, columnsR))
{
throw new ArgumentException(string.Format(Resources.ArrayTooSmall, "min(m,n)"), "tau");
}
if (q.Length != rowsR * rowsR)
{
throw new ArgumentException(string.Format(Resources.ArgumentArrayWrongLength, "rowsR * rowsR"), "q");
}
if (work.Length < columnsR * Control.BlockSize)
{
work[0] = columnsR * Control.BlockSize;
throw new ArgumentException(Resources.WorkArrayTooSmall, "work");
}
SafeNativeMethods.s_qr_factor(rowsR, columnsR, r, tau, q, work, work.Length);
}
/// <summary>
/// Solves A*X=B for X using QR factorization of A.
/// </summary>
/// <param name="a">The A matrix.</param>
/// <param name="rows">The number of rows in the A matrix.</param>
/// <param name="columns">The number of columns in the A matrix.</param>
/// <param name="b">The B matrix.</param>
/// <param name="columnsB">The number of columns of B.</param>
/// <param name="x">On exit, the solution matrix.</param>
/// <remarks>Rows must be greater or equal to columns.</remarks>
public override void QRSolve(float[] a, int rows, int columns, float[] b, int columnsB, float[] x)
{
if (a == null)
{
throw new ArgumentNullException("a");
}
if (b == null)
{
throw new ArgumentNullException("b");
}
if (x == null)
{
throw new ArgumentNullException("x");
}
if (a.Length != rows * columns)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "a");
}
if (b.Length != rows * columnsB)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "b");
}
if (x.Length != columns * columnsB)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "x");
}
if (rows < columns)
{
throw new ArgumentException(Resources.RowsLessThanColumns);
}
var work = new float[columns * Control.BlockSize];
QRSolve(a, rows, columns, b, columnsB, x, work);
}
/// <summary>
/// Solves A*X=B for X using QR factorization of A.
/// </summary>
/// <param name="a">The A matrix.</param>
/// <param name="rows">The number of rows in the A matrix.</param>
/// <param name="columns">The number of columns in the A matrix.</param>
/// <param name="b">The B matrix.</param>
/// <param name="columnsB">The number of columns of B.</param>
/// <param name="x">On exit, the solution matrix.</param>
/// <param name="work">The work array. The array must have a length of at least N,
/// but should be N*blocksize. The blocksize is machine dependent. On exit, work[0] contains the optimal
/// work size value.</param>
/// <remarks>Rows must be greater or equal to columns.</remarks>
public override void QRSolve(float[] a, int rows, int columns, float[] b, int columnsB, float[] x, float[] work)
{
if (a == null)
{
throw new ArgumentNullException("a");
}
if (b == null)
{
throw new ArgumentNullException("b");
}
if (x == null)
{
throw new ArgumentNullException("x");
}
if (work == null)
{
throw new ArgumentNullException("work");
}
if (a.Length != rows * columns)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "a");
}
if (b.Length != rows * columnsB)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "b");
}
if (x.Length != columns * columnsB)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "x");
}
if (rows < columns)
{
throw new ArgumentException(Resources.RowsLessThanColumns);
}
if (work.Length < 1)
{
work[0] = rows * Control.BlockSize;
throw new ArgumentException(Resources.WorkArrayTooSmall, "work");
}
SafeNativeMethods.s_qr_solve(rows, columns, columnsB, a, b, x, work, work.Length);
}
/// <summary>
/// Solves A*X=B for X using a previously QR factored matrix.
/// </summary>
/// <param name="q">The Q matrix obtained by calling <see cref="QRFactor(float[],int,int,float[],float[])"/>.</param>
/// <param name="r">The R matrix obtained by calling <see cref="QRFactor(float[],int,int,float[],float[])"/>. </param>
/// <param name="rowsR">The number of rows in the A matrix.</param>
/// <param name="columnsR">The number of columns in the A matrix.</param>
/// <param name="tau">Contains additional information on Q. Only used for the native solver
/// and can be <c>null</c> for the managed provider.</param>
/// <param name="b">The B matrix.</param>
/// <param name="columnsB">The number of columns of B.</param>
/// <param name="x">On exit, the solution matrix.</param>
/// <remarks>Rows must be greater or equal to columns.</remarks>
[SecuritySafeCritical]
public override void QRSolveFactored(float[] q, float[] r, int rowsR, int columnsR, float[] tau, float[] b, int columnsB, float[] x)
{
if (r == null)
{
throw new ArgumentNullException("r");
}
if (q == null)
{
throw new ArgumentNullException("q");
}
if (b == null)
{
throw new ArgumentNullException("q");
}
if (x == null)
{
throw new ArgumentNullException("q");
}
if (r.Length != rowsR * columnsR)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "r");
}
if (q.Length != rowsR * rowsR)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "q");
}
if (b.Length != rowsR * columnsB)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "b");
}
if (x.Length != columnsR * columnsB)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "x");
}
if (rowsR < columnsR)
{
throw new ArgumentException(Resources.RowsLessThanColumns);
}
var work = new float[columnsR * Control.BlockSize];
QRSolveFactored(q, r, rowsR, columnsR, tau, b, columnsB, x, work);
}
/// <summary>
/// Solves A*X=B for X using a previously QR factored matrix.
/// </summary>
/// <param name="q">The Q matrix obtained by QR factor. This is only used for the managed provider and can be
/// <c>null</c> for the native provider. The native provider uses the Q portion stored in the R matrix.</param>
/// <param name="r">The R matrix obtained by calling <see cref="QRFactor(float[],int,int,float[],float[])"/>. </param>
/// <param name="rowsR">The number of rows in the A matrix.</param>
/// <param name="columnsR">The number of columns in the A matrix.</param>
/// <param name="tau">Contains additional information on Q. Only used for the native solver
/// and can be <c>null</c> for the managed provider.</param>
/// <param name="b">On entry the B matrix; on exit the X matrix.</param>
/// <param name="columnsB">The number of columns of B.</param>
/// <param name="x">On exit, the solution matrix.</param>
/// <param name="work">The work array - only used in the native provider. The array must have a length of at least N,
/// but should be N*blocksize. The blocksize is machine dependent. On exit, work[0] contains the optimal
/// work size value.</param>
/// <remarks>Rows must be greater or equal to columns.</remarks>
public override void QRSolveFactored(float[] q, float[] r, int rowsR, int columnsR, float[] tau, float[] b, int columnsB, float[] x, float[] work)
{
if (r == null)
{
throw new ArgumentNullException("r");
}
if (q == null)
{
throw new ArgumentNullException("q");
}
if (b == null)
{
throw new ArgumentNullException("q");
}
if (x == null)
{
throw new ArgumentNullException("q");
}
if (work == null)
{
throw new ArgumentNullException("work");
}
if (r.Length != rowsR * columnsR)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "r");
}
if (q.Length != rowsR * rowsR)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "q");
}
if (b.Length != rowsR * columnsB)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "b");
}
if (x.Length != columnsR * columnsB)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "x");
}
if (rowsR < columnsR)
{
throw new ArgumentException(Resources.RowsLessThanColumns);
}
if (work.Length < 1)
{
work[0] = rowsR * Control.BlockSize;
throw new ArgumentException(Resources.WorkArrayTooSmall, "work");
}
SafeNativeMethods.s_qr_solve_factored(rowsR, columnsR, columnsB, r, b, tau, x, work, work.Length);
}
/// <summary>
/// Computes the singular value decomposition of A.
/// </summary>
/// <param name="computeVectors">Compute the singular U and VT vectors or not.</param>
/// <param name="a">On entry, the M by N matrix to decompose. On exit, A may be overwritten.</param>
/// <param name="rowsA">The number of rows in the A matrix.</param>
/// <param name="columnsA">The number of columns in the A matrix.</param>
/// <param name="s">The singular values of A in ascending value.</param>
/// <param name="u">If <paramref name="computeVectors"/> is <c>true</c>, on exit U contains the left
/// singular vectors.</param>
/// <param name="vt">If <paramref name="computeVectors"/> is <c>true</c>, on exit VT contains the transposed
/// right singular vectors.</param>
/// <remarks>This is equivalent to the GESVD LAPACK routine.</remarks>
[SecuritySafeCritical]
public override void SingularValueDecomposition(bool computeVectors, float[] a, int rowsA, int columnsA, float[] s, float[] u, float[] vt)
{
if (a == null)
{
throw new ArgumentNullException("a");
}
if (s == null)
{
throw new ArgumentNullException("s");
}
if (u == null)
{
throw new ArgumentNullException("u");
}
if (vt == null)
{
throw new ArgumentNullException("vt");
}
if (u.Length != rowsA * rowsA)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "u");
}
if (vt.Length != columnsA * columnsA)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "vt");
}
if (s.Length != Math.Min(rowsA, columnsA))
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "s");
}
var work = new float[Math.Max(((3 * Math.Min(rowsA, columnsA)) + Math.Max(rowsA, columnsA)), 5 * Math.Min(rowsA, columnsA))];
SingularValueDecomposition(computeVectors, a, rowsA, columnsA, s, u, vt, work);
}
/// <summary>
/// Solves A*X=B for X using the singular value decomposition of A.
/// </summary>
/// <param name="a">On entry, the M by N matrix to decompose.</param>
/// <param name="rowsA">The number of rows in the A matrix.</param>
/// <param name="columnsA">The number of columns in the A matrix.</param>
/// <param name="b">The B matrix.</param>
/// <param name="columnsB">The number of columns of B.</param>
/// <param name="x">On exit, the solution matrix.</param>
public override void SvdSolve(float[] a, int rowsA, int columnsA, float[] b, int columnsB, float[] x)
{
if (a == null)
{
throw new ArgumentNullException("a");
}
if (b == null)
{
throw new ArgumentNullException("b");
}
if (x == null)
{
throw new ArgumentNullException("x");
}
if (b.Length != rowsA * columnsB)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "b");
}
if (x.Length != columnsA * columnsB)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "b");
}
var work = new float[Math.Max(((3 * Math.Min(rowsA, columnsA)) + Math.Max(rowsA, columnsA)), 5 * Math.Min(rowsA, columnsA))];
var s = new float[Math.Min(rowsA, columnsA)];
var u = new float[rowsA * rowsA];
var vt = new float[columnsA * columnsA];
var clone = new float[a.Length];
a.Copy(clone);
SingularValueDecomposition(true, clone, rowsA, columnsA, s, u, vt, work);
SvdSolveFactored(rowsA, columnsA, s, u, vt, b, columnsB, x);
}
/// <summary>
/// Computes the singular value decomposition of A.
/// </summary>
/// <param name="computeVectors">Compute the singular U and VT vectors or not.</param>
/// <param name="a">On entry, the M by N matrix to decompose. On exit, A may be overwritten.</param>
/// <param name="rowsA">The number of rows in the A matrix.</param>
/// <param name="columnsA">The number of columns in the A matrix.</param>
/// <param name="s">The singular values of A in ascending value.</param>
/// <param name="u">If <paramref name="computeVectors"/> is <c>true</c>, on exit U contains the left
/// singular vectors.</param>
/// <param name="vt">If <paramref name="computeVectors"/> is <c>true</c>, on exit VT contains the transposed
/// right singular vectors.</param>
/// <param name="work">The work array. For real matrices, the work array should be at least
/// Max(3*Min(M, N) + Max(M, N), 5*Min(M,N)). For complex matrices, 2*Min(M, N) + Max(M, N).
/// On exit, work[0] contains the optimal work size value.</param>
/// <remarks>This is equivalent to the GESVD LAPACK routine.</remarks>
[SecuritySafeCritical]
public override void SingularValueDecomposition(bool computeVectors, float[] a, int rowsA, int columnsA, float[] s, float[] u, float[] vt, float[] work)
{
if (a == null)
{
throw new ArgumentNullException("a");
}
if (s == null)
{
throw new ArgumentNullException("s");
}
if (u == null)
{
throw new ArgumentNullException("u");
}
if (vt == null)
{
throw new ArgumentNullException("vt");
}
if (work == null)
{
throw new ArgumentNullException("work");
}
if (u.Length != rowsA * rowsA)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "u");
}
if (vt.Length != columnsA * columnsA)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "vt");
}
if (s.Length != Math.Min(rowsA, columnsA))
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "s");
}
if (work.Length == 0)
{
throw new ArgumentException(Resources.ArgumentSingleDimensionArray, "work");
}
if (work.Length < Math.Max(((3 * Math.Min(rowsA, columnsA)) + Math.Max(rowsA, columnsA)), 5 * Math.Min(rowsA, columnsA)))
{
work[0] = Math.Max((3 * Math.Min(rowsA, columnsA)) + Math.Max(rowsA, columnsA), 5 * Math.Min(rowsA, columnsA));
throw new ArgumentException(Resources.WorkArrayTooSmall, "work");
}
SafeNativeMethods.s_svd_factor(computeVectors, rowsA, columnsA, a, s, u, vt, work, work.Length);
}
}
}
| Amichai/PhysicsPad | mathnetnumerics_b382b1690235/src/Numerics/Algorithms/LinearAlgebra/Acml/AcmlLinearAlgebraProvider.float.cs | C# | lgpl-2.1 | 43,092 |
import java.io.IOException;
import jade.core.AID;
import java.util.ArrayList;
import java.util.Scanner;
import jade.core.Agent;
public class DutchModel {
public static void main(String[] args) throws IOException {
String option="";
ArrayList<BiderAgent> bidders= new ArrayList<BiderAgent>();
System.out.println("Welcome to Fish Dutch Auction!");
System.out.println("Press 1 to sell a product.");
System.out.println("Press 2 to Bid for a product.");
Scanner scan= new Scanner(System.in);
option= scan.nextLine();
System.out.println(option);
if(option.equals("1"))
{
}
else if(option.equals("2"))
{
Loader bidderxml = new Loader("Bidders.xml");
bidders=bidderxml.loadXmlBidders();
Product p1= new Product("gg",1,"g1",null);
AuctioneerAgent Ag = new AuctioneerAgent(10,1,1200);
SellerAgent s1= new SellerAgent (p1);
AID sel = s1.getSellerAid();
Ag.setSellerAid(sel);
Ag.setup();
s1.setup();
}
else
{
System.out.println("Wrong input... Time Out!");
}
}
}
| joaofloressantos/Dutch_Auction | Dutch_Auction/src/DutchModel.java | Java | lgpl-2.1 | 1,221 |
/*
* Copyright (C) 2010 Herve Quiroz
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.trancecode.collection;
import com.google.common.base.Preconditions;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSet.Builder;
import com.google.common.collect.Iterables;
import java.util.Set;
/**
* Utility methods related to {@link Set}.
*
* @author Herve Quiroz
*/
public final class TcSets
{
public static <T> ImmutableSet<T> immutableSet(final Iterable<T> set, final T element)
{
Preconditions.checkNotNull(set);
Preconditions.checkNotNull(element);
if (set instanceof Set && ((Set<?>) set).contains(element))
{
return ImmutableSet.copyOf(set);
}
final Builder<T> builder = ImmutableSet.builder();
return builder.addAll(set).add(element).build();
}
public static <T> ImmutableSet<T> immutableSet(final Set<T> set1, final Set<T> set2)
{
Preconditions.checkNotNull(set1);
Preconditions.checkNotNull(set2);
if (set1.isEmpty())
{
return ImmutableSet.copyOf(set2);
}
if (set2.isEmpty())
{
return ImmutableSet.copyOf(set1);
}
final Builder<T> builder = ImmutableSet.builder();
return builder.addAll(set1).addAll(set2).build();
}
public static <T> ImmutableSet<T> immutableSetWithout(final Iterable<T> elements, final T element)
{
Preconditions.checkNotNull(elements);
Preconditions.checkNotNull(element);
if (elements instanceof Set && !((Set<?>) elements).contains(element))
{
return ImmutableSet.copyOf(elements);
}
return ImmutableSet.copyOf(Iterables.filter(elements, Predicates.not(Predicates.equalTo(element))));
}
private TcSets()
{
// No instantiation
}
}
| herve-quiroz/tc-common | src/main/java/org/trancecode/collection/TcSets.java | Java | lgpl-2.1 | 2,646 |
/**
* @file llviewerdisplayname.cpp
* @brief Wrapper for display name functionality
*
* $LicenseInfo:firstyear=2010&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include "llviewerprecompiledheaders.h"
#include "llviewerdisplayname.h"
// viewer includes
#include "llagent.h"
#include "llviewerregion.h"
#include "llvoavatar.h"
// library includes
#include "llavatarnamecache.h"
#include "llhttpclient.h"
#include "llhttpnode.h"
#include "llnotificationsutil.h"
#include "llui.h" // getLanguage()
#include "fsradar.h"
#include "lggcontactsets.h"
#include "llviewercontrol.h"
namespace LLViewerDisplayName
{
// Fired when viewer receives server response to display name change
set_name_signal_t sSetDisplayNameSignal;
// Fired when there is a change in the agent's name
name_changed_signal_t sNameChangedSignal;
void addNameChangedCallback(const name_changed_signal_t::slot_type& cb)
{
sNameChangedSignal.connect(cb);
}
void doNothing() { }
}
class LLSetDisplayNameResponder : public LLHTTPClient::Responder
{
public:
// only care about errors
/*virtual*/ void errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
LL_WARNS() << "LLSetDisplayNameResponder error [status:"
<< status << "]: " << content << LL_ENDL;
LLViewerDisplayName::sSetDisplayNameSignal(false, "", LLSD());
LLViewerDisplayName::sSetDisplayNameSignal.disconnect_all_slots();
}
};
void LLViewerDisplayName::set(const std::string& display_name, const set_name_slot_t& slot)
{
// TODO: simple validation here
LLViewerRegion* region = gAgent.getRegion();
llassert(region);
std::string cap_url = region->getCapability("SetDisplayName");
if (cap_url.empty())
{
// this server does not support display names, report error
slot(false, "unsupported", LLSD());
return;
}
// People API can return localized error messages. Indicate our
// language preference via header.
LLSD headers;
headers["Accept-Language"] = LLUI::getLanguage();
// People API requires both the old and new value to change a variable.
// Our display name will be in cache before the viewer's UI is available
// to request a change, so we can use direct lookup without callback.
LLAvatarName av_name;
if (!LLAvatarNameCache::get( gAgent.getID(), &av_name))
{
slot(false, "name unavailable", LLSD());
return;
}
// People API expects array of [ "old value", "new value" ]
LLSD change_array = LLSD::emptyArray();
change_array.append(av_name.getDisplayName());
change_array.append(display_name);
LL_INFOS() << "Set name POST to " << cap_url << LL_ENDL;
// Record our caller for when the server sends back a reply
sSetDisplayNameSignal.connect(slot);
// POST the requested change. The sim will not send a response back to
// this request directly, rather it will send a separate message after it
// communicates with the back-end.
LLSD body;
body["display_name"] = change_array;
LLHTTPClient::post(cap_url, body, new LLSetDisplayNameResponder, headers);
}
class LLSetDisplayNameReply : public LLHTTPNode
{
LOG_CLASS(LLSetDisplayNameReply);
public:
/*virtual*/ void post(
LLHTTPNode::ResponsePtr response,
const LLSD& context,
const LLSD& input) const
{
LLSD body = input["body"];
S32 status = body["status"].asInteger();
bool success = (status == 200);
std::string reason = body["reason"].asString();
LLSD content = body["content"];
LL_INFOS() << "status " << status << " reason " << reason << LL_ENDL;
// If viewer's concept of display name is out-of-date, the set request
// will fail with 409 Conflict. If that happens, fetch up-to-date
// name information.
if (status == 409)
{
LLUUID agent_id = gAgent.getID();
// Flush stale data
LLAvatarNameCache::erase( agent_id );
// Queue request for new data: nothing to do on callback though...
// Note: no need to disconnect the callback as it never gets out of scope
LLAvatarNameCache::get(agent_id, boost::bind(&LLViewerDisplayName::doNothing));
// Kill name tag, as it is wrong
LLVOAvatar::invalidateNameTag( agent_id );
}
// inform caller of result
LLViewerDisplayName::sSetDisplayNameSignal(success, reason, content);
LLViewerDisplayName::sSetDisplayNameSignal.disconnect_all_slots();
}
};
class LLDisplayNameUpdate : public LLHTTPNode
{
/*virtual*/ void post(
LLHTTPNode::ResponsePtr response,
const LLSD& context,
const LLSD& input) const
{
LLSD body = input["body"];
LLUUID agent_id = body["agent_id"];
std::string old_display_name = body["old_display_name"];
// By convention this record is called "agent" in the People API
LLSD name_data = body["agent"];
// Inject the new name data into cache
LLAvatarName av_name;
av_name.fromLLSD( name_data );
LL_INFOS() << "name-update now " << LLDate::now()
<< " next_update " << LLDate(av_name.mNextUpdate)
<< LL_ENDL;
// Name expiration time may be provided in headers, or we may use a
// default value
// *TODO: get actual headers out of ResponsePtr
//LLSD headers = response->mHeaders;
LLSD headers;
av_name.mExpires =
LLAvatarNameCache::nameExpirationFromHeaders(headers);
LLAvatarNameCache::insert(agent_id, av_name);
// force name tag to update
LLVOAvatar::invalidateNameTag(agent_id);
LLSD args;
args["OLD_NAME"] = old_display_name;
args["SLID"] = av_name.getUserName();
args["NEW_NAME"] = av_name.getDisplayName();
if (LGGContactSets::getInstance()->hasPseudonym(agent_id))
{
LLSD payload;
payload["agent_id"] = agent_id;
LLNotificationsUtil::add("DisplayNameUpdateRemoveAlias", args, payload,
boost::bind(&LGGContactSets::callbackAliasReset, LGGContactSets::getInstance(), _1, _2));
}
else
{
// <FS:Ansariel> Optional hiding of display name update notification
if (gSavedSettings.getBOOL("FSShowDisplayNameUpdateNotification"))
{
LLNotificationsUtil::add("DisplayNameUpdate", args);
}
// </FS:Ansariel> Optional hiding of display name update notification
}
if (agent_id == gAgent.getID())
{
LLViewerDisplayName::sNameChangedSignal();
}
// <FS:Ansariel> Update name in radar
else
{
FSRadar* radar = FSRadar::getInstance();
if (radar)
{
radar->updateName(agent_id);
}
}
// </FS:Ansariel>
}
};
LLHTTPRegistration<LLSetDisplayNameReply>
gHTTPRegistrationMessageSetDisplayNameReply(
"/message/SetDisplayNameReply");
LLHTTPRegistration<LLDisplayNameUpdate>
gHTTPRegistrationMessageDisplayNameUpdate(
"/message/DisplayNameUpdate");
| gabeharms/firestorm | indra/newview/llviewerdisplayname.cpp | C++ | lgpl-2.1 | 7,372 |
/* -*-c++-*- $Id: Version,v 1.2 2004/04/20 12:26:04 andersb Exp $ */
/**
* OsgHaptics - OpenSceneGraph Haptic Library
* Copyright (C) 2006 VRlab, Umeå University
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include <osgHaptics/HapticRenderLeaf.h>
#include <osgHaptics/RenderTriangleOperator.h>
#include <osgHaptics/HapticRenderBin.h>
#include <osgHaptics/Shape.h>
#include <osgUtil/StateGraph>
#include <osg/Geometry>
#include <osg/TriangleFunctor>
using namespace osgHaptics;
void HapticRenderLeaf::render(osg::RenderInfo& renderInfo,osgUtil::RenderLeaf* previous)
{
// don't draw this leaf if the abort rendering flag has been set.
if (renderInfo.getState()->getAbortRendering())
{
//cout << "early abort"<<endl;
return;
}
if (previous)
{
// apply matrices if required.
renderInfo.getState()->applyProjectionMatrix(_projection.get());
renderInfo.getState()->applyModelViewMatrix(_modelview.get());
// apply state if required.
osgUtil::StateGraph* prev_rg = previous->_parent;
osgUtil::StateGraph* prev_rg_parent = prev_rg->_parent;
osgUtil::StateGraph* rg = _parent;
if (prev_rg_parent!=rg->_parent)
{
osgUtil::StateGraph::moveStateGraph(*renderInfo.getState(),prev_rg_parent,rg->_parent);
// send state changes and matrix changes to OpenGL.
renderInfo.getState()->apply(rg->_stateset.get());
}
else if (rg!=prev_rg)
{
// send state changes and matrix changes to OpenGL.
renderInfo.getState()->apply(rg->_stateset.get());
}
const osgHaptics::Shape *shape = m_renderbin->getShape(renderInfo);
//--by SophiaSoo/CUHK: for two arms
// Does this shape contain the device currently rendered?
if (!shape || !shape->containCurrentDevice()) {
return;
}
bool render_shape=false;
render_shape = !m_renderbin->hasBeenDrawn(renderInfo);
// If we have a shape,
// and the device is reporting, Dont render haptic shape,
// then bail out and skip the rendering of this HapticRenderLeaf
if (shape && !shape->getHapticDevice()->getEnableShapeRender())
return;
if (shape && render_shape) {
//shape = static_cast<const osgHaptics::Shape*> (sa);
shape->preDraw();
}
#ifdef OSGUTIL_RENDERBACKEND_USE_REF_PTR
osg::Geometry* geom = dynamic_cast<osg::Geometry *>(_drawable.get());
#else
osg::Geometry* geom = dynamic_cast<osg::Geometry *>(_drawable);
#endif
if (geom) {
RenderTriangleOperator op;
geom->accept(op);
}
else
// draw the drawable
{
_drawable->draw(renderInfo);
}
if (shape && render_shape) {
shape->postDraw();
}
}
else
{
std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
// apply matrices if required.
renderInfo.getState()->applyProjectionMatrix(_projection.get());
renderInfo.getState()->applyModelViewMatrix(_modelview.get());
// apply state if required.
osgUtil::StateGraph::moveStateGraph(*renderInfo.getState(),NULL,_parent->_parent);
#ifdef OSGUTIL_RENDERBACKEND_USE_REF_PTR
renderInfo.getState()->apply(_parent->_stateset.get());
#else
renderInfo.getState()->apply(_parent->_stateset);
#endif
// draw the drawable
_drawable->draw(renderInfo);
}
}
| mccdo/osghaptics | src/osgHaptics/HapticRenderLeaf.cpp | C++ | lgpl-2.1 | 3,952 |
/*****************************************************************
JADE - Java Agent DEvelopment Framework is a framework to develop
multi-agent systems in compliance with the FIPA specifications.
Copyright (C) 2000 CSELT S.p.A.
GNU Lesser General Public License
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation,
version 2.1 of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*****************************************************************/
package jade.core;
//#APIDOC_EXCLUDE_FILE
import jade.util.leap.Serializable;
import jade.security.JADEPrincipal;
import jade.security.Credentials;
/**
The <code>NodeDescriptor</code> class serves as a meta-level
description of a kernel-level service.
Instances of this class contain a <code>Node</code> object,
along with its name and properties, and are used in service
management operations, as well as in agent-level introspection of
platform-level entities.
@author Giovanni Rimassa - FRAMeTech s.r.l.
@see Node
*/
public class NodeDescriptor implements Serializable {
/**
Builds a new node descriptor, describing the given node with
the given name and properties.
@param nn The name of the described node.
@param node The described <code>Node</code> object.
*/
public NodeDescriptor(Node node) {
myName = node.getName();
myNode = node;
}
/**
Builds a node descriptor for a node hosting an agent container.
@param cid The container ID for the hosted container.
@param node The described <code>Node</code> object.
@param principal The principal of the node owner.
@param credentials The credentials of the node owner.
*/
public NodeDescriptor(ContainerID cid, Node node) {
myName = cid.getName();
myNode = node;
myContainer = cid;
}
/**
Builds an uninitialized node descriptor.
@see NodeDescriptor#setName(String sn)
@see NodeDescriptor#setNode(Node node)
*/
public NodeDescriptor() {
}
/**
Change the name (if any) of the described node.
@param nn The name to assign to the described node.
*/
public void setName(String nn) {
myName = nn;
}
/**
Retrieve the name (if any) of the described node.
@return The name of the described node, or <code>null</code>
if no name was set.
*/
public String getName() {
return myName;
}
/**
Change the described node (if any).
@param node The <code>Node</code> object that is to be
described by this node descriptor.
*/
public void setNode(Node node) {
myNode = node;
}
/**
Retrieve the described node.
@return The <code>Node</code> object described by this
node descriptor, or <code>null</code> if no node was set.
*/
public Node getNode() {
return myNode;
}
/**
Retrieve the ID of the container (if any) hosted by the
described node.
@return The <code>ContainerID</code> of the hosted container,
or <code>null</code> if no such container was set.
*/
public ContainerID getContainer() {
return myContainer;
}
public void setParentNode(Node n) {
parentNode = n;
}
public Node getParentNode() {
return parentNode;
}
/**
Set the username of the owner of the described node
*/
public void setUsername(String username) {
this.username = username;
}
/**
Retrieve the username of the owner of the described node
*/
public String getUsername() {
return username;
}
/**
Set the password of the owner of the described node
*/
public void setPassword(byte[] password) {
this.password = password;
}
/**
Retrieve the password of the owner of the described node
*/
public byte[] getPassword() {
return password;
}
/**
Set the principal of the described node
*/
public void setPrincipal(JADEPrincipal principal) {
myPrincipal = principal;
}
/**
Retrieve the principal of the described node
*/
public JADEPrincipal getPrincipal() {
return myPrincipal;
}
/**
Set the principal of the owner of this node
*/
public void setOwnerPrincipal(JADEPrincipal principal) {
ownerPrincipal = principal;
}
/**
Retrieve the principal of the owner of this node (if any)
@return The principal of the owner of this node, or
<code>null</code> if no principal was set.
*/
public JADEPrincipal getOwnerPrincipal() {
return ownerPrincipal;
}
/**
Set the credentials of the owner of this node
*/
public void setOwnerCredentials(Credentials credentials) {
ownerCredentials = credentials;
}
/**
Retrieve the credentials of the owner of this node (if any)
@return The credentials of the owner of this node, or
<code>null</code> if no credentials were set.
*/
public Credentials getOwnerCredentials() {
return ownerCredentials;
}
private String myName;
private Node myNode;
private Node parentNode;
private ContainerID myContainer;
private String username;
private byte[] password;
private JADEPrincipal myPrincipal;
private JADEPrincipal ownerPrincipal;
private Credentials ownerCredentials;
}
| automenta/jadehell | src/main/java/jade/core/NodeDescriptor.java | Java | lgpl-2.1 | 5,958 |
/*************** <auto-copyright.pl BEGIN do not edit this line> **************
*
* VR Juggler is (C) Copyright 1998-2007 by Iowa State University
*
* Original Authors:
* Allen Bierbaum, Christopher Just,
* Patrick Hartling, Kevin Meinert,
* Carolina Cruz-Neira, Albert Baker
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*************** <auto-copyright.pl END do not edit this line> ***************/
#include <gadget/gadgetConfig.h>
#include <boost/concept_check.hpp>
#include <vpr/Util/Debug.h>
#include <vpr/IO/ObjectWriter.h>
#include <vpr/IO/ObjectReader.h>
#include <gadget/Type/Command.h>
namespace gadget
{
const CommandData Command::getCommandData(int devNum)
{
SampleBuffer_t::buffer_t& stable_buffer = mCommandSamples.stableBuffer();
if ( (!stable_buffer.empty()) &&
(stable_buffer.back().size() > (unsigned)devNum) ) // If Have entry && devNum in range
{
return stable_buffer.back()[devNum];
}
else // No data or request out of range, return default value
{
if ( stable_buffer.empty() )
{
vprDEBUG(vprDBG_ALL, vprDBG_WARNING_LVL)
<< "WARNING: [gadget::Command::getCommandData()] "
<< "Stable buffer is empty. If this is not the first "
<< "read, then this is a problem.\n" << vprDEBUG_FLUSH;
}
else
{
vprDEBUG(vprDBG_ALL, vprDBG_CONFIG_LVL)
<< "WARNING: [gadget::Command::getCommandData()] "
<< "Requested devNum (" << devNum
<< ") is not in the range available. "
<< "This is probably a configuration error.\n" << vprDEBUG_FLUSH;
}
return mDefaultValue;
}
}
void Command::writeObject(vpr::ObjectWriter* writer)
{
writer->beginTag(Command::getInputTypeName());
SampleBuffer_t::buffer_t& stable_buffer = mCommandSamples.stableBuffer();
writer->beginAttribute(gadget::tokens::DataTypeAttrib);
// Write out the data type so that we can assert if reading in wrong
// place.
writer->writeUint16(MSG_DATA_COMMAND);
writer->endAttribute();
writer->beginAttribute(gadget::tokens::SampleBufferLenAttrib);
// Write the # of vectors in the stable buffer.
writer->writeUint16(stable_buffer.size());
writer->endAttribute();
if ( !stable_buffer.empty() )
{
mCommandSamples.lock();
for ( unsigned j = 0; j < stable_buffer.size(); ++j ) // For each vector in the stable buffer
{
writer->beginTag(gadget::tokens::BufferSampleTag);
writer->beginAttribute(gadget::tokens::BufferSampleLenAttrib);
writer->writeUint16(stable_buffer[j].size()); // Write the # of CommandDatas in the vector
writer->endAttribute();
for ( unsigned i = 0; i < stable_buffer[j].size(); ++i ) // For each CommandData in the vector
{
writer->beginTag(gadget::tokens::DigitalValue);
writer->beginAttribute(gadget::tokens::TimeStamp);
writer->writeUint64(stable_buffer[j][i].getTime().usec()); // Write Time Stamp vpr::Uint64
writer->endAttribute();
writer->writeUint32((vpr::Uint32)stable_buffer[j][i].getDigital()); // Write Command Data(int)
writer->endTag();
}
writer->endTag();
}
mCommandSamples.unlock();
}
writer->endTag();
}
void Command::readObject(vpr::ObjectReader* reader)
{
vprASSERT(reader->attribExists("rim.timestamp.delta"));
vpr::Uint64 delta = reader->getAttrib<vpr::Uint64>("rim.timestamp.delta");
// ASSERT if this data is really not Command Data
reader->beginTag(Command::getInputTypeName());
reader->beginAttribute(gadget::tokens::DataTypeAttrib);
vpr::Uint16 temp = reader->readUint16();
reader->endAttribute();
// XXX: Should there be error checking for the case when vprASSERT()
// is compiled out? -PH 8/21/2003
vprASSERT(temp==MSG_DATA_COMMAND && "[Remote Input Manager]Not Command Data");
boost::ignore_unused_variable_warning(temp);
std::vector<CommandData> dataSample;
unsigned numCommandDatas;
vpr::Uint32 value;
vpr::Uint64 timeStamp;
CommandData temp_command_data;
reader->beginAttribute(gadget::tokens::SampleBufferLenAttrib);
unsigned numVectors = reader->readUint16();
reader->endAttribute();
mCommandSamples.lock();
for ( unsigned i = 0; i < numVectors; ++i )
{
reader->beginTag(gadget::tokens::BufferSampleTag);
reader->beginAttribute(gadget::tokens::BufferSampleLenAttrib);
numCommandDatas = reader->readUint16();
reader->endAttribute();
dataSample.clear();
for ( unsigned j = 0; j < numCommandDatas; ++j )
{
reader->beginTag(gadget::tokens::DigitalValue);
reader->beginAttribute(gadget::tokens::TimeStamp);
timeStamp = reader->readUint64(); // read Time Stamp vpr::Uint64
reader->endAttribute();
value = reader->readUint32(); // read Command Data(int)
reader->endTag();
temp_command_data.setDigital(value);
temp_command_data.setTime(vpr::Interval(timeStamp + delta,vpr::Interval::Usec));
dataSample.push_back(temp_command_data);
}
mCommandSamples.addSample(dataSample);
reader->endTag();
}
mCommandSamples.unlock();
mCommandSamples.swapBuffers();
reader->endTag();
}
} // End of gadget namespace
| rpavlik/vrjuggler-2.2-debs | modules/gadgeteer/gadget/Type/Command.cpp | C++ | lgpl-2.1 | 6,203 |
/*$Id$
*
* This source file is a part of the Fresco Project.
* Copyright (C) 2000 Stefan Seefeld <stefan@fresco.org>
* http://www.fresco.org
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
* MA 02139, USA.
*/
#ifndef _Berlin_Console_GGIDrawableFactory_hh
#define _Berlin_Console_GGIDrawableFactory_hh
#include <Berlin/config.hh>
#include <Berlin/Console.hh>
#include <string>
extern "C"
{
#include <ggi/ggi-unix.h>
}
namespace Berlin
{
namespace Console_Extension
{
class GGIDrawable : public virtual Berlin::Console::Drawable
{
public:
virtual const std::string &name() const = 0;
virtual ggi_mode mode() const = 0;
virtual ggi_visual_t visual() const = 0;
};
class GGIDrawableFactory : virtual public Berlin::Console::Extension
{
public:
//. Creates a new Drawable of the given size (x, y) and depth.
//. It is accessable under the given shm-id.
virtual GGIDrawable *create_drawable(int shmid,
Fresco::PixelCoord,
Fresco::PixelCoord,
Fresco::PixelCoord) = 0;
};
} // namespace
} // namespace
#endif
| stefanseefeld/fresco | Berlin/include/Berlin/Console/GGIDrawableFactory.hh | C++ | lgpl-2.1 | 1,841 |
<?php
/**
* @package tikiwiki
*/
// (c) Copyright 2002-2016 by authors of the Tiki Wiki CMS Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$
$section = 'surveys';
require_once('tiki-setup.php');
include_once('lib/surveys/surveylib.php');
$auto_query_args = ['sort_mode', 'offset', 'find'];
$access->check_feature('feature_surveys');
$access->check_permission('tiki_p_view_survey_stats');
if (! isset($_REQUEST["sort_mode"])) {
$sort_mode = 'created_desc';
} else {
$sort_mode = $_REQUEST["sort_mode"];
}
if (! isset($_REQUEST["offset"])) {
$offset = 0;
} else {
$offset = $_REQUEST["offset"];
}
$smarty->assign_by_ref('offset', $offset);
if (isset($_REQUEST["find"])) {
$find = $_REQUEST["find"];
} else {
$find = '';
}
$smarty->assign('find', $find);
$smarty->assign_by_ref('sort_mode', $sort_mode);
$channels = $srvlib->list_surveys($offset, $maxRecords, $sort_mode, $find);
$temp_max = count($channels["data"]);
for ($i = 0; $i < $temp_max; $i++) {
if ($userlib->object_has_one_permission($channels["data"][$i]["surveyId"], 'survey')) {
$channels["data"][$i]["individual"] = 'y';
if ($userlib->object_has_permission($user, $channels["data"][$i]["surveyId"], 'survey', 'tiki_p_take_survey')) {
$channels["data"][$i]["individual_tiki_p_take_survey"] = 'y';
} else {
$channels["data"][$i]["individual_tiki_p_take_survey"] = 'n';
}
if ($userlib->object_has_permission($user, $channels["data"][$i]["surveyId"], 'survey', 'tiki_p_view_survey_stats')) {
$channels["data"][$i]["individual_tiki_p_view_survey_stats"] = 'y';
} else {
$channels["data"][$i]["individual_tiki_p_view_survey_stats"] = 'n';
}
if ($tiki_p_admin == 'y' || $userlib->object_has_permission($user, $channels["data"][$i]["surveyId"], 'survey', 'tiki_p_admin_surveys')) {
$channels["data"][$i]["individual_tiki_p_take_survey"] = 'y';
$channels["data"][$i]["individual_tiki_p_view_survey_stats"] = 'y';
$channels["data"][$i]["individual_tiki_p_admin_surveys"] = 'y';
}
} else {
$channels["data"][$i]["individual"] = 'n';
}
}
$smarty->assign_by_ref('cant_pages', $channels["cant"]);
$smarty->assign_by_ref('channels', $channels["data"]);
$smarty->assign('section', $section);
include_once('tiki-section_options.php');
ask_ticket('survey-stats');
// Display the template
$smarty->assign('mid', 'tiki-survey_stats.tpl');
$smarty->display("tiki.tpl");
| tikiorg/tiki | tiki-survey_stats.php | PHP | lgpl-2.1 | 2,518 |
/*
* Button representing user's Avatar
*
* Copyright (C) 2011 Martin Klapetek <martin.klapetek@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "avatar-button.h"
#include <QtGui/QWidgetAction>
#include <QDataStream>
#include <KFileDialog>
#include <KMenu>
#include <KLocalizedString>
#include <KMessageBox>
#include <KImageFilePreview>
#include <TelepathyQt/Account>
#include <KDE/KDebug>
#include <KGlobalSettings>
#include <KPixmapRegionSelectorDialog>
#include <KPixmapRegionSelectorWidget>
// It has been decided by a fair dice roll that 128px is a reasonable avatar
// size limit in case the server (or Telepathy backend) does not provide
// such information
#define AVATAR_MIN_SIZE 64
#define AVATAR_MAX_SIZE 128
AvatarButton::AvatarButton(QWidget *parent)
: QToolButton(parent)
{
KMenu *menu = new KMenu(this);
setPopupMode(QToolButton::InstantPopup);
setIconSize(QSize(64,64));
menu->addAction(KIcon(QLatin1String("document-open-folder")), i18n("Load from file..."), this, SLOT(onLoadAvatarFromFile()));
menu->addAction(KIcon(QLatin1String("edit-clear")), i18n("Clear Avatar"), this, SLOT(onClearAvatar()));
setMenu(menu);
}
AvatarButton::~AvatarButton()
{
}
void AvatarButton::setAvatar(const Tp::Avatar &avatar)
{
m_avatar = avatar;
if (! avatar.avatarData.isNull()) {
KIcon avatarIcon;
QPixmap avatarPixmap = QPixmap::fromImage(QImage::fromData(avatar.avatarData));
//scale oversized avatars to fit, but don't stretch smaller avatars
avatarIcon.addPixmap(avatarPixmap.scaled(iconSize().boundedTo(avatarPixmap.size()), Qt::KeepAspectRatio, Qt::SmoothTransformation));
setIcon(avatarIcon);
} else {
setIcon(KIcon(QLatin1String("im-user")));
}
}
Tp::Avatar AvatarButton::avatar() const
{
return m_avatar;
}
void AvatarButton::setAccount(const Tp::AccountPtr& account)
{
m_account = account;
}
void AvatarButton::onLoadAvatarFromFile()
{
QStringList mimeTypes;
if (m_account) {
mimeTypes = m_account->avatarRequirements().supportedMimeTypes();
}
if (mimeTypes.isEmpty()) {
mimeTypes << QLatin1String("image/jpeg")
<< QLatin1String("image/png")
<< QLatin1String("imgae/gif");
}
QPointer<KFileDialog> dialog = new KFileDialog(KUrl::fromPath(KGlobalSettings::picturesPath()),
mimeTypes.join(QLatin1String(" ")), this);
dialog->setOperationMode(KFileDialog::Opening);
dialog->setPreviewWidget(new KImageFilePreview(dialog));
dialog->setCaption(i18n("Please choose your avatar"));
KUrl fileUrl;
if (dialog->exec()) {
if (!dialog) {
return;
}
fileUrl = dialog->selectedUrl();
}
delete dialog;
if (fileUrl.isEmpty()) {
return;
}
const QPixmap pixmap(fileUrl.toLocalFile());
const Tp::AvatarSpec spec = m_account->avatarRequirements();
const int maxWidth = spec.maximumWidth() > 0 ? spec.maximumWidth() : AVATAR_MAX_SIZE;
const int maxHeight = spec.maximumHeight() > 0 ? spec.maximumHeight() : AVATAR_MAX_SIZE;
const int minWidth = spec.minimumWidth() > 0 ? spec.minimumWidth() : AVATAR_MIN_SIZE;
const int minHeight = spec.minimumHeight() > 0 ? spec.minimumHeight() : AVATAR_MIN_SIZE;
QPixmap finalPixmap;
if (pixmap.width() > spec.maximumWidth() || pixmap.height() > spec.maximumHeight()) {
finalPixmap = cropPixmap(pixmap, maxWidth, maxHeight, minWidth, minHeight);
} else {
finalPixmap = pixmap;
if (pixmap.width() < minWidth) {
finalPixmap = finalPixmap.scaledToWidth(minWidth, Qt::SmoothTransformation);
}
if (pixmap.height() < minHeight) {
finalPixmap = finalPixmap.scaledToHeight(minHeight, Qt::SmoothTransformation);
}
}
if (finalPixmap.isNull()) {
return;
}
Tp::Avatar avatar;
avatar.MIMEType = QLatin1String("image/png");
QDataStream stream(&avatar.avatarData, QIODevice::WriteOnly);
if (!finalPixmap.save(stream.device(), "PNG")) {
KMessageBox::error(this, i18n("Failed to load avatar."));
return;
}
setAvatar(avatar);
Q_EMIT avatarChanged();
}
QPixmap AvatarButton::cropPixmap(const QPixmap &pixmap, int maxWidth, int maxHeight,
int minWidth, int minHeight) const
{
//if there's no image we don't need to select a region
if (pixmap.isNull()) {
return pixmap;
}
QPointer<KPixmapRegionSelectorDialog> regionDlg = new KPixmapRegionSelectorDialog();
KPixmapRegionSelectorWidget *widget = regionDlg->pixmapRegionSelectorWidget();
widget->setPixmap(pixmap);
widget->setSelectionAspectRatio(maxWidth, maxHeight);
if (regionDlg->exec()) {
if (!regionDlg) {
return QPixmap();
}
delete regionDlg;
QImage selectedImage = widget->selectedImage();
if (selectedImage.width() > maxWidth || selectedImage.height() > maxHeight) {
return QPixmap::fromImage(selectedImage.scaled(maxWidth, maxHeight, Qt::KeepAspectRatio));
} else if (selectedImage.width() < minWidth || selectedImage.height() < minHeight) {
return QPixmap::fromImage(selectedImage.scaled(minWidth, minHeight, Qt::KeepAspectRatio));
} else {
return QPixmap::fromImage(widget->selectedImage());
}
}
delete regionDlg;
return QPixmap();
}
void AvatarButton::onClearAvatar()
{
setAvatar(Tp::Avatar());
Q_EMIT avatarChanged();
}
| KDE/ktp-accounts-kcm | src/avatar-button.cpp | C++ | lgpl-2.1 | 6,326 |
/*=========================================================================
Program: FEMUS
Module: PetscLinearEquationSolver
Authors: Eugenio Aulisa, Simone Bnà
Copyright (c) FEMTTU
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef __femus_algebra_GmresPetscLinearEquationSolver_hpp__
#define __femus_algebra_GmresPetscLinearEquationSolver_hpp__
#include "FemusConfig.hpp"
#ifdef HAVE_PETSC
#ifdef HAVE_MPI
#include <mpi.h>
#endif
//----------------------------------------------------------------------------
// includes :
//----------------------------------------------------------------------------
#include "LinearEquationSolver.hpp"
namespace femus {
/**
* This class inherits the abstract class LinearEquationSolver. In this class the solver is implemented using the PETSc package
*/
class GmresPetscLinearEquationSolver : public LinearEquationSolver {
public:
/** Constructor. Initializes Petsc data structures */
GmresPetscLinearEquationSolver(const unsigned &igrid, Solution *other_solution);
/// Destructor.
~GmresPetscLinearEquationSolver();
protected:
/// Release all memory and clear data structures.
void Clear();
void SetTolerances(const double &rtol, const double &atol, const double &divtol,
const unsigned &maxits, const unsigned &restart);
void Init(Mat& Amat, Mat &Pmat);
void Solve(const vector <unsigned>& variable_to_be_solved, const bool &ksp_clean);
void MGInit(const MgSmootherType & mg_smoother_type, const unsigned &levelMax, const char* outer_ksp_solver = KSPGMRES);
void MGSetLevel(LinearEquationSolver *LinSolver, const unsigned &maxlevel,
const vector <unsigned> &variable_to_be_solved,
SparseMatrix* PP, SparseMatrix* RR,
const unsigned &npre, const unsigned &npost);
void RemoveNullSpace();
void GetNullSpaceBase( std::vector < Vec > &nullspBase);
void ZerosBoundaryResiduals();
void SetPenalty();
void SetRichardsonScaleFactor(const double & richardsonScaleFactor){
_richardsonScaleFactor = richardsonScaleFactor;
}
virtual void BuildBdcIndex(const vector <unsigned> &variable_to_be_solved);
virtual void SetPreconditioner(KSP& subksp, PC& subpc);
void MGSolve(const bool ksp_clean);
inline void MGClear() {
KSPDestroy(&_ksp);
}
inline KSP* GetKSP() {
return &_ksp;
};
/// Set the user-specified solver stored in \p _solver_type
void SetPetscSolverType(KSP &ksp);
/** @deprecated, remove soon */
std::pair<unsigned int, double> solve(SparseMatrix& matrix_in,
SparseMatrix& precond_in, NumericVector& solution_in, NumericVector& rhs_in,
const double tol, const unsigned int m_its);
/** @deprecated, remove soon */
void init(SparseMatrix* matrix);
protected:
// member data
KSP _ksp; ///< Krylov subspace context
PC _pc; ///< Preconditioner context
PetscReal _rtol;
PetscReal _abstol;
PetscReal _dtol;
PetscInt _maxits;
PetscInt _restart;
vector <PetscInt> _bdcIndex;
bool _bdcIndexIsInitialized;
double _richardsonScaleFactor;
};
// =============================================
inline GmresPetscLinearEquationSolver::GmresPetscLinearEquationSolver(const unsigned &igrid, Solution *other_solution)
: LinearEquationSolver(igrid, other_solution) {
if(igrid == 0) {
this->_preconditioner_type = MLU_PRECOND;
this->_solver_type = PREONLY;
}
else {
this->_preconditioner_type = ILU_PRECOND;
this->_solver_type = GMRES;
}
_rtol = 1.e-5;
_abstol = 1.e-50;
_dtol = 1.e+5;
_maxits = 1000;
_restart = 30;
_richardsonScaleFactor = 0.5;
_bdcIndexIsInitialized = 0;
_printSolverInfo = false;
}
// =============================================
inline GmresPetscLinearEquationSolver::~GmresPetscLinearEquationSolver() {
this->Clear();
}
// ================================================
inline void GmresPetscLinearEquationSolver::Clear() {
//
if(this->initialized()) {
this->_is_initialized = false;
KSPDestroy(&_ksp);
}
}
} //end namespace femus
#endif
#endif
| eaulisa/MyFEMuS | src/algebra/GmresPetscLinearEquationSolver.hpp | C++ | lgpl-2.1 | 4,753 |
package com.quickserverlab.quickcached;
import java.io.IOException;
import java.net.SocketTimeoutException;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.quickserverlab.quickcached.cache.CacheException;
import com.quickserverlab.quickcached.cache.CacheInterface;
import org.quickserver.net.server.ClientHandler;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
/**
*
* @author Akshathkumar Shetty
*/
public class TextCommandProcessor {
private static final Logger logger = Logger.getLogger(TextCommandProcessor.class.getName());
private static String versionOutput = null;
static {
versionOutput = "VERSION " + QuickCached.version + "\r\n";
}
private CacheInterface cache;
public void setCache(CacheInterface cache) {
this.cache = cache;
}
public void handleTextCommand(ClientHandler handler, String command)
throws SocketTimeoutException, IOException, CacheException {
if (QuickCached.DEBUG) {
logger.log(Level.FINE, "command: {0}", command);
}
if (command.startsWith("get ") || command.startsWith("gets ")) {
handleGetCommands(handler, command);
} else if (command.equals("version")) {
sendResponse(handler, versionOutput);
} else if (command.startsWith("set ") || command.startsWith("add ")
|| command.startsWith("replace ") || command.startsWith("append ")
|| command.startsWith("prepend ") || command.startsWith("cas ")) {
handleStorageCommands(handler, command);
Data data = (Data) handler.getClientData();
if (data.isAllDataIn()) {
processStorageCommands(handler);
return;
} else {
return;
}
} else if (command.startsWith("delete ")) {
handleDeleteCommands(handler, command);
} else if (command.startsWith("flush_all")) {
handleFlushAll(handler, command);
} else if (command.equals("stats")) {
Map stats = CommandHandler.getStats(handler.getServer());
Set keySet = stats.keySet();
Iterator iterator = keySet.iterator();
String key = null;
String value = null;
while (iterator.hasNext()) {
key = (String) iterator.next();
value = (String) stats.get(key);
sendResponse(handler, "STAT " + key + " " + value + "\r\n");
}
sendResponse(handler, "END\r\n");
} else if (command.startsWith("stats ")) {
//TODO
sendResponse(handler, "ERROR\r\n");
} else if (command.equals("quit")) {
handler.closeConnection();
} else if (command.startsWith("incr ") || command.startsWith("decr ")) {
handleIncrDecrCommands(handler, command);
} else if (command.startsWith("touch ")) {
handleTouchCommands(handler, command);
} else {
logger.log(Level.WARNING, "unknown command! {0}", command);
sendResponse(handler, "ERROR\r\n");
}
}
private void handleFlushAll(ClientHandler handler, String command)
throws SocketTimeoutException, IOException, CacheException {
/*
flush_all [exptime] [noreply]\r\n
*/
String cmdData[] = command.split(" ");
String cmd = cmdData[0];
String exptime = null;
if(QuickCached.DEBUG==false) {
logger.log(Level.FINE, "cmd: {0}", new Object[]{cmd});
}
boolean noreplay = false;
if(cmdData[cmdData.length-1].equals("noreply")) {
noreplay = true;
}
if (noreplay==false && cmdData.length >= 2) {
exptime = cmdData[1];
} else if (noreplay==true && cmdData.length >= 3) {
exptime = cmdData[1];
}
if (exptime == null) {
cache.flush();
} else {
final int sleeptime = Integer.parseInt(exptime);
Thread t = new Thread() {
public void run() {
try {
sleep(1000 * sleeptime);
} catch (InterruptedException ex) {
logger.log(Level.WARNING, "Error: "+ex, ex);
}
try {
cache.flush();
} catch (CacheException ex) {
logger.log(Level.SEVERE, "Error: "+ex, ex);
}
}
};
t.start();
}
if (noreplay) {
return;
}
sendResponse(handler, "OK\r\n");
}
private void handleDeleteCommands(ClientHandler handler, String command)
throws SocketTimeoutException, IOException, CacheException {
/*
delete <key> [noreply]\r\n
*/
String cmdData[] = command.split(" ");
String cmd = cmdData[0];
String key = cmdData[1];
if(QuickCached.DEBUG==false) {
logger.log(Level.FINE, "cmd: {0}, key: {1}", new Object[]{cmd, key});
}
boolean noreplay = false;
if (cmdData.length == 3) {
if ("noreply".equals(cmdData[2])) {
noreplay = true;
}
}
boolean flag = cache.delete(key);
if (noreplay) {
return;
}
if (flag == true) {
sendResponse(handler, "DELETED\r\n");
} else {
sendResponse(handler, "NOT_FOUND\r\n");
}
}
private void handleTouchCommands(ClientHandler handler, String command)
throws SocketTimeoutException, IOException, CacheException {
/*
touch <key> <exptime> [noreply]\r\n
*/
String cmdData[] = command.split(" ");
String cmd = cmdData[0];
String key = cmdData[1];
int exptime = Integer.parseInt(cmdData[2]);
boolean noreplay = false;
if (cmdData.length >= 4) {
if ("noreply".equals(cmdData[3])) {
noreplay = true;
}
}
if(QuickCached.DEBUG==false) {
logger.log(Level.FINE, "cmd: {0}, key: {1}", new Object[]{cmd, key});
}
boolean flag = cache.touch(key, exptime);
if(noreplay) return;
if(flag==false) {
sendResponse(handler, "NOT_FOUND\r\n");
} else {
sendResponse(handler, "TOUCHED\r\n");
}
}
private void handleGetCommands(ClientHandler handler, String command)
throws SocketTimeoutException, IOException, CacheException {
/*
get <key>*\r\n
gets <key>*\r\n
*/
String cmdData[] = command.split(" ");
String cmd = cmdData[0];
String key = null;
for (int i = 1; i < cmdData.length; i++) {
key = cmdData[i];
if(QuickCached.DEBUG==false) {
logger.log(Level.FINE, "cmd: {0}, key: {1}", new Object[]{cmd, key});
}
DataCarrier dc = (DataCarrier) cache.get(key);
if (dc != null) {
StringBuilder sb = new StringBuilder();
sb.append("VALUE ");
sb.append(key);
sb.append(" ");
sb.append(dc.getFlags());
sb.append(" ");
sb.append(dc.getData().length);
sb.append(" ");
sb.append(dc.getCas());
sb.append("\r\n");
sendResponse(handler, sb.toString());
sendResponse(handler, dc.getData());
sendResponse(handler, "\r\n");
}
}
sendResponse(handler, "END\r\n");
/*
VALUE <key> <flags> <bytes> [<cas unique>]\r\n
<data block>\r\n
*/
}
private void handleIncrDecrCommands(ClientHandler handler, String command)
throws SocketTimeoutException, IOException, CacheException {
/*
incr <key> <value> [noreply]\r\n
decr <key> <value> [noreply]\r\n
*/
String cmdData[] = command.split(" ");
if (cmdData.length < 3) {
sendResponse(handler, "CLIENT_ERROR Bad number of args passed\r\n");
if (cmdData[0].equals("incr")) {
CommandHandler.incrMisses++;
} else if (cmdData[0].equals("decr")) {
CommandHandler.decrMisses++;
}
return;
}
String cmd = cmdData[0];
String key = cmdData[1];
String _value = cmdData[2];
long value = 0;
try {
value = Long.parseLong(_value);
} catch (Exception e) {
sendResponse(handler, "CLIENT_ERROR parse of client value failed\r\n");
if (cmd.equals("incr")) {
CommandHandler.incrMisses++;
} else if (cmd.equals("decr")) {
CommandHandler.decrMisses++;
}
return;
}
if(QuickCached.DEBUG==false) {
logger.log(Level.FINE, "cmd: {0}, key: {1}", new Object[]{cmd, key});
}
boolean noreplay = false;
if (cmdData.length >= 4) {
if ("noreply".equals(cmdData[3])) {
noreplay = true;
}
}
DataCarrier dc = (DataCarrier) cache.get(key, false);
if (dc == null) {
if (noreplay == false) {
sendResponse(handler, "NOT_FOUND\r\n");
}
if (cmd.equals("incr")) {
CommandHandler.incrMisses++;
} else if (cmd.equals("decr")) {
CommandHandler.decrMisses++;
}
return;
}
StringBuilder sb = new StringBuilder();
dc.writeLock.lock();
try {
long oldvalue = Long.parseLong(new String(dc.getData(),
HexUtil.getCharset()));
if (cmd.equals("incr")) {
value = oldvalue + value;
} else if (cmd.equals("decr")) {
value = oldvalue - value;
if (value < 0) {
value = 0;
}
} else {
throw new IllegalArgumentException("Unknown command "+cmd);
}
sb.append(value);
dc.setData(sb.toString().getBytes(HexUtil.getCharset()));
cache.update(key, dc, dc.getSize());
} catch(Exception e) {
if(noreplay == false) {
sendResponse(handler, "CLIENT_ERROR parse of server value failed\r\n");
}
if (cmd.equals("incr")) {
CommandHandler.incrMisses++;
} else if (cmd.equals("decr")) {
CommandHandler.decrMisses++;
}
return;
} finally {
dc.writeLock.unlock();
}
if (cmd.equals("incr")) {
CommandHandler.incrHits++;
} else if (cmd.equals("decr")) {
CommandHandler.decrHits++;
}
if (noreplay) {
return;
}
sb.append("\r\n");
sendResponse(handler, sb.toString());
}
private void handleStorageCommands(ClientHandler handler, String command)
throws SocketTimeoutException, IOException {
Data data = (Data) handler.getClientData();
/*
<command name> <key> <flags> <exptime> <bytes> [noreply]\r\n
cas <key> <flags> <exptime> <bytes> <cas unique> [noreply]\r\n
*/
String cmdData[] = command.split(" ");
String cmd = cmdData[0];
String key = cmdData[1];
String flags = cmdData[2];
int exptime = Integer.parseInt(cmdData[3]);
long bytes = Integer.parseInt(cmdData[4]);
String casunique = null;
boolean noreplay = false;
if (cmdData.length >= 6) {
if ("noreply".equals(cmdData[5])) {
noreplay = true;
} else {
casunique = cmdData[5];
}
if (cmdData.length >= 7) {
if ("noreply".equals(cmdData[6])) {
noreplay = true;
}
}
}
if(key.length()>Data.getMaxSizeAllowedForKey()) {
throw new IllegalArgumentException(
"key passed to big to store "+key);
}
if(Data.getMaxSizeAllowedForValue()>0) {
if(bytes > Data.getMaxSizeAllowedForValue()) {
throw new IllegalArgumentException(
"value passed to big to store "+bytes+" for key "+key);
}
}
data.setCmd(cmd);
data.setKey(key);
data.setFlags(flags);
data.setExptime(exptime);
data.setDataRequiredLength(bytes);
data.setCasUnique(casunique);
data.setNoreplay(noreplay);
}
public void processStorageCommands(ClientHandler handler)
throws SocketTimeoutException, IOException, CacheException {
Data data = (Data) handler.getClientData();
if(QuickCached.DEBUG==false) {
logger.log(Level.FINE, "cmd: {0}, key: {1}", new Object[]{data.getCmd(), data.getKey()});
}
byte dataToStore[] = data.getDataByte();
DataCarrier dc = new DataCarrier(dataToStore);
dc.setFlags(data.getFlags());
if (data.getCmd().equals("set")) {
DataCarrier olddata = (DataCarrier) cache.get(data.getKey(), false);
if(olddata==null) {
cache.set(data.getKey(), dc, dc.getSize(), data.getExptime());
} else {
olddata.writeLock.lock();
try {
olddata.setData(dc.getData());
olddata.setFlags(dc.getFlags());
cache.update(data.getKey(), olddata, olddata.getSize(), data.getExptime());
} finally {
olddata.writeLock.unlock();
}
}
if (data.isNoreplay() == false) {
sendResponse(handler, "STORED\r\n");
}
} else if (data.getCmd().equals("add")) {
Object olddata = cache.get(data.getKey(), false);
if (olddata == null) {
cache.set(data.getKey(), dc, dc.getSize(), data.getExptime());
if (data.isNoreplay() == false) {
sendResponse(handler, "STORED\r\n");
}
} else {
if (data.isNoreplay() == false) {
sendResponse(handler, "NOT_STORED\r\n");
}
}
} else if (data.getCmd().equals("replace")) {
DataCarrier olddata = (DataCarrier) cache.get(data.getKey(), false);
if (olddata != null) {
olddata.writeLock.lock();
try {
olddata.setData(dc.getData());
cache.update(data.getKey(), olddata, olddata.getSize());
} finally {
olddata.writeLock.unlock();
}
dc.setData(null);
dc = null;
if (data.isNoreplay() == false) {
if (data.isNoreplay() == false) {
sendResponse(handler, "STORED\r\n");
}
}
} else {
if (data.isNoreplay() == false) {
sendResponse(handler, "NOT_STORED\r\n");
}
}
} else if (data.getCmd().equals("append")) {
DataCarrier olddata = (DataCarrier) cache.get(data.getKey(), false);
if (olddata != null) {
olddata.writeLock.lock();
try {
olddata.append(dc.getData());
cache.update(data.getKey(), olddata, olddata.getSize());
} finally {
olddata.writeLock.unlock();
}
dc.setData(null);
dc = null;
if (data.isNoreplay() == false) {
if (data.isNoreplay() == false) {
sendResponse(handler, "STORED\r\n");
}
}
} else {
if (data.isNoreplay() == false) {
sendResponse(handler, "NOT_STORED\r\n");
}
}
} else if (data.getCmd().equals("prepend")) {
DataCarrier olddata = (DataCarrier) cache.get(data.getKey(), false);
if (olddata != null) {
olddata.writeLock.lock();
try {
olddata.prepend(dc.getData());
cache.update(data.getKey(), olddata, olddata.getSize());
} finally {
olddata.writeLock.unlock();
}
dc.setData(null);
dc = null;
if (data.isNoreplay() == false) {
if (data.isNoreplay() == false) {
sendResponse(handler, "STORED\r\n");
}
}
} else {
if (data.isNoreplay() == false) {
sendResponse(handler, "NOT_STORED\r\n");
}
}
} else if (data.getCmd().equals("cas")) {
String reply = null;
DataCarrier olddata = (DataCarrier) cache.get(data.getKey(), false);
if(olddata != null) {
olddata.writeLock.lock();
try {
int oldcas = olddata.getCas();
int passedcas = Integer.parseInt(data.getCasUnique());
if (oldcas == passedcas) {
olddata.setData(dc.getData());
cache.update(data.getKey(), olddata, olddata.getSize());
dc.setData(null);
dc = null;
CommandHandler.casHits++;
if (data.isNoreplay() == false) {
reply = "STORED\r\n";
}
} else {
CommandHandler.casBadval++;
if (data.isNoreplay() == false) {
reply = "EXISTS\r\n";
}
}
} finally {
olddata.writeLock.unlock();
}
} else {
CommandHandler.casMisses++;
if (data.isNoreplay() == false) {
reply = "NOT_FOUND\r\n";
}
}
if(reply!=null) {
sendResponse(handler, reply);
}
}
data.clear();
}
public void sendResponse(ClientHandler handler, String data) throws SocketTimeoutException, IOException {
sendResponse(handler, data.getBytes(HexUtil.getCharset()));
}
public void sendResponse(ClientHandler handler, byte data[]) throws SocketTimeoutException, IOException {
if(handler.getCommunicationLogging() || QuickCached.DEBUG) {
logger.log(Level.FINE, "S: {0}", new String(data, HexUtil.getCharset()));
} else {
logger.log(Level.FINE, "S: {0} bytes", data.length);
}
handler.sendClientBinary(data);
}
}
| QuickServerLab/QuickCached | src/main/com/quickserverlab/quickcached/TextCommandProcessor.java | Java | lgpl-2.1 | 15,156 |
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
#include "mainwindow.h"
#include <QtGui>
#include "svgview.h"
MainWindow::MainWindow()
: QMainWindow()
, m_view(new SvgView)
{
QMenu *fileMenu = new QMenu(tr("&File"), this);
QAction *openAction = fileMenu->addAction(tr("&Open..."));
openAction->setShortcut(QKeySequence(tr("Ctrl+O")));
QAction *quitAction = fileMenu->addAction(tr("E&xit"));
quitAction->setShortcuts(QKeySequence::Quit);
menuBar()->addMenu(fileMenu);
QMenu *viewMenu = new QMenu(tr("&View"), this);
m_backgroundAction = viewMenu->addAction(tr("&Background"));
m_backgroundAction->setEnabled(false);
m_backgroundAction->setCheckable(true);
m_backgroundAction->setChecked(false);
connect(m_backgroundAction, SIGNAL(toggled(bool)), m_view, SLOT(setViewBackground(bool)));
m_outlineAction = viewMenu->addAction(tr("&Outline"));
m_outlineAction->setEnabled(false);
m_outlineAction->setCheckable(true);
m_outlineAction->setChecked(true);
connect(m_outlineAction, SIGNAL(toggled(bool)), m_view, SLOT(setViewOutline(bool)));
menuBar()->addMenu(viewMenu);
QMenu *rendererMenu = new QMenu(tr("&Renderer"), this);
m_nativeAction = rendererMenu->addAction(tr("&Native"));
m_nativeAction->setCheckable(true);
m_nativeAction->setChecked(true);
#ifndef QT_NO_OPENGL
m_glAction = rendererMenu->addAction(tr("&OpenGL"));
m_glAction->setCheckable(true);
#endif
m_imageAction = rendererMenu->addAction(tr("&Image"));
m_imageAction->setCheckable(true);
#ifndef QT_NO_OPENGL
rendererMenu->addSeparator();
m_highQualityAntialiasingAction = rendererMenu->addAction(tr("&High Quality Antialiasing"));
m_highQualityAntialiasingAction->setEnabled(false);
m_highQualityAntialiasingAction->setCheckable(true);
m_highQualityAntialiasingAction->setChecked(false);
connect(m_highQualityAntialiasingAction, SIGNAL(toggled(bool)), m_view, SLOT(setHighQualityAntialiasing(bool)));
#endif
QActionGroup *rendererGroup = new QActionGroup(this);
rendererGroup->addAction(m_nativeAction);
#ifndef QT_NO_OPENGL
rendererGroup->addAction(m_glAction);
#endif
rendererGroup->addAction(m_imageAction);
menuBar()->addMenu(rendererMenu);
connect(openAction, SIGNAL(triggered()), this, SLOT(openFile()));
connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
connect(rendererGroup, SIGNAL(triggered(QAction*)),
this, SLOT(setRenderer(QAction*)));
setCentralWidget(m_view);
setWindowTitle(tr("SVG Viewer"));
}
void MainWindow::openFile(const QString &path)
{
QString fileName;
if (path.isNull())
fileName = QFileDialog::getOpenFileName(this, tr("Open SVG File"),
m_currentPath, "SVG files (*.svg *.svgz *.svg.gz)");
else
fileName = path;
if (!fileName.isEmpty()) {
QFile file(fileName);
if (!file.exists()) {
QMessageBox::critical(this, tr("Open SVG File"),
QString("Could not open file '%1'.").arg(fileName));
m_outlineAction->setEnabled(false);
m_backgroundAction->setEnabled(false);
return;
}
m_view->openFile(file);
if (!fileName.startsWith(":/")) {
m_currentPath = fileName;
setWindowTitle(tr("%1 - SVGViewer").arg(m_currentPath));
}
m_outlineAction->setEnabled(true);
m_backgroundAction->setEnabled(true);
resize(m_view->sizeHint() + QSize(80, 80 + menuBar()->height()));
}
}
void MainWindow::setRenderer(QAction *action)
{
#ifndef QT_NO_OPENGL
m_highQualityAntialiasingAction->setEnabled(false);
#endif
if (action == m_nativeAction)
m_view->setRenderer(SvgView::Native);
#ifndef QT_NO_OPENGL
else if (action == m_glAction) {
m_highQualityAntialiasingAction->setEnabled(true);
m_view->setRenderer(SvgView::OpenGL);
}
#endif
else if (action == m_imageAction) {
m_view->setRenderer(SvgView::Image);
}
}
| sunblithe/qt-everywhere-opensource-src-4.7.1 | examples/painting/svgviewer/mainwindow.cpp | C++ | lgpl-2.1 | 6,065 |
# -*- coding: utf-8 -*-
"""Additional helper functions for the optlang solvers.
All functions integrate well with the context manager, meaning that
all operations defined here are automatically reverted when used in a
`with model:` block.
The functions defined here together with the existing model functions should
allow you to implement custom flux analysis methods with ease.
"""
from __future__ import absolute_import
import re
from functools import partial
from collections import namedtuple
from types import ModuleType
from warnings import warn
import optlang
from optlang.symbolics import Basic, Zero
from cobra.exceptions import OptimizationError, OPTLANG_TO_EXCEPTIONS_DICT
from cobra.util.context import get_context
class SolverNotFound(Exception):
"""A simple Exception when a solver can not be found."""
pass
# Define all the solvers that are found in optlang.
solvers = {match.split("_")[0]: getattr(optlang, match)
for match in dir(optlang) if "_interface" in match}
# Defines all the QP solvers implemented in optlang.
qp_solvers = ["cplex"] # QP in gurobi not implemented yet
def linear_reaction_coefficients(model, reactions=None):
"""Coefficient for the reactions in a linear objective.
Parameters
----------
model : cobra model
the model object that defined the objective
reactions : list
an optional list for the reactions to get the coefficients for. All
reactions if left missing.
Returns
-------
dict
A dictionary where the key is the reaction object and the value is
the corresponding coefficient. Empty dictionary if there are no
linear terms in the objective.
"""
linear_coefficients = {}
reactions = model.reactions if not reactions else reactions
try:
objective_expression = model.solver.objective.expression
coefficients = objective_expression.as_coefficients_dict()
except AttributeError:
return linear_coefficients
for rxn in reactions:
forward_coefficient = coefficients.get(rxn.forward_variable, 0)
reverse_coefficient = coefficients.get(rxn.reverse_variable, 0)
if forward_coefficient != 0:
if forward_coefficient == -reverse_coefficient:
linear_coefficients[rxn] = float(forward_coefficient)
return linear_coefficients
def _valid_atoms(model, expression):
"""Check whether a sympy expression references the correct variables.
Parameters
----------
model : cobra.Model
The model in which to check for variables.
expression : sympy.Basic
A sympy expression.
Returns
-------
boolean
True if all referenced variables are contained in model, False
otherwise.
"""
atoms = expression.atoms(optlang.interface.Variable)
return all(a.problem is model.solver for a in atoms)
def set_objective(model, value, additive=False):
"""Set the model objective.
Parameters
----------
model : cobra model
The model to set the objective for
value : model.problem.Objective,
e.g. optlang.glpk_interface.Objective, sympy.Basic or dict
If the model objective is linear, the value can be a new Objective
object or a dictionary with linear coefficients where each key is a
reaction and the element the new coefficient (float).
If the objective is not linear and `additive` is true, only values
of class Objective.
additive : bool
If true, add the terms to the current objective, otherwise start with
an empty objective.
"""
interface = model.problem
reverse_value = model.solver.objective.expression
reverse_value = interface.Objective(
reverse_value, direction=model.solver.objective.direction,
sloppy=True)
if isinstance(value, dict):
if not model.objective.is_Linear:
raise ValueError('can only update non-linear objectives '
'additively using object of class '
'model.problem.Objective, not %s' %
type(value))
if not additive:
model.solver.objective = interface.Objective(
Zero, direction=model.solver.objective.direction)
for reaction, coef in value.items():
model.solver.objective.set_linear_coefficients(
{reaction.forward_variable: coef,
reaction.reverse_variable: -coef})
elif isinstance(value, (Basic, optlang.interface.Objective)):
if isinstance(value, Basic):
value = interface.Objective(
value, direction=model.solver.objective.direction,
sloppy=False)
# Check whether expression only uses variables from current model
# clone the objective if not, faster than cloning without checking
if not _valid_atoms(model, value.expression):
value = interface.Objective.clone(value, model=model.solver)
if not additive:
model.solver.objective = value
else:
model.solver.objective += value.expression
else:
raise TypeError(
'%r is not a valid objective for %r.' % (value, model.solver))
context = get_context(model)
if context:
def reset():
model.solver.objective = reverse_value
model.solver.objective.direction = reverse_value.direction
context(reset)
def interface_to_str(interface):
"""Give a string representation for an optlang interface.
Parameters
----------
interface : string, ModuleType
Full name of the interface in optlang or cobra representation.
For instance 'optlang.glpk_interface' or 'optlang-glpk'.
Returns
-------
string
The name of the interface as a string
"""
if isinstance(interface, ModuleType):
interface = interface.__name__
return re.sub(r"optlang.|.interface", "", interface)
def get_solver_name(mip=False, qp=False):
"""Select a solver for a given optimization problem.
Parameters
----------
mip : bool
Does the solver require mixed integer linear programming capabilities?
qp : bool
Does the solver require quadratic programming capabilities?
Returns
-------
string
The name of feasible solver.
Raises
------
SolverNotFound
If no suitable solver could be found.
"""
if len(solvers) == 0:
raise SolverNotFound("no solvers installed")
# Those lists need to be updated as optlang implements more solvers
mip_order = ["gurobi", "cplex", "glpk"]
lp_order = ["glpk", "cplex", "gurobi"]
qp_order = ["cplex"]
if mip is False and qp is False:
for solver_name in lp_order:
if solver_name in solvers:
return solver_name
# none of them are in the list order - so return the first one
return list(solvers)[0]
elif qp: # mip does not yet matter for this determination
for solver_name in qp_order:
if solver_name in solvers:
return solver_name
raise SolverNotFound("no qp-capable solver found")
else:
for solver_name in mip_order:
if solver_name in solvers:
return solver_name
raise SolverNotFound("no mip-capable solver found")
def choose_solver(model, solver=None, qp=False):
"""Choose a solver given a solver name and model.
This will choose a solver compatible with the model and required
capabilities. Also respects model.solver where it can.
Parameters
----------
model : a cobra model
The model for which to choose the solver.
solver : str, optional
The name of the solver to be used. Optlang solvers should be prefixed
by "optlang-", for instance "optlang-glpk".
qp : boolean, optional
Whether the solver needs Quadratic Programming capabilities.
Returns
-------
legacy : boolean
Whether the returned solver is a legacy (old cobra solvers) version or
an optlang solver (legacy = False).
solver : a cobra or optlang solver interface
Returns a valid solver for the problem. May be a cobra solver or an
optlang interface.
Raises
------
SolverNotFound
If no suitable solver could be found.
"""
legacy = False
if solver is None:
solver = model.problem
elif "optlang-" in solver:
solver = interface_to_str(solver)
solver = solvers[solver]
else:
legacy = True
solver = legacy_solvers.solver_dict[solver]
# Check for QP, raise error if no QP solver found
# optlang only since old interface interprets None differently
if qp and interface_to_str(solver) not in qp_solvers:
solver = solvers[get_solver_name(qp=True)]
return legacy, solver
def add_cons_vars_to_problem(model, what, **kwargs):
"""Add variables and constraints to a Model's solver object.
Useful for variables and constraints that can not be expressed with
reactions and lower/upper bounds. Will integrate with the Model's context
manager in order to revert changes upon leaving the context.
Parameters
----------
model : a cobra model
The model to which to add the variables and constraints.
what : list or tuple of optlang variables or constraints.
The variables or constraints to add to the model. Must be of class
`model.problem.Variable` or
`model.problem.Constraint`.
**kwargs : keyword arguments
passed to solver.add()
"""
context = get_context(model)
model.solver.add(what, **kwargs)
if context:
context(partial(model.solver.remove, what))
def remove_cons_vars_from_problem(model, what):
"""Remove variables and constraints from a Model's solver object.
Useful to temporarily remove variables and constraints from a Models's
solver object.
Parameters
----------
model : a cobra model
The model from which to remove the variables and constraints.
what : list or tuple of optlang variables or constraints.
The variables or constraints to remove from the model. Must be of
class `model.problem.Variable` or
`model.problem.Constraint`.
"""
context = get_context(model)
model.solver.remove(what)
if context:
context(partial(model.solver.add, what))
def add_absolute_expression(model, expression, name="abs_var", ub=None,
difference=0, add=True):
"""Add the absolute value of an expression to the model.
Also defines a variable for the absolute value that can be used in other
objectives or constraints.
Parameters
----------
model : a cobra model
The model to which to add the absolute expression.
expression : A sympy expression
Must be a valid expression within the Model's solver object. The
absolute value is applied automatically on the expression.
name : string
The name of the newly created variable.
ub : positive float
The upper bound for the variable.
difference : positive float
The difference between the expression and the variable.
add : bool
Whether to add the variable to the model at once.
Returns
-------
namedtuple
A named tuple with variable and two constraints (upper_constraint,
lower_constraint) describing the new variable and the constraints
that assign the absolute value of the expression to it.
"""
Components = namedtuple('Components', ['variable', 'upper_constraint',
'lower_constraint'])
variable = model.problem.Variable(name, lb=0, ub=ub)
# The following constraints enforce variable > expression and
# variable > -expression
upper_constraint = model.problem.Constraint(expression - variable,
ub=difference,
name="abs_pos_" + name),
lower_constraint = model.problem.Constraint(expression + variable,
lb=difference,
name="abs_neg_" + name)
to_add = Components(variable, upper_constraint, lower_constraint)
if add:
add_cons_vars_to_problem(model, to_add)
return to_add
def fix_objective_as_constraint(model, fraction=1, bound=None,
name='fixed_objective_{}'):
"""Fix current objective as an additional constraint.
When adding constraints to a model, such as done in pFBA which
minimizes total flux, these constraints can become too powerful,
resulting in solutions that satisfy optimality but sacrifices too
much for the original objective function. To avoid that, we can fix
the current objective value as a constraint to ignore solutions that
give a lower (or higher depending on the optimization direction)
objective value than the original model.
When done with the model as a context, the modification to the
objective will be reverted when exiting that context.
Parameters
----------
model : cobra.Model
The model to operate on
fraction : float
The fraction of the optimum the objective is allowed to reach.
bound : float, None
The bound to use instead of fraction of maximum optimal value. If
not None, fraction is ignored.
name : str
Name of the objective. May contain one `{}` placeholder which is filled
with the name of the old objective.
"""
fix_objective_name = name.format(model.objective.name)
if fix_objective_name in model.constraints:
model.solver.remove(fix_objective_name)
if bound is None:
bound = model.slim_optimize(error_value=None) * fraction
if model.objective.direction == 'max':
ub, lb = None, bound
else:
ub, lb = bound, None
constraint = model.problem.Constraint(
model.objective.expression,
name=fix_objective_name, ub=ub, lb=lb)
add_cons_vars_to_problem(model, constraint, sloppy=True)
def check_solver_status(status, raise_error=False):
"""Perform standard checks on a solver's status."""
if status == optlang.interface.OPTIMAL:
return
elif status == optlang.interface.INFEASIBLE and not raise_error:
warn("solver status is '{}'".format(status), UserWarning)
elif status is None:
raise RuntimeError(
"model was not optimized yet or solver context switched")
else:
raise OptimizationError("solver status is '{}'".format(status))
def assert_optimal(model, message='optimization failed'):
"""Assert model solver status is optimal.
Do nothing if model solver status is optimal, otherwise throw
appropriate exception depending on the status.
Parameters
----------
model : cobra.Model
The model to check the solver status for.
message : str (optional)
Message to for the exception if solver status was not optimal.
"""
if model.solver.status != optlang.interface.OPTIMAL:
raise OPTLANG_TO_EXCEPTIONS_DICT[model.solver.status](message)
import cobra.solvers as legacy_solvers # noqa
| zakandrewking/cobrapy | cobra/util/solver.py | Python | lgpl-2.1 | 15,435 |
// Copyright 2018 Google LLC. All Rights Reserved.
/*
Copyright (C) 2005-2017 Steven L. Scott
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "Models/Mixtures/DirichletProcessMixture.hpp"
#include "Models/Mixtures/PosteriorSamplers/SplitMerge.hpp"
#include "cpputil/report_error.hpp"
#include "cpputil/shift_element.hpp"
#include "distributions.hpp"
namespace BOOM {
namespace {
typedef DirichletProcessMixtureModel DPMM;
typedef ConjugateDirichletProcessMixtureModel CDPMM;
typedef DirichletProcessMixtureComponent DpMixtureComponent;
typedef ConjugateDirichletProcessMixtureComponent
ConjugateDpMixtureComponent;
} // namespace
DPMM::DirichletProcessMixtureModel(
const Ptr<DirichletProcessMixtureComponent> &mixture_component_prototype,
const Ptr<HierarchicalPosteriorSampler> &base_distribution,
const Ptr<UnivParams> &concentration_parameter)
: mixture_component_prototype_(mixture_component_prototype),
base_distribution_(base_distribution),
concentration_parameter_(concentration_parameter),
mixing_weights_(1, 1.0),
spare_mixture_component_target_buffer_size_(10) {
observe_concentration_parameter();
}
void DPMM::set_stick_fractions(const Vector &stick_fractions) {
if (stick_fractions.size() != number_of_components()) {
report_error("Stick fractions have the wrong dimension.");
}
stick_fractions_ = stick_fractions;
compute_mixing_weights();
}
int DPMM::cluster_indicator(int observation) const {
const Ptr<Data> &data_point(dat()[observation]);
auto it = cluster_indicators_.find(data_point);
if (it != cluster_indicators_.end()) {
// If the observation is currently unassigned then its cluster indicator
// is the nullptr. Return -1 in that case.
return !!it->second ? it->second->mixture_component_index() : -1;
} else {
report_error("Cluster indicator could not be found");
return -2; // Will never get here
}
}
void DPMM::cluster_indicators(std::vector<int> &indicators) const {
int sample_size = number_of_observations();
indicators.resize(sample_size);
for (int i = 0; i < sample_size; ++i) {
indicators[i] = cluster_indicator(i);
}
}
void DPMM::add_data(const Ptr<Data> &dp) {
data_.push_back(dp);
cluster_indicators_[dp] = nullptr;
}
void DPMM::clear_data() {
data_.clear();
for (int i = 0; i < mixture_components_.size(); ++i) {
mixture_components_[i]->clear_data();
}
cluster_indicators_.clear();
}
void DPMM::combine_data(const Model &other_model, bool just_suf) {
const DPMM &other(dynamic_cast<const DPMM &>(other_model));
const std::vector<Ptr<Data>> &other_data(other.dat());
for (int i = 0; i < other_data.size(); ++i) {
add_data(other_data[i]);
}
}
void DPMM::accept_split_merge_proposal(const SplitMerge::Proposal &proposal) {
if (proposal.is_merge()) {
replace_cluster(
mixture_components_[proposal.split1()->mixture_component_index()],
proposal.merged());
int component_index_2 = proposal.split2()->mixture_component_index();
mixture_components_[component_index_2]->clear_data();
remove_empty_cluster(mixture_components_[component_index_2], false);
// The last element of proposal.merged_mixing_weights() is the mixing
// weight for an empty cluster. Get rid of that and put in the collective
// weight for all unpopulated components.
mixing_weights_ = proposal.merged_mixing_weights();
mixing_weights_.back() = 0;
mixing_weights_.back() = 1.0 - mixing_weights_.sum();
} else {
// Accept a split move.
replace_cluster(
mixture_components_[proposal.merged()->mixture_component_index()],
proposal.split1());
insert_cluster(proposal.split2(),
proposal.split2()->mixture_component_index());
mixing_weights_ = proposal.split_mixing_weights();
mixing_weights_.push_back(1.0 - mixing_weights_.sum());
}
compute_stick_fractions_from_mixing_weights();
}
void DPMM::assign_data_to_cluster(const Ptr<Data> &dp, int cluster,
RNG &rng) {
if (cluster == number_of_components()) {
add_empty_cluster(rng);
}
if (cluster < number_of_components()) {
mixture_components_[cluster]->add_data(dp);
cluster_indicators_[dp] = mixture_components_[cluster];
} else {
report_error("Invalid cluster index.");
}
}
void DPMM::remove_data_from_cluster(const Ptr<Data> &dp,
bool remove_empty_cluster) {
Ptr<DirichletProcessMixtureComponent> component = cluster_indicators_[dp];
if (!!component) {
component->remove_data(dp);
if (component->number_of_observations() == 0 && remove_empty_cluster) {
this->remove_empty_cluster(component, true);
}
}
cluster_indicators_[dp] = nullptr;
}
void DPMM::add_empty_cluster(RNG &rng) {
repopulate_spare_mixture_components();
Ptr<DirichletProcessMixtureComponent> component =
spare_mixture_components_.back();
assign_and_add_mixture_component(component, rng);
pop_spare_component_stack();
}
void DPMM::remove_empty_cluster(const Ptr<DpMixtureComponent> &component,
bool adjust_mixing_weights) {
if (component->number_of_observations() != 0) {
report_error("Cluster to be removed is not empty.");
}
int which_cluster = component->mixture_component_index();
if (which_cluster < 0) {
// The component is not currently assigned.
return;
} else if (which_cluster > number_of_components()) {
report_error("Mixture component index too large.");
}
if (mixture_components_[which_cluster] != component) {
report_error("Mixture components have become misaligned.");
}
component->set_mixture_component_index(-1);
spare_mixture_components_.push_back(component);
for (int i = which_cluster; i < mixture_components_.size(); ++i) {
mixture_components_[i]->decrement_mixture_component_index();
}
mixture_components_.erase(mixture_components_.begin() + which_cluster);
if (adjust_mixing_weights) {
stick_fractions_.erase(stick_fractions_.begin() + which_cluster);
mixing_weights_.pop_back();
compute_mixing_weights();
}
}
void DPMM::remove_all_empty_clusters() {
for (int i = 0; i < mixture_components_.size(); ++i) {
if (cluster_count(i) == 0) {
remove_empty_cluster(mixture_components_[i], true);
--i;
}
}
}
void DPMM::shift_cluster(int from, int to) {
shift_element(mixture_components_, from, to);
for (int i = 0; i < number_of_components(); ++i) {
mixture_components_[i]->set_mixture_component_index(i);
}
mixing_weights_.shift_element(from, to);
compute_stick_fractions_from_mixing_weights();
}
void DPMM::compute_mixing_weights() {
mixing_weights_.resize(stick_fractions_.size() + 1);
double fraction_remaining = 1.0;
for (int i = 0; i < stick_fractions_.size(); ++i) {
mixing_weights_[i] = stick_fractions_[i] * fraction_remaining;
fraction_remaining *= (1 - stick_fractions_[i]);
}
mixing_weights_.back() = fraction_remaining;
}
void DPMM::compute_stick_fractions_from_mixing_weights() {
stick_fractions_.resize(mixing_weights_.size() - 1);
stick_fractions_[0] = mixing_weights_[0];
double probability_remaining = 1.0 - stick_fractions_[0];
for (int i = 1; i < stick_fractions_.size(); ++i) {
stick_fractions_[i] = mixing_weights_[i] / probability_remaining;
probability_remaining -= mixing_weights_[i];
}
}
// Here is the math for the stick breaking distribution. Let w = w1, w2, ...,
// wn. The density factors as p(w) = p(w1) p(w2 | w1) ... p(wn | w1..wn).
// Each wi is defined as vi * (1 - sum of previous weights), where vi ~
// Beta(1, alpha).
//
// That means p(wi | w1, ..., wi-1) = Beta(wi / previous) / previous, where
// the extra factor is a Jacobian.
//
// There is some nice cancellation that falls out of the beta distribution.
// Beta(v, 1, alpha) = Gamma(1 + alpha)
// ------------------- * v^(1-1) * (1-v)^(alpha - 1).
// Gamma(1) Gamma(alpha)
//
// Now, Gamma(1 + alpha) = alpha * Gamma(alpha), so the normalizing constant
// here is just alpha, and the density is just (1-v)^(alpha-1).
//
// The Jacobian term is 1/previous, where we can write previous_i =
// (1-v1)...(1-vi-1). Thus 1-v1 appears in the denominator of n-1 terms, 1-v2
// in n-2 terms etc.
//
// Putting all this together gives
// p(w) = alpha^n \prod_{i=1}^n (1-v_i)^{\alpha + i - 1 - n)}
//
// In C's zero-based counting scheme we just replace i-1 with i.
double DPMM::dstick(const Vector &weights, double alpha, bool logscale) {
// The amount of probability remaining after subtracting off all previous
// mixing weights.
double log_alpha = log(alpha);
int dim = weights.size();
double ans = dim * log_alpha;
double previous_probability = 1.0;
for (int i = 0; i < dim; ++i) {
if (previous_probability > 0) {
double stick_fraction = weights[i] / previous_probability;
previous_probability -= weights[i];
ans += (alpha + i - dim) * log(1 - stick_fraction);
} else {
// Do some error checking to make sure previous_probability isn't so
// more negative than can plausibly be attributed to numerical issues.
if (fabs(previous_probability) > 1e-10) {
report_error("Vector of weights sums to more than 1.");
} else {
// Assume all future weights (and thus all future stick fractions) are
// zero. Each zero stick fraction increments ans by zero, so we're
// done.
break;
}
}
}
return logscale ? ans : exp(ans);
}
void DPMM::repopulate_spare_mixture_components() {
if (spare_mixture_components_.empty()) {
for (int i = 0; i < spare_mixture_component_target_buffer_size(); ++i) {
Ptr<DirichletProcessMixtureComponent> component =
mixture_component_prototype_->clone();
component->clear_data();
unassign_component_and_add_to_spares(component);
}
}
}
void DPMM::pop_spare_component_stack() {
spare_mixture_components_.pop_back();
}
void DPMM::unassign_component_and_add_to_spares(
const Ptr<DirichletProcessMixtureComponent> &component) {
spare_mixture_components_.push_back(component);
spare_mixture_components_.back()->set_mixture_component_index(-1);
}
void DPMM::assign_and_add_mixture_component(
const Ptr<DpMixtureComponent> &component, RNG &rng) {
mixture_components_.push_back(component);
base_distribution_->draw_model_parameters(*mixture_components_.back());
mixture_components_.back()->set_mixture_component_index(
mixture_components_.size() - 1);
stick_fractions_.push_back(rbeta_mt(rng, 1, concentration_parameter()));
double remainder = mixing_weights_.back();
mixing_weights_.back() = remainder * stick_fractions_.back();
mixing_weights_.push_back(remainder * (1 - stick_fractions_.back()));
}
void DPMM::replace_cluster(
const Ptr<DpMixtureComponent> &component_to_replace,
const Ptr<DpMixtureComponent> &new_component) {
int index = component_to_replace->mixture_component_index();
component_to_replace->set_mixture_component_index(-1);
component_to_replace->clear_data();
spare_mixture_components_.push_back(component_to_replace);
int buffer_size = spare_mixture_component_target_buffer_size_;
if (spare_mixture_components_.size() > 2 * buffer_size) {
spare_mixture_components_.erase(
spare_mixture_components_.begin() + buffer_size,
spare_mixture_components_.end());
}
new_component->set_mixture_component_index(index);
mixture_components_[index] = new_component;
std::set<Ptr<Data>> data_set = new_component->abstract_data_set();
for (const auto &el : data_set) {
cluster_indicators_[el] = new_component;
}
}
void DPMM::insert_cluster(const Ptr<DpMixtureComponent> &component,
int index) {
mixture_components_.insert(mixture_components_.begin() + index, component);
std::set<Ptr<Data>> data_set = component->abstract_data_set();
for (const auto &data_point : data_set) {
cluster_indicators_[data_point] = component;
}
for (int i = index; i < mixture_components_.size(); ++i) {
mixture_components_[i]->set_mixture_component_index(i);
}
}
void DPMM::observe_concentration_parameter() {
concentration_parameter_->add_observer([this]() {
this->log_concentration_parameter_ = log(this->concentration_parameter());
});
concentration_parameter_->set(concentration_parameter());
}
//======================================================================
CDPMM::ConjugateDirichletProcessMixtureModel(
const Ptr<ConjugateDpMixtureComponent> &mixture_component_prototype,
const Ptr<ConjugateHierarchicalPosteriorSampler> &base_distribution,
const Ptr<UnivParams> &concentration_parameter)
: DPMM(mixture_component_prototype, base_distribution,
concentration_parameter),
conjugate_mixture_component_prototype_(mixture_component_prototype),
conjugate_base_distribution_(base_distribution) {}
double ConjugateDirichletProcessMixtureModel::log_marginal_density(
const Ptr<Data> &data_point, int which_component) const {
if (which_component > 0) {
return conjugate_base_distribution_->log_marginal_density(
data_point, component(which_component));
} else {
return conjugate_base_distribution_->log_marginal_density(
data_point, conjugate_mixture_component_prototype_.get());
}
}
void CDPMM::add_empty_cluster(RNG &rng) {
repopulate_spare_mixture_components();
Ptr<ConjugateDpMixtureComponent> component =
spare_conjugate_components_.back();
conjugate_mixture_components_.push_back(component);
DPMM::assign_and_add_mixture_component(component, rng);
pop_spare_component_stack();
}
void CDPMM::remove_empty_cluster(const Ptr<DpMixtureComponent> &component,
bool adjust_mixing_weights) {
int which_cluster = component->mixture_component_index();
if (conjugate_mixture_components_[which_cluster] != component) {
report_error("Conjugate mixture components have become misaligned");
}
spare_conjugate_components_.push_back(
conjugate_mixture_components_[which_cluster]);
conjugate_mixture_components_.erase(conjugate_mixture_components_.begin() +
which_cluster);
DPMM::remove_empty_cluster(component, adjust_mixing_weights);
}
void CDPMM::replace_cluster(
const Ptr<DpMixtureComponent> &component_to_replace,
const Ptr<DpMixtureComponent> &new_component) {
int index = component_to_replace->mixture_component_index();
conjugate_mixture_components_[index] =
new_component.dcast<ConjugateDirichletProcessMixtureComponent>();
DPMM::replace_cluster(component_to_replace, new_component);
}
void CDPMM::insert_cluster(const Ptr<DpMixtureComponent> &component,
int index) {
conjugate_mixture_components_.insert(
conjugate_mixture_components_.begin() + index,
component.dcast<ConjugateDpMixtureComponent>());
DPMM::insert_cluster(component, index);
}
void CDPMM::shift_cluster(int from, int to) {
shift_element(conjugate_mixture_components_, from, to);
DPMM::shift_cluster(from, to);
}
void CDPMM::repopulate_spare_mixture_components() {
if (spare_conjugate_components_.empty()) {
for (int i = 0; i < spare_mixture_component_target_buffer_size(); ++i) {
Ptr<ConjugateDirichletProcessMixtureComponent> component =
conjugate_mixture_component_prototype_->clone();
component->clear_data();
unassign_component_and_add_to_spares(component);
spare_conjugate_components_.push_back(component);
}
}
}
void CDPMM::pop_spare_component_stack() {
spare_conjugate_components_.pop_back();
DPMM::pop_spare_component_stack();
}
} // namespace BOOM
| cran/Boom | src/Models/Mixtures/DirichletProcessMixture.cpp | C++ | lgpl-2.1 | 17,226 |
//
// Created by anton on 21.03.15.
//
#include "wMotion.h"
#include "Matrix.h"
#include <nan.h>
v8::Persistent<FunctionTemplate> wMotion::constructor;
int buffersSize;
unsigned char *cur;
float *recent;
float *bg;
int motionThreshold, presenceThreshold;
float motionWeight, presenceWeight;
void
wMotion::Init(Handle<Object> target) {
NanScope();
//Class
Local<FunctionTemplate> ctor = NanNew<FunctionTemplate>(wMotion::New);
NanAssignPersistent(constructor, ctor);
ctor->InstanceTemplate()->SetInternalFieldCount(1);
ctor->SetClassName(NanNew("wMotion"));
// Prototype
NODE_SET_PROTOTYPE_METHOD(ctor, "process", Process);
target->Set(NanNew("wMotion"), ctor->GetFunction());
}
NAN_METHOD(wMotion::New) {
NanScope();
NanReturnValue(args.Holder());
}
wMotion::wMotion(): ObjectWrap() {
if( cur ) delete[] cur;
if( bg ) delete[] bg;
if( recent ) delete[] recent;
buffersSize = 0;
cur = NULL;
bg = recent = NULL;
motionThreshold = 8; // min 0 max 255
presenceThreshold = 8; // min 0 max 255
motionWeight = 0.1; // min 0 max 2
presenceWeight = 0.0001; // min 0 max 2
}
void quarterScale( unsigned char *to, unsigned char *from, int w, int h ) {
for( int y=0; y<h-1; y+=2 ) {
int yw = (y*w);
for( int x=0; x<w-1; x+=2 ) {
to[ (yw/4) + (x/2) ] =
(
from[ yw + x ]
+from[ yw + x + 1 ]
+from[ yw + w + x ]
+from[ yw + w + x + 1 ]
) / 4;
}
}
}
NAN_METHOD(wMotion::Reset) {
NanScope();
buffersSize = -1;
NanReturnNull();
}
NAN_METHOD(wMotion::Process) {
NanScope();
Matrix *src = ObjectWrap::Unwrap<Matrix>(args[0]->ToObject());
cv::Mat yuv;
cv::cvtColor(src->mat, yuv, CV_RGB2YCrCb);
motionThreshold = args[1]->IntegerValue();
presenceThreshold = args[2]->IntegerValue();
motionWeight = (float)args[3]->NumberValue();
presenceWeight = (float)args[4]->NumberValue();
int sz = yuv.cols*yuv.rows;
int sz4 = ( (yuv.cols/2)*(yuv.rows/2));
unsigned char *Y = yuv.data;
unsigned char *U = Y + sz;
unsigned char *V = U + sz4;
if( buffersSize != sz4 ) {
if( cur ) delete[] cur;
if( recent ) delete[] recent;
if( bg ) delete[] bg;
buffersSize = sz4;
cur = new unsigned char[sz4];
recent = new float[sz4];
bg = new float[sz4];
quarterScale( cur, Y, yuv.cols, yuv.rows );
for( int i=0; i<sz4; i++ ) recent[i]=bg[i]=cur[i];
} else {
quarterScale( cur, Y, yuv.cols, yuv.rows );
}
unsigned char mthresh = motionThreshold;
unsigned char pthresh = presenceThreshold;
unsigned char *P = U;
unsigned char *M = V;
float pw = presenceWeight;
float pwn = 1.-pw;
float mw = motionWeight;
float mwn = 1.-mw;
for( int i=0; i<sz4; i++ ) {
// 0-255, threshold
//M[i] = abs( late[i]-cur[i] )>mthresh?255:0;
//P[i] = abs( bg[i]-cur[i] )>pthresh?255:0;
// good looking
M[i] = abs( recent[i]-cur[i] )>mthresh?64:128;
P[i] = abs( bg[i]-cur[i] )>pthresh?64:128;
// "real"
//M[i] = 128+(late[i]-cur[i]);
//P[i] = 128+(bg[i]-cur[i]);
bg[i] *= pwn;
bg[i] += cur[i]*pw;
recent[i] *= mwn;
recent[i] += cur[i]*mw;
}
v8::Local<v8::Array> arr = NanNew<Array>(2);
v8::Handle<v8::Object> currentArray = NanNew<v8::Object>();
currentArray->SetIndexedPropertiesToExternalArrayData(&cur, v8::kExternalUnsignedByteArray, sz4);
v8::Handle<v8::Object> recentArray = NanNew<v8::Object>();
recentArray->SetIndexedPropertiesToExternalArrayData(&cur, v8::kExternalUnsignedByteArray, sz4);
arr->Set(0, currentArray);
arr->Set(1, recentArray);
NanReturnValue(arr);
}
| dasantonym/node-wdt-native | src/wMotion.cc | C++ | lgpl-2.1 | 4,224 |
/* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007 The Open Thread Group
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
//
// PThreadMutex.c++ - C++ Mutex class built on top of posix threads.
// ~~~~~~~~~~~~~~~~
//
#include <unistd.h>
#include <pthread.h>
#include <OpenThreads/Mutex>
#include "PThreadMutexPrivateData.h"
using namespace OpenThreads;
// ----------------------------------------------------------------------------
//
// Decription: Constructor
//
// Use: public.
//
Mutex::Mutex(MutexType type) :
_mutexType(type)
{
pthread_mutexattr_t mutex_attr;
pthread_mutexattr_init(&mutex_attr);
PThreadMutexPrivateData *pd = new PThreadMutexPrivateData();
if (type == MUTEX_RECURSIVE)
{
pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_RECURSIVE);
}
else
{
#ifndef __linux__ // (not available until NPTL) [
pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_ERRORCHECK);
#endif // ] __linux__
}
#ifdef ALLOW_PRIORITY_SCHEDULING // [
#ifdef __sun // [
pthread_mutexattr_setprotocol(&mutex_attr, PTHREAD_PRIO_NONE);
#endif // ] __sun
// -------------------------------------------------------------------------
// Initialization is a bit tricky, since we have to be able to be aware
// that on many-to-many execution vehicle systems, we may run into
// priority inversion deadlocks if a mutex is shared between threads
// of differing priorities. Systems that do this should provide the
// following protocol attributes to prevent deadlocks. Check at runtime.
//
// PRIO_INHERIT causes any thread locking the mutex to temporarily become
// the same priority as the highest thread also blocked on the mutex.
// Although more expensive, this is the preferred method.
//
// PRIO_PROTECT causes any thread locking the mutex to assume the priority
// specified by setprioceiling. pthread_mutex_lock will fail if
// the priority ceiling is lower than the thread's priority. Therefore,
// the priority ceiling must be set to the max priority in order to
// guarantee no deadlocks will occur.
//
#if defined (_POSIX_THREAD_PRIO_INHERIT) || defined (_POSIX_THREAD_PRIO_PROTECT) // [
if (sysconf(_POSIX_THREAD_PRIO_INHERIT))
{
pthread_mutexattr_setprotocol(&mutex_attr, PTHREAD_PRIO_INHERIT);
}
else if (sysconf(_POSIX_THREAD_PRIO_PROTECT))
{
int th_policy;
struct sched_param th_param;
pthread_getschedparam(pthread_self(), &th_policy, &th_param);
pthread_mutexattr_setprotocol(&mutex_attr, PTHREAD_PRIO_PROTECT);
pthread_mutexattr_setprioceiling(&mutex_attr,
sched_get_priority_max(th_policy));
}
#endif // ] Priority Scheduling.
#endif // ] ALLOW_PRIORITY_SCHEDULING
pthread_mutex_init(&pd->mutex, &mutex_attr);
_prvData = static_cast<void*>(pd);
}
// ----------------------------------------------------------------------------
//
// Decription: Destructor
//
// Use: public.
//
Mutex::~Mutex()
{
PThreadMutexPrivateData *pd =
static_cast<PThreadMutexPrivateData*>(_prvData);
pthread_mutex_destroy(&pd->mutex);
delete pd;
}
// ----------------------------------------------------------------------------
//
// Decription: lock the mutex
//
// Use: public.
//
int Mutex::lock()
{
PThreadMutexPrivateData *pd =
static_cast<PThreadMutexPrivateData*>(_prvData);
return pthread_mutex_lock(&pd->mutex);
}
// ----------------------------------------------------------------------------
//
// Decription: unlock the mutex
//
// Use: public.
//
int Mutex::unlock()
{
PThreadMutexPrivateData *pd =
static_cast<PThreadMutexPrivateData*>(_prvData);
return pthread_mutex_unlock(&pd->mutex);
}
// ----------------------------------------------------------------------------
//
// Decription: test if the mutex may be locked
//
// Use: public.
//
int Mutex::trylock()
{
PThreadMutexPrivateData *pd =
static_cast<PThreadMutexPrivateData*>(_prvData);
return pthread_mutex_trylock(&pd->mutex);
} | hyyh619/OpenSceneGraph-3.4.0 | src/OpenThreads/pthreads/PThreadMutex.cpp | C++ | lgpl-2.1 | 4,679 |
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#include "buildprogress.h"
#include "projectexplorerconstants.h"
#include <coreplugin/coreconstants.h>
#include <utils/stylehelper.h>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QLabel>
#include <QFont>
#include <QPixmap>
#include <QDebug>
using namespace ProjectExplorer;
using namespace ProjectExplorer::Internal;
BuildProgress::BuildProgress(TaskWindow *taskWindow, Qt::Orientation orientation)
: m_contentWidget(new QWidget),
m_errorIcon(new QLabel),
m_warningIcon(new QLabel),
m_errorLabel(new QLabel),
m_warningLabel(new QLabel),
m_taskWindow(taskWindow)
{
QHBoxLayout *contentLayout = new QHBoxLayout;
contentLayout->setContentsMargins(0, 0, 0, 0);
contentLayout->setSpacing(0);
setLayout(contentLayout);
contentLayout->addWidget(m_contentWidget);
QBoxLayout *layout;
if (orientation == Qt::Horizontal)
layout = new QHBoxLayout;
else
layout = new QVBoxLayout;
layout->setContentsMargins(8, 2, 0, 2);
layout->setSpacing(2);
m_contentWidget->setLayout(layout);
QHBoxLayout *errorLayout = new QHBoxLayout;
errorLayout->setSpacing(2);
layout->addLayout(errorLayout);
errorLayout->addWidget(m_errorIcon);
errorLayout->addWidget(m_errorLabel);
QHBoxLayout *warningLayout = new QHBoxLayout;
warningLayout->setSpacing(2);
layout->addLayout(warningLayout);
warningLayout->addWidget(m_warningIcon);
warningLayout->addWidget(m_warningLabel);
// ### TODO this setup should be done by style
QFont f = this->font();
f.setPointSizeF(Utils::StyleHelper::sidebarFontSize());
f.setBold(true);
m_errorLabel->setFont(f);
m_warningLabel->setFont(f);
m_errorLabel->setPalette(Utils::StyleHelper::sidebarFontPalette(m_errorLabel->palette()));
m_warningLabel->setPalette(Utils::StyleHelper::sidebarFontPalette(m_warningLabel->palette()));
m_errorIcon->setAlignment(Qt::AlignRight);
m_warningIcon->setAlignment(Qt::AlignRight);
m_errorIcon->setPixmap(QPixmap(QLatin1String(Core::Constants::ICON_ERROR)));
m_warningIcon->setPixmap(QPixmap(QLatin1String(Core::Constants::ICON_WARNING)));
m_contentWidget->hide();
connect(m_taskWindow, SIGNAL(tasksChanged()), this, SLOT(updateState()));
}
void BuildProgress::updateState()
{
if (!m_taskWindow)
return;
int errors = m_taskWindow->errorTaskCount(Constants::TASK_CATEGORY_BUILDSYSTEM)
+ m_taskWindow->errorTaskCount(Constants::TASK_CATEGORY_COMPILE)
+ m_taskWindow->errorTaskCount(Constants::TASK_CATEGORY_DEPLOYMENT);
bool haveErrors = (errors > 0);
m_errorIcon->setEnabled(haveErrors);
m_errorLabel->setEnabled(haveErrors);
m_errorLabel->setText(QString::number(errors));
int warnings = m_taskWindow->warningTaskCount(Constants::TASK_CATEGORY_BUILDSYSTEM)
+ m_taskWindow->warningTaskCount(Constants::TASK_CATEGORY_COMPILE)
+ m_taskWindow->warningTaskCount(Constants::TASK_CATEGORY_DEPLOYMENT);
bool haveWarnings = (warnings > 0);
m_warningIcon->setEnabled(haveWarnings);
m_warningLabel->setEnabled(haveWarnings);
m_warningLabel->setText(QString::number(warnings));
// Hide warnings and errors unless you need them
m_warningIcon->setVisible(haveWarnings);
m_warningLabel->setVisible(haveWarnings);
m_errorIcon->setVisible(haveErrors);
m_errorLabel->setVisible(haveErrors);
m_contentWidget->setVisible(haveWarnings || haveErrors);
}
| maui-packages/qt-creator | src/plugins/projectexplorer/buildprogress.cpp | C++ | lgpl-2.1 | 4,964 |
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying
** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qvideowidget_p.h"
#include <qmediaobject.h>
#include <qmediaservice.h>
#include <qvideowindowcontrol.h>
#include <qvideowidgetcontrol.h>
#include <qpaintervideosurface_p.h>
#include <qvideorenderercontrol.h>
#include <qvideosurfaceformat.h>
#include <qpainter.h>
#include <qapplication.h>
#include <qevent.h>
#include <qdialog.h>
#include <qboxlayout.h>
#include <qnamespace.h>
using namespace Qt;
QT_BEGIN_NAMESPACE
QVideoWidgetControlBackend::QVideoWidgetControlBackend(
QMediaService *service, QVideoWidgetControl *control, QWidget *widget)
: m_service(service)
, m_widgetControl(control)
{
connect(control, SIGNAL(brightnessChanged(int)), widget, SLOT(_q_brightnessChanged(int)));
connect(control, SIGNAL(contrastChanged(int)), widget, SLOT(_q_contrastChanged(int)));
connect(control, SIGNAL(hueChanged(int)), widget, SLOT(_q_hueChanged(int)));
connect(control, SIGNAL(saturationChanged(int)), widget, SLOT(_q_saturationChanged(int)));
connect(control, SIGNAL(fullScreenChanged(bool)), widget, SLOT(_q_fullScreenChanged(bool)));
QBoxLayout *layout = new QVBoxLayout;
layout->setMargin(0);
layout->setSpacing(0);
#ifdef Q_OS_SYMBIAN
// On some cases the flag is not reset automatically
// This would lead to viewfinder not being visible on Symbian
control->videoWidget()->setAttribute(Qt::WA_WState_ExplicitShowHide, false);
#endif // Q_OS_SYMBIAN
layout->addWidget(control->videoWidget());
widget->setLayout(layout);
}
void QVideoWidgetControlBackend::releaseControl()
{
m_service->releaseControl(m_widgetControl);
}
void QVideoWidgetControlBackend::setBrightness(int brightness)
{
m_widgetControl->setBrightness(brightness);
}
void QVideoWidgetControlBackend::setContrast(int contrast)
{
m_widgetControl->setContrast(contrast);
}
void QVideoWidgetControlBackend::setHue(int hue)
{
m_widgetControl->setHue(hue);
}
void QVideoWidgetControlBackend::setSaturation(int saturation)
{
m_widgetControl->setSaturation(saturation);
}
void QVideoWidgetControlBackend::setFullScreen(bool fullScreen)
{
m_widgetControl->setFullScreen(fullScreen);
}
Qt::AspectRatioMode QVideoWidgetControlBackend::aspectRatioMode() const
{
return m_widgetControl->aspectRatioMode();
}
void QVideoWidgetControlBackend::setAspectRatioMode(Qt::AspectRatioMode mode)
{
m_widgetControl->setAspectRatioMode(mode);
}
QRendererVideoWidgetBackend::QRendererVideoWidgetBackend(
QMediaService *service, QVideoRendererControl *control, QWidget *widget)
: m_service(service)
, m_rendererControl(control)
, m_widget(widget)
, m_surface(new QPainterVideoSurface)
, m_aspectRatioMode(Qt::KeepAspectRatio)
, m_updatePaintDevice(true)
{
connect(this, SIGNAL(brightnessChanged(int)), m_widget, SLOT(_q_brightnessChanged(int)));
connect(this, SIGNAL(contrastChanged(int)), m_widget, SLOT(_q_contrastChanged(int)));
connect(this, SIGNAL(hueChanged(int)), m_widget, SLOT(_q_hueChanged(int)));
connect(this, SIGNAL(saturationChanged(int)), m_widget, SLOT(_q_saturationChanged(int)));
connect(m_surface, SIGNAL(frameChanged()), this, SLOT(frameChanged()));
connect(m_surface, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat)),
this, SLOT(formatChanged(QVideoSurfaceFormat)));
m_rendererControl->setSurface(m_surface);
}
QRendererVideoWidgetBackend::~QRendererVideoWidgetBackend()
{
delete m_surface;
}
void QRendererVideoWidgetBackend::releaseControl()
{
m_service->releaseControl(m_rendererControl);
}
void QRendererVideoWidgetBackend::clearSurface()
{
m_rendererControl->setSurface(0);
}
void QRendererVideoWidgetBackend::setBrightness(int brightness)
{
m_surface->setBrightness(brightness);
emit brightnessChanged(brightness);
}
void QRendererVideoWidgetBackend::setContrast(int contrast)
{
m_surface->setContrast(contrast);
emit contrastChanged(contrast);
}
void QRendererVideoWidgetBackend::setHue(int hue)
{
m_surface->setHue(hue);
emit hueChanged(hue);
}
void QRendererVideoWidgetBackend::setSaturation(int saturation)
{
m_surface->setSaturation(saturation);
emit saturationChanged(saturation);
}
Qt::AspectRatioMode QRendererVideoWidgetBackend::aspectRatioMode() const
{
return m_aspectRatioMode;
}
void QRendererVideoWidgetBackend::setAspectRatioMode(Qt::AspectRatioMode mode)
{
m_aspectRatioMode = mode;
m_widget->updateGeometry();
}
void QRendererVideoWidgetBackend::setFullScreen(bool)
{
}
QSize QRendererVideoWidgetBackend::sizeHint() const
{
return m_surface->surfaceFormat().sizeHint();
}
void QRendererVideoWidgetBackend::showEvent()
{
}
void QRendererVideoWidgetBackend::hideEvent(QHideEvent *)
{
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
m_updatePaintDevice = true;
m_surface->setGLContext(0);
#endif
}
void QRendererVideoWidgetBackend::resizeEvent(QResizeEvent *)
{
updateRects();
}
void QRendererVideoWidgetBackend::moveEvent(QMoveEvent *)
{
}
void QRendererVideoWidgetBackend::paintEvent(QPaintEvent *event)
{
QPainter painter(m_widget);
if (m_widget->testAttribute(Qt::WA_OpaquePaintEvent)) {
QRegion borderRegion = event->region();
borderRegion = borderRegion.subtracted(m_boundingRect);
QBrush brush = m_widget->palette().window();
QVector<QRect> rects = borderRegion.rects();
for (QVector<QRect>::iterator it = rects.begin(), end = rects.end(); it != end; ++it) {
painter.fillRect(*it, brush);
}
}
if (m_surface->isActive() && m_boundingRect.intersects(event->rect())) {
m_surface->paint(&painter, m_boundingRect, m_sourceRect);
m_surface->setReady(true);
} else {
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
if (m_updatePaintDevice && (painter.paintEngine()->type() == QPaintEngine::OpenGL
|| painter.paintEngine()->type() == QPaintEngine::OpenGL2)) {
m_updatePaintDevice = false;
m_surface->setGLContext(const_cast<QGLContext *>(QGLContext::currentContext()));
if (m_surface->supportedShaderTypes() & QPainterVideoSurface::GlslShader) {
m_surface->setShaderType(QPainterVideoSurface::GlslShader);
} else {
m_surface->setShaderType(QPainterVideoSurface::FragmentProgramShader);
}
}
#endif
}
}
void QRendererVideoWidgetBackend::formatChanged(const QVideoSurfaceFormat &format)
{
m_nativeSize = format.sizeHint();
updateRects();
m_widget->updateGeometry();
m_widget->update();
}
void QRendererVideoWidgetBackend::frameChanged()
{
m_widget->update(m_boundingRect);
}
void QRendererVideoWidgetBackend::updateRects()
{
QRect rect = m_widget->rect();
if (m_nativeSize.isEmpty()) {
m_boundingRect = QRect();
} else if (m_aspectRatioMode == Qt::IgnoreAspectRatio) {
m_boundingRect = rect;
m_sourceRect = QRectF(0, 0, 1, 1);
} else if (m_aspectRatioMode == Qt::KeepAspectRatio) {
QSize size = m_nativeSize;
size.scale(rect.size(), Qt::KeepAspectRatio);
m_boundingRect = QRect(0, 0, size.width(), size.height());
m_boundingRect.moveCenter(rect.center());
m_sourceRect = QRectF(0, 0, 1, 1);
} else if (m_aspectRatioMode == Qt::KeepAspectRatioByExpanding) {
m_boundingRect = rect;
QSizeF size = rect.size();
size.scale(m_nativeSize, Qt::KeepAspectRatio);
m_sourceRect = QRectF(
0, 0, size.width() / m_nativeSize.width(), size.height() / m_nativeSize.height());
m_sourceRect.moveCenter(QPointF(0.5, 0.5));
}
}
QWindowVideoWidgetBackend::QWindowVideoWidgetBackend(
QMediaService *service, QVideoWindowControl *control, QWidget *widget)
: m_service(service)
, m_windowControl(control)
, m_widget(widget)
, m_aspectRatioMode(Qt::KeepAspectRatio)
{
connect(control, SIGNAL(brightnessChanged(int)), m_widget, SLOT(_q_brightnessChanged(int)));
connect(control, SIGNAL(contrastChanged(int)), m_widget, SLOT(_q_contrastChanged(int)));
connect(control, SIGNAL(hueChanged(int)), m_widget, SLOT(_q_hueChanged(int)));
connect(control, SIGNAL(saturationChanged(int)), m_widget, SLOT(_q_saturationChanged(int)));
connect(control, SIGNAL(fullScreenChanged(bool)), m_widget, SLOT(_q_fullScreenChanged(bool)));
connect(control, SIGNAL(nativeSizeChanged()), m_widget, SLOT(_q_dimensionsChanged()));
control->setWinId(widget->winId());
}
QWindowVideoWidgetBackend::~QWindowVideoWidgetBackend()
{
}
void QWindowVideoWidgetBackend::releaseControl()
{
m_service->releaseControl(m_windowControl);
}
void QWindowVideoWidgetBackend::setBrightness(int brightness)
{
m_windowControl->setBrightness(brightness);
}
void QWindowVideoWidgetBackend::setContrast(int contrast)
{
m_windowControl->setContrast(contrast);
}
void QWindowVideoWidgetBackend::setHue(int hue)
{
m_windowControl->setHue(hue);
}
void QWindowVideoWidgetBackend::setSaturation(int saturation)
{
m_windowControl->setSaturation(saturation);
}
void QWindowVideoWidgetBackend::setFullScreen(bool fullScreen)
{
m_windowControl->setFullScreen(fullScreen);
}
Qt::AspectRatioMode QWindowVideoWidgetBackend::aspectRatioMode() const
{
return m_windowControl->aspectRatioMode();
}
void QWindowVideoWidgetBackend::setAspectRatioMode(Qt::AspectRatioMode mode)
{
m_windowControl->setAspectRatioMode(mode);
}
QSize QWindowVideoWidgetBackend::sizeHint() const
{
return m_windowControl->nativeSize();
}
void QWindowVideoWidgetBackend::showEvent()
{
m_windowControl->setWinId(m_widget->winId());
m_windowControl->setDisplayRect(m_widget->rect());
#if defined(Q_WS_WIN)
m_widget->setUpdatesEnabled(false);
#endif
}
void QWindowVideoWidgetBackend::hideEvent(QHideEvent *)
{
#if defined(Q_WS_WIN)
m_widget->setUpdatesEnabled(true);
#endif
}
void QWindowVideoWidgetBackend::moveEvent(QMoveEvent *)
{
m_windowControl->setDisplayRect(m_widget->rect());
}
void QWindowVideoWidgetBackend::resizeEvent(QResizeEvent *)
{
m_windowControl->setDisplayRect(m_widget->rect());
}
void QWindowVideoWidgetBackend::paintEvent(QPaintEvent *event)
{
if (m_widget->testAttribute(Qt::WA_OpaquePaintEvent)) {
QPainter painter(m_widget);
painter.fillRect(event->rect(), m_widget->palette().window());
}
m_windowControl->repaint();
event->accept();
}
#if defined(Q_WS_WIN)
bool QWindowVideoWidgetBackend::winEvent(MSG *message, long *)
{
if (message->message == WM_PAINT)
m_windowControl->repaint();
return false;
}
#endif
void QVideoWidgetPrivate::setCurrentControl(QVideoWidgetControlInterface *control)
{
if (currentControl != control) {
currentControl = control;
currentControl->setBrightness(brightness);
currentControl->setContrast(contrast);
currentControl->setHue(hue);
currentControl->setSaturation(saturation);
currentControl->setAspectRatioMode(aspectRatioMode);
}
}
void QVideoWidgetPrivate::clearService()
{
if (service) {
QObject::disconnect(service, SIGNAL(destroyed()), q_func(), SLOT(_q_serviceDestroyed()));
if (widgetBackend) {
QLayout *layout = q_func()->layout();
for (QLayoutItem *item = layout->takeAt(0); item; item = layout->takeAt(0)) {
item->widget()->setParent(0);
delete item;
}
delete layout;
widgetBackend->releaseControl();
delete widgetBackend;
widgetBackend = 0;
} else if (rendererBackend) {
rendererBackend->clearSurface();
rendererBackend->releaseControl();
delete rendererBackend;
rendererBackend = 0;
} else {
windowBackend->releaseControl();
delete windowBackend;
windowBackend = 0;
}
currentBackend = 0;
currentControl = 0;
service = 0;
}
}
bool QVideoWidgetPrivate::createWidgetBackend()
{
if (QMediaControl *control = service->requestControl(QVideoWidgetControl_iid)) {
if (QVideoWidgetControl *widgetControl = qobject_cast<QVideoWidgetControl *>(control)) {
widgetBackend = new QVideoWidgetControlBackend(service, widgetControl, q_func());
setCurrentControl(widgetBackend);
return true;
}
service->releaseControl(control);
}
return false;
}
bool QVideoWidgetPrivate::createWindowBackend()
{
if (QMediaControl *control = service->requestControl(QVideoWindowControl_iid)) {
if (QVideoWindowControl *windowControl = qobject_cast<QVideoWindowControl *>(control)) {
windowBackend = new QWindowVideoWidgetBackend(service, windowControl, q_func());
currentBackend = windowBackend;
setCurrentControl(windowBackend);
return true;
}
service->releaseControl(control);
}
return false;
}
bool QVideoWidgetPrivate::createRendererBackend()
{
if (QMediaControl *control = service->requestControl(QVideoRendererControl_iid)) {
if (QVideoRendererControl *rendererControl = qobject_cast<QVideoRendererControl *>(control)) {
rendererBackend = new QRendererVideoWidgetBackend(service, rendererControl, q_func());
currentBackend = rendererBackend;
setCurrentControl(rendererBackend);
return true;
}
service->releaseControl(control);
}
return false;
}
void QVideoWidgetPrivate::_q_serviceDestroyed()
{
if (widgetBackend)
delete q_func()->layout();
delete widgetBackend;
delete windowBackend;
delete rendererBackend;
widgetBackend = 0;
windowBackend = 0;
rendererBackend = 0;
currentControl = 0;
currentBackend = 0;
service = 0;
}
void QVideoWidgetPrivate::_q_brightnessChanged(int b)
{
if (b != brightness)
emit q_func()->brightnessChanged(brightness = b);
}
void QVideoWidgetPrivate::_q_contrastChanged(int c)
{
if (c != contrast)
emit q_func()->contrastChanged(contrast = c);
}
void QVideoWidgetPrivate::_q_hueChanged(int h)
{
if (h != hue)
emit q_func()->hueChanged(hue = h);
}
void QVideoWidgetPrivate::_q_saturationChanged(int s)
{
if (s != saturation)
emit q_func()->saturationChanged(saturation = s);
}
void QVideoWidgetPrivate::_q_fullScreenChanged(bool fullScreen)
{
if (!fullScreen && q_func()->isFullScreen())
q_func()->showNormal();
}
void QVideoWidgetPrivate::_q_dimensionsChanged()
{
q_func()->updateGeometry();
q_func()->update();
}
/*!
\class QVideoWidget
\brief The QVideoWidget class provides a widget which presents video
produced by a media object.
\ingroup multimedia
\inmodule QtMultimediaKit
\since 1.0
\inmodule QtMultimediaKit
Attaching a QVideoWidget to a QMediaObject allows it to display the
video or image output of that media object. A QVideoWidget is attached
to media object by passing a pointer to the QMediaObject in its
constructor, and detached by destroying the QVideoWidget.
\snippet doc/src/snippets/multimedia-snippets/video.cpp Video widget
\bold {Note}: Only a single display output can be attached to a media
object at one time.
\sa QMediaObject, QMediaPlayer, QGraphicsVideoItem
*/
/*!
Constructs a new video widget.
The \a parent is passed to QWidget.
*/
QVideoWidget::QVideoWidget(QWidget *parent)
: QWidget(parent, 0)
, d_ptr(new QVideoWidgetPrivate)
{
d_ptr->q_ptr = this;
}
/*!
\internal
*/
QVideoWidget::QVideoWidget(QVideoWidgetPrivate &dd, QWidget *parent)
: QWidget(parent, 0)
, d_ptr(&dd)
{
d_ptr->q_ptr = this;
QPalette palette = QWidget::palette();
palette.setColor(QPalette::Background, Qt::black);
setPalette(palette);
}
/*!
Destroys a video widget.
*/
QVideoWidget::~QVideoWidget()
{
d_ptr->clearService();
delete d_ptr;
}
/*!
\property QVideoWidget::mediaObject
\brief the media object which provides the video displayed by a widget.
*/
QMediaObject *QVideoWidget::mediaObject() const
{
return d_func()->mediaObject;
}
/*!
\internal
*/
bool QVideoWidget::setMediaObject(QMediaObject *object)
{
Q_D(QVideoWidget);
if (object == d->mediaObject)
return true;
d->clearService();
d->mediaObject = object;
if (d->mediaObject)
d->service = d->mediaObject->service();
if (d->service) {
if (d->createWidgetBackend()) {
// Nothing to do here.
} else if ((!window() || !window()->testAttribute(Qt::WA_DontShowOnScreen))
&& d->createWindowBackend()) {
if (isVisible())
d->windowBackend->showEvent();
} else if (d->createRendererBackend()) {
if (isVisible())
d->rendererBackend->showEvent();
} else {
d->service = 0;
d->mediaObject = 0;
return false;
}
connect(d->service, SIGNAL(destroyed()), SLOT(_q_serviceDestroyed()));
} else {
d->mediaObject = 0;
return false;
}
return true;
}
/*!
\property QVideoWidget::aspectRatioMode
\brief how video is scaled with respect to its aspect ratio.
*/
Qt::AspectRatioMode QVideoWidget::aspectRatioMode() const
{
return d_func()->aspectRatioMode;
}
void QVideoWidget::setAspectRatioMode(Qt::AspectRatioMode mode)
{
Q_D(QVideoWidget);
if (d->currentControl) {
d->currentControl->setAspectRatioMode(mode);
d->aspectRatioMode = d->currentControl->aspectRatioMode();
} else {
d->aspectRatioMode = mode;
}
}
/*!
\property QVideoWidget::fullScreen
\brief whether video display is confined to a window or is fullScreen.
*/
void QVideoWidget::setFullScreen(bool fullScreen)
{
Q_D(QVideoWidget);
if (fullScreen) {
Qt::WindowFlags flags = windowFlags();
d->nonFullScreenFlags = flags & (Qt::Window | Qt::SubWindow);
flags |= Qt::Window;
flags &= ~Qt::SubWindow;
setWindowFlags(flags);
showFullScreen();
} else {
showNormal();
}
}
/*!
\fn QVideoWidget::fullScreenChanged(bool fullScreen)
Signals that the \a fullScreen mode of a video widget has changed.
\sa fullScreen
*/
/*!
\property QVideoWidget::brightness
\brief an adjustment to the brightness of displayed video.
Valid brightness values range between -100 and 100, the default is 0.
*/
int QVideoWidget::brightness() const
{
return d_func()->brightness;
}
void QVideoWidget::setBrightness(int brightness)
{
Q_D(QVideoWidget);
int boundedBrightness = qBound(-100, brightness, 100);
if (d->currentControl)
d->currentControl->setBrightness(boundedBrightness);
else if (d->brightness != boundedBrightness)
emit brightnessChanged(d->brightness = boundedBrightness);
}
/*!
\fn QVideoWidget::brightnessChanged(int brightness)
Signals that a video widgets's \a brightness adjustment has changed.
\sa brightness
*/
/*!
\property QVideoWidget::contrast
\brief an adjustment to the contrast of displayed video.
Valid contrast values range between -100 and 100, the default is 0.
*/
int QVideoWidget::contrast() const
{
return d_func()->contrast;
}
void QVideoWidget::setContrast(int contrast)
{
Q_D(QVideoWidget);
int boundedContrast = qBound(-100, contrast, 100);
if (d->currentControl)
d->currentControl->setContrast(boundedContrast);
else if (d->contrast != boundedContrast)
emit contrastChanged(d->contrast = boundedContrast);
}
/*!
\fn QVideoWidget::contrastChanged(int contrast)
Signals that a video widgets's \a contrast adjustment has changed.
\sa contrast
*/
/*!
\property QVideoWidget::hue
\brief an adjustment to the hue of displayed video.
Valid hue values range between -100 and 100, the default is 0.
*/
int QVideoWidget::hue() const
{
return d_func()->hue;
}
void QVideoWidget::setHue(int hue)
{
Q_D(QVideoWidget);
int boundedHue = qBound(-100, hue, 100);
if (d->currentControl)
d->currentControl->setHue(boundedHue);
else if (d->hue != boundedHue)
emit hueChanged(d->hue = boundedHue);
}
/*!
\fn QVideoWidget::hueChanged(int hue)
Signals that a video widgets's \a hue has changed.
\sa hue
*/
/*!
\property QVideoWidget::saturation
\brief an adjustment to the saturation of displayed video.
Valid saturation values range between -100 and 100, the default is 0.
*/
int QVideoWidget::saturation() const
{
return d_func()->saturation;
}
void QVideoWidget::setSaturation(int saturation)
{
Q_D(QVideoWidget);
int boundedSaturation = qBound(-100, saturation, 100);
if (d->currentControl)
d->currentControl->setSaturation(boundedSaturation);
else if (d->saturation != boundedSaturation)
emit saturationChanged(d->saturation = boundedSaturation);
}
/*!
\fn QVideoWidget::saturationChanged(int saturation)
Signals that a video widgets's \a saturation has changed.
\sa saturation
*/
/*!
Returns the size hint for the current back end,
if there is one, or else the size hint from QWidget.
*/
QSize QVideoWidget::sizeHint() const
{
Q_D(const QVideoWidget);
if (d->currentBackend)
return d->currentBackend->sizeHint();
else
return QWidget::sizeHint();
}
/*!
Current event \a event.
Returns the value of the baseclass QWidget::event(QEvent *event) function.
*/
bool QVideoWidget::event(QEvent *event)
{
Q_D(QVideoWidget);
if (event->type() == QEvent::WindowStateChange) {
Qt::WindowFlags flags = windowFlags();
if (windowState() & Qt::WindowFullScreen) {
if (d->currentControl)
d->currentControl->setFullScreen(true);
if (!d->wasFullScreen)
emit fullScreenChanged(d->wasFullScreen = true);
} else {
if (d->currentControl)
d->currentControl->setFullScreen(false);
if (d->wasFullScreen) {
flags &= ~(Qt::Window | Qt::SubWindow); //clear the flags...
flags |= d->nonFullScreenFlags; //then we reset the flags (window and subwindow)
setWindowFlags(flags);
emit fullScreenChanged(d->wasFullScreen = false);
}
}
}
return QWidget::event(event);
}
/*!
Handles the show \a event.
*/
void QVideoWidget::showEvent(QShowEvent *event)
{
Q_D(QVideoWidget);
QWidget::showEvent(event);
// The window backend won't work for re-directed windows so use the renderer backend instead.
if (d->windowBackend && window()->testAttribute(Qt::WA_DontShowOnScreen)) {
d->windowBackend->releaseControl();
delete d->windowBackend;
d->windowBackend = 0;
d->createRendererBackend();
}
if (d->currentBackend)
d->currentBackend->showEvent();
}
/*!
Handles the hide \a event.
*/
void QVideoWidget::hideEvent(QHideEvent *event)
{
Q_D(QVideoWidget);
if (d->currentBackend)
d->currentBackend->hideEvent(event);
QWidget::hideEvent(event);
}
/*!
Handles the resize \a event.
*/
void QVideoWidget::resizeEvent(QResizeEvent *event)
{
Q_D(QVideoWidget);
QWidget::resizeEvent(event);
if (d->currentBackend)
d->currentBackend->resizeEvent(event);
}
/*!
Handles the move \a event.
*/
void QVideoWidget::moveEvent(QMoveEvent *event)
{
Q_D(QVideoWidget);
if (d->currentBackend)
d->currentBackend->moveEvent(event);
}
/*!
Handles the paint \a event.
*/
void QVideoWidget::paintEvent(QPaintEvent *event)
{
Q_D(QVideoWidget);
if (d->currentBackend) {
d->currentBackend->paintEvent(event);
} else if (testAttribute(Qt::WA_OpaquePaintEvent)) {
QPainter painter(this);
painter.fillRect(event->rect(), palette().window());
}
}
#if defined(Q_WS_WIN)
/*!
\reimp
\internal
*/
bool QVideoWidget::winEvent(MSG *message, long *result)
{
return d_func()->windowBackend && d_func()->windowBackend->winEvent(message, result)
? true
: QWidget::winEvent(message, result);
}
#endif
#include "moc_qvideowidget.cpp"
#include "moc_qvideowidget_p.cpp"
QT_END_NAMESPACE
| KDE/android-qt-mobility | src/multimedia/qvideowidget.cpp | C++ | lgpl-2.1 | 26,102 |
#include "rendertarget.h"
#include <system/engine.h>
#include <renderer/renderer.h>
#include <renderer/forms.h>
using namespace CGE;
RenderTarget* RenderTarget::mCurrTarget = NULL;
void RenderTarget::drawFullscreen(bool transform){
Renderer* rend = Engine::instance()->getRenderer();
if (transform){
rend->ortho(1, 1);
rend->resetModelView();
}
rend->enableDepthTest(false);
CGE::Forms& forms = *CGE::Engine::instance()->getForms();
forms.activateQuad();
rend->enableTexturing(true);
rend->setColor(1, 1, 1, 1);
if (transform){
if (rend->getRenderType() != DirectX){
rend->switchMatrixStack(CGE::MatTexture);
rend->resetModelView();
rend->scale(1, -1, 1);
}
}
for (unsigned i = 0; i < getNumTextures(); ++i){
getTexture(i)->activate(i);
}
forms.drawQuad(Vec2f(), Vec2f(1, 1));
if (transform){
if (rend->getRenderType() != DirectX){
rend->resetModelView();
rend->switchMatrixStack(CGE::Modelview);
}
}
}
| captain-mayhem/captainsengine | Engine/renderer/rendertarget.cpp | C++ | lgpl-2.1 | 994 |
--TEST--
Test node order of EncryptedData children.
--DESCRIPTION--
Makes sure that the child elements of EncryptedData appear in
the correct order.
--FILE--
<?php
require($_SERVER['DOCUMENT_ROOT'] . '/../xmlseclibs.php');
$dom = new DOMDocument();
$dom->load($_SERVER['DOCUMENT_ROOT'] . '/basic-doc.xml');
$objKey = new XMLSecurityKey(XMLSecurityKey::AES256_CBC);
$objKey->generateSessionKey();
$siteKey = new XMLSecurityKey(XMLSecurityKey::RSA_OAEP_MGF1P, array('type'=>'public'));
$siteKey->loadKey($_SERVER['DOCUMENT_ROOT'] . '/mycert.pem', TRUE, TRUE);
$enc = new XMLSecEnc();
$enc->setNode($dom->documentElement);
$enc->encryptKey($siteKey, $objKey);
$enc->type = XMLSecEnc::Content;
$encNode = $enc->encryptNode($objKey);
$nodeOrder = array(
'EncryptionMethod',
'KeyInfo',
'CipherData',
'EncryptionProperties',
);
$prevNode = 0;
for ($node = $encNode->firstChild; $node !== NULL; $node = $node->nextSibling) {
if (! ($node instanceof DOMElement)) {
/* Skip comment and text nodes. */
continue;
}
$name = $node->localName;
$cIndex = array_search($name, $nodeOrder, TRUE);
if ($cIndex === FALSE) {
die("Unknown node: $name");
}
if ($cIndex >= $prevNode) {
/* In correct order. */
$prevNode = $cIndex;
continue;
}
$prevName = $nodeOrder[$prevNode];
die("Incorrect order: $name must appear before $prevName");
}
echo("OK\n");
?>
--EXPECTF--
OK
| oeru/simplesamlphp | vendor/robrichards/xmlseclibs/tests/encrypteddata-node-order.phpt | PHP | lgpl-2.1 | 1,386 |
////////////////////////////////////////////////////////////////
//
// Copyright (C) 2007 The Broad Institute and Affymetrix, Inc.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License (version 2) as
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program;if not, write to the
//
// Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
////////////////////////////////////////////////////////////////
//
#include "birdseed-dev/IntensitiesParser.h"
//
#include "broadutil/BroadException.h"
#include "broadutil/BroadUtil.h"
#include "broadutil/FileUtil.h"
//
#include <cerrno>
#include <cstdio>
using namespace std;
using namespace birdseed::dev;
IntensitiesParser::~IntensitiesParser()
{
if (fp != NULL) {
fclose(fp);
}
}
IntensitiesParser::IntensitiesParser(const std::string& path, bool calculateCorrectionFactor):
dataPath(path),
fp(fopen(path.c_str(), "r")),
correctionFactor(0.0),
header(),
snpName(),
intensities()
{
if (fp == NULL) {
throw BroadException("Could not open file", __FILE__, __LINE__, path.c_str(), errno);
}
header = readHeader(fp, "probeset_id\t");
if (calculateCorrectionFactor) {
long dataStartOffset = ftell(fp);
if (dataStartOffset == -1) {
throw BroadException("ftell error", __FILE__, __LINE__, path.c_str(), errno);
}
double total = 0.0;
size_t numIntensities = 0;
while (true) {
// Skip over SNP name
snpName = readWord(fp);
if (snpName.empty()) {
break;
}
double val;
while (readDouble(fp, &val)) {
total += val;
++numIntensities;
}
}
correctionFactor = total/numIntensities;
if (fseek(fp, dataStartOffset, SEEK_SET) == -1) {
throw BroadException("fseek error", __FILE__, __LINE__, path.c_str(), errno);
}
}
}
bool IntensitiesParser::advanceSNP()
{
// Skip over first SNP name
string snpNameA = readWord(fp);
if (snpNameA.empty()) {
snpName = "";
intensities.reset(NULL);
return false;
}
if (!endswith(snpNameA.c_str(), "-A")) {
std::stringstream strm;
strm << "Did not find -A suffix for SNP name: " << snpNameA << ".";
throw BroadException(strm.str().c_str(), __FILE__, __LINE__, dataPath.c_str());
}
snpName = snpNameA.substr(0, snpNameA.size() - 2);
vector<double> aValues;
double val;
while (readDouble(fp, &val)) {
aValues.push_back(val);
}
// Skip over next SNP name
string snpNameB = readWord(fp);
if (!endswith(snpNameB.c_str(), "-B")) {
std::stringstream strm;
strm << "Did not find -B suffix for SNP name: " << snpNameB << ".";
throw BroadException(strm.str().c_str(), __FILE__, __LINE__, dataPath.c_str());
}
if (snpName != snpNameB.substr(0, snpNameB.size() - 2)) {
std::stringstream strm;
strm << "B intensities do not have same SNP name as A. SNP-A: " << snpNameA << "; SNP-B: " << snpNameB << " .";
throw BroadException(strm.str().c_str(), __FILE__, __LINE__, dataPath.c_str());
}
intensities.reset(new IntensityMatrix(aValues.size()));
// Syntactic sugar
IntensityMatrix &intensitiesRef = *(intensities.get());
for (size_t i = 0; i < aValues.size(); ++i) {
intensitiesRef[i][0] = aValues[i];
if (!readDouble(fp, &val)) {
throw BroadException("Number of B values is less than number of A values", __FILE__, __LINE__, dataPath.c_str());
}
intensitiesRef[i][1] = val;
}
return true;
}
/******************************************************************/
/**************************[END OF IntensitiesParser.cpp]*************************/
/******************************************************************/
/* Emacs configuration
* Local Variables:
* mode: C++
* tab-width:4
* End:
*/
| einon/affymetrix-power-tools | sdk/birdseed-dev/IntensitiesParser.cpp | C++ | lgpl-2.1 | 4,466 |
class TmsFakeIn < ActiveRecord::Base
set_table_name "tms_fake_in"
end
# == Schema Information
#
# Table name: tms_fake_in
#
# id :integer(10) not null, primary key
# message :text not null
# created_at :datetime
# priority :integer(10) default(0), not null
#
| jfoxGRT/jboss_upgrade | standalone/deployments/custserv-web/src/main/webapp/WEB-INF/app/models/tms_fake_in.rb | Ruby | lgpl-2.1 | 299 |
// Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
// W A R N I N G
// -------------
//
// This file is automatically generated.
// Changes will be lost.
//
#include "AST.h"
#include "ASTMatcher.h"
using namespace CPlusPlus;
bool ObjCSelectorArgumentAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCSelectorArgumentAST *_other = pattern->asObjCSelectorArgument())
return matcher->match(this, _other);
return false;
}
bool ObjCSelectorAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCSelectorAST *_other = pattern->asObjCSelector())
return matcher->match(this, _other);
return false;
}
bool SimpleSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (SimpleSpecifierAST *_other = pattern->asSimpleSpecifier())
return matcher->match(this, _other);
return false;
}
bool AttributeSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (AttributeSpecifierAST *_other = pattern->asAttributeSpecifier())
return matcher->match(this, _other);
return false;
}
bool AttributeAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (AttributeAST *_other = pattern->asAttribute())
return matcher->match(this, _other);
return false;
}
bool TypeofSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TypeofSpecifierAST *_other = pattern->asTypeofSpecifier())
return matcher->match(this, _other);
return false;
}
bool DeclaratorAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (DeclaratorAST *_other = pattern->asDeclarator())
return matcher->match(this, _other);
return false;
}
bool SimpleDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (SimpleDeclarationAST *_other = pattern->asSimpleDeclaration())
return matcher->match(this, _other);
return false;
}
bool EmptyDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (EmptyDeclarationAST *_other = pattern->asEmptyDeclaration())
return matcher->match(this, _other);
return false;
}
bool AccessDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (AccessDeclarationAST *_other = pattern->asAccessDeclaration())
return matcher->match(this, _other);
return false;
}
bool QtObjectTagAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtObjectTagAST *_other = pattern->asQtObjectTag())
return matcher->match(this, _other);
return false;
}
bool QtPrivateSlotAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtPrivateSlotAST *_other = pattern->asQtPrivateSlot())
return matcher->match(this, _other);
return false;
}
bool QtPropertyDeclarationItemAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtPropertyDeclarationItemAST *_other = pattern->asQtPropertyDeclarationItem())
return matcher->match(this, _other);
return false;
}
bool QtPropertyDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtPropertyDeclarationAST *_other = pattern->asQtPropertyDeclaration())
return matcher->match(this, _other);
return false;
}
bool QtEnumDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtEnumDeclarationAST *_other = pattern->asQtEnumDeclaration())
return matcher->match(this, _other);
return false;
}
bool QtFlagsDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtFlagsDeclarationAST *_other = pattern->asQtFlagsDeclaration())
return matcher->match(this, _other);
return false;
}
bool QtInterfaceNameAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtInterfaceNameAST *_other = pattern->asQtInterfaceName())
return matcher->match(this, _other);
return false;
}
bool QtInterfacesDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtInterfacesDeclarationAST *_other = pattern->asQtInterfacesDeclaration())
return matcher->match(this, _other);
return false;
}
bool AsmDefinitionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (AsmDefinitionAST *_other = pattern->asAsmDefinition())
return matcher->match(this, _other);
return false;
}
bool BaseSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (BaseSpecifierAST *_other = pattern->asBaseSpecifier())
return matcher->match(this, _other);
return false;
}
bool IdExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (IdExpressionAST *_other = pattern->asIdExpression())
return matcher->match(this, _other);
return false;
}
bool CompoundExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CompoundExpressionAST *_other = pattern->asCompoundExpression())
return matcher->match(this, _other);
return false;
}
bool CompoundLiteralAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CompoundLiteralAST *_other = pattern->asCompoundLiteral())
return matcher->match(this, _other);
return false;
}
bool QtMethodAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtMethodAST *_other = pattern->asQtMethod())
return matcher->match(this, _other);
return false;
}
bool QtMemberDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QtMemberDeclarationAST *_other = pattern->asQtMemberDeclaration())
return matcher->match(this, _other);
return false;
}
bool BinaryExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (BinaryExpressionAST *_other = pattern->asBinaryExpression())
return matcher->match(this, _other);
return false;
}
bool CastExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CastExpressionAST *_other = pattern->asCastExpression())
return matcher->match(this, _other);
return false;
}
bool ClassSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ClassSpecifierAST *_other = pattern->asClassSpecifier())
return matcher->match(this, _other);
return false;
}
bool CaseStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CaseStatementAST *_other = pattern->asCaseStatement())
return matcher->match(this, _other);
return false;
}
bool CompoundStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CompoundStatementAST *_other = pattern->asCompoundStatement())
return matcher->match(this, _other);
return false;
}
bool ConditionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ConditionAST *_other = pattern->asCondition())
return matcher->match(this, _other);
return false;
}
bool ConditionalExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ConditionalExpressionAST *_other = pattern->asConditionalExpression())
return matcher->match(this, _other);
return false;
}
bool CppCastExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CppCastExpressionAST *_other = pattern->asCppCastExpression())
return matcher->match(this, _other);
return false;
}
bool CtorInitializerAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CtorInitializerAST *_other = pattern->asCtorInitializer())
return matcher->match(this, _other);
return false;
}
bool DeclarationStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (DeclarationStatementAST *_other = pattern->asDeclarationStatement())
return matcher->match(this, _other);
return false;
}
bool DeclaratorIdAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (DeclaratorIdAST *_other = pattern->asDeclaratorId())
return matcher->match(this, _other);
return false;
}
bool NestedDeclaratorAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NestedDeclaratorAST *_other = pattern->asNestedDeclarator())
return matcher->match(this, _other);
return false;
}
bool FunctionDeclaratorAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (FunctionDeclaratorAST *_other = pattern->asFunctionDeclarator())
return matcher->match(this, _other);
return false;
}
bool ArrayDeclaratorAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ArrayDeclaratorAST *_other = pattern->asArrayDeclarator())
return matcher->match(this, _other);
return false;
}
bool DeleteExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (DeleteExpressionAST *_other = pattern->asDeleteExpression())
return matcher->match(this, _other);
return false;
}
bool DoStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (DoStatementAST *_other = pattern->asDoStatement())
return matcher->match(this, _other);
return false;
}
bool NamedTypeSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NamedTypeSpecifierAST *_other = pattern->asNamedTypeSpecifier())
return matcher->match(this, _other);
return false;
}
bool ElaboratedTypeSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ElaboratedTypeSpecifierAST *_other = pattern->asElaboratedTypeSpecifier())
return matcher->match(this, _other);
return false;
}
bool EnumSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (EnumSpecifierAST *_other = pattern->asEnumSpecifier())
return matcher->match(this, _other);
return false;
}
bool EnumeratorAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (EnumeratorAST *_other = pattern->asEnumerator())
return matcher->match(this, _other);
return false;
}
bool ExceptionDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ExceptionDeclarationAST *_other = pattern->asExceptionDeclaration())
return matcher->match(this, _other);
return false;
}
bool ExceptionSpecificationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ExceptionSpecificationAST *_other = pattern->asExceptionSpecification())
return matcher->match(this, _other);
return false;
}
bool ExpressionOrDeclarationStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ExpressionOrDeclarationStatementAST *_other = pattern->asExpressionOrDeclarationStatement())
return matcher->match(this, _other);
return false;
}
bool ExpressionStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ExpressionStatementAST *_other = pattern->asExpressionStatement())
return matcher->match(this, _other);
return false;
}
bool FunctionDefinitionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (FunctionDefinitionAST *_other = pattern->asFunctionDefinition())
return matcher->match(this, _other);
return false;
}
bool ForeachStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ForeachStatementAST *_other = pattern->asForeachStatement())
return matcher->match(this, _other);
return false;
}
bool ForStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ForStatementAST *_other = pattern->asForStatement())
return matcher->match(this, _other);
return false;
}
bool IfStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (IfStatementAST *_other = pattern->asIfStatement())
return matcher->match(this, _other);
return false;
}
bool ArrayInitializerAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ArrayInitializerAST *_other = pattern->asArrayInitializer())
return matcher->match(this, _other);
return false;
}
bool LabeledStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (LabeledStatementAST *_other = pattern->asLabeledStatement())
return matcher->match(this, _other);
return false;
}
bool LinkageBodyAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (LinkageBodyAST *_other = pattern->asLinkageBody())
return matcher->match(this, _other);
return false;
}
bool LinkageSpecificationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (LinkageSpecificationAST *_other = pattern->asLinkageSpecification())
return matcher->match(this, _other);
return false;
}
bool MemInitializerAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (MemInitializerAST *_other = pattern->asMemInitializer())
return matcher->match(this, _other);
return false;
}
bool NestedNameSpecifierAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NestedNameSpecifierAST *_other = pattern->asNestedNameSpecifier())
return matcher->match(this, _other);
return false;
}
bool QualifiedNameAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QualifiedNameAST *_other = pattern->asQualifiedName())
return matcher->match(this, _other);
return false;
}
bool OperatorFunctionIdAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (OperatorFunctionIdAST *_other = pattern->asOperatorFunctionId())
return matcher->match(this, _other);
return false;
}
bool ConversionFunctionIdAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ConversionFunctionIdAST *_other = pattern->asConversionFunctionId())
return matcher->match(this, _other);
return false;
}
bool SimpleNameAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (SimpleNameAST *_other = pattern->asSimpleName())
return matcher->match(this, _other);
return false;
}
bool DestructorNameAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (DestructorNameAST *_other = pattern->asDestructorName())
return matcher->match(this, _other);
return false;
}
bool TemplateIdAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TemplateIdAST *_other = pattern->asTemplateId())
return matcher->match(this, _other);
return false;
}
bool NamespaceAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NamespaceAST *_other = pattern->asNamespace())
return matcher->match(this, _other);
return false;
}
bool NamespaceAliasDefinitionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NamespaceAliasDefinitionAST *_other = pattern->asNamespaceAliasDefinition())
return matcher->match(this, _other);
return false;
}
bool NewPlacementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NewPlacementAST *_other = pattern->asNewPlacement())
return matcher->match(this, _other);
return false;
}
bool NewArrayDeclaratorAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NewArrayDeclaratorAST *_other = pattern->asNewArrayDeclarator())
return matcher->match(this, _other);
return false;
}
bool NewExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NewExpressionAST *_other = pattern->asNewExpression())
return matcher->match(this, _other);
return false;
}
bool NewInitializerAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NewInitializerAST *_other = pattern->asNewInitializer())
return matcher->match(this, _other);
return false;
}
bool NewTypeIdAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NewTypeIdAST *_other = pattern->asNewTypeId())
return matcher->match(this, _other);
return false;
}
bool OperatorAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (OperatorAST *_other = pattern->asOperator())
return matcher->match(this, _other);
return false;
}
bool ParameterDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ParameterDeclarationAST *_other = pattern->asParameterDeclaration())
return matcher->match(this, _other);
return false;
}
bool ParameterDeclarationClauseAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ParameterDeclarationClauseAST *_other = pattern->asParameterDeclarationClause())
return matcher->match(this, _other);
return false;
}
bool CallAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CallAST *_other = pattern->asCall())
return matcher->match(this, _other);
return false;
}
bool ArrayAccessAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ArrayAccessAST *_other = pattern->asArrayAccess())
return matcher->match(this, _other);
return false;
}
bool PostIncrDecrAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (PostIncrDecrAST *_other = pattern->asPostIncrDecr())
return matcher->match(this, _other);
return false;
}
bool MemberAccessAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (MemberAccessAST *_other = pattern->asMemberAccess())
return matcher->match(this, _other);
return false;
}
bool TypeidExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TypeidExpressionAST *_other = pattern->asTypeidExpression())
return matcher->match(this, _other);
return false;
}
bool TypenameCallExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TypenameCallExpressionAST *_other = pattern->asTypenameCallExpression())
return matcher->match(this, _other);
return false;
}
bool TypeConstructorCallAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TypeConstructorCallAST *_other = pattern->asTypeConstructorCall())
return matcher->match(this, _other);
return false;
}
bool PointerToMemberAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (PointerToMemberAST *_other = pattern->asPointerToMember())
return matcher->match(this, _other);
return false;
}
bool PointerAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (PointerAST *_other = pattern->asPointer())
return matcher->match(this, _other);
return false;
}
bool ReferenceAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ReferenceAST *_other = pattern->asReference())
return matcher->match(this, _other);
return false;
}
bool BreakStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (BreakStatementAST *_other = pattern->asBreakStatement())
return matcher->match(this, _other);
return false;
}
bool ContinueStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ContinueStatementAST *_other = pattern->asContinueStatement())
return matcher->match(this, _other);
return false;
}
bool GotoStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (GotoStatementAST *_other = pattern->asGotoStatement())
return matcher->match(this, _other);
return false;
}
bool ReturnStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ReturnStatementAST *_other = pattern->asReturnStatement())
return matcher->match(this, _other);
return false;
}
bool SizeofExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (SizeofExpressionAST *_other = pattern->asSizeofExpression())
return matcher->match(this, _other);
return false;
}
bool PointerLiteralAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (PointerLiteralAST *_other = pattern->asPointerLiteral())
return matcher->match(this, _other);
return false;
}
bool NumericLiteralAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NumericLiteralAST *_other = pattern->asNumericLiteral())
return matcher->match(this, _other);
return false;
}
bool BoolLiteralAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (BoolLiteralAST *_other = pattern->asBoolLiteral())
return matcher->match(this, _other);
return false;
}
bool ThisExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ThisExpressionAST *_other = pattern->asThisExpression())
return matcher->match(this, _other);
return false;
}
bool NestedExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (NestedExpressionAST *_other = pattern->asNestedExpression())
return matcher->match(this, _other);
return false;
}
bool StringLiteralAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (StringLiteralAST *_other = pattern->asStringLiteral())
return matcher->match(this, _other);
return false;
}
bool SwitchStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (SwitchStatementAST *_other = pattern->asSwitchStatement())
return matcher->match(this, _other);
return false;
}
bool TemplateDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TemplateDeclarationAST *_other = pattern->asTemplateDeclaration())
return matcher->match(this, _other);
return false;
}
bool ThrowExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ThrowExpressionAST *_other = pattern->asThrowExpression())
return matcher->match(this, _other);
return false;
}
bool TranslationUnitAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TranslationUnitAST *_other = pattern->asTranslationUnit())
return matcher->match(this, _other);
return false;
}
bool TryBlockStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TryBlockStatementAST *_other = pattern->asTryBlockStatement())
return matcher->match(this, _other);
return false;
}
bool CatchClauseAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CatchClauseAST *_other = pattern->asCatchClause())
return matcher->match(this, _other);
return false;
}
bool TypeIdAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TypeIdAST *_other = pattern->asTypeId())
return matcher->match(this, _other);
return false;
}
bool TypenameTypeParameterAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TypenameTypeParameterAST *_other = pattern->asTypenameTypeParameter())
return matcher->match(this, _other);
return false;
}
bool TemplateTypeParameterAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TemplateTypeParameterAST *_other = pattern->asTemplateTypeParameter())
return matcher->match(this, _other);
return false;
}
bool UnaryExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (UnaryExpressionAST *_other = pattern->asUnaryExpression())
return matcher->match(this, _other);
return false;
}
bool UsingAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (UsingAST *_other = pattern->asUsing())
return matcher->match(this, _other);
return false;
}
bool UsingDirectiveAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (UsingDirectiveAST *_other = pattern->asUsingDirective())
return matcher->match(this, _other);
return false;
}
bool WhileStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (WhileStatementAST *_other = pattern->asWhileStatement())
return matcher->match(this, _other);
return false;
}
bool ObjCClassForwardDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCClassForwardDeclarationAST *_other = pattern->asObjCClassForwardDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCClassDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCClassDeclarationAST *_other = pattern->asObjCClassDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCProtocolForwardDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCProtocolForwardDeclarationAST *_other = pattern->asObjCProtocolForwardDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCProtocolDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCProtocolDeclarationAST *_other = pattern->asObjCProtocolDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCProtocolRefsAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCProtocolRefsAST *_other = pattern->asObjCProtocolRefs())
return matcher->match(this, _other);
return false;
}
bool ObjCMessageArgumentAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCMessageArgumentAST *_other = pattern->asObjCMessageArgument())
return matcher->match(this, _other);
return false;
}
bool ObjCMessageExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCMessageExpressionAST *_other = pattern->asObjCMessageExpression())
return matcher->match(this, _other);
return false;
}
bool ObjCProtocolExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCProtocolExpressionAST *_other = pattern->asObjCProtocolExpression())
return matcher->match(this, _other);
return false;
}
bool ObjCTypeNameAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCTypeNameAST *_other = pattern->asObjCTypeName())
return matcher->match(this, _other);
return false;
}
bool ObjCEncodeExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCEncodeExpressionAST *_other = pattern->asObjCEncodeExpression())
return matcher->match(this, _other);
return false;
}
bool ObjCSelectorExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCSelectorExpressionAST *_other = pattern->asObjCSelectorExpression())
return matcher->match(this, _other);
return false;
}
bool ObjCInstanceVariablesDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCInstanceVariablesDeclarationAST *_other = pattern->asObjCInstanceVariablesDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCVisibilityDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCVisibilityDeclarationAST *_other = pattern->asObjCVisibilityDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCPropertyAttributeAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCPropertyAttributeAST *_other = pattern->asObjCPropertyAttribute())
return matcher->match(this, _other);
return false;
}
bool ObjCPropertyDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCPropertyDeclarationAST *_other = pattern->asObjCPropertyDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCMessageArgumentDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCMessageArgumentDeclarationAST *_other = pattern->asObjCMessageArgumentDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCMethodPrototypeAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCMethodPrototypeAST *_other = pattern->asObjCMethodPrototype())
return matcher->match(this, _other);
return false;
}
bool ObjCMethodDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCMethodDeclarationAST *_other = pattern->asObjCMethodDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCSynthesizedPropertyAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCSynthesizedPropertyAST *_other = pattern->asObjCSynthesizedProperty())
return matcher->match(this, _other);
return false;
}
bool ObjCSynthesizedPropertiesDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCSynthesizedPropertiesDeclarationAST *_other = pattern->asObjCSynthesizedPropertiesDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCDynamicPropertiesDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCDynamicPropertiesDeclarationAST *_other = pattern->asObjCDynamicPropertiesDeclaration())
return matcher->match(this, _other);
return false;
}
bool ObjCFastEnumerationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCFastEnumerationAST *_other = pattern->asObjCFastEnumeration())
return matcher->match(this, _other);
return false;
}
bool ObjCSynchronizedStatementAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (ObjCSynchronizedStatementAST *_other = pattern->asObjCSynchronizedStatement())
return matcher->match(this, _other);
return false;
}
bool LambdaExpressionAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (LambdaExpressionAST *_other = pattern->asLambdaExpression())
return matcher->match(this, _other);
return false;
}
bool LambdaIntroducerAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (LambdaIntroducerAST *_other = pattern->asLambdaIntroducer())
return matcher->match(this, _other);
return false;
}
bool LambdaCaptureAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (LambdaCaptureAST *_other = pattern->asLambdaCapture())
return matcher->match(this, _other);
return false;
}
bool CaptureAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (CaptureAST *_other = pattern->asCapture())
return matcher->match(this, _other);
return false;
}
bool LambdaDeclaratorAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (LambdaDeclaratorAST *_other = pattern->asLambdaDeclarator())
return matcher->match(this, _other);
return false;
}
bool TrailingReturnTypeAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (TrailingReturnTypeAST *_other = pattern->asTrailingReturnType())
return matcher->match(this, _other);
return false;
}
bool BracedInitializerAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (BracedInitializerAST *_other = pattern->asBracedInitializer())
return matcher->match(this, _other);
return false;
}
| bakaiadam/collaborative_qt_creator | src/libs/3rdparty/cplusplus/ASTMatch0.cpp | C++ | lgpl-2.1 | 30,168 |
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.service.protocol.event;
import java.util.*;
import net.java.sip.communicator.service.protocol.*;
/**
* Events of this class represent the fact that a server stored
* subscription/contact has been moved from one server stored group to another.
* Such events are only generated by implementations of
* OperationSetPersistentPresence as non persistent presence operation sets do
* not support the notion of server stored groups.
*
* @author Emil Ivov
*/
public class SubscriptionMovedEvent
extends EventObject
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
private ContactGroup oldParent = null;
private ContactGroup newParent = null;
private ProtocolProviderService sourceProvider = null;
/**
* Creates an event instance with the specified source contact and old and
* new parent.
*
* @param sourceContact the <tt>Contact</tt> that has been moved.
* @param sourceProvider a reference to the <tt>ProtocolProviderService</tt>
* that the source <tt>Contact</tt> belongs to.
* @param oldParent the <tt>ContactGroup</tt> that has previously been
* the parent
* @param newParent the new <tt>ContactGroup</tt> parent of
* <tt>sourceContact</tt>
*/
public SubscriptionMovedEvent(Contact sourceContact,
ProtocolProviderService sourceProvider,
ContactGroup oldParent,
ContactGroup newParent)
{
super(sourceContact);
this.oldParent = oldParent;
this.newParent = newParent;
this.sourceProvider = sourceProvider;
}
/**
* Returns a reference to the contact that has been moved.
* @return a reference to the <tt>Contact</tt> that has been moved.
*/
public Contact getSourceContact()
{
return (Contact)getSource();
}
/**
* Returns a reference to the ContactGroup that contained the source contact
* before it was moved.
* @return a reference to the previous <tt>ContactGroup</tt> parent of
* the source <tt>Contact</tt>.
*/
public ContactGroup getOldParentGroup()
{
return oldParent;
}
/**
* Returns a reference to the ContactGroup that currently contains the
* source contact.
*
* @return a reference to the current <tt>ContactGroup</tt> parent of
* the source <tt>Contact</tt>.
*/
public ContactGroup getNewParentGroup()
{
return newParent;
}
/**
* Returns the provider that the source contact belongs to.
* @return the provider that the source contact belongs to.
*/
public ProtocolProviderService getSourceProvider()
{
return sourceProvider;
}
/**
* Returns a String representation of this ContactPresenceStatusChangeEvent
*
* @return A a String representation of this
* SubscriptionMovedEvent.
*/
public String toString()
{
StringBuffer buff
= new StringBuffer("SubscriptionMovedEvent-[ ContactID=");
buff.append(getSourceContact().getAddress());
buff.append(", OldParentGroup=").append(getOldParentGroup().getGroupName());
buff.append(", NewParentGroup=").append(getNewParentGroup().getGroupName());
return buff.toString();
}
}
| zhaozw/android-1 | src/net/java/sip/communicator/service/protocol/event/SubscriptionMovedEvent.java | Java | lgpl-2.1 | 3,564 |
#include <ixlib_random.hpp>
| JackieXie168/ixlib | old_headers/ixlib_random.hh | C++ | lgpl-2.1 | 28 |
package net.gigimoi.zombietc.tile;
import net.gigimoi.zombietc.ZombieTC;
import net.gigimoi.zombietc.util.IListenerZTC;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
/**
* Created by gigimoi on 8/8/2014.
*/
public abstract class TileZTC extends TileEntity implements IListenerZTC {
@Override
public void updateEntity() {
super.updateEntity();
if(!ZombieTC.gameManager.isRegisteredListener(this)) {
ZombieTC.gameManager.registerListener(this);
}
}
@Override
public Packet getDescriptionPacket() {
NBTTagCompound tagCompound = new NBTTagCompound();
writeToNBT(tagCompound);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tagCompound);
}
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
super.onDataPacket(net, pkt);
readFromNBT(pkt.func_148857_g());
}
}
| gigimoi/Zombie-Total-Conversion-Craft | src/main/java/net/gigimoi/zombietc/tile/TileZTC.java | Java | lgpl-2.1 | 1,114 |
package net.minecraft.server;
import java.util.Iterator;
import java.util.List;
import net.minecraft.src.BiomeGenBase;
import cpw.mods.fml.common.registry.IMinecraftRegistry;
import cpw.mods.fml.server.FMLBukkitHandler;
public class BukkitRegistry implements IMinecraftRegistry
{
@Override
public void addRecipe(net.minecraft.src.ItemStack output, Object... params)
{
CraftingManager.getInstance().registerShapedRecipe((ItemStack) output, params);
}
@Override
public void addShapelessRecipe(net.minecraft.src.ItemStack output, Object... params)
{
CraftingManager.getInstance().registerShapelessRecipe((ItemStack) output, params);
}
@SuppressWarnings("unchecked")
@Override
public void addRecipe(net.minecraft.src.IRecipe recipe)
{
CraftingManager.getInstance().getRecipies().add(recipe);
}
@Override
public void addSmelting(int input, net.minecraft.src.ItemStack output)
{
FurnaceRecipes.getInstance().registerRecipe(input, (ItemStack) output);
}
@Override
public void registerBlock(net.minecraft.src.Block block)
{
registerBlock(block, ItemBlock.class);
}
@Override
public void registerBlock(net.minecraft.src.Block block, Class <? extends net.minecraft.src.ItemBlock > itemclass)
{
try
{
assert block != null : "registerBlock: block cannot be null";
assert itemclass != null : "registerBlock: itemclass cannot be null";
int blockItemId = ((Block)block).id - 256;
itemclass.getConstructor(int.class).newInstance(blockItemId);
}
catch (Exception e)
{
//HMMM
}
}
@SuppressWarnings("unchecked")
@Override
public void registerEntityID(Class <? extends net.minecraft.src.Entity > entityClass, String entityName, int id)
{
EntityTypes.addNewEntityListMapping((Class<? extends Entity>) entityClass, entityName, id);
}
@SuppressWarnings("unchecked")
@Override
public void registerEntityID(Class <? extends net.minecraft.src.Entity > entityClass, String entityName, int id, int backgroundEggColour, int foregroundEggColour)
{
EntityTypes.addNewEntityListMapping((Class<? extends Entity>) entityClass, entityName, id, backgroundEggColour, foregroundEggColour);
}
@SuppressWarnings("unchecked")
@Override
public void registerTileEntity(Class <? extends net.minecraft.src.TileEntity > tileEntityClass, String id)
{
TileEntity.addNewTileEntityMapping((Class<? extends TileEntity>) tileEntityClass, id);
}
@Override
public void addBiome(BiomeGenBase biome)
{
FMLBukkitHandler.instance().addBiomeToDefaultWorldGenerator((BiomeBase) biome);
}
@Override
public void addSpawn(Class <? extends net.minecraft.src.EntityLiving > entityClass, int weightedProb, int min, int max, net.minecraft.src.EnumCreatureType typeOfCreature, BiomeGenBase... biomes)
{
BiomeBase[] realBiomes=(BiomeBase[]) biomes;
for (BiomeBase biome : realBiomes)
{
@SuppressWarnings("unchecked")
List<BiomeMeta> spawns = ((BiomeBase)biome).getMobs((EnumCreatureType)typeOfCreature);
for (BiomeMeta entry : spawns)
{
//Adjusting an existing spawn entry
if (entry.a == entityClass)
{
entry.d = weightedProb;
entry.b = min;
entry.c = max;
break;
}
}
spawns.add(new BiomeMeta(entityClass, weightedProb, min, max));
}
}
@Override
@SuppressWarnings("unchecked")
public void addSpawn(String entityName, int weightedProb, int min, int max, net.minecraft.src.EnumCreatureType spawnList, BiomeGenBase... biomes)
{
Class <? extends Entity > entityClazz = EntityTypes.getEntityToClassMapping().get(entityName);
if (EntityLiving.class.isAssignableFrom(entityClazz))
{
addSpawn((Class <? extends net.minecraft.src.EntityLiving >) entityClazz, weightedProb, min, max, spawnList, biomes);
}
}
@Override
public void removeBiome(BiomeGenBase biome)
{
FMLBukkitHandler.instance().removeBiomeFromDefaultWorldGenerator((BiomeBase)biome);
}
@Override
public void removeSpawn(Class <? extends net.minecraft.src.EntityLiving > entityClass, net.minecraft.src.EnumCreatureType typeOfCreature, BiomeGenBase... biomesO)
{
BiomeBase[] biomes=(BiomeBase[]) biomesO;
for (BiomeBase biome : biomes)
{
@SuppressWarnings("unchecked")
List<BiomeMeta> spawns = ((BiomeBase)biome).getMobs((EnumCreatureType) typeOfCreature);
Iterator<BiomeMeta> entries = spawns.iterator();
while (entries.hasNext())
{
BiomeMeta entry = entries.next();
if (entry.a == entityClass)
{
entries.remove();
}
}
}
}
@Override
@SuppressWarnings("unchecked")
public void removeSpawn(String entityName, net.minecraft.src.EnumCreatureType spawnList, BiomeGenBase... biomes)
{
Class <? extends Entity > entityClazz = EntityTypes.getEntityToClassMapping().get(entityName);
if (EntityLiving.class.isAssignableFrom(entityClazz))
{
removeSpawn((Class <? extends net.minecraft.src.EntityLiving >) entityClazz, spawnList, biomes);
}
}
}
| aerospark/FML | bukkit/net/minecraft/server/BukkitRegistry.java | Java | lgpl-2.1 | 5,591 |
#define OMPI_SKIP_MPICXX 1
#define MPICH_SKIP_MPICXX 1
#include "comm.h"
#include <stdio.h>
#include "cmdLineOptions.h"
#include "h5test.h"
#include "parallel_io.h"
#include "t3pio.h"
Comm P;
void outputResults(CmdLineOptions& cmd, ParallelIO& pio);
int main(int argc, char* argv[])
{
P.init(&argc, &argv, MPI_COMM_WORLD);
CmdLineOptions cmd(argc, argv);
CmdLineOptions::state_t state = cmd.state();
if (state != CmdLineOptions::iGOOD)
{
MPI_Finalize();
return (state == CmdLineOptions::iBAD);
}
ParallelIO pio;
if (cmd.h5slab || cmd.h5chunk)
pio.h5writer(cmd);
if (cmd.romio)
pio.MPIIOwriter(cmd);
if (P.myProc == 0)
outputResults(cmd, pio);
P.fini();
return 0;
}
void outputResults(CmdLineOptions& cmd, ParallelIO& pio)
{
double fileSz = pio.totalSz()/(1024.0 * 1024.0 * 1024.0);
const char* t3pioV = t3pio_version();
if (cmd.luaStyleOutput)
{
printf("%%%% { t3pioV = \"%s\", nprocs = %d, lSz = %ld, wrtStyle = \"%s\","
" xferStyle = \"%s\", iounits = %d, aggregators = %d, nstripes = %d, "
" stripeSzMB = %d, fileSzGB = %15.7g, time = %15.7g, totalTime = %15.7g,"
" rate = %15.7g },\n",
t3pioV, P.nProcs, cmd.localSz, cmd.wrtStyle.c_str(), cmd.xferStyle.c_str(),
pio.nIOUnits(), pio.aggregators(), pio.nStripes(), pio.stripeSzMB(),
fileSz, pio.time(), pio.totalTime(), pio.rate());
}
if (cmd.tableStyleOutput)
{
printf("\nunstructTest:\n"
"-------------------\n\n"
" Nprocs: %12d\n"
" lSz: %12ld\n"
" Numvar: %12d\n"
" iounits: %12d\n"
" aggregators: %12d\n"
" nstripes: %12d\n"
" stripeSz (MB): %12d\n"
" fileSz (GB): %12.3f\n"
" time (sec): %12.3f\n"
" totalTime (sec): %12.3f\n"
" rate (MB/s): %12.3f\n"
" wrtStyle: %12s\n"
" xferStyle: %12s\n"
" S_dne: %12d\n"
" S_auto_max: %12d\n"
" nStripesT3: %12d\n"
" t3pioV: %12s\n",
P.nProcs, cmd.localSz, pio.numvar(), pio.nIOUnits(), pio.aggregators(),
pio.nStripes(), pio.stripeSzMB(), fileSz, pio.time(), pio.totalTime(),
pio.rate(), cmd.wrtStyle.c_str(), cmd.xferStyle.c_str(), pio.dne_stripes(),
pio.auto_max_stripes(), pio.nStripesT3(), t3pioV);
}
}
| TACC/t3pio | unstructTest/main.C | C++ | lgpl-2.1 | 2,609 |
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package com.xpn.xwiki.web;
/**
* Enumeration of supported object policy types. A object policy type is an
* implementation on how to manage parameters in the query string that wants to
* modify objects in page. They are usually on the form of
* 'Space.PageClass_0_prop. In the default implementation of XWiki, these
* parameters will initialize values of properties of existing object (see
* 'UPDATE').
*
* The second implementation, called 'UDPATE_OR_CREATE' will also create objects
* if they don't exist. For example, let's take a page that contains one object
* Space.PageClass. Given the following parameters:
* <ul>
* <li>Space.PageClass_0_prop=abc</li>
* <li>Space.PageClass_1_prop=def</li>
* <li>Space.PageClass_2_prop=ghi</li>
* <li>Space.PageClass_6_prop=jkl</li>
* </ul>
*
* The object number 0 will have it's property initialized with 'abc'. The
* objects number 1 and 2 will be created and respectively initialized with
* 'def' and 'ghi'. The final parameter will be ignored since the number doesn't
* refer to a following number.
*
* @version $Id$
* @since 7.0RC1
*/
public enum ObjectPolicyType {
/** Only update objects. */
UPDATE("update"),
/** Update and/or create objects. */
UPDATE_OR_CREATE("updateOrCreate");
/** Name that is used in HTTP parameters to specify the object policy. */
private final String name;
/**
* @param name The string name corresponding to the object policy type.
*/
ObjectPolicyType(String name) {
this.name = name;
}
/**
* @return The string name corresponding to the object policy type.
*/
public String getName() {
return this.name;
}
/**
* @param name The string name corresponding to the object policy type.
* @return The ObjectPolicyType corresponding to the parameter 'name'.
*/
public static ObjectPolicyType forName(String name) {
for (ObjectPolicyType type : values()) {
if (type.getName().equals(name)) {
return type;
}
}
return null;
}
}
| pbondoer/xwiki-platform | xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/ObjectPolicyType.java | Java | lgpl-2.1 | 2,998 |
#if USE_SDL_BACKEND
#include "../test/SDLBackend.h"
#else
#include "../test/OgreBackend.h"
#endif
#include <GG/StyleFactory.h>
#include <GG/dialogs/ThreeButtonDlg.h>
#include <GG/dialogs/FileDlg.h>
#include <iostream>
// Tutorial 1: Minimal
// This contains the minimal interesting GG application. It contains 3D as
// well as GUI elements in the same scene, and demonstrates how to use the
// default SDL and Ogre input drivers.
void CustomRender()
{
const double RPM = 4;
const double DEGREES_PER_MS = 360.0 * RPM / 60000.0;
// DeltaT() returns the time in whole milliseconds since the last frame
// was rendered (in other words, since this method was last invoked).
glRotated(GG::GUI::GetGUI()->DeltaT() * DEGREES_PER_MS, 0.0, 1.0, 0.0);
glBegin(GL_QUADS);
glColor3d(0.0, 1.0, 0.0);
glVertex3d(1.0, 1.0, -1.0);
glVertex3d(-1.0, 1.0, -1.0);
glVertex3d(-1.0, 1.0, 1.0);
glVertex3d(1.0, 1.0, 1.0);
glColor3d(1.0, 0.5, 0.0);
glVertex3d(1.0, -1.0, 1.0);
glVertex3d(-1.0, -1.0, 1.0);
glVertex3d(-1.0, -1.0,-1.0);
glVertex3d(1.0, -1.0,-1.0);
glColor3d(1.0, 0.0, 0.0);
glVertex3d(1.0, 1.0, 1.0);
glVertex3d(-1.0, 1.0, 1.0);
glVertex3d(-1.0, -1.0, 1.0);
glVertex3d(1.0, -1.0, 1.0);
glColor3d(1.0, 1.0, 0.0);
glVertex3d(1.0, -1.0, -1.0);
glVertex3d(-1.0, -1.0, -1.0);
glVertex3d(-1.0, 1.0, -1.0);
glVertex3d(1.0, 1.0, -1.0);
glColor3d(0.0, 0.0, 1.0);
glVertex3d(-1.0, 1.0, 1.0);
glVertex3d(-1.0, 1.0, -1.0);
glVertex3d(-1.0, -1.0, -1.0);
glVertex3d(-1.0, -1.0, 1.0);
glColor3d(1.0, 0.0, 1.0);
glVertex3d(1.0, 1.0, -1.0);
glVertex3d(1.0, 1.0, 1.0);
glVertex3d(1.0, -1.0, 1.0);
glVertex3d(1.0, -1.0, -1.0);
glEnd();
}
// This is the launch point for your GG app. This is where you should place
// your main GG::Wnd(s) that should appear when the application starts, if
// any.
void CustomInit()
{
// Create a modal dialog and execute it. This will show GG operating on
// top of a "real 3D" scene. Note that if you want "real" 3D objects
// (i.e. drawn in a non-orthographic space) inside of GG windows, you can
// add whatever OpenGL calls you like to a GG::Wnd's Render() method,
// sandwiched between Exit2DMode() and Enter2DMode().
const std::string message = "Are we Готово yet?"; // That Russian word means "Done", ha.
const std::set<GG::UnicodeCharset> charsets_ = GG::UnicodeCharsetsToRender(message);
const std::vector<GG::UnicodeCharset> charsets(charsets_.begin(), charsets_.end());
const boost::shared_ptr<GG::Font> font =
GG::GUI::GetGUI()->GetStyleFactory()->DefaultFont(12, &charsets[0], &charsets[0] + charsets.size());
GG::Wnd* quit_dlg =
new GG::ThreeButtonDlg(GG::X(200), GG::Y(100), message, font, GG::CLR_SHADOW,
GG::CLR_SHADOW, GG::CLR_SHADOW, GG::CLR_WHITE, 1);
quit_dlg->Run();
// Now that we're back from the modal dialog, we can exit normally, since
// that's what closing the dialog indicates. Exit() calls all the cleanup
// methods for GG::SDLGUI.
GG::GUI::GetGUI()->Exit(0);
}
extern "C" // Note the use of C-linkage, as required by SDL.
int main(int argc, char* argv[])
{
// The try-catch block is not strictly necessary, but it sure helps to see
// what exception crashed your app in the log file.
try {
#if USE_SDL_BACKEND
MinimalSDLGUI::CustomInit = &CustomInit;
MinimalSDLGUI::CustomRender = &CustomRender;
MinimalSDLMain();
#else
MinimalOgreGUI::CustomInit = &CustomInit;
MinimalOgreGUI::CustomRender = &CustomRender;
MinimalOgreMain();
#endif
} catch (const std::invalid_argument& e) {
std::cerr << "main() caught exception(std::invalid_arg): " << e.what();
} catch (const std::runtime_error& e) {
std::cerr << "main() caught exception(std::runtime_error): " << e.what();
} catch (const std::exception& e) {
std::cerr << "main() caught exception(std::exception): " << e.what();
}
return 0;
}
| tzlaine/GG | tutorial/minimal.cpp | C++ | lgpl-2.1 | 4,112 |
/**
* DSS - Digital Signature Services
* Copyright (C) 2015 European Commission, provided under the CEF programme
*
* This file is part of the "DSS - Digital Signature Services" project.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package eu.europa.esig.dss.asic.cades.signature.asics;
import eu.europa.esig.dss.asic.cades.ASiCWithCAdESContainerExtractor;
import eu.europa.esig.dss.asic.cades.ASiCWithCAdESSignatureParameters;
import eu.europa.esig.dss.asic.cades.ASiCWithCAdESTimestampParameters;
import eu.europa.esig.dss.asic.cades.signature.ASiCWithCAdESService;
import eu.europa.esig.dss.asic.common.ASiCContent;
import eu.europa.esig.dss.diagnostic.DiagnosticData;
import eu.europa.esig.dss.diagnostic.SignatureWrapper;
import eu.europa.esig.dss.diagnostic.jaxb.XmlDigestMatcher;
import eu.europa.esig.dss.enumerations.ASiCContainerType;
import eu.europa.esig.dss.enumerations.SignatureLevel;
import eu.europa.esig.dss.model.DSSDocument;
import eu.europa.esig.dss.model.InMemoryDocument;
import eu.europa.esig.dss.signature.DocumentSignatureService;
import eu.europa.esig.dss.utils.Utils;
import eu.europa.esig.dss.validation.SignedDocumentValidator;
import eu.europa.esig.dss.validation.reports.Reports;
import org.junit.jupiter.api.BeforeEach;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class ASiCSCAdESLevelLTTest extends AbstractASiCSCAdESTestSignature {
private DocumentSignatureService<ASiCWithCAdESSignatureParameters, ASiCWithCAdESTimestampParameters> service;
private ASiCWithCAdESSignatureParameters signatureParameters;
private DSSDocument documentToSign;
@BeforeEach
public void init() throws Exception {
documentToSign = new InMemoryDocument("Hello World !".getBytes(), "test.text");
signatureParameters = new ASiCWithCAdESSignatureParameters();
signatureParameters.bLevel().setSigningDate(new Date());
signatureParameters.setSigningCertificate(getSigningCert());
signatureParameters.setCertificateChain(getCertificateChain());
signatureParameters.setSignatureLevel(SignatureLevel.CAdES_BASELINE_LT);
signatureParameters.aSiC().setContainerType(ASiCContainerType.ASiC_S);
service = new ASiCWithCAdESService(getCompleteCertificateVerifier());
service.setTspSource(getGoodTsa());
}
@Override
protected void onDocumentSigned(byte[] byteArray) {
super.onDocumentSigned(byteArray);
ASiCWithCAdESContainerExtractor containerExtractor = new ASiCWithCAdESContainerExtractor(new InMemoryDocument(byteArray));
ASiCContent result = containerExtractor.extract();
List<DSSDocument> signatureDocuments = result.getSignatureDocuments();
assertTrue(Utils.isCollectionNotEmpty(signatureDocuments));
for (DSSDocument signatureDocument : signatureDocuments) {
// validate with no detached content
DiagnosticData diagnosticData = validateDocument(signatureDocument);
SignatureWrapper signature = diagnosticData.getSignatureById(diagnosticData.getFirstSignatureId());
List<XmlDigestMatcher> digestMatchers = signature.getDigestMatchers();
assertEquals(1, digestMatchers.size());
assertFalse(digestMatchers.get(0).isDataFound());
assertFalse(digestMatchers.get(0).isDataIntact());
// with detached content
diagnosticData = validateDocument(signatureDocument, Arrays.asList(getSignedData(result)));
signature = diagnosticData.getSignatureById(diagnosticData.getFirstSignatureId());
digestMatchers = signature.getDigestMatchers();
assertEquals(1, digestMatchers.size());
assertTrue(digestMatchers.get(0).isDataFound());
assertTrue(digestMatchers.get(0).isDataIntact());
}
}
private DiagnosticData validateDocument(DSSDocument signatureDocument) {
return validateDocument(signatureDocument, null);
}
private DiagnosticData validateDocument(DSSDocument signatureDocument, List<DSSDocument> detachedContents) {
SignedDocumentValidator validator = SignedDocumentValidator.fromDocument(signatureDocument);
validator.setCertificateVerifier(getOfflineCertificateVerifier());
if (Utils.isCollectionNotEmpty(detachedContents)) {
validator.setDetachedContents(detachedContents);
}
Reports reports = validator.validateDocument();
return reports.getDiagnosticData();
}
@Override
protected DocumentSignatureService<ASiCWithCAdESSignatureParameters, ASiCWithCAdESTimestampParameters> getService() {
return service;
}
@Override
protected ASiCWithCAdESSignatureParameters getSignatureParameters() {
return signatureParameters;
}
@Override
protected DSSDocument getDocumentToSign() {
return documentToSign;
}
@Override
protected String getSigningAlias() {
return GOOD_USER;
}
}
| esig/dss | dss-asic-cades/src/test/java/eu/europa/esig/dss/asic/cades/signature/asics/ASiCSCAdESLevelLTTest.java | Java | lgpl-2.1 | 5,526 |
#!/usr/bin/env kjscmd5
function Calculator(ui)
{
// Setup entry functions
var display = ui.findChild('display');
this.display = display;
this.one = function() { display.intValue = display.intValue*10+1; }
this.two = function() { display.intValue = display.intValue*10+2; }
this.three = function() { display.intValue = display.intValue*10+3; }
this.four = function() { display.intValue = display.intValue*10+4; }
this.five = function() { display.intValue = display.intValue*10+5; }
this.six = function() { display.intValue = display.intValue*10+6; }
this.seven = function() { display.intValue = display.intValue*10+7; }
this.eight = function() { display.intValue = display.intValue*10+8; }
this.nine = function() { display.intValue = display.intValue*10+9; }
this.zero = function() { display.intValue = display.intValue*10+0; }
ui.connect( ui.findChild('one'), 'clicked()', this, 'one()' );
ui.connect( ui.findChild('two'), 'clicked()', this, 'two()' );
ui.connect( ui.findChild('three'), 'clicked()', this, 'three()' );
ui.connect( ui.findChild('four'), 'clicked()', this, 'four()' );
ui.connect( ui.findChild('five'), 'clicked()', this, 'five()' );
ui.connect( ui.findChild('six'), 'clicked()', this, 'six()' );
ui.connect( ui.findChild('seven'), 'clicked()', this, 'seven()' );
ui.connect( ui.findChild('eight'), 'clicked()', this, 'eight()' );
ui.connect( ui.findChild('nine'), 'clicked()', this, 'nine()' );
ui.connect( ui.findChild('zero'), 'clicked()', this, 'zero()' );
this.val = 0;
this.display.intValue = 0;
this.lastop = function() {}
this.plus = function()
{
this.val = display.intValue+this.val;
display.intValue = 0;
this.lastop=this.plus
}
this.minus = function()
{
this.val = display.intValue-this.val;
display.intValue = 0;
this.lastop=this.minus;
}
ui.connect( ui.findChild('plus'), 'clicked()', this, 'plus()' );
ui.connect( ui.findChild('minus'), 'clicked()', this, 'minus()' );
this.equals = function() { this.lastop(); display.intValue = this.val; }
this.clear = function() { this.lastop=function(){}; display.intValue = 0; this.val = 0; }
ui.connect( ui.findChild('equals'), 'clicked()', this, 'equals()' );
ui.connect( ui.findChild('clear'), 'clicked()', this, 'clear()' );
}
var loader = new QUiLoader();
var ui = loader.load('calc.ui', this);
var calc = new Calculator(ui);
ui.show();
exec();
| KDE/kjsembed | examples/calc/calc.js | JavaScript | lgpl-2.1 | 2,564 |
import { Keys } from '@ephox/agar';
import { describe, it } from '@ephox/bedrock-client';
import { TinyAssertions, TinyContentActions, TinyHooks, TinySelections } from '@ephox/mcagar';
import Editor from 'tinymce/core/api/Editor';
import Theme from 'tinymce/themes/silver/Theme';
describe('browser.tinymce.core.keyboard.TypeTextAtCef', () => {
const hook = TinyHooks.bddSetupLight<Editor>({
add_unload_trigger: false,
base_url: '/project/tinymce/js/tinymce'
}, [ Theme ], true);
it('Type text before cef inline element', () => {
const editor = hook.editor();
editor.setContent('<p><span contenteditable="false">a</span></p>');
TinySelections.select(editor, 'p', [ 1 ]);
TinyContentActions.keystroke(editor, Keys.left());
TinyContentActions.type(editor, 'bc');
TinyAssertions.assertCursor(editor, [ 0, 0 ], 2);
TinyAssertions.assertContent(editor, '<p>bc<span contenteditable="false">a</span></p>');
});
it('Type after cef inline element', () => {
const editor = hook.editor();
editor.setContent('<p><span contenteditable="false">a</span></p>');
TinySelections.select(editor, 'p', [ 1 ]);
TinyContentActions.keystroke(editor, Keys.right());
TinyContentActions.type(editor, 'bc');
TinyAssertions.assertCursor(editor, [ 0, 1 ], 3);
TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc</p>');
});
it('Type between cef inline elements', () => {
const editor = hook.editor();
editor.setContent('<p><span contenteditable="false">a</span> <span contenteditable="false">b</span></p>');
TinySelections.select(editor, 'p', [ 3 ]);
TinyContentActions.keystroke(editor, Keys.left());
TinyContentActions.keystroke(editor, Keys.left());
TinyContentActions.type(editor, 'bc');
TinyAssertions.assertSelection(editor, [ 0, 1 ], 3, [ 0, 1 ], 3);
TinyAssertions.assertContent(editor, '<p><span contenteditable="false">a</span>bc <span contenteditable="false">b</span></p>');
});
});
| TeamupCom/tinymce | modules/tinymce/src/core/test/ts/browser/keyboard/TypeTextAtCefTest.ts | TypeScript | lgpl-2.1 | 2,019 |
<?php
namespace wcf\acp\form;
use wcf\data\contact\option\ContactOption;
use wcf\data\contact\option\ContactOptionAction;
use wcf\data\contact\option\ContactOptionEditor;
/**
* Shows the contact option add form.
*
* @author Alexander Ebert
* @copyright 2001-2019 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\Acp\Form
* @since 3.1
*/
class ContactOptionAddForm extends AbstractCustomOptionForm {
/**
* @inheritDoc
*/
public $action = 'add';
/**
* @inheritDoc
*/
public $activeMenuItem = 'wcf.acp.menu.link.contact.settings';
/**
* @inheritDoc
*/
public $neededModules = ['MODULE_CONTACT_FORM'];
/**
* @inheritDoc
*/
public $neededPermissions = ['admin.contact.canManageContactForm'];
/**
* action class name
* @var string
*/
public $actionClass = ContactOptionAction::class;
/**
* base class name
* @var string
*/
public $baseClass = ContactOption::class;
/**
* editor class name
* @var string
*/
public $editorClass = ContactOptionEditor::class;
/**
* @inheritDoc
*/
public function readParameters() {
parent::readParameters();
$this->getI18nValue('optionTitle')->setLanguageItem('wcf.contact.option', 'wcf.contact', 'com.woltlab.wcf');
$this->getI18nValue('optionDescription')->setLanguageItem('wcf.contact.optionDescription', 'wcf.contact', 'com.woltlab.wcf');
}
}
| MenesesEvandro/WCF | wcfsetup/install/files/lib/acp/form/ContactOptionAddForm.class.php | PHP | lgpl-2.1 | 1,453 |
/**
* Copyright 2006-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.solmix.generator.plugin;
import static org.solmix.commons.util.StringUtils.stringHasValue;
import static org.solmix.generator.util.Messages.getString;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.solmix.generator.api.IntrospectedTable;
import org.solmix.generator.api.PluginAdapter;
/**
* This plugin demonstrates overriding the initialized() method to rename the
* generated example classes. Instead of xxxExample, the classes will be named
* xxxCriteria.
*
* <p>This plugin accepts two properties:
*
* <ul>
* <li><tt>searchString</tt> (required) the regular expression of the name
* search.</li>
* <li><tt>replaceString</tt> (required) the replacement String.</li>
* </ul>
*
* <p>For example, to change the name of the generated Example classes from
* xxxExample to xxxCriteria, specify the following:
*
* <dl>
* <dt>searchString</dt>
* <dd>Example$</dd>
* <dt>replaceString</dt>
* <dd>Criteria</dd>
* </dl>
*
*
* @author Jeff Butler
*
*/
public class RenameExampleClassPlugin extends PluginAdapter {
private String searchString;
private String replaceString;
private Pattern pattern;
public RenameExampleClassPlugin() {
}
@Override
public boolean validate(List<String> warnings) {
searchString = properties.getProperty("searchString");
replaceString = properties.getProperty("replaceString");
boolean valid = stringHasValue(searchString)
&& stringHasValue(replaceString);
if (valid) {
pattern = Pattern.compile(searchString);
} else {
if (!stringHasValue(searchString)) {
warnings.add(getString("ValidationError.18",
"RenameExampleClassPlugin",
"searchString"));
}
if (!stringHasValue(replaceString)) {
warnings.add(getString("ValidationError.18",
"RenameExampleClassPlugin",
"replaceString"));
}
}
return valid;
}
@Override
public void initialized(IntrospectedTable introspectedTable) {
String oldType = introspectedTable.getExampleType();
Matcher matcher = pattern.matcher(oldType);
oldType = matcher.replaceAll(replaceString);
introspectedTable.setExampleType(oldType);
}
}
| solmix/datax | generator/core/src/main/java/org/solmix/generator/plugin/RenameExampleClassPlugin.java | Java | lgpl-2.1 | 3,084 |
/******************************************************************************
* Copyright (C) 2010-2016 CERN. All rights not expressly granted are reserved.
*
* This file is part of the CERN Control and Monitoring Platform 'C2MON'.
* C2MON is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the license.
*
* C2MON is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with C2MON. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
package cern.c2mon.client.ext.history.common;
import java.sql.Timestamp;
import cern.c2mon.client.ext.history.common.id.HistoryUpdateId;
/**
* This interface is used to keep track of the data which is from the history.
* It have a function to get the execution time of the update so the player will know
* when to execute the update. And it also have an identifier.
*
* @author vdeila
*
*/
public interface HistoryUpdate {
/**
*
* @return the id of the update
*/
HistoryUpdateId getUpdateId();
/**
*
* @return the time of when this update should execute
*/
Timestamp getExecutionTimestamp();
}
| c2mon/c2mon-client-ext-history | src/main/java/cern/c2mon/client/ext/history/common/HistoryUpdate.java | Java | lgpl-3.0 | 1,559 |
from __future__ import absolute_import
import json
class JSONRenderer:
"""
Renders a mystery as JSON
"""
def render(self, mystery):
return json.dumps(mystery.encode(), indent=4)
| chjacobsen/mystery-murder-generator | mmgen/renderers/json.py | Python | lgpl-3.0 | 204 |
/*
* SonarQube Java
* Copyright (C) 2012-2017 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package org.sonar.maven.model;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import javax.xml.stream.XMLStreamReader;
/**
* Adapter in charge of converting attributes from XML object, being String, to located attribute,
* storing information related to the location of the attribute.
*/
public class LocatedAttributeAdapter extends XmlAdapter<String, LocatedAttribute> {
private final XMLStreamReader reader;
public LocatedAttributeAdapter(XMLStreamReader reader) {
this.reader = reader;
}
@Override
public LocatedAttribute unmarshal(String value) throws Exception {
LocatedAttribute result = new LocatedAttribute(value);
result.setEndLocation(XmlLocation.getLocation(reader.getLocation()));
result.setStartLocation(XmlLocation.getStartLocation(value, reader.getLocation()));
return result;
}
@Override
public String marshal(LocatedAttribute attribute) throws Exception {
return attribute.getValue();
}
}
| mbring/sonar-java | java-maven-model/src/main/java/org/sonar/maven/model/LocatedAttributeAdapter.java | Java | lgpl-3.0 | 1,812 |
package com.silicolife.textmining.core.datastructures.dataaccess.database.dataaccess.implementation.model.core.entities;
// Generated 23/Mar/2015 16:36:00 by Hibernate Tools 4.3.1
import javax.persistence.Column;
import javax.persistence.Embeddable;
/**
* ClusterProcessHasLabelsId generated by hbm2java
*/
@Embeddable
public class ClusterProcessHasLabelsId implements java.io.Serializable {
private long cphClusterProcessId;
private long cphClusterLabelId;
public ClusterProcessHasLabelsId() {
}
public ClusterProcessHasLabelsId(long cphClusterProcessId, long cphClusterLabelId) {
this.cphClusterProcessId = cphClusterProcessId;
this.cphClusterLabelId = cphClusterLabelId;
}
@Column(name = "cph_cluster_process_id", nullable = false)
public long getCphClusterProcessId() {
return this.cphClusterProcessId;
}
public void setCphClusterProcessId(long cphClusterProcessId) {
this.cphClusterProcessId = cphClusterProcessId;
}
@Column(name = "cph_cluster_label_id", nullable = false)
public long getCphClusterLabelId() {
return this.cphClusterLabelId;
}
public void setCphClusterLabelId(long cphClusterLabelId) {
this.cphClusterLabelId = cphClusterLabelId;
}
public boolean equals(Object other) {
if ((this == other))
return true;
if ((other == null))
return false;
if (!(other instanceof ClusterProcessHasLabelsId))
return false;
ClusterProcessHasLabelsId castOther = (ClusterProcessHasLabelsId) other;
return (this.getCphClusterProcessId() == castOther.getCphClusterProcessId()) && (this.getCphClusterLabelId() == castOther.getCphClusterLabelId());
}
public int hashCode() {
int result = 17;
result = 37 * result + (int) this.getCphClusterProcessId();
result = 37 * result + (int) this.getCphClusterLabelId();
return result;
}
}
| biotextmining/core | src/main/java/com/silicolife/textmining/core/datastructures/dataaccess/database/dataaccess/implementation/model/core/entities/ClusterProcessHasLabelsId.java | Java | lgpl-3.0 | 1,802 |
var namespaces =
[
[ "shyft", "namespaceshyft.html", "namespaceshyft" ]
]; | statkraft/shyft-doc | core/html/namespaces.js | JavaScript | lgpl-3.0 | 78 |
/**
* Copyright (C) 2010-2012 Regis Montoya (aka r3gis - www.r3gis.fr)
* This file is part of CSipSimple.
*
* CSipSimple is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* If you own a pjsip commercial license you can also redistribute it
* and/or modify it under the terms of the GNU Lesser General Public License
* as an android library.
*
* CSipSimple is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with CSipSimple. If not, see <http://www.gnu.org/licenses/>.
*/
package com.csipsimple.ui.outgoingcall;
import android.app.PendingIntent;
import android.app.PendingIntent.CanceledException;
import android.database.Cursor;
import android.os.Bundle;
import android.os.RemoteException;
import android.support.v4.content.Loader;
import android.view.View;
import android.widget.ListView;
import com.csipsimple.api.ISipService;
import com.csipsimple.api.SipProfile;
import com.csipsimple.ui.account.AccountsLoader;
import com.csipsimple.utils.CallHandlerPlugin;
import com.csipsimple.utils.Log;
import com.csipsimple.widgets.CSSListFragment;
public class OutgoingCallListFragment extends CSSListFragment {
private static final String THIS_FILE = "OutgoingCallListFragment";
private OutgoingAccountsAdapter mAdapter;
private AccountsLoader accLoader;
private long startDate;
private boolean callMade = false;
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
setHasOptionsMenu(true);
}
@Override
public void onResume() {
super.onResume();
callMade = false;
attachAdapter();
getLoaderManager().initLoader(0, null, this);
startDate = System.currentTimeMillis();
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
}
private void attachAdapter() {
if(getListAdapter() == null) {
if(mAdapter == null) {
mAdapter = new OutgoingAccountsAdapter(this, null);
}
setListAdapter(mAdapter);
}
}
@Override
public Loader<Cursor> onCreateLoader(int loader, Bundle args) {
OutgoingCallChooser superActivity = ((OutgoingCallChooser) getActivity());
accLoader = new AccountsLoader(getActivity(), superActivity.getPhoneNumber(), superActivity.shouldIgnoreRewritingRules());
return accLoader;
}
final long MOBILE_CALL_DELAY_MS = 600;
/**
* Place the call for a given cursor positionned at right index in list
* @param c The cursor pointing the entry we'd like to call
* @return true if call performed, false else
*/
private boolean placeCall(Cursor c) {
OutgoingCallChooser superActivity = ((OutgoingCallChooser)getActivity());
ISipService service = superActivity.getConnectedService();
long accountId = c.getLong(c.getColumnIndex(SipProfile.FIELD_ID));
if(accountId > SipProfile.INVALID_ID) {
// Extra check for the account id.
if(service == null) {
return false;
}
boolean canCall = c.getInt(c.getColumnIndex(AccountsLoader.FIELD_STATUS_OUTGOING)) == 1;
if(!canCall) {
return false;
}
try {
String toCall = c.getString(c.getColumnIndex(AccountsLoader.FIELD_NBR_TO_CALL));
service.makeCall(toCall, (int) accountId);
superActivity.finishServiceIfNeeded(true);
return true;
} catch (RemoteException e) {
Log.e(THIS_FILE, "Unable to make the call", e);
}
}else if(accountId < SipProfile.INVALID_ID) {
// This is a plugin row.
if(accLoader != null) {
CallHandlerPlugin ch = accLoader.getCallHandlerWithAccountId(accountId);
if(ch == null) {
Log.w(THIS_FILE, "Call handler not anymore available in loader... something gone wrong");
return false;
}
String nextExclude = ch.getNextExcludeTelNumber();
long delay = 0;
if (nextExclude != null && service != null) {
try {
service.ignoreNextOutgoingCallFor(nextExclude);
} catch (RemoteException e) {
Log.e(THIS_FILE, "Ignore next outgoing number failed");
}
delay = MOBILE_CALL_DELAY_MS - (System.currentTimeMillis() - startDate);
}
if(ch.getIntent() != null) {
PluginCallRunnable pendingTask = new PluginCallRunnable(ch.getIntent(), delay);
Log.d(THIS_FILE, "Deferring call task of " + delay);
pendingTask.start();
}
return true;
}
}
return false;
}
private class PluginCallRunnable extends Thread {
private PendingIntent pendingIntent;
private long delay;
public PluginCallRunnable(PendingIntent pi, long d) {
pendingIntent = pi;
delay = d;
}
@Override
public void run() {
if(delay > 0) {
try {
sleep(delay);
} catch (InterruptedException e) {
Log.e(THIS_FILE, "Thread that fires outgoing call has been interrupted");
}
}
OutgoingCallChooser superActivity = ((OutgoingCallChooser)getActivity());
try {
pendingIntent.send();
} catch (CanceledException e) {
Log.e(THIS_FILE, "Pending intent cancelled", e);
}
superActivity.finishServiceIfNeeded(false);
}
}
@Override
public synchronized void changeCursor(Cursor c) {
if(c != null && callMade == false) {
OutgoingCallChooser superActivity = ((OutgoingCallChooser)getActivity());
Long accountToCall = superActivity.getAccountToCallTo();
// Move to first to search in this cursor
c.moveToFirst();
// First of all, if only one is available... try call with it
if(c.getCount() == 1) {
if(placeCall(c)) {
c.close();
callMade = true;
return;
}
}else {
// Now lets search for one in for call mode if service is ready
do {
if(c.getInt(c.getColumnIndex(AccountsLoader.FIELD_FORCE_CALL)) == 1) {
if(placeCall(c)) {
c.close();
callMade = true;
return;
}
}
if(accountToCall != SipProfile.INVALID_ID) {
if(accountToCall == c.getLong(c.getColumnIndex(SipProfile.FIELD_ID))) {
if(placeCall(c)) {
c.close();
callMade = true;
return;
}
}
}
} while(c.moveToNext());
}
}
// Set adapter content if nothing to force was found
if(mAdapter != null) {
mAdapter.changeCursor(c);
}
}
@Override
public synchronized void onListItemClick(ListView l, View v, int position, long id) {
if(mAdapter != null) {
placeCall((Cursor) mAdapter.getItem(position));
}
}
public AccountsLoader getAccountLoader() {
return accLoader;
}
}
| fingi/csipsimple | src/com/csipsimple/ui/outgoingcall/OutgoingCallListFragment.java | Java | lgpl-3.0 | 8,351 |
package fun.guruqu.portal.structures;
public class BlockStructure {
/**
* @param args
*/
public static void main(String[] args) {
}
}
| guruqu/BeaconTeleport | src/fun/guruqu/portal/structures/BlockStructure.java | Java | lgpl-3.0 | 149 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SphericalHarmonicAnalyze
{
class LUDenceMatrix:MathNet.Numerics.LinearAlgebra.Double.Factorization.LU
{
MathNet.Numerics.LinearAlgebra.Double.DenseMatrix dm { get; set; }
}
}
| vadimart92/SGG-TRF-Analyzer | SphericalHarmonicAnalyze/LUDenceMatrix.cs | C# | lgpl-3.0 | 295 |
/**************************************************************************
**
** This file is part of .
** https://github.com/HamedMasafi/
**
** is free software: you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public License
** along with . If not, see <http://www.gnu.org/licenses/>.
**
**************************************************************************/
#include <QEventLoop>
#include <QtCore/QDebug>
#include <QtNetwork/QTcpSocket>
#include "abstracthub_p.h"
#include "serverhub.h"
#include "serverhub_p.h"
NEURON_BEGIN_NAMESPACE
ServerHubPrivate::ServerHubPrivate() : serverThread(nullptr), connectionEventLoop(nullptr)
{
}
ServerHub::ServerHub(QObject *parent) : AbstractHub(parent),
d(new ServerHubPrivate)
{
}
ServerHub::ServerHub(AbstractSerializer *serializer, QObject *parent) : AbstractHub(serializer, parent),
d(new ServerHubPrivate)
{
}
ServerHub::ServerHub(QTcpSocket *socket, QObject *parent) : AbstractHub(parent),
d(new ServerHubPrivate)
{
this->socket = socket;
}
ServerHub::~ServerHub()
{
// QList<SharedObject *> soList = sharedObjects();
// foreach (SharedObject *so, soList) {
// if(so)
// removeSharedObject(so);
// }
// while(sharedObjects().count()){
// removeSharedObject(sharedObjects().at(0));
// }
auto so = sharedObjectHash();
QHashIterator<const QString, SharedObject*> i(so);
while (i.hasNext()) {
i.next();
// cout << i.key() << ": " << i.value() << endl;
detachSharedObject(i.value());
}
}
ServerThread *ServerHub::serverThread() const
{
return d->serverThread;
}
qlonglong ServerHub::hi(qlonglong hubId)
{
initalizeMutex.lock();
setHubId(hubId);
// emit connected();
K_TRACE_DEBUG;
// invokeOnPeer(THIS_HUB, "hi", hubId);
if (d->connectionEventLoop) {
d->connectionEventLoop->quit();
d->connectionEventLoop->deleteLater();
}
initalizeMutex.unlock();
setStatus(Connected);
return this->hubId();
}
bool ServerHub::setSocketDescriptor(qintptr socketDescriptor, bool waitForConnect)
{
bool ok = socket->setSocketDescriptor(socketDescriptor);
if(waitForConnect)
socket->waitForReadyRead();
return ok;
}
void ServerHub::setServerThread(ServerThread *serverThread)
{
if(d->serverThread != serverThread)
d->serverThread = serverThread;
}
void ServerHub::beginConnection()
{
K_TRACE_DEBUG;
d->connectionEventLoop = new QEventLoop;
K_REG_OBJECT(d->connectionEventLoop);
d->connectionEventLoop->exec();
}
NEURON_END_NAMESPACE
| HamedMasafi/Noron | src/serverhub.cpp | C++ | lgpl-3.0 | 3,066 |
/* $Id$
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States Government Work" under the
* terms of the United States Copyright Act. It was written as part of
* the author's official duties as a United States Government employee and
* thus cannot be copyrighted. This software/database is freely available
* to the public for use. The National Library of Medicine and the U.S.
* Government have not placed any restriction on its use or reproduction.
*
* Although all reasonable efforts have been taken to ensure the accuracy
* and reliability of the software and data, the NLM and the U.S.
* Government do not and cannot warrant the performance or results that
* may be obtained by using this software or data. The NLM and the U.S.
* Government disclaim all warranties, express or implied, including
* warranties of performance, merchantability or fitness for any particular
* purpose.
*
* Please cite the author in any work or product based on this material.
*
* ===========================================================================
*
*/
/// @file Cn3d_backbone_style.hpp
/// User-defined methods of the data storage class.
///
/// This file was originally generated by application DATATOOL
/// using the following specifications:
/// 'cn3d.asn'.
///
/// New methods or data members can be added to it if needed.
/// See also: Cn3d_backbone_style_.hpp
#ifndef OBJECTS_CN3D_CN3D_BACKBONE_STYLE_HPP
#define OBJECTS_CN3D_CN3D_BACKBONE_STYLE_HPP
// generated includes
#include <objects/cn3d/Cn3d_backbone_style_.hpp>
// generated classes
BEGIN_NCBI_SCOPE
BEGIN_objects_SCOPE // namespace ncbi::objects::
/////////////////////////////////////////////////////////////////////////////
class NCBI_CN3D_EXPORT CCn3d_backbone_style : public CCn3d_backbone_style_Base
{
typedef CCn3d_backbone_style_Base Tparent;
public:
// constructor
CCn3d_backbone_style(void);
// destructor
~CCn3d_backbone_style(void);
private:
// Prohibit copy constructor and assignment operator
CCn3d_backbone_style(const CCn3d_backbone_style& value);
CCn3d_backbone_style& operator=(const CCn3d_backbone_style& value);
};
/////////////////// CCn3d_backbone_style inline methods
// constructor
inline
CCn3d_backbone_style::CCn3d_backbone_style(void)
{
}
/////////////////// end of CCn3d_backbone_style inline methods
END_objects_SCOPE // namespace ncbi::objects::
END_NCBI_SCOPE
#endif // OBJECTS_CN3D_CN3D_BACKBONE_STYLE_HPP
/* Original file checksum: lines: 86, chars: 2588, CRC32: dfafc7fa */
| kyungtaekLIM/PSI-BLASTexB | src/ncbi-blast-2.5.0+/c++/include/objects/cn3d/Cn3d_backbone_style.hpp | C++ | lgpl-3.0 | 2,744 |
package com.sirma.itt.seip.rest.handlers.readers;
import static com.sirma.itt.seip.rest.utils.request.params.RequestParams.PATH_ID;
import java.io.IOException;
import java.io.InputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import javax.inject.Inject;
import javax.ws.rs.BeanParam;
import javax.ws.rs.Consumes;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.ext.MessageBodyReader;
import javax.ws.rs.ext.Provider;
import com.sirma.itt.seip.domain.instance.Instance;
import com.sirma.itt.seip.rest.exceptions.BadRequestException;
import com.sirma.itt.seip.rest.resources.instances.InstanceResourceParser;
import com.sirma.itt.seip.rest.utils.JSON;
import com.sirma.itt.seip.rest.utils.Versions;
import com.sirma.itt.seip.rest.utils.request.RequestInfo;
/**
* Converts a JSON object to {@link Instance}.
*
* @author yasko
*/
@Provider
@Consumes(Versions.V2_JSON)
public class InstanceBodyReader implements MessageBodyReader<Instance> {
@Inject
private InstanceResourceParser instanceResourceParser;
@BeanParam
private RequestInfo request;
@Override
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) {
return Instance.class.isAssignableFrom(type);
}
@Override
public Instance readFrom(Class<Instance> type, Type genericType, Annotation[] annotations, MediaType mediaType,
MultivaluedMap<String, String> headers, InputStream stream) throws IOException {
String id = PATH_ID.get(request);
Instance instance = JSON.readObject(stream, instanceResourceParser.toSingleInstance(id));
if (instance != null) {
return instance;
}
throw new BadRequestException("There was a problem with the stream reading or instance resolving.");
}
}
| SirmaITT/conservation-space-1.7.0 | docker/sirma-platform/platform/seip-parent/platform/rest-api/src/main/java/com/sirma/itt/seip/rest/handlers/readers/InstanceBodyReader.java | Java | lgpl-3.0 | 1,803 |
/***
Copyright (c) 2012 - 2021 Hércules S. S. José
Este arquivo é parte do programa Orçamento Doméstico.
Orçamento Doméstico é um software livre; você pode redistribui-lo e/ou
modificá-lo dentro dos termos da Licença Pública Geral Menor GNU como
publicada pela Fundação do Software Livre (FSF); na versão 3.0 da
Licença.
Este programa é distribuído na esperança que possa ser útil, mas SEM
NENHUMA GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer
MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral Menor
GNU em português para maiores detalhes.
Você deve ter recebido uma cópia da Licença Pública Geral Menor GNU sob
o nome de "LICENSE" junto com este programa, se não, acesse o site do
projeto no endereco https://github.com/herculeshssj/orcamento ou escreva
para a Fundação do Software Livre(FSF) Inc., 51 Franklin St, Fifth Floor,
Boston, MA 02110-1301, USA.
Para mais informações sobre o programa Orçamento Doméstico e seu autor
entre em contato pelo e-mail herculeshssj@outlook.com, ou ainda escreva
para Hércules S. S. José, Rua José dos Anjos, 160 - Bl. 3 Apto. 304 -
Jardim Alvorada - CEP: 26261-130 - Nova Iguaçu, RJ, Brasil.
***/
package br.com.hslife.orcamento.entity;
import static org.junit.Assert.assertEquals;
import java.util.Date;
import org.junit.Before;
import org.junit.Test;
import br.com.hslife.orcamento.enumeration.TipoCategoria;
import br.com.hslife.orcamento.exception.ValidationException;
public class DividaTerceiroTest {
private DividaTerceiro entity;
@Before
public void setUp() throws Exception {
Usuario usuario = new Usuario();
usuario.setNome("Usuário de teste");
Favorecido favorecido = new Favorecido();
favorecido.setNome("Favorecido de teste");
Moeda moeda = new Moeda();
moeda.setNome("Real");
moeda.setSimboloMonetario("R$");
entity = new DividaTerceiro();
entity.setDataNegociacao(new Date());
entity.setFavorecido(favorecido);
entity.setJustificativa("Justificativa da dívida de teste");
entity.setTermoDivida("Termo da dívida de teste");
entity.setTermoQuitacao("Termo de quitação da dívida de teste");
entity.setTipoCategoria(TipoCategoria.CREDITO);
entity.setUsuario(usuario);
entity.setValorDivida(1000);
entity.setMoeda(moeda);
PagamentoDividaTerceiro pagamento;
for (int i = 0; i < 3; ++i) {
pagamento = new PagamentoDividaTerceiro();
pagamento.setComprovantePagamento("Comprovante de pagamento da dívida de teste " + i);
pagamento.setDataPagamento(new Date());
pagamento.setDividaTerceiro(entity);
pagamento.setValorPago(100);
entity.getPagamentos().add(pagamento);
}
}
@Test(expected=ValidationException.class)
public void testValidateDataNegociacao() {
entity.setDataNegociacao(null);
entity.validate();
}
@Test(expected=ValidationException.class)
public void testValidateJustificativa() {
entity.setJustificativa(null);
entity.validate();
}
@Test(expected=ValidationException.class)
public void testValidateTamanhoJustificativa() {
StringBuilder s = new StringBuilder(10000);
for (int i = 0; i < 10000; ++i)
s.append("a");
entity.setJustificativa(s.toString());
entity.validate();
}
@Test(expected=ValidationException.class)
public void testValidateCategoria() {
entity.setTipoCategoria(null);
entity.validate();
}
@Test(expected=ValidationException.class)
public void testValidateFavorecido() {
entity.setFavorecido(null);
entity.validate();
}
@Test(expected=ValidationException.class)
public void testValidateMoeda() {
entity.setMoeda(null);
entity.validate();
}
@Test
public void testLabel() {
assertEquals("Crédito com Favorecido de teste no valor de R$ 1000.0 - Registrado", entity.getLabel());
}
@Test
public void testTotalPago() {
assertEquals(300.0, entity.getTotalPago(), 0);
}
@Test
public void testTotalAPagar() {
assertEquals(700.0, entity.getTotalAPagar(), 0);
}
@Test(expected=ValidationException.class)
public void testValidateDataPagamento() {
for (PagamentoDividaTerceiro pagamento : entity.getPagamentos()) {
pagamento.setDataPagamento(null);
pagamento.validate();
}
}
}
| herculeshssj/orcamento | orcamento/src/test/java/br/com/hslife/orcamento/entity/DividaTerceiroTest.java | Java | lgpl-3.0 | 4,219 |
/**
* GetAllUsersResponse.java
* Created by pgirard at 2:07:29 PM on Aug 19, 2010
* in the com.qagwaai.starmalaccamax.shared.services.action package
* for the JobMalaccamax project
*/
package com.qagwaai.starmalaccamax.client.service.action;
import java.util.ArrayList;
import com.google.gwt.user.client.rpc.IsSerializable;
import com.qagwaai.starmalaccamax.shared.model.JobDTO;
/**
* @author pgirard
*
*/
public final class GetAllJobsResponse extends AbstractResponse implements IsSerializable {
/**
*
*/
private ArrayList<JobDTO> jobs;
/**
*
*/
private int totalJobs;
/**
* @return the users
*/
public ArrayList<JobDTO> getJobs() {
return jobs;
}
/**
* @return the totalJobs
*/
public int getTotalJobs() {
return totalJobs;
}
/**
* @param jobs
* the users to set
*/
public void setJobs(final ArrayList<JobDTO> jobs) {
this.jobs = jobs;
}
/**
* @param totalJobs
* the totalJobs to set
*/
public void setTotalJobs(final int totalJobs) {
this.totalJobs = totalJobs;
}
/**
* {@inheritDoc}
*/
@Override
public String toString() {
return "GetAllJobsResponse [jobs=" + jobs + ", totalJobs=" + totalJobs + "]";
}
}
| qagwaai/StarMalaccamax | src/com/qagwaai/starmalaccamax/client/service/action/GetAllJobsResponse.java | Java | lgpl-3.0 | 1,407 |
/*
* Copyright (C) 2021 Inera AB (http://www.inera.se)
*
* This file is part of sklintyg (https://github.com/sklintyg).
*
* sklintyg is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* sklintyg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
angular.module('StatisticsApp.treeMultiSelector.controller', [])
.controller('treeMultiSelectorCtrl', ['$scope', '$uibModal',
function($scope, $uibModal) {
'use strict';
$scope.openDialogClicked = function() {
if (angular.isFunction($scope.onOpen)) {
$scope.onOpen();
}
var modalInstance = $uibModal.open({
animation: false,
templateUrl: '/app/shared/treemultiselector/modal/modal.html',
controller: 'TreeMultiSelectorModalCtrl',
windowTopClass: 'tree-multi-selector',
size: 'lg',
backdrop: 'true',
resolve: {
directiveScope: $scope
}
});
modalInstance.result.then(function() {
$scope.doneClicked();
}, function() {
});
};
}]);
| sklintyg/statistik | web/src/main/webapp/app/shared/treemultiselector/treeMultiSelectorCtrl.js | JavaScript | lgpl-3.0 | 1,547 |
// node/this-3.js
var object = {
id: "xyz",
printId: function() {
console.log('The id is '+
this.id + ' ' +
this.toString());
}
};
// setTimeout(object.printId, 100);
var callback = object.printId;
callback();
| sistemas-web/nodejs-exemplos | node/this-3.js | JavaScript | lgpl-3.0 | 238 |
var complexExample = {
"edges" : [
{
"id" : 0,
"sbo" : 15,
"source" : "Reactome:109796",
"target" : "Reactome:177938"
},
{
"id" : 1,
"sbo" : 15,
"source" : "MAP:Cb15996_CY_Reactome:177938",
"target" : "Reactome:177938"
},
{
"id" : 2,
"sbo" : 11,
"source" : "Reactome:177938",
"target" : "MAP:Cb17552_CY_Reactome:177938"
},
{
"id" : 3,
"sbo" : 11,
"source" : "Reactome:177938",
"target" : "Reactome:109783"
},
{
"id" : 4,
"sbo" : 13,
"source" : "Reactome:179820",
"target" : "Reactome:177938"
},
{
"id" : 5,
"sbo" : 15,
"source" : "Reactome:179845",
"target" : "Reactome:177934"
},
{
"id" : 6,
"sbo" : 15,
"source" : "MAP:Cs56-65-5_CY_Reactome:177934",
"target" : "Reactome:177934"
},
{
"id" : 7,
"sbo" : 11,
"source" : "Reactome:177934",
"target" : "MAP:Cb16761_CY_Reactome:177934"
},
{
"id" : 8,
"sbo" : 11,
"source" : "Reactome:177934",
"target" : "Reactome:179882"
},
{
"id" : 9,
"sbo" : 13,
"source" : "Reactome:179845",
"target" : "Reactome:177934"
},
{
"id" : 10,
"sbo" : 15,
"source" : "Reactome:109844",
"target" : "Reactome:109867"
},
{
"id" : 11,
"sbo" : 11,
"source" : "Reactome:109867",
"target" : "Reactome:109845"
},
{
"id" : 12,
"sbo" : 15,
"source" : "Reactome:29358_MAN:R12",
"target" : "MAN:R12"
},
{
"id" : 13,
"sbo" : 15,
"source" : "Reactome:198710",
"target" : "MAN:R12"
},
{
"id" : 14,
"sbo" : 11,
"source" : "MAN:R12",
"target" : "Reactome:113582_MAN:R12"
},
{
"id" : 15,
"sbo" : 11,
"source" : "MAN:R12",
"target" : "Reactome:198666"
},
{
"id" : 16,
"sbo" : 13,
"source" : "Reactome:109845",
"target" : "MAN:R12"
},
{
"id" : 17,
"sbo" : 15,
"source" : "MAP:Cs56-65-5_CY_Reactome:109841",
"target" : "Reactome:109841"
},
{
"id" : 18,
"sbo" : 15,
"source" : "Reactome:109794",
"target" : "Reactome:109841"
},
{
"id" : 19,
"sbo" : 11,
"source" : "Reactome:109841",
"target" : "MAP:Cb16761_CY_Reactome:109841"
},
{
"id" : 20,
"sbo" : 11,
"source" : "Reactome:109841",
"target" : "Reactome:109793"
},
{
"id" : 21,
"sbo" : 11,
"source" : "Reactome:109841",
"target" : "MAP:UQ02750_CY_pho218pho222"
},
{
"id" : 22,
"sbo" : 13,
"source" : "Reactome:112406",
"target" : "Reactome:109841"
},
{
"id" : 23,
"sbo" : 15,
"source" : "Reactome:179882",
"target" : "Reactome:177940"
},
{
"id" : 24,
"sbo" : 15,
"source" : "Reactome:179849",
"target" : "Reactome:177940"
},
{
"id" : 25,
"sbo" : 11,
"source" : "Reactome:177940",
"target" : "Reactome:180348"
},
{
"id" : 26,
"sbo" : 15,
"source" : "Reactome:109788",
"target" : "Reactome:109802"
},
{
"id" : 27,
"sbo" : 15,
"source" : "MAP:UP31946_CY",
"target" : "Reactome:109802"
},
{
"id" : 28,
"sbo" : 11,
"source" : "Reactome:109802",
"target" : "Reactome:109789"
},
{
"id" : 29,
"sbo" : 15,
"source" : "Reactome:109787",
"target" : "Reactome:109803"
},
{
"id" : 30,
"sbo" : 15,
"source" : "Reactome:109783",
"target" : "Reactome:109803"
},
{
"id" : 31,
"sbo" : 11,
"source" : "Reactome:109803",
"target" : "Reactome:109788"
},
{
"id" : 32,
"sbo" : 11,
"source" : "Reactome:109803",
"target" : "MAP:UP31946_CY"
},
{
"id" : 33,
"sbo" : 15,
"source" : "MAP:Cs56-65-5_CY_Reactome:177930",
"target" : "Reactome:177930"
},
{
"id" : 34,
"sbo" : 15,
"source" : "Reactome:180348",
"target" : "Reactome:177930"
},
{
"id" : 35,
"sbo" : 11,
"source" : "Reactome:177930",
"target" : "Reactome:180286"
},
{
"id" : 36,
"sbo" : 11,
"source" : "Reactome:177930",
"target" : "MAP:Cb16761_CY_Reactome:177930"
},
{
"id" : 37,
"sbo" : 13,
"source" : "Reactome:180348",
"target" : "Reactome:177930"
},
{
"id" : 38,
"sbo" : 15,
"source" : "Reactome:109796",
"target" : "Reactome:177945"
},
{
"id" : 39,
"sbo" : 15,
"source" : "MAP:Cb15996_CY_Reactome:177945",
"target" : "Reactome:177945"
},
{
"id" : 40,
"sbo" : 11,
"source" : "Reactome:177945",
"target" : "MAP:Cb17552_CY_Reactome:177945"
},
{
"id" : 41,
"sbo" : 11,
"source" : "Reactome:177945",
"target" : "Reactome:109783"
},
{
"id" : 42,
"sbo" : 13,
"source" : "Reactome:180331",
"target" : "Reactome:177945"
},
{
"id" : 43,
"sbo" : 15,
"source" : "Reactome:109793",
"target" : "MAN:R1"
},
{
"id" : 44,
"sbo" : 15,
"source" : "MAP:UP36507_CY",
"target" : "MAN:R1"
},
{
"id" : 45,
"sbo" : 11,
"source" : "MAN:R1",
"target" : "Reactome:109795"
},
{
"id" : 46,
"sbo" : 15,
"source" : "Reactome:109843",
"target" : "Reactome:109863"
},
{
"id" : 47,
"sbo" : 11,
"source" : "Reactome:109863",
"target" : "MAP:UP27361_CY_pho202pho204"
},
{
"id" : 48,
"sbo" : 11,
"source" : "Reactome:109863",
"target" : "MAP:UQ02750_CY_pho218pho222"
},
{
"id" : 49,
"sbo" : 15,
"source" : "MAP:Cs56-65-5_CY_Reactome:177933",
"target" : "Reactome:177933"
},
{
"id" : 50,
"sbo" : 15,
"source" : "Reactome:180301",
"target" : "Reactome:177933"
},
{
"id" : 51,
"sbo" : 11,
"source" : "Reactome:177933",
"target" : "MAP:Cb16761_CY_Reactome:177933"
},
{
"id" : 52,
"sbo" : 11,
"source" : "Reactome:177933",
"target" : "Reactome:180337"
},
{
"id" : 53,
"sbo" : 13,
"source" : "Reactome:180301",
"target" : "Reactome:177933"
},
{
"id" : 54,
"sbo" : 15,
"source" : "MAP:UQ02750_CY",
"target" : "MAN:R2"
},
{
"id" : 55,
"sbo" : 15,
"source" : "Reactome:109793",
"target" : "MAN:R2"
},
{
"id" : 56,
"sbo" : 11,
"source" : "MAN:R2",
"target" : "Reactome:109794"
},
{
"id" : 57,
"sbo" : 15,
"source" : "MAP:UP04049_CY_pho259pho621",
"target" : "Reactome:109804"
},
{
"id" : 58,
"sbo" : 15,
"source" : "MAP:UP31946_CY",
"target" : "Reactome:109804"
},
{
"id" : 59,
"sbo" : 11,
"source" : "Reactome:109804",
"target" : "Reactome:109787"
},
{
"id" : 60,
"sbo" : 15,
"source" : "MAP:Cs56-65-5_CY_Reactome:109852",
"target" : "Reactome:109852"
},
{
"id" : 61,
"sbo" : 15,
"source" : "Reactome:109795",
"target" : "Reactome:109852"
},
{
"id" : 62,
"sbo" : 11,
"source" : "Reactome:109852",
"target" : "MAP:Cb16761_CY_Reactome:109852"
},
{
"id" : 63,
"sbo" : 11,
"source" : "Reactome:109852",
"target" : "Reactome:109793"
},
{
"id" : 64,
"sbo" : 11,
"source" : "Reactome:109852",
"target" : "Reactome:109848"
},
{
"id" : 65,
"sbo" : 13,
"source" : "Reactome:112406",
"target" : "Reactome:109852"
},
{
"id" : 66,
"sbo" : 15,
"source" : "MAP:Cs56-65-5_CY_Reactome:177939",
"target" : "Reactome:177939"
},
{
"id" : 67,
"sbo" : 15,
"source" : "Reactome:179856",
"target" : "Reactome:177939"
},
{
"id" : 68,
"sbo" : 11,
"source" : "Reactome:177939",
"target" : "MAP:Cb16761_CY_Reactome:177939"
},
{
"id" : 69,
"sbo" : 11,
"source" : "Reactome:177939",
"target" : "Reactome:179838"
},
{
"id" : 70,
"sbo" : 13,
"source" : "Reactome:179791",
"target" : "Reactome:177939"
},
{
"id" : 71,
"sbo" : 15,
"source" : "Reactome:180286",
"target" : "MAN:R25"
},
{
"id" : 72,
"sbo" : 15,
"source" : "MAP:C3",
"target" : "MAN:R25"
},
{
"id" : 73,
"sbo" : 15,
"source" : "MAP:C2",
"target" : "MAN:R25"
},
{
"id" : 74,
"sbo" : 11,
"source" : "MAN:R25",
"target" : "Reactome:179791"
},
{
"id" : 75,
"sbo" : 15,
"source" : "MAP:Cx114",
"target" : "Reactome:177936"
},
{
"id" : 76,
"sbo" : 15,
"source" : "Reactome:180337",
"target" : "Reactome:177936"
},
{
"id" : 77,
"sbo" : 11,
"source" : "Reactome:177936",
"target" : "Reactome:180331"
},
{
"id" : 78,
"sbo" : 15,
"source" : "MAP:C3",
"target" : "MAN:R28"
},
{
"id" : 79,
"sbo" : 15,
"source" : "MAP:C2",
"target" : "MAN:R28"
},
{
"id" : 80,
"sbo" : 15,
"source" : "Reactome:109783",
"target" : "MAN:R28"
},
{
"id" : 81,
"sbo" : 11,
"source" : "MAN:R28",
"target" : "MAN:C10"
},
{
"id" : 82,
"sbo" : 15,
"source" : "Reactome:179847",
"target" : "Reactome:177922"
},
{
"id" : 83,
"sbo" : 11,
"source" : "Reactome:177922",
"target" : "Reactome:179845"
},
{
"id" : 84,
"sbo" : 15,
"source" : "Reactome:109838",
"target" : "Reactome:109860"
},
{
"id" : 85,
"sbo" : 15,
"source" : "MAP:Cs56-65-5_CY_Reactome:109860",
"target" : "Reactome:109860"
},
{
"id" : 86,
"sbo" : 11,
"source" : "Reactome:109860",
"target" : "MAP:Cb16761_CY_Reactome:109860"
},
{
"id" : 87,
"sbo" : 11,
"source" : "Reactome:109860",
"target" : "Reactome:109843"
},
{
"id" : 88,
"sbo" : 13,
"source" : "Reactome:109838",
"target" : "Reactome:109860"
},
{
"id" : 89,
"sbo" : 20,
"source" : "Reactome:112340",
"target" : "Reactome:109860"
},
{
"id" : 90,
"sbo" : 15,
"source" : "MAP:Cx114",
"target" : "Reactome:177943"
},
{
"id" : 91,
"sbo" : 15,
"source" : "Reactome:179882",
"target" : "Reactome:177943"
},
{
"id" : 92,
"sbo" : 11,
"source" : "Reactome:177943",
"target" : "Reactome:179820"
},
{
"id" : 93,
"sbo" : 15,
"source" : "MAP:UP27361_CY_pho202pho204",
"target" : "Reactome:109865"
},
{
"id" : 94,
"sbo" : 11,
"source" : "Reactome:109865",
"target" : "Reactome:109844"
},
{
"id" : 95,
"sbo" : 15,
"source" : "Reactome:179882",
"target" : "Reactome:177925"
},
{
"id" : 96,
"sbo" : 15,
"source" : "MAP:UP29353_CY",
"target" : "Reactome:177925"
},
{
"id" : 97,
"sbo" : 11,
"source" : "Reactome:177925",
"target" : "Reactome:180301"
},
{
"id" : 98,
"sbo" : 15,
"source" : "Reactome:109789",
"target" : "Reactome:109829"
},
{
"id" : 99,
"sbo" : 15,
"source" : "MAP:Cs56-65-5_CY_Reactome:109829",
"target" : "Reactome:109829"
},
{
"id" : 100,
"sbo" : 11,
"source" : "Reactome:109829",
"target" : "MAP:Cb16761_CY_Reactome:109829"
},
{
"id" : 101,
"sbo" : 11,
"source" : "Reactome:109829",
"target" : "Reactome:109793"
},
{
"id" : 102,
"sbo" : 13,
"source" : "Reactome:163338",
"target" : "Reactome:109829"
},
{
"id" : 103,
"sbo" : 15,
"source" : "MAP:UP27361_CY",
"target" : "Reactome:109857"
},
{
"id" : 104,
"sbo" : 15,
"source" : "MAP:UQ02750_CY_pho218pho222",
"target" : "Reactome:109857"
},
{
"id" : 105,
"sbo" : 11,
"source" : "Reactome:109857",
"target" : "Reactome:109838"
},
{
"id" : 106,
"sbo" : 15,
"source" : "Reactome:179863",
"target" : "Reactome:177942"
},
{
"id" : 107,
"sbo" : 15,
"source" : "Reactome:179837",
"target" : "Reactome:177942"
},
{
"id" : 108,
"sbo" : 11,
"source" : "Reactome:177942",
"target" : "Reactome:179847"
},
{
"id" : 109,
"sbo" : 20,
"source" : "Reactome:197745",
"target" : "Reactome:177942"
}
],
"nodes" : [
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS:GDP",
"modification" : [],
"ref" : "Reactome:109796",
"subnodes" : [
"MAP:Cb17552_CY_Reactome:109796_1",
"Reactome:109782_Reactome:109796_1"
],
"x" : 1889,
"y" : 2293
},
"id" : "Reactome:109796",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "RAS:RAF:14-3-3",
"modification" : [],
"ref" : "Reactome:109789",
"subnodes" : [
"Reactome:109788_Reactome:109789_1",
"MAP:UP31946_CY_Reactome:109789_1"
],
"x" : 1757,
"y" : 1680
},
"id" : "Reactome:109789",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "PI3K alpha",
"modification" : [],
"ref" : "MAP:Cx156"
},
"id" : "MAP:Cx156",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "Activated RAF1 complex",
"modification" : [],
"ref" : "Reactome:109793",
"subnodes" : [
"MAP:UP31946_CY_Reactome:109793_1",
"Reactome:109783_Reactome:109793_1",
"Reactome:109792_Reactome:109793_1"
],
"x" : 2402,
"y" : 1480
},
"id" : "Reactome:109793",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR-SHC",
"modification" : [],
"ref" : "Reactome:180301",
"subnodes" : [
"Reactome:179882_Reactome:180301_1",
"MAP:UP29353_CY_Reactome:180301_1"
],
"x" : 1478,
"y" : 2706
},
"id" : "Reactome:180301",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Nucleus",
"label" : "phospho-ERK-1 dimer",
"modification" : [],
"ref" : "Reactome:109845",
"subnodes" : [
"Reactome:112359_Reactome:109845_1",
"Reactome:112359_Reactome:109845_2"
],
"x" : 3261,
"y" : 202
},
"id" : "Reactome:109845",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "GRB2:Phospho-GAB1",
"modification" : [],
"ref" : "Reactome:180304"
},
"id" : "Reactome:180304",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860"
},
"id" : "Reactome:179860",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "GAB1:GRB2-EGF-Phospho-EGFR dimer",
"modification" : [],
"ref" : "Reactome:180348",
"subnodes" : [
"Reactome:179882_Reactome:180348_1",
"Reactome:179849_Reactome:180348_1"
],
"x" : 477,
"y" : 2293
},
"id" : "Reactome:180348",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "phospho-ERK-1:MEK1",
"modification" : [],
"ref" : "Reactome:109843",
"subnodes" : [
"MAP:UP27361_CY_pho202pho204_Reactome:109843_1",
"MAP:UQ02750_CY_pho218pho222_Reactome:109843_1"
],
"x" : 3519,
"y" : 722
},
"id" : "Reactome:109843",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "RAS:RAF",
"modification" : [],
"ref" : "Reactome:109788",
"subnodes" : [
"MAP:UP04049_CY_pho259pho621_Reactome:109788_1",
"Reactome:109783_Reactome:109788_1"
],
"x" : 1569,
"y" : 1880
},
"id" : "Reactome:109788",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "GRB2:GAB1",
"modification" : [],
"ref" : "Reactome:179849",
"subnodes" : [
"MAP:UP62993_CY_Reactome:179849_1",
"MAP:UQ13480_CY_Reactome:179849_1"
],
"x" : 686,
"y" : 2506
},
"id" : "Reactome:179849",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "GRB2:Phospho GAB1-EGF-Phospho-EGFR dimer",
"modification" : [],
"ref" : "Reactome:180286",
"subnodes" : [
"Reactome:180304_Reactome:180286_1",
"Reactome:179882_Reactome:180286_1"
],
"x" : 770,
"y" : 2080
},
"id" : "Reactome:180286",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:EGFR dimer",
"modification" : [],
"ref" : "Reactome:179845",
"subnodes" : [
"Reactome:179847_Reactome:179845_1",
"Reactome:179847_Reactome:179845_2"
],
"x" : 1331,
"y" : 3106
},
"id" : "Reactome:179845",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "phospho-ERK-1 dimer",
"modification" : [],
"ref" : "Reactome:109844",
"subnodes" : [
"MAP:UP27361_CY_pho202pho204_Reactome:109844_1",
"MAP:UP27361_CY_pho202pho204_Reactome:109844_2"
],
"x" : 3261,
"y" : 378
},
"id" : "Reactome:109844",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:EGFR",
"modification" : [],
"ref" : "Reactome:179847",
"subnodes" : [
"Reactome:179863_Reactome:179847_1",
"Reactome:179837_Reactome:179847_1"
],
"x" : 1331,
"y" : 3294
},
"id" : "Reactome:179847",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "GRB2:SOS1",
"modification" : [],
"ref" : "MAP:Cx114",
"subnodes" : [
"MAP:UQ07889_CY_MAP:Cx114_1",
"MAP:UP62993_CY_MAP:Cx114_1"
],
"x" : 1555,
"y" : 2506
},
"id" : "MAP:Cx114",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR (Y992, Y1068, Y1086, Y1148, Y1173) dimer",
"modification" : [],
"ref" : "Reactome:179882",
"subnodes" : [
"Reactome:179860_Reactome:179882_1",
"Reactome:179860_Reactome:179882_2"
],
"x" : 967,
"y" : 2906
},
"id" : "Reactome:179882",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "MEK1:ERK-1",
"modification" : [],
"ref" : "Reactome:109838",
"subnodes" : [
"MAP:UP27361_CY_Reactome:109838_1",
"MAP:UQ02750_CY_pho218pho222_Reactome:109838_1"
],
"x" : 3806,
"y" : 898
},
"id" : "Reactome:109838",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "RAS:GTP:PI3Ka",
"modification" : [],
"ref" : "MAN:C10",
"subnodes" : [
"MAP:Cx156_MAN:C10_1",
"Reactome:109783_MAN:C10_1"
],
"x" : 1292,
"y" : 1880
},
"id" : "MAN:C10",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "p-Raf1(S259,S621):14-3-3 protein beta/alpha",
"modification" : [],
"ref" : "Reactome:109787",
"subnodes" : [
"MAP:UP04049_CY_pho259pho621_Reactome:109787_1",
"MAP:UP31946_CY_Reactome:109787_1"
],
"x" : 2423,
"y" : 1680
},
"id" : "Reactome:109787",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "GRB2:SOS-Phospho-SHC:EGF:Phospho-EGFR dimer",
"modification" : [],
"ref" : "Reactome:180331",
"subnodes" : [
"MAP:Cx114_Reactome:180331_1",
"Reactome:180337_Reactome:180331_1"
],
"x" : 2310,
"y" : 2293
},
"id" : "Reactome:180331",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "Activated RAF1 complex:MEK2",
"modification" : [],
"ref" : "Reactome:109795",
"subnodes" : [
"Reactome:109793_Reactome:109795_1",
"MAP:UP36507_CY_Reactome:109795_1"
],
"x" : 2070,
"y" : 1267
},
"id" : "Reactome:109795",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "EGF:Phospho-EGFR-GRB2:GAB1:PI3Kreg:PI3Kcat",
"modification" : [],
"ref" : "Reactome:179791",
"subnodes" : [
"MAP:C3_Reactome:179791_1",
"Reactome:179882_Reactome:179791_1",
"MAP:C2_Reactome:179791_1",
"Reactome:179849_Reactome:179791_1"
],
"x" : 963,
"y" : 1880
},
"id" : "Reactome:179791",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "Activated RAF1 complex:MEK1",
"modification" : [],
"ref" : "Reactome:109794",
"subnodes" : [
"MAP:UQ02750_CY_Reactome:109794_1",
"Reactome:109793_Reactome:109794_1"
],
"x" : 2762,
"y" : 1267
},
"id" : "Reactome:109794",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "Activated RAF1 complex:MEK",
"modification" : [],
"ref" : "Reactome:112406",
"subnodes" : [
"Reactome:109793_Reactome:112406_1",
"Reactome:112398_Reactome:112406_1"
],
"x" : 2416,
"y" : 1267
},
"id" : "Reactome:112406",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR:Phospho-SHC",
"modification" : [],
"ref" : "Reactome:180337",
"subnodes" : [
"Reactome:180276_Reactome:180337_1",
"Reactome:179882_Reactome:180337_1"
],
"x" : 1945,
"y" : 2506
},
"id" : "Reactome:180337",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "GRB2:SOS-EGF-Phospho-EGFR dimer",
"modification" : [],
"ref" : "Reactome:179820",
"subnodes" : [
"MAP:Cx114_Reactome:179820_1",
"Reactome:179882_Reactome:179820_1"
],
"x" : 1514,
"y" : 2293
},
"id" : "Reactome:179820",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS:GTP",
"modification" : [],
"ref" : "Reactome:109783",
"subnodes" : [
"Reactome:109782_Reactome:109783_1",
"MAP:Cb15996_CY_Reactome:109783_1"
],
"x" : 1886,
"y" : 2080
},
"id" : "Reactome:109783",
"is_abstract" : 0,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "GDP",
"modification" : [],
"ref" : "MAP:Cb17552_CY"
},
"id" : "MAP:Cb17552_CY",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"compartment" : "MAP:Nucleus",
"label" : "ATP",
"modification" : [],
"ref" : "Reactome:29358"
},
"id" : "Reactome:29358",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "ATP",
"modification" : [],
"ref" : "MAP:Cs56-65-5_CY"
},
"id" : "MAP:Cs56-65-5_CY",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "Phosphatidylinositol-4,5-bisphosphate",
"modification" : [],
"ref" : "Reactome:179856",
"x" : 543,
"y" : 1880
},
"id" : "Reactome:179856",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "ADP",
"modification" : [],
"ref" : "MAP:Cb16761_CY"
},
"id" : "MAP:Cb16761_CY",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"compartment" : "MAP:Nucleus",
"label" : "ADP",
"modification" : [],
"ref" : "Reactome:113582"
},
"id" : "Reactome:113582",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY"
},
"id" : "MAP:Cb15996_CY",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "Phosphatidylinositol-3,4,5-trisphosphate",
"modification" : [],
"ref" : "Reactome:179838",
"x" : 733,
"y" : 1680
},
"id" : "Reactome:179838",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"compartment" : "MAP:Nucleus",
"label" : "Phospho-ELK1",
"modification" : [],
"ref" : "Reactome:198666",
"x" : 3722,
"y" : 30
},
"id" : "Reactome:198666",
"is_abstract" : 0,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"compartment" : "MAP:Nucleus",
"label" : "ELK1",
"modification" : [],
"ref" : "Reactome:198710",
"x" : 3556,
"y" : 202
},
"id" : "Reactome:198710",
"is_abstract" : 0,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "MEK",
"modification" : [],
"ref" : "Reactome:112398"
},
"id" : "Reactome:112398",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "phospho_MEK1",
"modification" : [],
"ref" : "Reactome:112340",
"x" : 3186,
"y" : 898
},
"id" : "Reactome:112340",
"is_abstract" : 0,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "phospho-MEK2",
"modification" : [
[
216,
null
],
[
216,
null
]
],
"ref" : "Reactome:109848",
"x" : 2325,
"y" : 1070
},
"id" : "Reactome:109848",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "Transforming protein N-Ras",
"modification" : [],
"ref" : "MAP:C79"
},
"id" : "MAP:C79",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Nucleus",
"label" : "phospho-ERK-1",
"modification" : [
[
216,
"202"
],
[
216,
"204"
]
],
"ref" : "Reactome:112359"
},
"id" : "Reactome:112359",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "YWHAB()",
"modification" : [],
"ref" : "MAP:UP31946_CY",
"x" : 1887,
"y" : 1880
},
"id" : "MAP:UP31946_CY",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "Phospho-SHC transforming protein",
"modification" : [
[
216,
"349"
],
[
216,
"350"
]
],
"ref" : "Reactome:180276"
},
"id" : "Reactome:180276",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "K-RAS isoform 2A",
"modification" : [],
"ref" : "MAP:UP01116_"
},
"id" : "MAP:UP01116_",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "phospho-MEK1",
"modification" : [
[
216,
"286"
],
[
216,
"292"
]
],
"ref" : "Reactome:112374"
},
"id" : "Reactome:112374",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "Son of sevenless protein homolog 1",
"modification" : [],
"ref" : "MAP:UQ07889_CY"
},
"id" : "MAP:UQ07889_CY",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Nucleus",
"label" : "ETS-domain protein Elk-1-1",
"modification" : [],
"ref" : "MAP:UP19419_NU(1-428)"
},
"id" : "MAP:UP19419_NU(1-428)",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "SHC",
"modification" : [],
"ref" : "MAP:UP29353_CY",
"x" : 1370,
"y" : 2906
},
"id" : "MAP:UP29353_CY",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "MEK1",
"modification" : [],
"ref" : "MAP:UQ02750_CY",
"x" : 2748,
"y" : 1480
},
"id" : "MAP:UQ02750_CY",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "GRB2()",
"modification" : [],
"ref" : "MAP:UP62993_CY"
},
"id" : "MAP:UP62993_CY",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "cRaf",
"modification" : [
[
216,
"340"
],
[
216,
"621"
],
[
216,
"259"
],
[
216,
"341"
]
],
"ref" : "Reactome:109792"
},
"id" : "Reactome:109792",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "Phospho-GAB1",
"modification" : [
[
216,
"627"
],
[
216,
"659"
],
[
216,
"447"
],
[
216,
"472"
],
[
216,
"589"
]
],
"ref" : "Reactome:180344"
},
"id" : "Reactome:180344",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "c-H-ras",
"modification" : [],
"ref" : "MAP:UP01112_PM"
},
"id" : "MAP:UP01112_PM",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "unidentified protein tyrosine kinase",
"modification" : [],
"ref" : "Reactome:163338",
"x" : 2811,
"y" : 1680
},
"id" : "Reactome:163338",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "PI3K-p85",
"modification" : [],
"ref" : "MAP:C3",
"x" : 1292,
"y" : 2080
},
"id" : "MAP:C3",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "RAF1(ph259,ph621)",
"modification" : [
[
216,
"259"
],
[
216,
"621"
]
],
"ref" : "MAP:UP04049_CY_pho259pho621",
"x" : 2294,
"y" : 1880
},
"id" : "MAP:UP04049_CY_pho259pho621",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "MEK2()",
"modification" : [],
"ref" : "MAP:UP36507_CY",
"x" : 2084,
"y" : 1480
},
"id" : "MAP:UP36507_CY",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "Activated ERK1",
"modification" : [
[
216,
"202"
],
[
216,
"204"
]
],
"ref" : "MAP:UP27361_CY_pho202pho204",
"x" : 3261,
"y" : 550
},
"id" : "MAP:UP27361_CY_pho202pho204",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863",
"x" : 1331,
"y" : 3466
},
"id" : "Reactome:179863",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "phospho-MEK1",
"modification" : [
[
216,
"218"
],
[
216,
"222"
]
],
"ref" : "MAP:UQ02750_CY_pho218pho222",
"x" : 3102,
"y" : 1070
},
"id" : "MAP:UQ02750_CY_pho218pho222",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "EGFR",
"modification" : [],
"ref" : "Reactome:179837",
"x" : 928,
"y" : 3466
},
"id" : "Reactome:179837",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "GAB1",
"modification" : [],
"ref" : "MAP:UQ13480_CY"
},
"id" : "MAP:UQ13480_CY",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "phospho-MEK1",
"modification" : [
[
216,
"218"
],
[
216,
"222"
],
[
216,
"286"
],
[
216,
"292"
]
],
"ref" : "Reactome:112339"
},
"id" : "Reactome:112339",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"label" : "SOS1",
"modification" : [],
"ref" : "PID:C200496"
},
"id" : "PID:C200496",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "Leucine-rich repeats and immunoglobulin-like domains protein 1 precursor",
"modification" : [],
"ref" : "Reactome:197745",
"x" : 1902,
"y" : 3466
},
"id" : "Reactome:197745",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Nucleus",
"label" : "Phospho-ETS-domain protein Elk-1-2",
"modification" : [
[
216,
"324"
],
[
216,
"383"
],
[
216,
"389"
],
[
216,
"336"
],
[
216,
"422"
]
],
"ref" : "MAP:UP19419_NU(1-428)_pho324pho336pho383pho389pho422"
},
"id" : "MAP:UP19419_NU(1-428)_pho324pho336pho383pho389pho422",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "PI3K-p110",
"modification" : [],
"ref" : "MAP:C2",
"x" : 1066,
"y" : 2080
},
"id" : "MAP:C2",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Cytosol",
"label" : "ERK1",
"modification" : [],
"ref" : "MAP:UP27361_CY",
"x" : 3707,
"y" : 1070
},
"id" : "MAP:UP27361_CY",
"is_abstract" : 0,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"label" : "GRB2",
"modification" : [],
"ref" : "PID:C200490"
},
"id" : "PID:C200490",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177938",
"x" : 1569,
"y" : 2180
},
"id" : "Reactome:177938",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY",
"x" : 1131,
"y" : 2293
},
"id" : "MAP:Cb15996_CY_Reactome:177938",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb17552_CY",
"compartment" : "MAP:Cytosol",
"label" : "GDP",
"modification" : [],
"ref" : "MAP:Cb17552_CY",
"x" : 1569,
"y" : 2080
},
"id" : "MAP:Cb17552_CY_Reactome:177938",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177934",
"x" : 1331,
"y" : 3006
},
"id" : "Reactome:177934",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cs56-65-5_CY",
"compartment" : "MAP:Cytosol",
"label" : "ATP",
"modification" : [],
"ref" : "MAP:Cs56-65-5_CY",
"x" : 1008,
"y" : 3106
},
"id" : "MAP:Cs56-65-5_CY_Reactome:177934",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb16761_CY",
"compartment" : "MAP:Cytosol",
"label" : "ADP",
"modification" : [],
"ref" : "MAP:Cb16761_CY",
"x" : 1696,
"y" : 2906
},
"id" : "MAP:Cb16761_CY_Reactome:177934",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109867",
"x" : 3261,
"y" : 290
},
"id" : "Reactome:109867",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "MAN:R12",
"x" : 3556,
"y" : 114
},
"id" : "MAN:R12",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "Reactome:29358",
"compartment" : "MAP:Nucleus",
"label" : "ATP",
"modification" : [],
"ref" : "Reactome:29358",
"x" : 3881,
"y" : 202
},
"id" : "Reactome:29358_MAN:R12",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "Reactome:113582",
"compartment" : "MAP:Nucleus",
"label" : "ADP",
"modification" : [],
"ref" : "Reactome:113582",
"x" : 3390,
"y" : 30
},
"id" : "Reactome:113582_MAN:R12",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109841",
"x" : 2716,
"y" : 1154
},
"id" : "Reactome:109841",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cs56-65-5_CY",
"compartment" : "MAP:Cytosol",
"label" : "ATP",
"modification" : [],
"ref" : "MAP:Cs56-65-5_CY",
"x" : 3085,
"y" : 1267
},
"id" : "MAP:Cs56-65-5_CY_Reactome:109841",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb16761_CY",
"compartment" : "MAP:Cytosol",
"label" : "ADP",
"modification" : [],
"ref" : "MAP:Cb16761_CY",
"x" : 2696,
"y" : 1070
},
"id" : "MAP:Cb16761_CY_Reactome:109841",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177940",
"x" : 549,
"y" : 2406
},
"id" : "Reactome:177940",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109802",
"x" : 1757,
"y" : 1780
},
"id" : "Reactome:109802",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109803",
"x" : 1886,
"y" : 1980
},
"id" : "Reactome:109803",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177930",
"x" : 477,
"y" : 2180
},
"id" : "Reactome:177930",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cs56-65-5_CY",
"compartment" : "MAP:Cytosol",
"label" : "ATP",
"modification" : [],
"ref" : "MAP:Cs56-65-5_CY",
"x" : 800,
"y" : 2293
},
"id" : "MAP:Cs56-65-5_CY_Reactome:177930",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb16761_CY",
"compartment" : "MAP:Cytosol",
"label" : "ADP",
"modification" : [],
"ref" : "MAP:Cb16761_CY",
"x" : 425,
"y" : 2080
},
"id" : "MAP:Cb16761_CY_Reactome:177930",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177945",
"x" : 2256,
"y" : 2180
},
"id" : "Reactome:177945",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY",
"x" : 2739,
"y" : 2293
},
"id" : "MAP:Cb15996_CY_Reactome:177945",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb17552_CY",
"compartment" : "MAP:Cytosol",
"label" : "GDP",
"modification" : [],
"ref" : "MAP:Cb17552_CY",
"x" : 2256,
"y" : 2080
},
"id" : "MAP:Cb17552_CY_Reactome:177945",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "MAN:R1",
"x" : 2084,
"y" : 1380
},
"id" : "MAN:R1",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109863",
"x" : 3261,
"y" : 634
},
"id" : "Reactome:109863",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177933",
"x" : 1478,
"y" : 2606
},
"id" : "Reactome:177933",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cs56-65-5_CY",
"compartment" : "MAP:Cytosol",
"label" : "ATP",
"modification" : [],
"ref" : "MAP:Cs56-65-5_CY",
"x" : 1155,
"y" : 2706
},
"id" : "MAP:Cs56-65-5_CY_Reactome:177933",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb16761_CY",
"compartment" : "MAP:Cytosol",
"label" : "ADP",
"modification" : [],
"ref" : "MAP:Cb16761_CY",
"x" : 1221,
"y" : 2506
},
"id" : "MAP:Cb16761_CY_Reactome:177933",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "MAN:R2",
"x" : 2748,
"y" : 1380
},
"id" : "MAN:R2",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109804",
"x" : 2294,
"y" : 1780
},
"id" : "Reactome:109804",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109852",
"x" : 2080,
"y" : 1154
},
"id" : "Reactome:109852",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cs56-65-5_CY",
"compartment" : "MAP:Cytosol",
"label" : "ATP",
"modification" : [],
"ref" : "MAP:Cs56-65-5_CY",
"x" : 1747,
"y" : 1267
},
"id" : "MAP:Cs56-65-5_CY_Reactome:109852",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb16761_CY",
"compartment" : "MAP:Cytosol",
"label" : "ADP",
"modification" : [],
"ref" : "MAP:Cb16761_CY",
"x" : 1999,
"y" : 1070
},
"id" : "MAP:Cb16761_CY_Reactome:109852",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177939",
"x" : 543,
"y" : 1780
},
"id" : "Reactome:177939",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cs56-65-5_CY",
"compartment" : "MAP:Cytosol",
"label" : "ATP",
"modification" : [],
"ref" : "MAP:Cs56-65-5_CY",
"x" : 160,
"y" : 1880
},
"id" : "MAP:Cs56-65-5_CY_Reactome:177939",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb16761_CY",
"compartment" : "MAP:Cytosol",
"label" : "ADP",
"modification" : [],
"ref" : "MAP:Cb16761_CY",
"x" : 354,
"y" : 1680
},
"id" : "MAP:Cb16761_CY_Reactome:177939",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "MAN:R25",
"x" : 1014,
"y" : 1980
},
"id" : "MAN:R25",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177936",
"x" : 1945,
"y" : 2406
},
"id" : "Reactome:177936",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "MAN:R28",
"x" : 1292,
"y" : 1980
},
"id" : "MAN:R28",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177922",
"x" : 1331,
"y" : 3206
},
"id" : "Reactome:177922",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109860",
"x" : 3519,
"y" : 810
},
"id" : "Reactome:109860",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cs56-65-5_CY",
"compartment" : "MAP:Cytosol",
"label" : "ATP",
"modification" : [],
"ref" : "MAP:Cs56-65-5_CY",
"x" : 3519,
"y" : 898
},
"id" : "MAP:Cs56-65-5_CY_Reactome:109860",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb16761_CY",
"compartment" : "MAP:Cytosol",
"label" : "ADP",
"modification" : [],
"ref" : "MAP:Cb16761_CY",
"x" : 3228,
"y" : 722
},
"id" : "MAP:Cb16761_CY_Reactome:109860",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177943",
"x" : 1514,
"y" : 2406
},
"id" : "Reactome:177943",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109865",
"x" : 3261,
"y" : 466
},
"id" : "Reactome:109865",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177925",
"x" : 1370,
"y" : 2806
},
"id" : "Reactome:177925",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109829",
"x" : 2080,
"y" : 1580
},
"id" : "Reactome:109829",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "MAP:Cs56-65-5_CY",
"compartment" : "MAP:Cytosol",
"label" : "ATP",
"modification" : [],
"ref" : "MAP:Cs56-65-5_CY",
"x" : 2080,
"y" : 1680
},
"id" : "MAP:Cs56-65-5_CY_Reactome:109829",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:Cb16761_CY",
"compartment" : "MAP:Cytosol",
"label" : "ADP",
"modification" : [],
"ref" : "MAP:Cb16761_CY",
"x" : 1758,
"y" : 1480
},
"id" : "MAP:Cb16761_CY_Reactome:109829",
"is_abstract" : 0,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:109857",
"x" : 3707,
"y" : 986
},
"id" : "Reactome:109857",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"label" : null,
"ref" : "Reactome:177942",
"x" : 1331,
"y" : 3382
},
"id" : "Reactome:177942",
"is_abstract" : 0,
"sbo" : 167,
"type" : "Reaction"
},
{
"data" : {
"clone_marker" : "Reactome:109788",
"compartment" : "MAP:Plasmamembrane",
"label" : "RAS:RAF",
"modification" : [],
"ref" : "Reactome:109788",
"subnodes" : [
"MAP:UP04049_CY_pho259pho621_Reactome:109788_Reactome:109789_1_1",
"Reactome:109783_Reactome:109788_Reactome:109789_1_1"
]
},
"id" : "Reactome:109788_Reactome:109789_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UP31946_CY",
"compartment" : "MAP:Cytosol",
"label" : "YWHAB()",
"modification" : [],
"ref" : "MAP:UP31946_CY"
},
"id" : "MAP:UP31946_CY_Reactome:109789_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:Cb17552_CY",
"compartment" : "MAP:Cytosol",
"label" : "GDP",
"modification" : [],
"ref" : "MAP:Cb17552_CY"
},
"id" : "MAP:Cb17552_CY_Reactome:109796_1",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "Reactome:109782",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782_Reactome:109796_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:UP31946_CY",
"compartment" : "MAP:Cytosol",
"label" : "YWHAB()",
"modification" : [],
"ref" : "MAP:UP31946_CY"
},
"id" : "MAP:UP31946_CY_Reactome:109793_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109783",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS:GTP",
"modification" : [],
"ref" : "Reactome:109783",
"subnodes" : [
"Reactome:109782_Reactome:109783_Reactome:109793_1_1",
"MAP:Cb15996_CY_Reactome:109783_Reactome:109793_1_1"
]
},
"id" : "Reactome:109783_Reactome:109793_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109792",
"compartment" : "MAP:Plasmamembrane",
"label" : "cRaf",
"modification" : [
[
216,
"340"
],
[
216,
"621"
],
[
216,
"259"
],
[
216,
"341"
]
],
"ref" : "Reactome:109792"
},
"id" : "Reactome:109792_Reactome:109793_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179882",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR (Y992, Y1068, Y1086, Y1148, Y1173) dimer",
"modification" : [],
"ref" : "Reactome:179882",
"subnodes" : [
"Reactome:179860_Reactome:179882_Reactome:180301_1_1",
"Reactome:179860_Reactome:179882_Reactome:180301_1_2"
]
},
"id" : "Reactome:179882_Reactome:180301_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UP29353_CY",
"compartment" : "MAP:Cytosol",
"label" : "SHC",
"modification" : [],
"ref" : "MAP:UP29353_CY"
},
"id" : "MAP:UP29353_CY_Reactome:180301_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:112359",
"compartment" : "MAP:Nucleus",
"label" : "phospho-ERK-1",
"modification" : [
[
216,
"202"
],
[
216,
"204"
]
],
"ref" : "Reactome:112359"
},
"id" : "Reactome:112359_Reactome:109845_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:112359",
"compartment" : "MAP:Nucleus",
"label" : "phospho-ERK-1",
"modification" : [
[
216,
"202"
],
[
216,
"204"
]
],
"ref" : "Reactome:112359"
},
"id" : "Reactome:112359_Reactome:109845_2",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179882",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR (Y992, Y1068, Y1086, Y1148, Y1173) dimer",
"modification" : [],
"ref" : "Reactome:179882",
"subnodes" : [
"Reactome:179860_Reactome:179882_Reactome:180348_1_1",
"Reactome:179860_Reactome:179882_Reactome:180348_1_2"
]
},
"id" : "Reactome:179882_Reactome:180348_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179849",
"compartment" : "MAP:Cytosol",
"label" : "GRB2:GAB1",
"modification" : [],
"ref" : "Reactome:179849",
"subnodes" : [
"MAP:UP62993_CY_Reactome:179849_Reactome:180348_1_1",
"MAP:UQ13480_CY_Reactome:179849_Reactome:180348_1_1"
]
},
"id" : "Reactome:179849_Reactome:180348_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UP27361_CY_pho202pho204",
"compartment" : "MAP:Cytosol",
"label" : "Activated ERK1",
"modification" : [
[
216,
"202"
],
[
216,
"204"
]
],
"ref" : "MAP:UP27361_CY_pho202pho204"
},
"id" : "MAP:UP27361_CY_pho202pho204_Reactome:109843_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UQ02750_CY_pho218pho222",
"compartment" : "MAP:Cytosol",
"label" : "phospho-MEK1",
"modification" : [
[
216,
"218"
],
[
216,
"222"
]
],
"ref" : "MAP:UQ02750_CY_pho218pho222"
},
"id" : "MAP:UQ02750_CY_pho218pho222_Reactome:109843_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UP04049_CY_pho259pho621",
"compartment" : "MAP:Cytosol",
"label" : "RAF1(ph259,ph621)",
"modification" : [
[
216,
"259"
],
[
216,
"621"
]
],
"ref" : "MAP:UP04049_CY_pho259pho621"
},
"id" : "MAP:UP04049_CY_pho259pho621_Reactome:109788_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109783",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS:GTP",
"modification" : [],
"ref" : "Reactome:109783",
"subnodes" : [
"Reactome:109782_Reactome:109783_Reactome:109788_1_1",
"MAP:Cb15996_CY_Reactome:109783_Reactome:109788_1_1"
]
},
"id" : "Reactome:109783_Reactome:109788_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UP62993_CY",
"compartment" : "MAP:Cytosol",
"label" : "GRB2()",
"modification" : [],
"ref" : "MAP:UP62993_CY"
},
"id" : "MAP:UP62993_CY_Reactome:179849_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UQ13480_CY",
"compartment" : "MAP:Cytosol",
"label" : "GAB1",
"modification" : [],
"ref" : "MAP:UQ13480_CY"
},
"id" : "MAP:UQ13480_CY_Reactome:179849_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:180304",
"compartment" : "MAP:Cytosol",
"label" : "GRB2:Phospho-GAB1",
"modification" : [],
"ref" : "Reactome:180304",
"subnodes" : [
"MAP:UP62993_CY_Reactome:180304_Reactome:180286_1_1",
"Reactome:180344_Reactome:180304_Reactome:180286_1_1"
]
},
"id" : "Reactome:180304_Reactome:180286_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179882",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR (Y992, Y1068, Y1086, Y1148, Y1173) dimer",
"modification" : [],
"ref" : "Reactome:179882",
"subnodes" : [
"Reactome:179860_Reactome:179882_Reactome:180286_1_1",
"Reactome:179860_Reactome:179882_Reactome:180286_1_2"
]
},
"id" : "Reactome:179882_Reactome:180286_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179847",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:EGFR",
"modification" : [],
"ref" : "Reactome:179847",
"subnodes" : [
"Reactome:179863_Reactome:179847_Reactome:179845_1_1",
"Reactome:179837_Reactome:179847_Reactome:179845_1_1"
]
},
"id" : "Reactome:179847_Reactome:179845_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179847",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:EGFR",
"modification" : [],
"ref" : "Reactome:179847",
"subnodes" : [
"Reactome:179863_Reactome:179847_Reactome:179845_2_1",
"Reactome:179837_Reactome:179847_Reactome:179845_2_1"
]
},
"id" : "Reactome:179847_Reactome:179845_2",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UP27361_CY_pho202pho204",
"compartment" : "MAP:Cytosol",
"label" : "Activated ERK1",
"modification" : [
[
216,
"202"
],
[
216,
"204"
]
],
"ref" : "MAP:UP27361_CY_pho202pho204"
},
"id" : "MAP:UP27361_CY_pho202pho204_Reactome:109844_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UP27361_CY_pho202pho204",
"compartment" : "MAP:Cytosol",
"label" : "Activated ERK1",
"modification" : [
[
216,
"202"
],
[
216,
"204"
]
],
"ref" : "MAP:UP27361_CY_pho202pho204"
},
"id" : "MAP:UP27361_CY_pho202pho204_Reactome:109844_2",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UQ07889_CY",
"compartment" : "MAP:Cytosol",
"label" : "Son of sevenless protein homolog 1",
"modification" : [],
"ref" : "MAP:UQ07889_CY"
},
"id" : "MAP:UQ07889_CY_MAP:Cx114_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UP62993_CY",
"compartment" : "MAP:Cytosol",
"label" : "GRB2()",
"modification" : [],
"ref" : "MAP:UP62993_CY"
},
"id" : "MAP:UP62993_CY_MAP:Cx114_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179847_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179837",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGFR",
"modification" : [],
"ref" : "Reactome:179837"
},
"id" : "Reactome:179837_Reactome:179847_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UP27361_CY",
"compartment" : "MAP:Cytosol",
"label" : "ERK1",
"modification" : [],
"ref" : "MAP:UP27361_CY"
},
"id" : "MAP:UP27361_CY_Reactome:109838_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UQ02750_CY_pho218pho222",
"compartment" : "MAP:Cytosol",
"label" : "phospho-MEK1",
"modification" : [
[
216,
"218"
],
[
216,
"222"
]
],
"ref" : "MAP:UQ02750_CY_pho218pho222"
},
"id" : "MAP:UQ02750_CY_pho218pho222_Reactome:109838_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_1_1",
"Reactome:179803_Reactome:179860_Reactome:179882_1_1"
]
},
"id" : "Reactome:179860_Reactome:179882_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_2_1",
"Reactome:179803_Reactome:179860_Reactome:179882_2_1"
]
},
"id" : "Reactome:179860_Reactome:179882_2",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UP04049_CY_pho259pho621",
"compartment" : "MAP:Cytosol",
"label" : "RAF1(ph259,ph621)",
"modification" : [
[
216,
"259"
],
[
216,
"621"
]
],
"ref" : "MAP:UP04049_CY_pho259pho621"
},
"id" : "MAP:UP04049_CY_pho259pho621_Reactome:109787_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UP31946_CY",
"compartment" : "MAP:Cytosol",
"label" : "YWHAB()",
"modification" : [],
"ref" : "MAP:UP31946_CY"
},
"id" : "MAP:UP31946_CY_Reactome:109787_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:Cx156",
"compartment" : "MAP:Cytosol",
"label" : "PI3K alpha",
"modification" : [],
"ref" : "MAP:Cx156",
"subnodes" : [
"MAP:C3_MAP:Cx156_MAN:C10_1_1",
"MAP:C2_MAP:Cx156_MAN:C10_1_1"
]
},
"id" : "MAP:Cx156_MAN:C10_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109783",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS:GTP",
"modification" : [],
"ref" : "Reactome:109783",
"subnodes" : [
"Reactome:109782_Reactome:109783_MAN:C10_1_1",
"MAP:Cb15996_CY_Reactome:109783_MAN:C10_1_1"
]
},
"id" : "Reactome:109783_MAN:C10_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109793",
"compartment" : "MAP:Plasmamembrane",
"label" : "Activated RAF1 complex",
"modification" : [],
"ref" : "Reactome:109793",
"subnodes" : [
"MAP:UP31946_CY_Reactome:109793_Reactome:109795_1_1",
"Reactome:109783_Reactome:109793_Reactome:109795_1_1",
"Reactome:109792_Reactome:109793_Reactome:109795_1_1"
]
},
"id" : "Reactome:109793_Reactome:109795_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UP36507_CY",
"compartment" : "MAP:Cytosol",
"label" : "MEK2()",
"modification" : [],
"ref" : "MAP:UP36507_CY"
},
"id" : "MAP:UP36507_CY_Reactome:109795_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:Cx114",
"compartment" : "MAP:Cytosol",
"label" : "GRB2:SOS1",
"modification" : [],
"ref" : "MAP:Cx114",
"subnodes" : [
"MAP:UQ07889_CY_MAP:Cx114_Reactome:180331_1_1",
"MAP:UP62993_CY_MAP:Cx114_Reactome:180331_1_1"
]
},
"id" : "MAP:Cx114_Reactome:180331_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:180337",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR:Phospho-SHC",
"modification" : [],
"ref" : "Reactome:180337",
"subnodes" : [
"Reactome:180276_Reactome:180337_Reactome:180331_1_1",
"Reactome:179882_Reactome:180337_Reactome:180331_1_1"
]
},
"id" : "Reactome:180337_Reactome:180331_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:C3",
"compartment" : "MAP:Cytosol",
"label" : "PI3K-p85",
"modification" : [],
"ref" : "MAP:C3"
},
"id" : "MAP:C3_Reactome:179791_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179882",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR (Y992, Y1068, Y1086, Y1148, Y1173) dimer",
"modification" : [],
"ref" : "Reactome:179882",
"subnodes" : [
"Reactome:179860_Reactome:179882_Reactome:179791_1_1",
"Reactome:179860_Reactome:179882_Reactome:179791_1_2"
]
},
"id" : "Reactome:179882_Reactome:179791_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:C2",
"compartment" : "MAP:Cytosol",
"label" : "PI3K-p110",
"modification" : [],
"ref" : "MAP:C2"
},
"id" : "MAP:C2_Reactome:179791_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179849",
"compartment" : "MAP:Cytosol",
"label" : "GRB2:GAB1",
"modification" : [],
"ref" : "Reactome:179849",
"subnodes" : [
"MAP:UP62993_CY_Reactome:179849_Reactome:179791_1_1",
"MAP:UQ13480_CY_Reactome:179849_Reactome:179791_1_1"
]
},
"id" : "Reactome:179849_Reactome:179791_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109793",
"compartment" : "MAP:Plasmamembrane",
"label" : "Activated RAF1 complex",
"modification" : [],
"ref" : "Reactome:109793",
"subnodes" : [
"MAP:UP31946_CY_Reactome:109793_Reactome:112406_1_1",
"Reactome:109783_Reactome:109793_Reactome:112406_1_1",
"Reactome:109792_Reactome:109793_Reactome:112406_1_1"
]
},
"id" : "Reactome:109793_Reactome:112406_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:112398",
"compartment" : "MAP:Cytosol",
"label" : "MEK",
"modification" : [],
"ref" : "Reactome:112398"
},
"id" : "Reactome:112398_Reactome:112406_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:UQ02750_CY",
"compartment" : "MAP:Cytosol",
"label" : "MEK1",
"modification" : [],
"ref" : "MAP:UQ02750_CY"
},
"id" : "MAP:UQ02750_CY_Reactome:109794_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109793",
"compartment" : "MAP:Plasmamembrane",
"label" : "Activated RAF1 complex",
"modification" : [],
"ref" : "Reactome:109793",
"subnodes" : [
"MAP:UP31946_CY_Reactome:109793_Reactome:109794_1_1",
"Reactome:109783_Reactome:109793_Reactome:109794_1_1",
"Reactome:109792_Reactome:109793_Reactome:109794_1_1"
]
},
"id" : "Reactome:109793_Reactome:109794_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:180276",
"compartment" : "MAP:Cytosol",
"label" : "Phospho-SHC transforming protein",
"modification" : [
[
216,
"349"
],
[
216,
"350"
]
],
"ref" : "Reactome:180276"
},
"id" : "Reactome:180276_Reactome:180337_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179882",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR (Y992, Y1068, Y1086, Y1148, Y1173) dimer",
"modification" : [],
"ref" : "Reactome:179882",
"subnodes" : [
"Reactome:179860_Reactome:179882_Reactome:180337_1_1",
"Reactome:179860_Reactome:179882_Reactome:180337_1_2"
]
},
"id" : "Reactome:179882_Reactome:180337_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:Cx114",
"compartment" : "MAP:Cytosol",
"label" : "GRB2:SOS1",
"modification" : [],
"ref" : "MAP:Cx114",
"subnodes" : [
"MAP:UQ07889_CY_MAP:Cx114_Reactome:179820_1_1",
"MAP:UP62993_CY_MAP:Cx114_Reactome:179820_1_1"
]
},
"id" : "MAP:Cx114_Reactome:179820_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179882",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR (Y992, Y1068, Y1086, Y1148, Y1173) dimer",
"modification" : [],
"ref" : "Reactome:179882",
"subnodes" : [
"Reactome:179860_Reactome:179882_Reactome:179820_1_1",
"Reactome:179860_Reactome:179882_Reactome:179820_1_2"
]
},
"id" : "Reactome:179882_Reactome:179820_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109782",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782_Reactome:109783_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY"
},
"id" : "MAP:Cb15996_CY_Reactome:109783_1",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:UP04049_CY_pho259pho621",
"compartment" : "MAP:Cytosol",
"label" : "RAF1(ph259,ph621)",
"modification" : [
[
216,
"259"
],
[
216,
"621"
]
],
"ref" : "MAP:UP04049_CY_pho259pho621"
},
"id" : "MAP:UP04049_CY_pho259pho621_Reactome:109788_Reactome:109789_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109783",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS:GTP",
"modification" : [],
"ref" : "Reactome:109783",
"subnodes" : [
"Reactome:109782_Reactome:109783_Reactome:109788_Reactome:109789_1_1_1",
"MAP:Cb15996_CY_Reactome:109783_Reactome:109788_Reactome:109789_1_1_1"
]
},
"id" : "Reactome:109783_Reactome:109788_Reactome:109789_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109782",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782_Reactome:109783_Reactome:109793_1_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY"
},
"id" : "MAP:Cb15996_CY_Reactome:109783_Reactome:109793_1_1",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180301_1_1_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180301_1_1_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180301_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180301_1_2_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180301_1_2_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180301_1_2",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180348_1_1_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180348_1_1_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180348_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180348_1_2_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180348_1_2_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180348_1_2",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UP62993_CY",
"compartment" : "MAP:Cytosol",
"label" : "GRB2()",
"modification" : [],
"ref" : "MAP:UP62993_CY"
},
"id" : "MAP:UP62993_CY_Reactome:179849_Reactome:180348_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UQ13480_CY",
"compartment" : "MAP:Cytosol",
"label" : "GAB1",
"modification" : [],
"ref" : "MAP:UQ13480_CY"
},
"id" : "MAP:UQ13480_CY_Reactome:179849_Reactome:180348_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109782",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782_Reactome:109783_Reactome:109788_1_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY"
},
"id" : "MAP:Cb15996_CY_Reactome:109783_Reactome:109788_1_1",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:UP62993_CY",
"compartment" : "MAP:Cytosol",
"label" : "GRB2()",
"modification" : [],
"ref" : "MAP:UP62993_CY"
},
"id" : "MAP:UP62993_CY_Reactome:180304_Reactome:180286_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:180344",
"compartment" : "MAP:Cytosol",
"label" : "Phospho-GAB1",
"modification" : [
[
216,
"627"
],
[
216,
"659"
],
[
216,
"447"
],
[
216,
"472"
],
[
216,
"589"
]
],
"ref" : "Reactome:180344"
},
"id" : "Reactome:180344_Reactome:180304_Reactome:180286_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180286_1_1_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180286_1_1_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180286_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180286_1_2_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180286_1_2_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180286_1_2",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179847_Reactome:179845_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179837",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGFR",
"modification" : [],
"ref" : "Reactome:179837"
},
"id" : "Reactome:179837_Reactome:179847_Reactome:179845_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179847_Reactome:179845_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179837",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGFR",
"modification" : [],
"ref" : "Reactome:179837"
},
"id" : "Reactome:179837_Reactome:179847_Reactome:179845_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:C3",
"compartment" : "MAP:Cytosol",
"label" : "PI3K-p85",
"modification" : [],
"ref" : "MAP:C3"
},
"id" : "MAP:C3_MAP:Cx156_MAN:C10_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:C2",
"compartment" : "MAP:Cytosol",
"label" : "PI3K-p110",
"modification" : [],
"ref" : "MAP:C2"
},
"id" : "MAP:C2_MAP:Cx156_MAN:C10_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109782",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782_Reactome:109783_MAN:C10_1_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY"
},
"id" : "MAP:Cb15996_CY_Reactome:109783_MAN:C10_1_1",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "MAP:UP31946_CY",
"compartment" : "MAP:Cytosol",
"label" : "YWHAB()",
"modification" : [],
"ref" : "MAP:UP31946_CY"
},
"id" : "MAP:UP31946_CY_Reactome:109793_Reactome:109795_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109783",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS:GTP",
"modification" : [],
"ref" : "Reactome:109783",
"subnodes" : [
"Reactome:109782_Reactome:109783_Reactome:109793_Reactome:109795_1_1_1",
"MAP:Cb15996_CY_Reactome:109783_Reactome:109793_Reactome:109795_1_1_1"
]
},
"id" : "Reactome:109783_Reactome:109793_Reactome:109795_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109792",
"compartment" : "MAP:Plasmamembrane",
"label" : "cRaf",
"modification" : [
[
216,
"340"
],
[
216,
"621"
],
[
216,
"259"
],
[
216,
"341"
]
],
"ref" : "Reactome:109792"
},
"id" : "Reactome:109792_Reactome:109793_Reactome:109795_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UQ07889_CY",
"compartment" : "MAP:Cytosol",
"label" : "Son of sevenless protein homolog 1",
"modification" : [],
"ref" : "MAP:UQ07889_CY"
},
"id" : "MAP:UQ07889_CY_MAP:Cx114_Reactome:180331_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UP62993_CY",
"compartment" : "MAP:Cytosol",
"label" : "GRB2()",
"modification" : [],
"ref" : "MAP:UP62993_CY"
},
"id" : "MAP:UP62993_CY_MAP:Cx114_Reactome:180331_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:180276",
"compartment" : "MAP:Cytosol",
"label" : "Phospho-SHC transforming protein",
"modification" : [
[
216,
"349"
],
[
216,
"350"
]
],
"ref" : "Reactome:180276"
},
"id" : "Reactome:180276_Reactome:180337_Reactome:180331_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179882",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR (Y992, Y1068, Y1086, Y1148, Y1173) dimer",
"modification" : [],
"ref" : "Reactome:179882",
"subnodes" : [
"Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_1",
"Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_2"
]
},
"id" : "Reactome:179882_Reactome:180337_Reactome:180331_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:179791_1_1_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:179791_1_1_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:179791_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:179791_1_2_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:179791_1_2_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:179791_1_2",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UP62993_CY",
"compartment" : "MAP:Cytosol",
"label" : "GRB2()",
"modification" : [],
"ref" : "MAP:UP62993_CY"
},
"id" : "MAP:UP62993_CY_Reactome:179849_Reactome:179791_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UQ13480_CY",
"compartment" : "MAP:Cytosol",
"label" : "GAB1",
"modification" : [],
"ref" : "MAP:UQ13480_CY"
},
"id" : "MAP:UQ13480_CY_Reactome:179849_Reactome:179791_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UP31946_CY",
"compartment" : "MAP:Cytosol",
"label" : "YWHAB()",
"modification" : [],
"ref" : "MAP:UP31946_CY"
},
"id" : "MAP:UP31946_CY_Reactome:109793_Reactome:112406_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109783",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS:GTP",
"modification" : [],
"ref" : "Reactome:109783",
"subnodes" : [
"Reactome:109782_Reactome:109783_Reactome:109793_Reactome:112406_1_1_1",
"MAP:Cb15996_CY_Reactome:109783_Reactome:109793_Reactome:112406_1_1_1"
]
},
"id" : "Reactome:109783_Reactome:109793_Reactome:112406_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109792",
"compartment" : "MAP:Plasmamembrane",
"label" : "cRaf",
"modification" : [
[
216,
"340"
],
[
216,
"621"
],
[
216,
"259"
],
[
216,
"341"
]
],
"ref" : "Reactome:109792"
},
"id" : "Reactome:109792_Reactome:109793_Reactome:112406_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UP31946_CY",
"compartment" : "MAP:Cytosol",
"label" : "YWHAB()",
"modification" : [],
"ref" : "MAP:UP31946_CY"
},
"id" : "MAP:UP31946_CY_Reactome:109793_Reactome:109794_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109783",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS:GTP",
"modification" : [],
"ref" : "Reactome:109783",
"subnodes" : [
"Reactome:109782_Reactome:109783_Reactome:109793_Reactome:109794_1_1_1",
"MAP:Cb15996_CY_Reactome:109783_Reactome:109793_Reactome:109794_1_1_1"
]
},
"id" : "Reactome:109783_Reactome:109793_Reactome:109794_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109792",
"compartment" : "MAP:Plasmamembrane",
"label" : "cRaf",
"modification" : [
[
216,
"340"
],
[
216,
"621"
],
[
216,
"259"
],
[
216,
"341"
]
],
"ref" : "Reactome:109792"
},
"id" : "Reactome:109792_Reactome:109793_Reactome:109794_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180337_1_1_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180337_1_1_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180337_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180337_1_2_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180337_1_2_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180337_1_2",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "MAP:UQ07889_CY",
"compartment" : "MAP:Cytosol",
"label" : "Son of sevenless protein homolog 1",
"modification" : [],
"ref" : "MAP:UQ07889_CY"
},
"id" : "MAP:UQ07889_CY_MAP:Cx114_Reactome:179820_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "MAP:UP62993_CY",
"compartment" : "MAP:Cytosol",
"label" : "GRB2()",
"modification" : [],
"ref" : "MAP:UP62993_CY"
},
"id" : "MAP:UP62993_CY_MAP:Cx114_Reactome:179820_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:179820_1_1_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:179820_1_1_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:179820_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:179820_1_2_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:179820_1_2_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:179820_1_2",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:109782",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782_Reactome:109783_Reactome:109788_Reactome:109789_1_1_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY"
},
"id" : "MAP:Cb15996_CY_Reactome:109783_Reactome:109788_Reactome:109789_1_1_1",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180301_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180301_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180301_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180301_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180348_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180348_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180348_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180348_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180286_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180286_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180286_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180286_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109782",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782_Reactome:109783_Reactome:109793_Reactome:109795_1_1_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY"
},
"id" : "MAP:Cb15996_CY_Reactome:109783_Reactome:109793_Reactome:109795_1_1_1",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_1_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_1_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_1",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179860",
"compartment" : "MAP:Plasmamembrane",
"label" : "EGF:Phospho-EGFR",
"modification" : [],
"ref" : "Reactome:179860",
"subnodes" : [
"Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_2_1",
"Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_2_1"
]
},
"id" : "Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_2",
"is_abstract" : 1,
"sbo" : 253,
"type" : "Complex"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:179791_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:179791_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:179791_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:179791_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:109782",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782_Reactome:109783_Reactome:109793_Reactome:112406_1_1_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY"
},
"id" : "MAP:Cb15996_CY_Reactome:109783_Reactome:109793_Reactome:112406_1_1_1",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "Reactome:109782",
"compartment" : "MAP:Plasmamembrane",
"label" : "p21 RAS",
"modification" : [],
"ref" : "Reactome:109782"
},
"id" : "Reactome:109782_Reactome:109783_Reactome:109793_Reactome:109794_1_1_1",
"is_abstract" : 1,
"sbo" : 240,
"type" : "Compound"
},
{
"data" : {
"clone_marker" : "MAP:Cb15996_CY",
"compartment" : "MAP:Cytosol",
"label" : "GTP",
"modification" : [],
"ref" : "MAP:Cb15996_CY"
},
"id" : "MAP:Cb15996_CY_Reactome:109783_Reactome:109793_Reactome:109794_1_1_1",
"is_abstract" : 1,
"sbo" : 247,
"type" : "SimpleCompound"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180337_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180337_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180337_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180337_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:179820_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:179820_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:179820_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:179820_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_1_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179863",
"compartment" : "MAP:Extracellular",
"label" : "EGF",
"modification" : [],
"ref" : "Reactome:179863"
},
"id" : "Reactome:179863_Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"clone_marker" : "Reactome:179803",
"compartment" : "MAP:Plasmamembrane",
"label" : "Phospho-EGFR",
"modification" : [
[
216,
"1068"
],
[
216,
"1148"
],
[
216,
"1173"
],
[
216,
"1086"
],
[
216,
"992"
]
],
"ref" : "Reactome:179803"
},
"id" : "Reactome:179803_Reactome:179860_Reactome:179882_Reactome:180337_Reactome:180331_1_1_2_1",
"is_abstract" : 1,
"sbo" : 252,
"type" : "Protein"
},
{
"data" : {
"label" : "Extracellular",
"ref" : "MAP:Extracellular",
"subnodes" : [
"Reactome:179863"
]
},
"id" : "MAP:Extracellular",
"is_abstract" : 0,
"sbo" : 290,
"type" : "Compartment"
},
{
"data" : {
"label" : "Plasmamembrane",
"ref" : "MAP:Plasmamembrane",
"subnodes" : [
"Reactome:177934",
"MAP:C79",
"Reactome:179856",
"Reactome:109841",
"Reactome:179860",
"Reactome:177940",
"MAP:UP01116_",
"Reactome:109803",
"Reactome:109788",
"Reactome:177930",
"Reactome:180286",
"MAN:R1",
"MAN:C10",
"Reactome:180331",
"Reactome:177936",
"Reactome:112406",
"MAN:R28",
"Reactome:177922",
"Reactome:180337",
"Reactome:177943",
"Reactome:109792",
"MAP:UP01112_PM",
"Reactome:109789",
"Reactome:109796",
"Reactome:163338",
"Reactome:177938",
"Reactome:109793",
"Reactome:180301",
"Reactome:109802",
"Reactome:180348",
"Reactome:179837",
"Reactome:177945",
"Reactome:179845",
"Reactome:177933",
"Reactome:179847",
"MAN:R2",
"Reactome:179882",
"Reactome:197745",
"Reactome:109852",
"Reactome:177939",
"Reactome:109795",
"Reactome:109794",
"Reactome:109782",
"Reactome:179820",
"Reactome:179803",
"Reactome:179838",
"Reactome:177925",
"Reactome:109829",
"Reactome:109783",
"Reactome:177942"
]
},
"id" : "MAP:Plasmamembrane",
"is_abstract" : 0,
"sbo" : 290,
"type" : "Compartment"
},
{
"data" : {
"label" : "Nucleus",
"ref" : "MAP:Nucleus",
"subnodes" : [
"MAP:UP19419_NU(1-428)",
"Reactome:29358",
"Reactome:198666",
"MAP:UP19419_NU(1-428)_pho324pho336pho383pho389pho422",
"Reactome:112359",
"Reactome:198710",
"Reactome:109845",
"Reactome:113582"
]
},
"id" : "MAP:Nucleus",
"is_abstract" : 0,
"sbo" : 290,
"type" : "Compartment"
},
{
"data" : {
"label" : "Cytosol",
"ref" : "MAP:Cytosol",
"subnodes" : [
"MAP:Cx156",
"Reactome:109848",
"Reactome:109867",
"MAP:UP31946_CY",
"Reactome:180276",
"Reactome:180304",
"Reactome:109843",
"Reactome:179849",
"MAP:Cb17552_CY",
"Reactome:112374",
"MAP:UQ07889_CY",
"MAP:Cx114",
"Reactome:109804",
"Reactome:109787",
"Reactome:112340",
"MAP:UP29353_CY",
"MAP:UQ02750_CY",
"MAP:Cb16761_CY",
"Reactome:109860",
"Reactome:112398",
"MAP:UP62993_CY",
"MAP:Cb15996_CY",
"Reactome:109865",
"Reactome:180344",
"MAP:C3",
"MAP:UP04049_CY_pho259pho621",
"MAP:Cs56-65-5_CY",
"MAP:UP36507_CY",
"MAP:UP27361_CY_pho202pho204",
"MAP:UQ02750_CY_pho218pho222",
"MAP:UQ13480_CY",
"Reactome:112339",
"Reactome:109863",
"Reactome:109844",
"Reactome:109838",
"Reactome:179791",
"MAP:C2",
"MAP:UP27361_CY",
"Reactome:109857"
]
},
"id" : "MAP:Cytosol",
"is_abstract" : 0,
"sbo" : 290,
"type" : "Compartment"
}
]
}; | taye/adeyemitaye-biographer-interactjs | src/test/environment/resources/examples/complex_cp.js | JavaScript | lgpl-3.0 | 146,668 |
#include "gblackboard_p.h"
#include "gblackboard_p_p.h"
#include "gghosttree_p.h"
#include "gghostnode_p.h"
typedef QHash<QQmlEngine *, QPointer<GBlackboard> > GlobalBlackboards;
Q_GLOBAL_STATIC(GlobalBlackboards, theGlobalBlackboards)
// class GBlackboard
GBlackboard::GBlackboard(QObject *parent)
: QObject(*new GBlackboardPrivate(), parent)
{
Q_D(GBlackboard);
d->targetNode = qobject_cast<GGhostNode *>(parent);
if (d->targetNode) {
connect(d->targetNode, &GGhostNode::statusChanged,
[this](Ghost::Status status) {
if (Ghost::StandBy == status) {
this->clear();
}
});
d->masterTree = d->targetNode->masterTree();
} else {
d->masterTree = qobject_cast<GGhostTree *>(parent);
if (d->masterTree) {
connect(d->masterTree, &GGhostTree::statusChanged,
[this](Ghost::Status status) {
if (Ghost::StandBy == status) {
this->clear();
}
});
}
}
}
GBlackboard *GBlackboard::qmlAttachedProperties(QObject *target)
{
return new GBlackboard(target);
}
GBlackboard *GBlackboard::globalBlackboard() const
{
Q_D(const GBlackboard);
if (d->globalBlackboard) {
return d->globalBlackboard;
}
QQmlContext *context = qmlContext(d->parent);
if (nullptr == context) {
Q_CHECK_PTR(context);
return nullptr;
}
QQmlEngine *engine = context->engine();
if (nullptr == engine) {
Q_CHECK_PTR(engine);
return nullptr;
}
QPointer<GBlackboard> blackboard = theGlobalBlackboards()->value(engine);
if (blackboard.isNull()) {
blackboard = new GBlackboard(engine);
theGlobalBlackboards()->insert(engine, blackboard);
}
GBlackboardPrivate *_this = const_cast<GBlackboardPrivate *>(d);
_this->globalBlackboard = blackboard.data();
return d->globalBlackboard;
}
GBlackboard *GBlackboard::sharedBlackboard() const
{
Q_D(const GBlackboard);
if (d->sharedBlackboard) {
return d->sharedBlackboard;
}
if (!d->masterTree) {
qWarning("GtGhost : Master tree is null.");
return nullptr;
}
QObject *attached = qmlAttachedPropertiesObject<GBlackboard>(d->masterTree);
if (attached) {
GBlackboardPrivate *_this = const_cast<GBlackboardPrivate *>(d);
_this->sharedBlackboard = qobject_cast<GBlackboard *>(attached);
}
return d->sharedBlackboard;
}
bool GBlackboard::has(const QString &key) const
{
Q_D(const GBlackboard);
return d->datas.contains(key);
}
void GBlackboard::set(const QString &key, const QJSValue &value)
{
Q_D(GBlackboard);
if (value.isUndefined()) {
d->datas.remove(key);
} else {
d->datas.insert(key, value);
}
}
QJSValue GBlackboard::get(const QString &key) const
{
Q_D(const GBlackboard);
return d->datas.value(key);
}
void GBlackboard::unset(const QString &key)
{
Q_D(GBlackboard);
d->datas.remove(key);
}
void GBlackboard::clear()
{
Q_D(GBlackboard);
d->datas.clear();
}
// class GBlackboardPrivate
GBlackboardPrivate::GBlackboardPrivate()
: masterTree(nullptr)
, targetNode(nullptr)
, globalBlackboard(nullptr)
, sharedBlackboard(nullptr)
{
}
GBlackboardPrivate::~GBlackboardPrivate()
{
}
| echowalways/GtGhost | src/ghost/kernel/gblackboard.cpp | C++ | lgpl-3.0 | 3,388 |
/*
* Copyright (C) 2006-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.jlan.client;
import org.alfresco.jlan.smb.PCShare;
import org.alfresco.jlan.smb.SMBDeviceType;
import org.alfresco.jlan.smb.SMBException;
/**
* SMB print session class
*
* <p>The print session allows a new print job to be created, using the SMBFile
* class or as an SMBOutputStream.
*
* <p>When the SMBFile/SMBOutputStream is closed the print job will be queued to
* the remote printer.
*
* <p>A print session is created using the SessionFactory.OpenPrinter() method. The
* SessionFactory negotiates the appropriate SMB dialect and creates the appropriate
* PrintSession derived object.
*
* @see SessionFactory
*
* @author gkspencer
*/
public abstract class PrintSession extends Session {
// Print modes
public static final int TextMode = 0;
public static final int GraphicsMode = 1;
// Default number of print queue entries to return
public static final int DefaultEntryCount = 20;
/**
* Construct an SMB print session
*
* @param shr Remote server details
* @param dialect SMB dialect that this session is using
*/
protected PrintSession(PCShare shr, int dialect) {
super(shr, dialect, null);
// Set the device type
this.setDeviceType(SMBDeviceType.Printer);
}
/**
* Determine if the print session has been closed.
*
* @return true if the print session has been closed, else false.
*/
protected final boolean isClosed() {
return m_treeid == Closed ? true : false;
}
/**
* Open a spool file on the remote print server.
*
* @param id Identifier string for this print request.
* @param mode Print mode, either TextMode or GraphicsMode.
* @param setuplen Length of data in the start of the spool file that is printer setup code.
* @return SMBFile for the new spool file, else null.
* @exception java.io.IOException If an I/O error occurs.
* @exception SMBException If an SMB level error occurs
*/
public abstract SMBFile OpenSpoolFile(String id, int mode, int setuplen)
throws java.io.IOException, SMBException;
/**
* Open a spool file as an output stream.
*
* @param id Identifier string for this print request.
* @param mode Print mode, either TextMode or GraphicsMode.
* @param setuplen Length of data in the start of the spool file that is printer setup code.
* @return SMBOutputStream for the spool file, else null.
* @exception java.io.IOException If an I/O error occurs.
* @exception SMBException If an SMB level error occurs
*/
public SMBOutputStream OpenSpoolStream(String id, int mode, int setuplen)
throws java.io.IOException, SMBException {
// Open an SMBFile first
SMBFile sfile = OpenSpoolFile(id, mode, setuplen);
if ( sfile == null)
return null;
// Create an output stream attached to the SMBFile
return new SMBOutputStream(sfile);
}
} | loftuxab/community-edition-old | projects/alfresco-jlan/source/java/org/alfresco/jlan/client/PrintSession.java | Java | lgpl-3.0 | 3,570 |
//
// Ce fichier a été généré par l'implémentation de référence JavaTM Architecture for XML Binding (JAXB), v2.2.8-b130911.1802
// Voir <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Toute modification apportée à ce fichier sera perdue lors de la recompilation du schéma source.
// Généré le : 2015.10.08 à 11:14:04 PM CEST
//
package org.klipdev.spidergps3p.kml;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Classe Java pour vec2Type complex type.
*
* <p>Le fragment de schéma suivant indique le contenu attendu figurant dans cette classe.
*
* <pre>
* <complexType name="vec2Type">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attribute name="x" type="{http://www.w3.org/2001/XMLSchema}double" default="1.0" />
* <attribute name="y" type="{http://www.w3.org/2001/XMLSchema}double" default="1.0" />
* <attribute name="xunits" type="{http://www.opengis.net/kml/2.2}unitsEnumType" default="fraction" />
* <attribute name="yunits" type="{http://www.opengis.net/kml/2.2}unitsEnumType" default="fraction" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "vec2Type")
public class Vec2Type {
@XmlAttribute(name = "x")
protected Double x;
@XmlAttribute(name = "y")
protected Double y;
@XmlAttribute(name = "xunits")
protected UnitsEnumType xunits;
@XmlAttribute(name = "yunits")
protected UnitsEnumType yunits;
/**
* Obtient la valeur de la propriété x.
*
* @return
* possible object is
* {@link Double }
*
*/
public double getX() {
if (x == null) {
return 1.0D;
} else {
return x;
}
}
/**
* Définit la valeur de la propriété x.
*
* @param value
* allowed object is
* {@link Double }
*
*/
public void setX(Double value) {
this.x = value;
}
/**
* Obtient la valeur de la propriété y.
*
* @return
* possible object is
* {@link Double }
*
*/
public double getY() {
if (y == null) {
return 1.0D;
} else {
return y;
}
}
/**
* Définit la valeur de la propriété y.
*
* @param value
* allowed object is
* {@link Double }
*
*/
public void setY(Double value) {
this.y = value;
}
/**
* Obtient la valeur de la propriété xunits.
*
* @return
* possible object is
* {@link UnitsEnumType }
*
*/
public UnitsEnumType getXunits() {
if (xunits == null) {
return UnitsEnumType.FRACTION;
} else {
return xunits;
}
}
/**
* Définit la valeur de la propriété xunits.
*
* @param value
* allowed object is
* {@link UnitsEnumType }
*
*/
public void setXunits(UnitsEnumType value) {
this.xunits = value;
}
/**
* Obtient la valeur de la propriété yunits.
*
* @return
* possible object is
* {@link UnitsEnumType }
*
*/
public UnitsEnumType getYunits() {
if (yunits == null) {
return UnitsEnumType.FRACTION;
} else {
return yunits;
}
}
/**
* Définit la valeur de la propriété yunits.
*
* @param value
* allowed object is
* {@link UnitsEnumType }
*
*/
public void setYunits(UnitsEnumType value) {
this.yunits = value;
}
}
| klipdev/SpiderGps | workspace/SpiderGps/src3p/org/klipdev/spidergps3p/kml/Vec2Type.java | Java | lgpl-3.0 | 3,972 |
<?php
namespace Database\Media\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Database\Media\Artist;
use Database\Media\Media;
use Database\Media\MediaToArtist;
use Database\Media\MediaToArtistPeer;
use Database\Media\MediaToArtistQuery;
/**
* Base class that represents a query for the 'net_bazzline_media_library_media_to_artist' table.
*
*
*
* This class was autogenerated by Propel 1.7.1 on:
*
* Wed Oct 1 21:22:56 2014
*
* @method MediaToArtistQuery orderById($order = Criteria::ASC) Order by the id column
* @method MediaToArtistQuery orderByMediaId($order = Criteria::ASC) Order by the media_id column
* @method MediaToArtistQuery orderByArtistId($order = Criteria::ASC) Order by the artist_id column
*
* @method MediaToArtistQuery groupById() Group by the id column
* @method MediaToArtistQuery groupByMediaId() Group by the media_id column
* @method MediaToArtistQuery groupByArtistId() Group by the artist_id column
*
* @method MediaToArtistQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method MediaToArtistQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method MediaToArtistQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method MediaToArtistQuery leftJoinMedia($relationAlias = null) Adds a LEFT JOIN clause to the query using the Media relation
* @method MediaToArtistQuery rightJoinMedia($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Media relation
* @method MediaToArtistQuery innerJoinMedia($relationAlias = null) Adds a INNER JOIN clause to the query using the Media relation
*
* @method MediaToArtistQuery leftJoinArtist($relationAlias = null) Adds a LEFT JOIN clause to the query using the Artist relation
* @method MediaToArtistQuery rightJoinArtist($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Artist relation
* @method MediaToArtistQuery innerJoinArtist($relationAlias = null) Adds a INNER JOIN clause to the query using the Artist relation
*
* @method MediaToArtist findOne(PropelPDO $con = null) Return the first MediaToArtist matching the query
* @method MediaToArtist findOneOrCreate(PropelPDO $con = null) Return the first MediaToArtist matching the query, or a new MediaToArtist object populated from the query conditions when no match is found
*
* @method MediaToArtist findOneByMediaId(string $media_id) Return the first MediaToArtist filtered by the media_id column
* @method MediaToArtist findOneByArtistId(string $artist_id) Return the first MediaToArtist filtered by the artist_id column
*
* @method array findById(string $id) Return MediaToArtist objects filtered by the id column
* @method array findByMediaId(string $media_id) Return MediaToArtist objects filtered by the media_id column
* @method array findByArtistId(string $artist_id) Return MediaToArtist objects filtered by the artist_id column
*
* @package propel.generator.Media.om
*/
abstract class BaseMediaToArtistQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseMediaToArtistQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = null, $modelName = null, $modelAlias = null)
{
if (null === $dbName) {
$dbName = 'netBazzlineMediaLibrary';
}
if (null === $modelName) {
$modelName = 'Database\\Media\\MediaToArtist';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new MediaToArtistQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param MediaToArtistQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return MediaToArtistQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof MediaToArtistQuery) {
return $criteria;
}
$query = new MediaToArtistQuery(null, null, $modelAlias);
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
return $query;
}
/**
* Find object by primary key.
* Propel uses the instance pool to skip the database if the object exists.
* Go fast if the query is untouched.
*
* <code>
* $obj = $c->findPk(12, $con);
* </code>
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return MediaToArtist|MediaToArtist[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = MediaToArtistPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(MediaToArtistPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|| $this->map || $this->having || $this->joins) {
return $this->findPkComplex($key, $con);
} else {
return $this->findPkSimple($key, $con);
}
}
/**
* Alias of findPk to use instance pooling
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return MediaToArtist A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneById($key, $con = null)
{
return $this->findPk($key, $con);
}
/**
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return MediaToArtist A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT id, media_id, artist_id FROM net_bazzline_media_library_media_to_artist WHERE id = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_STR);
$stmt->execute();
} catch (Exception $e) {
Propel::log($e->getMessage(), Propel::LOG_ERR);
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new MediaToArtist();
$obj->hydrate($row);
MediaToArtistPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return MediaToArtist|MediaToArtist[]|mixed the result, formatted by the current formatter
*/
protected function findPkComplex($key, $con)
{
// As the query uses a PK condition, no limit(1) is necessary.
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @param array $keys Primary keys to use for the query
* @param PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|MediaToArtist[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return MediaToArtistQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(MediaToArtistPeer::ID, $key, Criteria::EQUAL);
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return MediaToArtistQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(MediaToArtistPeer::ID, $keys, Criteria::IN);
}
/**
* Filter the query on the id column
*
* Example usage:
* <code>
* $query->filterById('fooValue'); // WHERE id = 'fooValue'
* $query->filterById('%fooValue%'); // WHERE id LIKE '%fooValue%'
* </code>
*
* @param string $id The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return MediaToArtistQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($id)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $id)) {
$id = str_replace('*', '%', $id);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(MediaToArtistPeer::ID, $id, $comparison);
}
/**
* Filter the query on the media_id column
*
* Example usage:
* <code>
* $query->filterByMediaId('fooValue'); // WHERE media_id = 'fooValue'
* $query->filterByMediaId('%fooValue%'); // WHERE media_id LIKE '%fooValue%'
* </code>
*
* @param string $mediaId The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return MediaToArtistQuery The current query, for fluid interface
*/
public function filterByMediaId($mediaId = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($mediaId)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $mediaId)) {
$mediaId = str_replace('*', '%', $mediaId);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(MediaToArtistPeer::MEDIA_ID, $mediaId, $comparison);
}
/**
* Filter the query on the artist_id column
*
* Example usage:
* <code>
* $query->filterByArtistId('fooValue'); // WHERE artist_id = 'fooValue'
* $query->filterByArtistId('%fooValue%'); // WHERE artist_id LIKE '%fooValue%'
* </code>
*
* @param string $artistId The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return MediaToArtistQuery The current query, for fluid interface
*/
public function filterByArtistId($artistId = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($artistId)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $artistId)) {
$artistId = str_replace('*', '%', $artistId);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(MediaToArtistPeer::ARTIST_ID, $artistId, $comparison);
}
/**
* Filter the query by a related Media object
*
* @param Media|PropelObjectCollection $media The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return MediaToArtistQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByMedia($media, $comparison = null)
{
if ($media instanceof Media) {
return $this
->addUsingAlias(MediaToArtistPeer::MEDIA_ID, $media->getId(), $comparison);
} elseif ($media instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(MediaToArtistPeer::MEDIA_ID, $media->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByMedia() only accepts arguments of type Media or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the Media relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return MediaToArtistQuery The current query, for fluid interface
*/
public function joinMedia($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Media');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'Media');
}
return $this;
}
/**
* Use the Media relation Media object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \Database\Media\MediaQuery A secondary query class using the current class as primary query
*/
public function useMediaQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinMedia($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Media', '\Database\Media\MediaQuery');
}
/**
* Filter the query by a related Artist object
*
* @param Artist|PropelObjectCollection $artist The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return MediaToArtistQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByArtist($artist, $comparison = null)
{
if ($artist instanceof Artist) {
return $this
->addUsingAlias(MediaToArtistPeer::ARTIST_ID, $artist->getId(), $comparison);
} elseif ($artist instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(MediaToArtistPeer::ARTIST_ID, $artist->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByArtist() only accepts arguments of type Artist or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the Artist relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return MediaToArtistQuery The current query, for fluid interface
*/
public function joinArtist($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Artist');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'Artist');
}
return $this;
}
/**
* Use the Artist relation Artist object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \Database\Media\ArtistQuery A secondary query class using the current class as primary query
*/
public function useArtistQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinArtist($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Artist', '\Database\Media\ArtistQuery');
}
/**
* Exclude object from result
*
* @param MediaToArtist $mediaToArtist Object to remove from the list of results
*
* @return MediaToArtistQuery The current query, for fluid interface
*/
public function prune($mediaToArtist = null)
{
if ($mediaToArtist) {
$this->addUsingAlias(MediaToArtistPeer::ID, $mediaToArtist->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
}
| stevleibelt/media_library | application/Database/Media/om/BaseMediaToArtistQuery.php | PHP | lgpl-3.0 | 19,447 |
package com.pahlsoft.ws.iaas.provision.deploy.behaviors;
import org.apache.log4j.Logger;
import com.pahlsoft.ws.iaas.provision.generated.InstructionType;
import com.pahlsoft.ws.iaas.provision.generated.ProvisionProperties;
import com.pahlsoft.ws.iaas.provision.generated.ProvisionResponse;
import com.pahlsoft.ws.iaas.utilities.PropertyParser;
public class JbossDeployBehavior implements DeployBehavior {
public Logger LOG = Logger.getLogger(JbossDeployBehavior.class);
public ProvisionResponse pr = new ProvisionResponse();
public ProvisionResponse deploy(String hostname, ProvisionProperties props) {
LOG.info("Deploying JBOSS :" + hostname);
PropertyParser.listProps(props);
pr.setHostname(hostname);
pr.setProperties(props);
pr.setInstruction(InstructionType.DEPLOY);
pr.setStatus(true);
return pr;
}
public ProvisionResponse redeploy(String hostname, ProvisionProperties props) {
LOG.info("Redeploying JBOSS :" + hostname);
PropertyParser.listProps(props);
pr.setHostname(hostname);
pr.setProperties(props);
pr.setInstruction(InstructionType.REDEPLOY);
pr.setStatus(true);
return pr;
}
public ProvisionResponse clean(String hostname, ProvisionProperties props) {
LOG.info("Cleaning JBOSS :" + hostname);
PropertyParser.listProps(props);
pr.setHostname(hostname);
pr.setProperties(props);
pr.setInstruction(InstructionType.CLEAN);
pr.setStatus(true);
return pr;
}
public ProvisionResponse backup(String hostname, ProvisionProperties props) {
LOG.info("Backing Up JBOSS :" + hostname);
PropertyParser.listProps(props);
pr.setHostname(hostname);
pr.setProperties(props);
pr.setInstruction(InstructionType.BACKUP);
pr.setStatus(true);
return pr;
}
public ProvisionResponse configure(String hostname, ProvisionProperties props) {
LOG.info("Configuring JBOSS :" + hostname);
PropertyParser.listProps(props);
pr.setHostname(hostname);
pr.setProperties(props);
pr.setInstruction(InstructionType.CONFIGURE);
pr.setStatus(true);
return pr;
}
public ProvisionResponse install(String hostname, ProvisionProperties props) {
LOG.info("Installing JBOSS :" + hostname);
PropertyParser.listProps(props);
pr.setHostname(hostname);
pr.setProperties(props);
pr.setInstruction(InstructionType.INSTALL);
pr.setStatus(true);
return pr;
}
}
| ajpahl1008/iaas | iaas-provision-service/src/main/java/com/pahlsoft/ws/iaas/provision/behaviors/deploy/JbossDeployBehavior.java | Java | lgpl-3.0 | 2,342 |