~ubuntu-branches/ubuntu/karmic/psi/karmic

« back to all changes in this revision

Viewing changes to src/options/optionsdlg.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2006-01-20 00:20:36 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060120002036-7nw6yo6totip0ee5
Tags: 0.10-2
* Added upstream changelog (Closes: Bug#327748)
* Mention --no-gpg and --no-gpg-agent in manpage (Closes: Bug#204416)

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
// tabs
18
18
#include "opt_application.h"
 
19
#include "opt_appearance.h"
19
20
#include "opt_chat.h"
20
21
#include "opt_events.h"
21
22
#include "opt_status.h"
22
 
#include "opt_appearance.h"
23
23
#include "opt_iconset.h"
24
24
#include "opt_groupchat.h"
25
25
#include "opt_sound.h"
109
109
// OptionsTabBase
110
110
//----------------------------------------------------------------------------
111
111
 
112
 
class OptionsTabBase : public OptionsTab
113
 
{
114
 
        Q_OBJECT
115
 
public:
116
 
        OptionsTabBase(QObject *parent, QCString id, QCString parentId, QString iconName, QString name, QString desc)
117
 
                : OptionsTab(parent, id, parentId, name, desc, iconName)
118
 
        {
119
 
                w = new QWidget();
120
 
                QGridLayout *layout = new QGridLayout(w, 0, 2, 0, 5);
121
 
                layout->setAutoAdd(true);
122
 
        }
123
 
        ~OptionsTabBase()
124
 
        {
125
 
                w->deleteLater();
126
 
        }
127
 
 
128
 
        QWidget *widget() { return w; }
129
 
 
130
 
public slots:
131
 
        void tabAdded(OptionsTab *tab);
132
 
 
133
 
private:
134
 
        QWidget *w;
135
 
};
136
 
 
137
 
void OptionsTabBase::tabAdded(OptionsTab *tab)
138
 
{
139
 
        //qWarning("OptionsTabBase::tabAdded(): id = %s, tab_id = %s", (const char *)id(), (const char *)tab->id());
140
 
        QLabel *name = new QLabel(w);
141
 
        name->setText("<b>" + tab->name() + "</b>");
142
 
        name->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
143
 
 
144
 
        IconLabel *desc = new IconLabel(w);
145
 
        desc->setText(tab->desc());
146
 
        desc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
147
 
}
 
112
//class OptionsTabBase : public OptionsTab
 
113
//{
 
114
//      Q_OBJECT
 
115
//public:
 
116
//      OptionsTabBase(QObject *parent, QCString id, QCString parentId, QString iconName, QString name, QString desc)
 
117
//              : OptionsTab(parent, id, parentId, name, desc, iconName)
 
118
//      {
 
119
//              w = new QWidget();
 
120
//              QGridLayout *layout = new QGridLayout(w, 0, 2, 0, 5);
 
121
//              layout->setAutoAdd(true);
 
122
//      }
 
123
//      ~OptionsTabBase()
 
124
//      {
 
125
//              w->deleteLater();
 
126
//      }
 
127
//
 
128
//      QWidget *widget() { return w; }
 
129
//
 
130
//public slots:
 
131
//      void tabAdded(OptionsTab *tab);
 
132
//
 
133
//private:
 
134
//      QWidget *w;
 
135
//};
 
136
//
 
137
//void OptionsTabBase::tabAdded(OptionsTab *tab)
 
138
//{
 
139
//      //qWarning("OptionsTabBase::tabAdded(): id = %s, tab_id = %s", (const char *)id(), (const char *)tab->id());
 
140
//      QLabel *name = new QLabel(w);
 
141
//      name->setText("<b>" + tab->name() + "</b>");
 
142
//      name->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
 
143
//
 
144
//      IconLabel *desc = new IconLabel(w);
 
145
//      desc->setText(tab->desc());
 
146
//      desc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
 
147
//}
148
148
 
149
149
//----------------------------------------------------------------------------
150
150
// OptionsDlg::Private
167
167
        void createTabs();
168
168
        void createChangedMap();
169
169
 
170
 
        void addWidgetChangedSignal(QString widgetName, QCString signal);
 
170
        //void addWidgetChangedSignal(QString widgetName, QCString signal);
171
171
        void connectDataChanged(QWidget *);
172
172
 
173
173
public:
187
187
        psi = _psi;
188
188
        opt = _opt; // option
189
189
        noDirty = false;
 
190
        dirty = false;
190
191
 
191
192
        dlg->lb_pageTitle->setScaledContents(32, 32);
192
193
 
205
206
                //qWarning("Adding tab %s...", (const char *)opttab->id());
206
207
                opttab->setData(psi, dlg);
207
208
                connect(opttab, SIGNAL(dataChanged()), SLOT(dataChanged()));
208
 
                connect(opttab, SIGNAL(addWidgetChangedSignal(QString, QCString)), SLOT(addWidgetChangedSignal(QString, QCString)));
 
209
                //connect(opttab, SIGNAL(addWidgetChangedSignal(QString, QCString)), SLOT(addWidgetChangedSignal(QString, QCString)));
209
210
                connect(opttab, SIGNAL(noDirty(bool)), SLOT(noDirtySlot(bool)));
210
211
                connect(opttab, SIGNAL(connectDataChanged(QWidget *)), SLOT(connectDataChanged(QWidget *)));
211
212
 
308
309
        tabs.append( new OptionsTabEvents(this) );
309
310
        tabs.append( new OptionsTabStatus(this) );
310
311
        tabs.append( new OptionsTabAppearance(this) );
311
 
        tabs.append( new OptionsTabIconsetSystem(this) );
312
 
        tabs.append( new OptionsTabIconsetRoster(this) );
313
 
        tabs.append( new OptionsTabIconsetEmoticons(this) );
 
312
        //tabs.append( new OptionsTabIconsetSystem(this) );
 
313
        //tabs.append( new OptionsTabIconsetRoster(this) );
 
314
        //tabs.append( new OptionsTabIconsetEmoticons(this) );
314
315
        tabs.append( new OptionsTabGroupchat(this) );
315
316
        tabs.append( new OptionsTabSound(this) );
316
317
        tabs.append( new OptionsTabAdvanced(this) );
372
373
        //changedMap.insert("QTabWidget", SIGNAL(currentChanged(QWidget *)));
373
374
}
374
375
 
375
 
void OptionsDlg::Private::addWidgetChangedSignal(QString widgetName, QCString signal)
376
 
{
377
 
        changedMap.insert(widgetName, signal);
378
 
}
 
376
//void OptionsDlg::Private::addWidgetChangedSignal(QString widgetName, QCString signal)
 
377
//{
 
378
//      changedMap.insert(widgetName, signal);
 
379
//}
379
380
 
380
381
void OptionsDlg::Private::openTab(QString id)
381
382
{