Hi,
This is my last post in this blog. Please visit my new blog here: www.tomkonikkara.in
Thank you.
This is my last post in this blog. Please visit my new blog here: www.tomkonikkara.in
Thank you.
pyuic4 widget.ui > calc_ui.py
import sys
from PyQt4 import QtCore, QtGui
from calc_ui import Ui_Widget
class MyForm(QtGui.QMainWindow):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.ui = Ui_Widget()
self.ui.setupUi(self)
def calc_sum(Widget):
value1=Widget.ui.a.text();
value2=Widget.ui.b.text();
result=float(value1)+float(value2);
str_result=str(result)
Widget.ui.sum.setText(str_result);
if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
myapp = MyForm()
myapp.show()
sys.exit(app.exec_())
pyhon calc.pyI am not so good in explaining the code. I think you got the idea of how to make a custom slot and to make a standalone program. If any reader need clarification or more explanation, I will try to explain further.
#include
#include "mainwindow.h"
#include
//![1]
int main(int argv, char **args)
{
QApplication app(argv, args);
QTranslator translator;
translator.load("malayalam");
app.installTranslator(&translator);
app.setApplicationName("Music Player");
app.setQuitOnLastWindowClosed(true);
MainWindow window;
window.show();
return app.exec();
}
QT += phonon
HEADERS += mainwindow.h
SOURCES += main.cpp \
mainwindow.cpp
TRANSLATIONS = malayalam.ts
# install
target.path = $$[QT_INSTALL_EXAMPLES]/phonon/qmusicplayer
sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png images
sources.path = $$[QT_INSTALL_EXAMPLES]/phonon/qmusicplayer
INSTALLS += target sources
wince*{
DEPLOYMENT_PLUGIN += phonon_ds9 phonon_waveout
}
symbian:TARGET.UID3 = 0xA000CF6A
#This code input a monochrome bitmap of size 128x64 and convert it to a form compatible to ks0108 graphic lcd(glcd)
arg_list=argv();
x=imread(arg_list{1}); #accept argument
num=0;
printf("Controller 1 (left)\n\n");
page=0;
for offset = [1:8:64]
printf("Page %d:\n",page);
page+=1;
for j=1:64
for i=[offset:offset+7]
num=num+x(i,j)*(2^(i-offset));
endfor
printf("%d ",255-num);
num=0;
endfor
printf("\n\n");
endfor
printf("Controller 2 (right)\n\n");
page=0;
for offset = [1:8:64]
printf("Page %d:\n",page);
page+=1;
for j=65:128
for i=[offset:offset+7]
num=num+x(i,j)*(2^(i-offset));
endfor
printf("%d ",255-num);
num=0;
endfor
printf("\n\n");
endfor

The middle picture is photo-shot of the spinning lady. Concentrate on the picture and tell what you are viewing- the frontside or backside? It may be both. Look at the left picture. It is the modified version of middle one by adding eyes in her face. Now you feel that you are viewing the front side of the lady. At the same time, you see the backside of the lady in the right picture, but that also a modified version of middle picture with marking of a hair bud. This is important to be noted. While you are viewing the middle picture only, your brain fall in to the mess of finding whether the shadow is of the front side or backside. Then your brain 'randomly' choose one possibility (not actually). But in other pictures, your brain has powerful proof that indicates the state of the lady's body.
scripts/driver-select atheros
make
sudo make install
sudo apt-get install bcmwl-kernel-source
echo wl | sudo tee -a /etc/modules
#! /bin/bashYou need to change to the correct path in 3rd line. Here 345 means different run levels and 40 and 60 are the order for start and stop. save the file in /etc/init.d .
# chkconfig: 345 40 60
mkdir /home/tom/Desktop/folder
chkconfig --level 345 my_own_script onThen restart you computer and you can see a directory named 'folder' on your desktop in each start up. For more details, use:
man chkconfigThe mkdir command can be replaced by your own custom scripts. This worked on my PC powered with fedora 12. I found in linux forums that, it will work on Redhat/CentOS/Mandriva.
chkconfig --level 345 my_own_script off

I do some Qt exercise when I get leisure time. RevealThem is just the after effect but I hope source code will be useful for somebody. While I was over consuming my vacation in front of TV, found a nice program like RevealThem. Hiding a celebrity behind a brick wall, and player can remove bricks one at a time so that, a part of the face is visible. People get higher points if they identify the celebrity with minimum number of picks. I found it was interesting to realize in Qt.
2)Transliteration - This is easier method for beginners. In this method, you just type a word similar to the Malayalam word. (For example അമ്മ in Malayalam can be printed on screen by typing 'amma' in English.