Anna University Results November - December 2011 available with your GPA only for Credit System
Anna University Results Nov - Dec 2011
Exam Results 2012
Exam Results 2012 | Inspirational Quotes |
Friday, December 23, 2011
Anna University AU Chennai Nov/Dec 2011 Results Announcing Date - Tentative Date | November/December 2011 AU Results Announcing Date | Nov - Dec 2011 Results Anna University,Chennai | Anna University Nov/Dec 2011 Results | WHEN WILL BE THE ANNA UNIVERSITY 3RD SEMESTER, 5TH SEMESTER, 7TH SEMESTER RESULTS ANNOUNCED?
Labels:
Anna University Results
Tuesday, October 11, 2011
GUI Programming Using Qt Designer
GUI Programming Using Qt Designer
Aim :
Learn to write GUI programs using FOSS tools like Qt,GTK,Gambas, etc. in Linux.
Introduction :
GUI programming on Linux is based on the X Window system. X provides windowing on computer displays and manages keyboard, pointing device control functions and touch-screens. X provides the basic framework, or primitives, for building such GUI environments: drawing and moving windows on the display and interacting with a mouse, keyboard or touchscreen. X uses GUI toolkits to help the development of GUI programs. GUI toolkit is a set of widgets for use in designing applications with graphical user interfaces (GUIs). GUI toolkits can be based on different languages. The most commonly used languages are C/C++. Often the toolkits provide higher level language bindings which allow the user to program GUIs using an easier to use higher level language like Python, Ruby etc. There are two popular GUI toolkits which are widely used today. They are Qt and GTK+. Qt is written in C++ while GTK+ is written in C. Both toolkits provide bindings in a wide variety of languages. For users who are familiar with Visual basic, Gambas is a full-featured object language and development environment built on a BASIC interpreter which runs on top of the X window system. It in turn relies on the underlying GUI toolkits (both Qt and GTk+). This exercise consists of developing GUI programs using the Qt toolkit.
Description :
We will learn to setup their systems to develop using Qt and write 5 programs and test their results. The programs are of increasing complexity and introduce the students to more and more concepts. All the programs will be purely code drive, ie. the user interface is developed entirely using C++ code. None of the visual GUI builders will be used for these exercises.
Pre-requisites:
Qt Designer Installation :
Step 1:
Goto Terminal window
Step 2 :
Enter into root user account.
$su
Password : <your password>
Step 3 :
Install Qt Development Tool using following Command
# yum install qt-devel
Step 4 :
Install Qt Demo using following Command
# yum install qt-demos
Step 5 :
Install Qt Examples using following Command
# yum install qt-examples
Step 6 :
Install Qt Documents using following Command
# yum install qt-doc
Step 7 :
Install GCC C++ Compiler tool using following Command
# yum install gcc-c++
Step 8 :
Now you can goto Applications -> Programming -> Qt4 Designer
Use this Qt Designer Tool to develop the GUI Application …
You can also use Qt Demo and Qt Assitant for example help
Step 9 :
Now you can develop GUI application using Qt Designer
Simple Example GUI Application :
Example :
Menus and Toolbars
· This program will display a menu which can be used to close the program.
· we have 3 files as part of the program:
1. mymenu.h
2. mymenu.cpp
3. main.cpp
· Create a new directory “qtmenu” for the program.
# mkdir qtmenu
· Go to the newly created directory “qtmenu”.
# cd qtmenu
· Create the “mymenu.h“ file in the qtmenu directory.
# sudo gedit mymenu.h
Type the following code in geditor
// mymenu.h
#include <QMainWindow>
class MyMenu : public QMainWindow
{
public:
MyMenu(QWidget *parent = 0);
};
· Create the “mymenu.cpp“ file in the qtmenu directory.
# sudo gedit mymenu.cpp
Type the following code in geditor
//mymenu.cpp
#include "mymenu.h"
#include <QMenu>
#include <QMenuBar>
#include <QApplication>
MyMenu::MyMenu(QWidget *parent)
: QMainWindow(parent)
{
//create the quit action object
QAction *quit = new QAction("&Quit", this);
//create the file menu
QMenu *file;
file = menuBar()->addMenu("&File");
9
CS2406-Lab Manual - NRCFOSS/AU-KBC Centre, Anna University Chennai
//add the quit action to the new menu
file->addAction(quit);
//connect the triggered signal from the quit action menu
//to the global quit method which closes the application
connect(quit, SIGNAL(triggered()), qApp, SLOT(quit()));
}
· Create the “main.cpp” file in the qtmenu directory.
# sudo gedit main.cpp
Type the following code in geditor
//main.cpp
#include "mymenu.h"
#include <QDesktopWidget>
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MyMenu window;
window.setWindowTitle("My menu");
window.show();
return app.exec();
}
· Once the file has been saved, use the following commands to compile and execute the program.
# qmake-qt4 –project
# qmake-qt4
# make
· To run this GUI program goto “qtmenu” directory and Click “qtmenu.exe” File
· On running the program we get a window with a menu “ File -> Quit” which allows us to close the program.
· On running the program we get a window with a menu “ File -> Quit” which allows us to close the program.
Hope this will be helpful for you!!!
Stay tuned for updates. If you find any problem or have any suggestions for improvements, you can always mail me.
All the best for Your Exam !!!!!
All the best for Your Exam !!!!!
By M.Baran Mahamood
Labels:
CSE - VII SEM,
Open Source Lab - CS2406
Monday, August 22, 2011
Sharing Files/Folders between Windows XP and Fedora Linux
Sharing Files/Folders between Windows XP and Fedora Linux :
Getting started:
To get started, logon to Windows XP and click Start –> then right click
‘My Computer’ and select ‘Properties’.
Then select ‘Computer Name’ tab and click ‘Change’
Enter the Computer and Workgroup name and click OK. Make sure all systems use the same Workgroup name. You will have to restart your computer for the change to take effect.
After restarting, click Start –> Control Panel.
Select Security Center –> Windows Firewall.
When Windows Firewall opens, select ‘Exceptions’ tab and check the box to enable File and Printer Sharing. Close out when done.
Next, logon to Fedora and go to System –> Administration –> Add/Remove Software.
Then search for and install system-config-samba. Install all additional packages when prompted.
system-config-samba
After installing, go to System –> Administration –> Samba.
Then select Preferences –> Server Settings.
Enter the Workgroup name here and click OK.
Select Preferences –> Samba Users.
Edit or Add User to samba database and click OK.
To create shares, click File –> Create Add Shares, then select the folder you wish to share and check
- Writable
- Visible
Then select ‘Access’ tab and give users access to the shares, then click OK to save.
Next, go to System –> Administration –> Firewall.
Select ‘Samba’ under ‘Trusted Services’ and enable Samba.
Next, select ‘ICMP’ and enable ‘Echo Reply (pong) and Echo Request (ping)’
After that go to Applications –> System Tools –> Terminal and run the command below
su -c 'chkconfig smb on'
Restart your computer and if everything is setup correctly, you should be able to view shares from either system.
After doing all these setup make sure Firewall should be Turn off on both the system.In Fedora Linux goto the Places->Network then click Windows Network then click PENGUIN.
You will see the shared Workgroups as follows
In Windows goto the My Network Places then click View Workgroup Computers on the left pane
You will see the shared Workgroups as follows
Hope this will be helpful for you!!!
Stay tuned for updates. If you find any problem or have any suggestions for improvements, you can always mail me.
By M.Baran Mahamood
Labels:
CSE - VII SEM,
Open Source Lab - CS2406
Subscribe to:
Posts (Atom)