PDA

View Full Version : how to split a class ?



mimmo_kallon
8th April 2008, 11:37
hi, i have to ask again your help, this time with a more c++ related question than Qt, but i am a newbie also on that topic and I wish you can help me on this very stupid question :rolleyes:

i made my qt application with only one big class, with all the methods:


class App : public QMainWindow, public Ui::AppDLG{
public:
App(QWidget *parent = 0);
void readFileC(const QString &fileName);
void update_comboBox(const QString &fileName,int type);
QString norm(const QString &fileName,int type);
QString norm_m(int type);
...
public slots:
void getPath();
void mod_norm();
void new_sensor();
void del_sensor();
....


i need to split up in a second class the methods norm(...) and norm_m(...) , and the slots mod_norm(...), new_sensor(...) and del_sensor(...).

i don't know how to organize my .h and .cpp files.... so i'm asking you the help and "what to place and where", and also how i can call the new objects created using that new class.

also a link with useful examples of easy qt projects using several classes will be appreciated.

thanks in advance.......... i'm a very newbie :o