Esempio n. 1
0
ContainerBase::ContainerBase(Widget* parent)
        : Widget(parent),
          _layout(NULL)
{
    setLayout(new LayoutBase(this));
    setInputMethod(PointerPassthrough);
    sigGeometryUpdated.connect(sigc::mem_fun(this, &ContainerBase::updateLayoutGeometry));
}
Esempio n. 2
0
StatusbarButton::StatusbarButton(Widget* parent)
        : Widget(parent),
          _myState(0),
          _click(false),
          _active(false)
{
    setXConstraint(FixedConstraint);
    setInputMethod(PointerInput);
    if (!bgDef)
        bgDef = new Image(ILIXI_DATADIR"car/statusbar/statusbar-buttons.png");
}
Esempio n. 3
0
AppCompositor::AppCompositor(ILXCompositor* compositor, AppInstance* instance, Widget* parent)
        : Widget(parent),
          _compositor(compositor),
          _instance(instance),
          _cState(APPCOMP_NONE),
          _zoomFactor(1),
          _hScale(1),
          _vScale(1)
{
    ILOG_TRACE_W(ILX_APPCOMPOSITOR);
    setInputMethod(NoInput);
    sigGeometryUpdated.connect(sigc::mem_fun(this, &AppCompositor::updateAppCompositorGeometry));
}
ZAddProfile::ZAddProfile()
    :MyBaseDlg()
{
	id = "";
	pas = "";
	edit = false;
	num = 0;
    prot = 0;

	setMainWidgetTitle(LNG_ADDPROFILE);
	
	ZFormContainer *form = new ZFormContainer(this, 0, ZSkinService::clsZFormContainer);
	setContentWidget(form);
	
	zcbProtocol = new ZComboBox(form);
	zcbProtocol->setTitle( LNG_PROTOCOL );
	QPixmap pm;
	pm.load(ProgDir+ "/status/icq/online.png");
	zcbProtocol->insertItem(pm, "ICQ", 0);
	#ifdef _XMPP
	pm.load(ProgDir+ "/status/jabber/online.png");
	zcbProtocol->insertItem(pm, "JABBER", 1);
	#endif
		
	form->addChild(zcbProtocol);
	
	zleID = new ZLineEdit("", form);
	zleID->setTitle( LNG_LOGIN );
	form->addChild ( zleID );
	
	zlePas = new ZLineEdit("", form);
	zlePas->setTitle( LNG_PASSWORD );
	setInputMethod(zlePas, ZKB_INPUT_MULTITAP, ZKbInputField::FIELD_TYPE_PASSWORD);
	zlePas->setEchoMode(ZLineEdit::Password);
	form->addChild ( zlePas );

	connect ( zcbProtocol, SIGNAL ( activated(int) ), this, SLOT ( changeProtocol(int) ) );
	changeProtocol(0);

	QValueList<QUuid> flist2;
	flist2.append( ZKB_INPUT_MULTITAP );
	flist2.append( ZKB_INPUT_SYMBOL );
	setInputMethods((QWidget*)zlePas, (const QUuid&)ZKB_INPUT_MULTITAP, flist2);
	
	ZSoftKey *softKey  = new ZSoftKey("CST_2", this, this);
	softKey->setText ( ZSoftKey::LEFT, LNG_ADD, ( ZSoftKey::TEXT_PRIORITY ) 0 );
	softKey->setText ( ZSoftKey::RIGHT, LNG_CANCEL, ( ZSoftKey::TEXT_PRIORITY ) 0 );
	softKey->setClickedSlot ( ZSoftKey::RIGHT, this, SLOT ( reject() ) );
	softKey->setClickedSlot ( ZSoftKey::LEFT, this, SLOT ( addProfile() ) );
	setSoftKey(softKey);
}
Esempio n. 5
0
Notification::Notification(const Compositor::NotificationData& data, ILXCompositor* parent)
        : Widget(parent->appWindow()),
          _compositor(parent),
          _notState(Init),
          _clicked(false)
{
    ILOG_TRACE_W(ILX_NOTIFICATION);
    setInputMethod(PointerInput);

    if (!_bg)
        _bg = new Image(ILIXI_DATADIR"images/notify.png");

    _client = data.client;
    _tag = data.tag;
    _text = data.body;
    _title = data.title;
    snprintf(_uuid, 37, "%s", data.uuid);
    if (strcmp(data.icon, "") != 0)
        _icon = new Image(data.icon, 64, 64);
    else
    {
        AppInfo* info = _compositor->appMan()->infoByPID(_client);
        if (info)
            _icon = new Image(info->icon(), 64, 64);
        else
            _icon = stylist()->defaultIcon(StyleHint::Cross);
    }
    _timer.sigExec.connect(sigc::mem_fun(this, &Notification::hide));

    _animZ = new TweenAnimation();
    _tweenZ = new Tween(Tween::SINE, Tween::EASE_OUT, 0, 1);
    _animZ->addTween(_tweenZ);
    _animZ->setDuration(400);
    _animZ->sigExec.connect(sigc::mem_fun(this, &Notification::tweenSlot));
    _seq.addAnimation(_animZ);

    _animX = new TweenAnimation();
    _tweenX = new Tween(Tween::SINE, Tween::EASE_OUT, 1, 0);
    _animX->addTween(_tweenX);
    _animX->setDuration(400);
    _animX->sigExec.connect(sigc::mem_fun(this, &Notification::tweenSlot));
    _animX->sigFinished.connect(sigc::mem_fun(this, &Notification::tweenEndSlot));
    _seq.addAnimation(_animX);

    setVisible(false);
    ILOG_DEBUG(ILX_NOTIFICATION, " -> body: %s\n", data.body);
    ILOG_DEBUG(ILX_NOTIFICATION, " -> client: %d\n", _client);
    ILOG_DEBUG(ILX_NOTIFICATION, " -> iconURL: %s\n", data.icon);
    ILOG_DEBUG(ILX_NOTIFICATION, " -> title: %s\n", data.title);
    ILOG_DEBUG(ILX_NOTIFICATION, " -> uuid: %s\n", data.uuid);
}
Esempio n. 6
0
GridView::GridView(Widget* parent)
        : Widget(parent),
          _scrollArea(NULL),
          _layout(NULL),
          _currentIndex(0),
          _currentItem(NULL)
{
    ILOG_TRACE_W(ILX_GRIDVIEW);
    setInputMethod(PointerPassthrough);
    _scrollArea = new ScrollArea();
    addChild(_scrollArea);

    _layout = new GridLayout(2, 2);
    _layout->setKeyNavChildrenFirst(true);
    _scrollArea->setContent(_layout);

    sigGeometryUpdated.connect(sigc::mem_fun(this, &GridView::updateGridViewGeometry));
}
Esempio n. 7
0
AppThumbnail::AppThumbnail(ILXCompositor* compositor, AppInstance* instance, Widget* parent)
        : AppCompositor(compositor, instance, parent),
          _close(NULL)
{
    ILOG_TRACE_W(ILX_APPTHUMB);
    setInputMethod(KeyPointer);
    setConstraints(FixedConstraint, FixedConstraint);

    if (!(instance->appInfo()->appFlags() & APP_AUTO_START))
    {
        _close = new ToolButton("");
        _close->setToolButtonStyle(ToolButton::IconOnly);
        _close->setIcon(ILIXI_DATADIR"images/close.png", Size(32, 32));
        _close->setDrawFrame(false);
        _close->setGeometry(164, 0, 32, 32);
        _close->sigClicked.connect(sigc::bind<AppInstance*>(sigc::mem_fun(_compositor, &ILXCompositor::killApp), _instance));
        addChild(_close);
    }
    sigGeometryUpdated.connect(sigc::mem_fun(this, &AppThumbnail::updateThumbGeometry));
    sigRestacked.connect(sigc::mem_fun(this, &AppThumbnail::handleRestack));
    setVisible(false);
}
Esempio n. 8
0
ScreenBase::ScreenBase(ilixi::Widget* parent)
        : Widget(parent)
{
    setInputMethod(ilixi::PointerInput);
}