~ubuntu-branches/ubuntu/jaunty/fqterm/jaunty

« back to all changes in this revision

Viewing changes to src/ui/schemadialog.cpp

  • Committer: Bazaar Package Importer
  • Author(s): LI Daobing
  • Date: 2009-02-14 09:32:53 UTC
  • Revision ID: james.westby@ubuntu.com-20090214093253-s2e6544ox2aj79rj
Tags: upstream-0.9.3+svn632
ImportĀ upstreamĀ versionĀ 0.9.3+svn632

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   fqterm, a terminal emulator for both BBS and *nix.                    *
 
3
 *   Copyright (C) 2008 fqterm development group.                          *
 
4
 *                                                                         *
 
5
 *   This program is free software; you can redistribute it and/or modify  *
 
6
 *   it under the terms of the GNU General Public License as published by  *
 
7
 *   the Free Software Foundation; either version 2 of the License, or     *
 
8
 *   (at your option) any later version.                                   *
 
9
 *                                                                         *
 
10
 *   This program is distributed in the hope that it will be useful,       *
 
11
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 
12
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 
13
 *   GNU General Public License for more details.                          *
 
14
 *                                                                         *
 
15
 *   You should have received a copy of the GNU General Public License     *
 
16
 *   along with this program; if not, write to the                         *
 
17
 *   Free Software Foundation, Inc.,                                       *
 
18
 *   51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.               *
 
19
 ***************************************************************************/
 
20
 
 
21
#include <QFileDialog>
 
22
#include <QColorDialog>
 
23
#include <QComboBox>
 
24
#include <QMessageBox>
 
25
 
 
26
#include "fqterm_config.h"
 
27
#include "fqterm_path.h"
 
28
#include "fqterm_trace.h"
 
29
 
 
30
#include "schemadialog.h"
 
31
 
 
32
namespace FQTerm {
 
33
 
 
34
schemaDialog::schemaDialog(QWidget *parent, Qt::WFlags fl)
 
35
    : QDialog(parent, fl),
 
36
      buttonGroup_(this) {
 
37
  ui_.setupUi(this);
 
38
  buttonGroup_.addButton(ui_.noneRadioButton, 0);
 
39
  buttonGroup_.addButton(ui_.imageRadioButton, 1);
 
40
  buttonGroup_.addButton(ui_.transpRadioButton, 2);
 
41
 
 
42
  lastItemID_ = -1;
 
43
  isModified_ = false;
 
44
 
 
45
  ui_.alphaSlider->setMinimum(0);
 
46
  ui_.alphaSlider->setMaximum(100);
 
47
  ui_.alphaSlider->setSingleStep(1);
 
48
  ui_.alphaSlider->setPageStep(10);
 
49
 
 
50
  ui_.imagePixmapLabel->setScaledContents(false);
 
51
  //    ui.bgButtonGroup->setRadioButtonExclusive(true);
 
52
  colorButtons[0] = ui_.clr0Button;
 
53
  colorButtons[1] = ui_.clr1Button;
 
54
  colorButtons[2] = ui_.clr2Button;
 
55
  colorButtons[3] = ui_.clr3Button;
 
56
  colorButtons[4] = ui_.clr4Button;
 
57
  colorButtons[5] = ui_.clr5Button;
 
58
  colorButtons[6] = ui_.clr6Button;
 
59
  colorButtons[7] = ui_.clr7Button;
 
60
  colorButtons[8] = ui_.clr8Button;
 
61
  colorButtons[9] = ui_.clr9Button;
 
62
  colorButtons[10] = ui_.clr10Button;
 
63
  colorButtons[11] = ui_.clr11Button;
 
64
  colorButtons[12] = ui_.clr12Button;
 
65
  colorButtons[13] = ui_.clr13Button;
 
66
  colorButtons[14] = ui_.clr14Button;
 
67
  colorButtons[15] = ui_.clr15Button;
 
68
 
 
69
  connectSlots();
 
70
  loadList();
 
71
}
 
72
 
 
73
 
 
74
schemaDialog::~schemaDialog(){}
 
75
 
 
76
void schemaDialog::setSchema(const QString &strSchemaFile) {
 
77
  if (!QFile::exists(strSchemaFile)) {
 
78
    return ;
 
79
  }
 
80
 
 
81
  int n = fileList_.indexOf(strSchemaFile);
 
82
  ui_.nameListWidget->setCurrentRow(n);
 
83
}
 
84
 
 
85
QString schemaDialog::getSchema() {
 
86
  return currentSchemaFileName_;
 
87
}
 
88
 
 
89
void schemaDialog::connectSlots() {
 
90
  FQ_VERIFY(connect(ui_.saveButton, SIGNAL(clicked()), this, SLOT(saveSchema())));
 
91
  FQ_VERIFY(connect(ui_.removeButton, SIGNAL(clicked()), this, SLOT(removeSchema())));
 
92
  FQ_VERIFY(connect(ui_.okButton, SIGNAL(clicked()), this, SLOT(onOK())));
 
93
  FQ_VERIFY(connect(ui_.cancelButton, SIGNAL(clicked()), this, SLOT(onCancel())));
 
94
 
 
95
  for (int i = 0; i < 16; ++i) {
 
96
    FQ_VERIFY(connect(colorButtons[i], SIGNAL(clicked()), this, SLOT(buttonClicked())));
 
97
  }
 
98
 
 
99
  FQ_VERIFY(connect(ui_.nameListWidget, SIGNAL(currentRowChanged(int)),
 
100
                  this, SLOT(nameChanged(int))));
 
101
 
 
102
//  FQ_VERIFY(connect(&buttonGroup_, SIGNAL(clicked(int)), this, SLOT(bgType(int))));
 
103
  FQ_VERIFY(connect(ui_.typeComboBox, SIGNAL(activated(int)), this, SLOT(imageType(int))));
 
104
  FQ_VERIFY(connect(ui_.chooseButton, SIGNAL(clicked()), this, SLOT(chooseImage())));
 
105
  FQ_VERIFY(connect(ui_.fadeButton, SIGNAL(clicked()), this, SLOT(fadeClicked())));
 
106
  FQ_VERIFY(connect(ui_.alphaSlider, SIGNAL(valueChanged(int)), this, SLOT(alphaChanged(int))));
 
107
 
 
108
  FQ_VERIFY(connect(ui_.titleLineEdit, SIGNAL(textChanged(const QString &)),
 
109
                  this, SLOT(textChanged(const QString &))));
 
110
  FQ_VERIFY(connect(ui_.imageLineEdit, SIGNAL(textChanged(const QString &)),
 
111
                  this, SLOT(textChanged(const QString &))));
 
112
}
 
113
 
 
114
void schemaDialog::loadList() {
 
115
  QDir dir;
 
116
  QFileInfoList lstFile;
 
117
  //QFileInfo *fi;
 
118
 
 
119
  dir.setNameFilters(QStringList("*.schema"));
 
120
  dir.setPath(getPath(RESOURCE) + "schema");
 
121
  lstFile = dir.entryInfoList();
 
122
 
 
123
  //if(lstFile != NULL)
 
124
  {
 
125
    foreach(QFileInfo fi, lstFile) {
 
126
      FQTermConfig *pConf = new FQTermConfig(fi.absoluteFilePath());
 
127
      ui_.nameListWidget->addItem(pConf->getItemValue("schema", "title"));
 
128
      delete pConf;
 
129
      fileList_.append(fi.absoluteFilePath());
 
130
    }
 
131
  }
 
132
  if (ui_.nameListWidget->count() != 0) {
 
133
    ui_.nameListWidget->setCurrentRow(0);
 
134
  }
 
135
}
 
136
 
 
137
void schemaDialog::loadSchema(const QString &strSchemaFile) {
 
138
  FQTermConfig *pConf = new FQTermConfig(strSchemaFile);
 
139
 
 
140
  currentSchemaFileName_ = strSchemaFile;
 
141
 
 
142
  title_ = pConf->getItemValue("schema", "title");
 
143
  backgroundFileName_ = pConf->getItemValue("image", "name");
 
144
  QString strTmp = pConf->getItemValue("image", "type");
 
145
  backgroundType_ = strTmp.toInt();
 
146
  fade_.setNamedColor(pConf->getItemValue("image", "fade"));
 
147
  strTmp = pConf->getItemValue("image", "alpha");
 
148
  alpha_ = strTmp.toFloat();
 
149
 
 
150
  for (int i = 0; i < 16; ++i) {
 
151
    colors[i].setNamedColor(pConf->getItemValue("color", QString("color%1").arg(i)));
 
152
  }
 
153
 
 
154
  delete pConf;
 
155
 
 
156
  updateView();
 
157
 
 
158
}
 
159
 
 
160
void schemaDialog::saveNumSchema(int n) {
 
161
  // FIXME: ?, and there is more below
 
162
  QStringList::Iterator it = fileList_.begin();
 
163
  while (n--) {
 
164
    it++;
 
165
  }
 
166
 
 
167
  title_ = ui_.titleLineEdit->text();
 
168
  backgroundFileName_ = ui_.imageLineEdit->text();
 
169
 
 
170
  QString schemaFileName = getPath(RESOURCE) + "schema/" + title_ + ".schema";
 
171
 
 
172
  // create a new schema if title changed
 
173
  if (schemaFileName != currentSchemaFileName_) {
 
174
    ui_.nameListWidget->addItem(title_);
 
175
    fileList_.append(schemaFileName);
 
176
  }
 
177
 
 
178
  FQTermConfig *pConf = new FQTermConfig(currentSchemaFileName_);
 
179
 
 
180
  currentSchemaFileName_ = schemaFileName;
 
181
 
 
182
 
 
183
  pConf->setItemValue("schema", "title", title_);
 
184
 
 
185
  pConf->setItemValue("image", "name", backgroundFileName_);
 
186
 
 
187
  QString strTmp;
 
188
  strTmp.setNum(backgroundType_);
 
189
  pConf->setItemValue("image", "type", strTmp);
 
190
 
 
191
  pConf->setItemValue("image", "fade", fade_.name());
 
192
 
 
193
  strTmp.setNum(alpha_);
 
194
  pConf->setItemValue("image", "alpha", strTmp);
 
195
  for (int i = 0; i < 16; ++i) {
 
196
    pConf->setItemValue("color", QString("color%1").arg(i), colors[i].name());
 
197
  }
 
198
 
 
199
  pConf->save(schemaFileName);
 
200
 
 
201
  delete pConf;
 
202
 
 
203
  isModified_ = false;
 
204
 
 
205
}
 
206
 
 
207
void schemaDialog::updateView() {
 
208
  // title
 
209
  ui_.titleLineEdit->setText(title_);
 
210
  for (int i = 0; i < 16; ++i) {
 
211
    QPalette palette;
 
212
    palette.setColor(QPalette::Button, colors[i]);
 
213
    colorButtons[i]->setPalette(palette);
 
214
  }
 
215
 
 
216
  // bg type
 
217
  switch (backgroundType_) {
 
218
    case 0:
 
219
      // none
 
220
      buttonGroup_.button(0)->setChecked(true);
 
221
      bgType(2);
 
222
      break;
 
223
    case 1:
 
224
      // transparent
 
225
      buttonGroup_.button(2)->setChecked(true);
 
226
      bgType(3);
 
227
      break;
 
228
    case 2:
 
229
      // tile
 
230
      buttonGroup_.button(1)->setChecked(true);
 
231
      bgType(1);
 
232
      break;
 
233
    case 3:
 
234
      // center
 
235
      buttonGroup_.button(1)->setChecked(true);
 
236
      bgType(1);
 
237
      break;
 
238
    case 4:
 
239
      // stretch
 
240
      buttonGroup_.button(1)->setChecked(true);
 
241
      bgType(1);
 
242
      break;
 
243
    default:
 
244
      buttonGroup_.button(0)->setChecked(true);
 
245
      break;
 
246
  }
 
247
  // image type
 
248
 
 
249
  // image file
 
250
  ui_.imageLineEdit->setText(backgroundFileName_);
 
251
  // fade color
 
252
  QPalette palette;
 
253
  palette.setColor(ui_.fadeButton->backgroundRole(), fade_);
 
254
  ui_.fadeButton->setPalette(palette);
 
255
 
 
256
  // alpha
 
257
  ui_.alphaSlider->setValue(int(alpha_ * 100));
 
258
 
 
259
  // load from file, nothing changed
 
260
  isModified_ = false;
 
261
}
 
262
 
 
263
void schemaDialog::updateBgPreview() {
 
264
  QPalette palette;
 
265
  palette.setColor(ui_.imagePixmapLabel->backgroundRole(), colors[0]);
 
266
  ui_.imagePixmapLabel->setPalette(palette);
 
267
 
 
268
  //    ui.imagePixmapLabel->setPaletteBackgroundColor(clr0);
 
269
  ui_.imagePixmapLabel->clear();
 
270
  if (!QFile::exists(backgroundFileName_) || backgroundType_ == 0) {
 
271
    return ;
 
272
  }
 
273
 
 
274
  QPixmap pixmap;
 
275
  QImage img(backgroundFileName_);
 
276
  img = fadeColor(img, alpha_, fade_);
 
277
  pixmap = QPixmap::fromImage(img.scaled(ui_.imagePixmapLabel->width(),
 
278
                                         ui_.imagePixmapLabel->height()));
 
279
  /*
 
280
        switch(type)
 
281
        {
 
282
        case 2: // tile
 
283
        if( !pixmap.isNull() )
 
284
        {
 
285
        imagePixmapLabel->setPixmap( pixmap );
 
286
        break;
 
287
        }
 
288
        case 3: // center
 
289
        if( !pixmap.isNull() )
 
290
        {
 
291
        QPixmap pxm;
 
292
        pxm.resize(size());
 
293
        pxm.fill( clr0 );
 
294
        bitBlt( &pxm,
 
295
        ( size().width() - pixmap.width() ) / 2,
 
296
        ( size().height() - pixmap.height() ) / 2,
 
297
        &pixmap, 0, 0,
 
298
        pixmap.width(), pixmap.height() );
 
299
        imagePixmapLabel->setPixmap(pxm);
 
300
        break;
 
301
        }
 
302
        case 4: // stretch
 
303
        if( !pixmap.isNull() )
 
304
        {
 
305
        float sx = (float)size().width() / pixmap.width();
 
306
        float sy = (float)size().height() /pixmap.height();
 
307
        QWMatrix matrix;
 
308
        matrix.scale( sx, sy );
 
309
        imagePixmapLabel->setPixmap(pixmap.xForm( matrix ));
 
310
        break;
 
311
        }
 
312
        }
 
313
  */
 
314
  ui_.imagePixmapLabel->setPixmap(pixmap);
 
315
 
 
316
}
 
317
 
 
318
void schemaDialog::buttonClicked() {
 
319
  QPushButton *button = (QPushButton*)sender();
 
320
  QColor color =
 
321
      QColorDialog::getColor(button->palette().color(button->backgroundRole()));
 
322
  if (color.isValid() == true) {
 
323
    QPalette palette;
 
324
    palette.setColor(QPalette::Button, color);
 
325
    button->setPalette(palette);
 
326
    isModified_ = true;
 
327
  }
 
328
  for (int i = 0; i < 16; ++i) {
 
329
    if (colorButtons[i] == button) {
 
330
      colors[i] = color;
 
331
      break;
 
332
    }
 
333
  }
 
334
}
 
335
 
 
336
void schemaDialog::nameChanged(int item) {
 
337
  if (isModified_) {
 
338
    QMessageBox mb("FQTerm", "Setting changed, do you want to save?",
 
339
                   QMessageBox::Warning, QMessageBox::Yes | QMessageBox::Default,
 
340
                   QMessageBox::No | QMessageBox::Escape, 0, this);
 
341
    if (mb.exec() == QMessageBox::Yes) {
 
342
      if (lastItemID_ != -1) {
 
343
        saveNumSchema(lastItemID_);
 
344
      }
 
345
    }
 
346
  }
 
347
 
 
348
  QStringList::Iterator it = fileList_.begin();
 
349
  int n = item; //nameListBox->index(item);
 
350
  if (n != -1) {
 
351
    lastItemID_ = n;
 
352
    while (n--) {
 
353
      it++;
 
354
    }
 
355
  }
 
356
 
 
357
 
 
358
  loadSchema(*it);
 
359
  updateView();
 
360
}
 
361
 
 
362
void schemaDialog::bgType(int n) {
 
363
  switch (n) {
 
364
    case 1:
 
365
      // image
 
366
      //                        typeComboBox->setEnabled(true);
 
367
      //                        imageLineEdit->setEnabled(true);
 
368
      //                        chooseButton->setEnabled(true);
 
369
      if (backgroundType_ == 0) {
 
370
        backgroundType_ = 2;
 
371
      }
 
372
      ui_.typeComboBox->setCurrentIndex(backgroundType_ - 2);
 
373
      break;
 
374
 
 
375
    case 2:
 
376
      // none
 
377
      //                        typeComboBox->setEnabled(false);
 
378
      //                        imageLineEdit->setEnabled(false);
 
379
      //                        chooseButton->setEnabled(false);
 
380
      backgroundType_ = 0;
 
381
      break;
 
382
    case 3:
 
383
      // transparent
 
384
      QMessageBox::information(this, "sorry",
 
385
                               "We are trying to bring you this function soon :)");
 
386
      //                        typeComboBox->setEnabled(false);
 
387
      //                        imageLineEdit->setEnabled(false);
 
388
      //                        chooseButton->setEnabled(false);
 
389
      //                        backgroundType_ = 1;
 
390
      //                        bgButtonGroup->setButton(2);
 
391
      buttonGroup_.button(2)->setChecked(true);
 
392
      break;
 
393
  }
 
394
  isModified_ = true;
 
395
  updateBgPreview();
 
396
}
 
397
 
 
398
void schemaDialog::imageType(int n) {
 
399
  backgroundType_ = n + 2;
 
400
  isModified_ = true;
 
401
  updateBgPreview();
 
402
}
 
403
 
 
404
void schemaDialog::chooseImage() {
 
405
  QString img = QFileDialog::getOpenFileName(
 
406
      this, "Choose an image", QDir::currentPath());
 
407
  if (!img.isNull()) {
 
408
    ui_.imageLineEdit->setText(img);
 
409
    backgroundFileName_ = img;
 
410
    backgroundType_ = 2+ui_.typeComboBox->currentIndex();
 
411
    isModified_ = true;
 
412
    updateBgPreview();
 
413
  }
 
414
}
 
415
 
 
416
void schemaDialog::fadeClicked() {
 
417
  QColor color = QColorDialog::getColor(fade_);
 
418
  if (color.isValid() == TRUE) {
 
419
    fade_ = color;
 
420
#if (QT_VERSION>300)
 
421
    QPalette palette;
 
422
    palette.setColor(ui_.fadeButton->backgroundRole(), color);
 
423
    ui_.fadeButton->setPalette(palette);
 
424
 
 
425
    //          ui.fadeButton->setPaletteBackgroundColor(color);
 
426
#else
 
427
    ui_.fadeButton->setPalette(color);
 
428
#endif
 
429
 
 
430
    isModified_ = true;
 
431
    updateBgPreview();
 
432
  }
 
433
}
 
434
 
 
435
void schemaDialog::alphaChanged(int value) {
 
436
  alpha_ = float(value) / 100;
 
437
  isModified_ = true;
 
438
  updateBgPreview();
 
439
}
 
440
 
 
441
void schemaDialog::saveSchema() {
 
442
  // get current schema file name
 
443
  int n = ui_.nameListWidget->currentRow();
 
444
  saveNumSchema(n);
 
445
}
 
446
 
 
447
void schemaDialog::removeSchema() {
 
448
  QFileInfo fi(currentSchemaFileName_);
 
449
  if (fi.isWritable()) {
 
450
    QFile::remove(currentSchemaFileName_);
 
451
    QStringList::Iterator it = fileList_.begin();
 
452
    int n = ui_.nameListWidget->currentRow();
 
453
    ui_.nameListWidget->takeItem(n);
 
454
    while (n--) {
 
455
      it++;
 
456
    }
 
457
 
 
458
    fileList_.erase(it);
 
459
  } else {
 
460
    QMessageBox::warning(this, "Error",
 
461
                         "This is a system schema. Permission Denied");
 
462
  }
 
463
}
 
464
 
 
465
void schemaDialog::onOK() {
 
466
  if (isModified_) {
 
467
    QMessageBox mb("FQTerm", "Setting changed, do you want to save?",
 
468
                   QMessageBox::Warning, QMessageBox::Yes | QMessageBox::Default,
 
469
                   QMessageBox::No | QMessageBox::Escape, 0, this);
 
470
    if (mb.exec() == QMessageBox::Yes) {
 
471
      int n = ui_.nameListWidget->currentRow();
 
472
      saveNumSchema(n);
 
473
    }
 
474
  }
 
475
 
 
476
  done(1);
 
477
}
 
478
 
 
479
void schemaDialog::onCancel() {
 
480
  if (isModified_) {
 
481
    QMessageBox mb("FQTerm", "Setting changed, do you want to save?",
 
482
                   QMessageBox::Warning, QMessageBox::Yes | QMessageBox::Default,
 
483
                   QMessageBox::No | QMessageBox::Escape, 0, this);
 
484
    if (mb.exec() == QMessageBox::Yes) {
 
485
      int n = ui_.nameListWidget->currentRow();
 
486
      saveNumSchema(n);
 
487
    }
 
488
  }
 
489
 
 
490
  done(0);
 
491
}
 
492
 
 
493
void schemaDialog::textChanged(const QString &) {
 
494
  isModified_ = true;
 
495
}
 
496
 
 
497
// from KImageEffect::fade
 
498
QImage &schemaDialog::fadeColor(QImage &img, float val, const QColor &color) {
 
499
  if (img.width() == 0 || img.height() == 0) {
 
500
    return img;
 
501
  }
 
502
 
 
503
  // We don't handle bitmaps
 
504
  if (img.depth() == 1) {
 
505
    return img;
 
506
  }
 
507
 
 
508
  unsigned char tbl[256];
 
509
  for (int i = 0; i < 256; i++) {
 
510
    tbl[i] = (int)(val *i + 0.5);
 
511
  }
 
512
 
 
513
  int red = color.red();
 
514
  int green = color.green();
 
515
  int blue = color.blue();
 
516
 
 
517
  QRgb col;
 
518
  int r, g, b, cr, cg, cb;
 
519
 
 
520
  if (img.depth() <= 8) {
 
521
    // pseudo color
 
522
    for (int i = 0; i < img.numColors(); i++) {
 
523
      col = img.color(i);
 
524
      cr = qRed(col);
 
525
      cg = qGreen(col);
 
526
      cb = qBlue(col);
 
527
      if (cr > red) {
 
528
        r = cr - tbl[cr - red];
 
529
      } else {
 
530
        r = cr + tbl[red - cr];
 
531
      }
 
532
 
 
533
      if (cg > green) {
 
534
        g = cg - tbl[cg - green];
 
535
      } else {
 
536
        g = cg + tbl[green - cg];
 
537
      }
 
538
 
 
539
      if (cb > blue) {
 
540
        b = cb - tbl[cb - blue];
 
541
      } else {
 
542
        b = cb + tbl[blue - cb];
 
543
      }
 
544
 
 
545
      img.setColor(i, qRgba(r, g, b, qAlpha(col)));
 
546
    }
 
547
 
 
548
  } else {
 
549
    // truecolor
 
550
    for (int y = 0; y < img.height(); y++) {
 
551
      QRgb *data = (QRgb*)img.scanLine(y);
 
552
      for (int x = 0; x < img.width(); x++) {
 
553
        col =  *data;
 
554
        cr = qRed(col);
 
555
        cg = qGreen(col);
 
556
        cb = qBlue(col);
 
557
        if (cr > Qt::red) {
 
558
          r = cr - tbl[cr - Qt::red];
 
559
        } else {
 
560
          r = cr + tbl[Qt::red - cr];
 
561
        }
 
562
 
 
563
        if (cg > Qt::green) {
 
564
          g = cg - tbl[cg - Qt::green];
 
565
        } else {
 
566
          g = cg + tbl[Qt::green - cg];
 
567
        }
 
568
 
 
569
        if (cb > Qt::blue) {
 
570
          b = cb - tbl[cb - Qt::blue];
 
571
        } else {
 
572
          b = cb + tbl[Qt::blue - cb];
 
573
        }
 
574
 
 
575
        *data++ = qRgba(r, g, b, qAlpha(col));
 
576
      }
 
577
    }
 
578
  }
 
579
 
 
580
  return img;
 
581
}
 
582
 
 
583
}  // namespace FQTerm
 
584
 
 
585
#include "schemadialog.moc"