OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio


Welcome Guest ( Log In | Register )

Personal Photo
Personal Statement
jdf doesn't have a personal statement currently.
Personal Info
Age Unknown
Gender Not Set
Location Unknown
Birthday Unknown
No Information
Joined: 28-February 04
Profile Views: 221*
Last Seen: 13th January 2005 - 06:47 AM
Local Time: Dec 5 2016, 11:03 PM
33 posts (0 per day)
Contact Information
AIM No Information
Yahoo No Information
ICQ No Information
MSN No Information
Contact Private
* Profile views updated each hour



My Content
13 Mar 2004
I am new to Qt and C++ and only progran as a hobby. I got my Z one month ago. I just finished my first application thankx to some help from members of this board.

The app is just a Unit Conversion Program. Wrote it as a training exercise, not because anyone needed another conversion program! In any case I attached the source code to this message. (don't expect it to be pretty). I tested the file and it will compile and run under dev-x86-qpe environment, dev-arm-qpe and transferred to Z works fine; also under winXP envronment works fine. The program uses customizable text files as the conversion database. I included these data files in the attachment too. They should be in the same directory where you run the program from.

Here are my questions:

1) What is the best way to get the application to start full screen. What screen size should be used? My app seems to start a little bit less than full size and then I can maximize it.

2) I use a QLabel and a QLineedit. How can I set the color for those backgrounds?

3) The Lineedit accepts keyboard entry from the Sharp hardware. I tried to do a connect of the textChanged signal to a Slot in mysoftware but this never works. Maybe some one could look at that connect statement.

4) I used a setCaption, but the title doesn't appear in the title bar?

Sorry if some of these questions may be obvious, but I have spent hours searching and trying to resolve them.

I placed the files here too:

6 Mar 2004
Bear with me, I am new to CPP and am having a problem with variables. The only reason I haven't given up yet, is because of the support I got off this board so far!!

I have a Class called "HandMade" . Handmade is derived from QVBox class. Handmade includes a listbox, a slider, an ADD button, a REMOVE button. When you press ADD, whatever value the slider displays is added to listbox. When you press delete, whatever value is current in the listbox is deleted from list box.

The HandMade class also includes another class “TicTacToe”. Basically this is the last item in the QVBox.

(As you can tell, I just slapped TWO example programs into ONE to learn some fundamentals!!)

Now, it all works!! The buttons update the listbox from the slider etc.. And the tictactoe game works right along below it. Kind of 2 independent widgets functioning on the same page.

Now HOW Can I get the TicTacToe class to TALK TO the LISTBOX in HandMade class? For example, when I tap a box in the TicTacToe grid (call it TTT) a mousePressEvent is generated. In TTT, the mouseevent calls a function to draw the X or O etc.. This all works fine.

I want to add something to the mousePressEvent that will also ADD TO THE LISTBOX a number from 1 to 9.

The 2 class files are listed below my signature.

Note that in HandMade *lb is a variable to reference the listbox.
I assume if “lb” was global or accessable I could just do:
lb->insertItem( “9” );
But that doesn’t work inside the Class TicTacToe!
I just get this error message:
Error E2451 tictactoe.cpp 50: Undefined symbol 'lb' in function TicTacToe::mousePressEvent(QMouseEvent *)

Anyone care to help a newbie learn about this!!

Thankx in advance

***** handmaid.h ********
#ifndef HANDMADE_H
#define HANDMADE_H

// My main widget is derived from the QVBox widget
#include <qvbox.h>

// these "forward declarations" tell the compiler what other
// classes I WILL BE using without having to fully use
// the class declarations. The actual class declarations are included
// in the implementation file as <qlistbox> and <qlcdnumber>.
class QLCDNumber;
class QListBox;
class TicTacToe;

// This is the start of MY new class I am making called handmade
// It is based on QVBoz class
class HandMade : public QVBox
// Must have this Qt Keyword in order to use signals/slots/etc...

// This is the CONSTRUCTOR declaration
HandMade( QWidget *parent=0, char *name=0 );
QListBox *lb;
TicTacToe *kybd;

protected slots:
// These are SLOTS
void addNumber();
void removeNumber();

//These pointer values are used by the slots
QLCDNumber *lcd;
//QListBox *lb;
//Need to watch the keybopard
//TicTacToe *kybd;



***** tictactoe.h ********

#include <qwidget.h>

class TicTacToe : public QWidget
TicTacToe(QWidget *parent = 0, const char *name = 0);

void paintEvent(QPaintEvent *event);
void mousePressEvent(QMouseEvent *event);

enum { Empty = '-', Cross = 'X', Nought = 'O' };
QRect cellRect(int row, int col) const;
int cellWidth() const { return width() / 3; }
int cellHeight() const { return height() / 3; }
char board[3][3];

28 Feb 2004
This is my 2nd attempt to try to install the tools for developing for the 5500.

I followed the development "HOW TO" exactly for configuring the compiler and loading Qt for embedix. However, when I run make, it seems to work at first using gcc296 and then the messages start flying about undefined objects. Thousands of messages!

In any case I am new to Linux. I can follow instructions. I am using Fedorar Core and I also loaded the "compat-****" files to get the compatible gcc.

If you have already done this, please look at the "How to" for compiler setup and and see if you remember any trick you needed to get it going.

Thankx John
Last Visitors
jdf has no visitors to display.

Other users have left no comments for jdf.

There are no friends to display.
RSS Lo-Fi Version Time is now: 5th December 2016 - 07:03 PM