Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Publicaciones sobre kde (publicaciones antiguas, página 26)

Kid, wanna try a WM?

Read­ing a post on plan­etkde, I saw an ap­par­ent­ly out­-of-nowhere ref­er­ence to black­boxqt...

Not all that in­ter­est­ing, I sup­pose, but I am fond of ol'B­B,and this Qt4 re­make could be pret­ty cool (although I can't test it be­cause it does­n't build for me). Here's a link to the code.

Presentaciones en modo texto

Ya que me gus­ta el res­truc­tu­red text y Py­Q­t, es­tá ba­sa­do en eso, pe­ro se pue­de usar con vi y una wyse60.

Mi pro­yec­to se lla­ma To­bo­gan y se pue­de des­car­ga­r, y fun­cio­na has­ta cier­to pun­to.

Tie­ne una in­ter­fa­ce grá­fi­ca, pe­ro ig­no­ré­mos­la en es­te men­sa­je acer­ca de so­ftwa­re en mo­do tex­to ;-) y mos­tre­mos el tex­to que tie­ne atrá­s.

===============
Why use Tobogan
===============

-------------------
(If you are a nerd)
-------------------

:transitions: from_left,to_left,from_top,to_top,from_right,to_right,to_bottom,fade_out



It's nerd-oriented
------------------

It's trivial to display source code, with
proper syntax highlighting.

.. code-block:: python

    from base64 import *
    def myFirstFunction():
          print b64decode ('YnllIHdvcmxkIQ==')

Even for things like shell sessions.
Dammit, I am a nerd, I will try to add every nerd
feature I deem cool.



It does things simply
---------------------

This is a subtitle?
===================

Wanna show a flickr photo?

.. code-block:: rst

    .. flickr:: myPhotoTitle

How about using openomy.com to share your files?
And whatever else you can think of, it probably
**can**\  be done.

.. footer:: Smart thing goes here

Y aquí es­tá el re­sul­ta­do des­pués de co­rrer el script rs­t2s­l.­p­y.

Pis­ta­s:

  • Si el cu­r­­sor se mue­­ve ha­s­­ta la pa­r­­te su­­pe­­rior de la ven­­ta­­na, se pue­­de ver fle­­chas de an­­te­­rio­­­r/­­si­­guien­­te.

  • Si se ha­­ce cli­­ck en la ven­­ta­­na, se va a la si­­guien­­te pá­­gi­­na.

ha­ce ca­si un año que no lo to­co, y ne­ce­si­ta mu­cho ca­ri­ño, pe­ro no es una ma­la idea, me pa­re­ce.

Thinking in 800x480: Web browsing

Po­de­mos ha­cer lo ha­bi­tua­l, mo­do de pan­ta­lla com­ple­ta, y esas co­sas, pe­ro pa­ra mu­chos si­tios 800 pixels es sim­ple­men­te de­ma­sia­do an­gos­to.

Se pue­de ha­cer que las pá­gi­nas "en­tren" me­jor en un an­cho li­mi­ta­do re­du­cien­do el ta­ma­ño de la ti­po­gra­fía. Una bue­na fuen­te de 8 pun­tos de­be­ría ser le­gi­ble en esa pan­ta­lla, ya que uno es­tá cer­ca de la pan­ta­lla.

Sin em­bar­go, eso no ha­ce na­da pa­ra di­se­ños ba­sa­dos en pixel­s, y por el ta­ma­ño de las imá­ge­nes.

Sin em­bar­go, des­pués de leer que Qt 4.4 in­clu­ye we­bkit y per­mi­te po­ner wi­dge­ts en un QGra­phi­cs­View, em­pe­cé a pen­sar, es­to es­tá mal.

Lo que uno quie­re con una pan­ta­lla li­mi­ta­da es tex­to en el ta­ma­ño nor­mal y la pá­gi­na en un ta­ma­ño me­nor.

Por eso mi idea es:

  • Agran­­dar la ti­­po­­­gra­­fía. Ej: 12 pun­­to­­s.

  • Mo­s­­trar la pá­­gi­­na en un wi­­dget we­­bkit de 1200­­x720 pixe­l­s.

  • Po­­­ner el wi­­dget en una QGra­­phi­­csS­­ce­­ne, y re­­du­­ci­r­­lo 33%

El re­sul­ta­do es una pá­gi­na web com­ple­ta pe­ro que mi­de 800­x480.

Por su­pues­to se de­be­ría po­der cam­biar to­dos es­tos pa­ra­me­tros con un úni­co con­tro­l. Si la pá­gi­na es de­ma­sia­do an­cha pa­ra ver­la en 800­x480 con fuen­tes de 8 pun­to­s...

Pro­ba­mos 1000­x600 con fuen­tes de 10 pun­to­s, y re­du­ci­mos al ta­ma­ño de la pan­ta­lla.

Si­gue sien­do de­ma­sia­do an­cho? Pro­ba­mos 1200­x720, fuen­tes de 12 pun­tos y re­du­ci­mos 33%.

Po­si­bles ayu­da­s:

  • De­­be­­­ría ve­r­­se me­­jor con fuen­­tes sin an­­tia­­lia­s, ya que la re­­du­c­­ción de ta­­ma­­ño ha­­ría las fuen­­tes con an­­tia­­lia­­sing de­­ma­­sia­­do bo­­­rro­­sas. Una fuen­­te an­­cha y abie­r­­ta se va a ver me­­jo­­­r.

  • Las ba­­rras de scro­­­ll se van a ver apla­s­­ta­­da­s, creo. Pro­­­ba­­ble­­men­­te los che­­ck­­bo­­­xes y ra­­dio bu­­ttons se van a ver ma­­l. Pa­­ra arre­­glar eso se ne­­ce­­si­­ta ma­­gia mas avan­­za­­da que la mía ;-)

Por su­pues­to que ha­bría que pro­bar­lo, pe­ro cal­cu­lo que fun­cio­na me­jor que las al­ter­na­ti­va­s. Si tu­vie­ra un Py­Qt 4.4 lo in­ten­ta­ría yo mis­mo ;-)

Everything is still around

For a project I am do­ing for one of my cus­tomer­s, I need­ed a mail­ing list ar­chive. I looked, and it seems the nicer one is Lurk­er.

Sad­ly, there are no RPM pack­ages, so I had to build it man­u­al­ly... and ran in­to mimelib. Which, look­ing closer, is the same mimelib from Doug Saud­er I used in KRN back in the late 90s.

And which I had a hand in GPLing, too. And it's still in use. One of the things I al­ways liked about FLOSS: noth­ing ev­er re­al­ly gets thrown away.

New library: ChipScene

This is the re­al out­come of my Py­Week fail­ure: a neat li­brary.

Take Chip­munk and Qt mash them up, and what do you get?

A OpenGL-ac­cel­er­at­ed, mul­ti­plat­for­m, easy-­to-use play­ground!

But watch the sil­ly video that shows no in­ter­est­ing fea­tures in­stead:

You can't see it but there are 29 bal­loon­s, num­bered, that bounce around hap­pi­ly.

Per­for­mance in the video sucks be­cause I had to dis­able OpenGL in or­der to cap­ture it cor­rect­ly (and video record­ing kills my note­book,any­way). That de­mo nor­mal­ly runs in 3 sec­ond­s, not 57.

Here's the non-boil­er­plate code for that de­mo:

def fillWorld(scene):
  items=[]
  for x in range(1, 29):
      b=cs.CPBodyItem(bpos=[0+13*random.randint(0,25), -50-30*random.randint(0,10)],m=10)
      s=cs.CPCircleShapeItem(10, b, e=.5, offset=[0, 0])
      t=QtGui.QGraphicsSimpleTextItem(str(x), s)
      t.setPos(-5, -5)
      items.append(b)
  items.append(cs.CPSegmentShapeItem([0, 50], [500, 450], 1, None, e=.7))
  items.append(cs.CPSegmentShapeItem([0, 450], [500, 50], 1, None, e=.7))

  for i in items:
      scene.addItem(i)

Neat, is­n't it?

You can get it at the Chip­Scene google code project in­clud­ing, of course, the source.


Contents © 2000-2024 Roberto Alsina