void  Preferences::createETPage()
{
  // extra tool bar page

  QWidget *w = new QWidget(this);
  Q3VBoxLayout *vbox = new Q3VBoxLayout(w);

  Q3GridLayout *grid = new Q3GridLayout(vbox, 1, 2);
  grid->setMargin(5);
  grid->setSpacing(5);
  grid->setColStretch(1, 1);

  vbox->insertStretch(-1, 1);

  int i = 0; // count rows
  int j = 0; // "count" cols
  bool tb; // temporary
  RcFile rcfile;

  QLabel *label = new QLabel(tr("Recent charts"), w);
  grid->addWidget(label, i, j);
  recentComboBoxCheck = new QCheckBox(w);
  rcfile.loadData(RcFile::ShowRecentCharts, tb);
  recentComboBoxCheck->setChecked(tb);
  connect(recentComboBoxCheck, SIGNAL(stateChanged(int)), this, SLOT(slotModified()));
  grid->addWidget(recentComboBoxCheck, i++, j + 1);

  addTab(w, tr("ExtraToolbar"));
}
ConstraintDialog::ConstraintDialog(ConstraintCanvas * c)
    : QDialog(0, "ConstraintVisibilityDialog", TRUE, 0), constraint(c)
{
    setCaption(TR("Constraints visibility dialog"));

    Q3VBoxLayout * vbox = new Q3VBoxLayout(this);

    vbox->setMargin(5);

    table = new ConstraintTable(this, constraint);
    vbox->addWidget(table);
    vbox->addWidget(new QLabel(this));

    Q3HBoxLayout * hbox;

    hbox = new Q3HBoxLayout(vbox);

    cb_visible = new QCheckBox(TR("Specify visible elements rather than hidden ones"), this);
    cb_visible->setChecked(constraint->indicate_visible);
    hbox->addWidget(cb_visible);

    QPushButton * showall = new QPushButton(TR("Show all"), this);
    QPushButton * hideall = new QPushButton(TR("Hide all"), this);
    QPushButton * hideinherited = new QPushButton(TR("Hide inherited"), this);
    QSize bs = hideinherited->sizeHint();

    showall->setFixedSize(bs);
    hideall->setFixedSize(bs);
    hideinherited->setFixedSize(bs);

    hbox->addWidget(new QLabel(this));
    hbox->addWidget(showall);
    hbox->addWidget(new QLabel(this));
    hbox->addWidget(hideall);
    hbox->addWidget(new QLabel(this));
    hbox->addWidget(hideinherited);
    hbox->addWidget(new QLabel(this));

    connect(showall, SIGNAL(clicked()), this, SLOT(show_all()));
    connect(hideall, SIGNAL(clicked()), this, SLOT(hide_all()));
    connect(hideinherited, SIGNAL(clicked()), this, SLOT(hide_inherited()));

    vbox->addWidget(new QLabel(this));
    hbox = new Q3HBoxLayout(vbox);

    hbox->setMargin(5);
    QPushButton * ok = new QPushButton(TR("&OK"), this);
    QPushButton * cancel = new QPushButton(TR("&Cancel"), this);

    ok->setDefault(TRUE);
    bs = cancel->sizeHint();
    ok->setFixedSize(bs);
    cancel->setFixedSize(bs);

    hbox->addWidget(ok);
    hbox->addWidget(cancel);

    connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
    connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));
}
void Preferences::createFontPage()
{
  // font parms page

  QWidget *w = new QWidget(this);
  Q3VBoxLayout *vbox = new Q3VBoxLayout(w);

  Q3GridLayout *grid = new Q3GridLayout(vbox, 1, 3);
  grid->setMargin(5);
  grid->setSpacing(5);
  grid->setColStretch(1, 1);
  grid->setColStretch(2, 2);

  vbox->insertStretch(-1, 1);

  // plot font
  QLabel *label = new QLabel(tr("Plot Font"), w);
  grid->addWidget(label, 0, 0);

  plotFontButton = new FontButton(w, plotFont);
  grid->addWidget(plotFontButton, 0, 1);
  connect(plotFontButton, SIGNAL(valueChanged()), this, SLOT(slotModified()));

  // app font
  label = new QLabel(tr("App Font"), w);
  grid->addWidget(label, 1, 0);

  appFontButton = new FontButton(w, appFont);
  grid->addWidget(appFontButton, 1, 1);
  connect(appFontButton, SIGNAL(valueChanged()), this, SLOT(slotModified()));

  addTab(w, tr("Fonts"));

}
Exemple #4
0
//===========================================================
//
void ImportWizard::setupDstType()
{
    m_dstTypePage = new QWidget(this);

    KexiDB::DriverManager manager;
    KexiDB::Driver::InfoHash drvs = manager.driversInfo();

    Q3VBoxLayout *vbox = new Q3VBoxLayout(m_dstTypePage, KDialog::marginHint());

    Q3HBoxLayout *hbox = new Q3HBoxLayout(vbox);
    QLabel *lbl = new QLabel(i18n("Destination database type:") + " ", m_dstTypePage);
    lbl->setAlignment(Qt::AlignAuto | Qt::AlignTop);
    hbox->addWidget(lbl);

    m_dstPrjTypeSelector = new KexiPrjTypeSelector(m_dstTypePage);
    hbox->addWidget(m_dstPrjTypeSelector);
    m_dstPrjTypeSelector->option_file->setText(i18n("Database project stored in a file"));
    m_dstPrjTypeSelector->option_server->setText(i18n("Database project stored on a server"));

    QVBoxLayout *frame_server_vbox = new QVBoxLayout(
        m_dstPrjTypeSelector->frame_server, KDialog::spacingHint());
    m_dstServerTypeCombo = new KexiDBDriverComboBox(m_dstPrjTypeSelector->frame_server, drvs,
            KexiDBDriverComboBox::ShowServerDrivers);
    frame_server_vbox->addWidget(m_dstServerTypeCombo);
    hbox->addStretch(1);
    vbox->addStretch(1);
    lbl->setBuddy(m_dstServerTypeCombo);

//! @todo hardcoded: find a way to preselect default engine item
    //m_dstTypeCombo->setCurrentText("SQLite3");
    addPage(m_dstTypePage, i18n("Select Destination Database Type"));
}
Exemple #5
0
//===========================================================
//
void ImportWizard::setupDst()
{
    m_dstPage = new QWidget(this);
    Q3VBoxLayout *vbox = new Q3VBoxLayout(m_dstPage, KDialog::marginHint());

    m_dstConn = new KexiConnSelectorWidget(Kexi::connset(),
                                           "kfiledialog:///ProjectMigrationDestinationDir",
                                           KAbstractFileWidget::Saving, m_dstPage);
    m_dstConn->hideHelpers();
    //me: Can't connect m_dstConn->m_fileDlg here, it doesn't exist yet
    //connect(this, SLOT(next()), m_dstConn->m_fileDlg, SIGNAL(accepted()));

    vbox->addWidget(m_dstConn);
    connect(m_dstConn, SIGNAL(connectionItemExecuted(ConnectionDataLVItem*)),
            this, SLOT(next()));

// m_dstConn->hideHelpers();
    m_dstConn->showSimpleConn();
    //anyway, db files will be _saved_
    m_dstConn->fileWidget->setMode(KexiStartupFileWidget::SavingFileBasedDB);
// m_dstConn->hideHelpers();
// m_dstConn->m_file->btn_advanced->hide();
// m_dstConn->m_file->label->hide();
// m_dstConn->m_file->lbl->hide();
    //m_dstConn->m_file->spacer7->hide();


    //js dstNewDBName = new KLineEdit(dstControls);
    //   dstNewDBName->setText(i18n("Enter new database name here"));
    addPage(m_dstPage, i18n("Select Location for Destination Database"));
}
Exemple #6
0
CColorDialog::CColorDialog (QWidget * parent, const char *name, F4lmApp * p):
        QWidget (parent, name)
{
        //QColor renk;
        //renk=QColorDialog::getColor(renk,this);
    realp = p;

    Q3VBoxLayout *topLayout = new Q3VBoxLayout (this);

    Q3ButtonGroup *ToolsButtonGroup =new Q3ButtonGroup (this, "ToolsButtonGroup");
    ToolsButtonGroup->setGeometry (QRect (150, 70, 71, 291));
    ToolsButtonGroup->setLineWidth (0);
    ToolsButtonGroup->setTitle (trUtf8 (""));

    QToolButton *ToolButton1 =new QToolButton (ToolsButtonGroup, "ToolButton1");
    ToolButton1->setGeometry (QRect (0, 10, 30, 30));
    ToolButton1->setText (trUtf8 ("CC"));
    connect (ToolButton1, SIGNAL (clicked ()), this,SLOT (slotColorChooser ()));

    QToolButton *ToolButton2 =new QToolButton (ToolsButtonGroup, "ToolButton2");
    ToolButton2->setGeometry (QRect (30, 10, 30, 30));
    ToolButton2->setText (trUtf8 ("..."));

        //CColorSwatches* s=new CColorSwatches(this,"color_swatches",p);
    topLayout->addWidget (ToolsButtonGroup);
        //topLayout->addWidget(s);
}
RenameImagesDialog::RenameImagesDialog(const KUrl::List& images,
                                       KIPI::Interface* interface,
                                       QWidget* parent)
    : KDialog(parent)
{
    setCaption(i18n("Rename Images"));
    setModal(true);
    setButtons(Help | User1 | Close);
    setButtonText(User1, i18n("&Start"));
    setDefaultButton(Close);
    // About data and help button.

    m_about = new KIPIPlugins::KPAboutData(ki18n("Batch-rename images"),
                                           QByteArray(),
                                           KAboutData::License_GPL,
                                           ki18n("A Kipi plugin to batch-rename images"),
                                           ki18n("(c) 2003-2007, Gilles Caulier"));

    m_about->addAuthor(ki18n("Gilles Caulier"), ki18n("Author and maintainer"),
                       "caulier dot gilles at gmail dot com");

    DialogUtils::setupHelpButton(this, m_about);
    // gui

    QWidget* box = new QWidget(this);
    setMainWidget(box);
    Q3VBoxLayout* lay = new Q3VBoxLayout(box);
    m_widget = new RenameImagesWidget(box, interface, images);
    lay->addWidget(m_widget);

    connect(this, SIGNAL(user1Clicked()),
            m_widget, SLOT(slotStart()));
    
    adjustSize();
}
int main(int argc, char** argv)
{
    // Initialise the program
    KCmdLineArgs::init(argc, argv, "kexidbcomboboxtest", 0, KLocalizedString(), "", KLocalizedString(), true);
    KApplication* app = new KApplication(true, true);

    // Look for installed database drivers
    KDbDriverManager manager;
    KDbDriver::InfoHash drvs = manager.driversInfo();

    // Set up a combo box and a quit widget in a new container
    QWidget* vbox = new QWidget();
    Q3VBoxLayout* vbLayout = new Q3VBoxLayout(vbox);

    KexiDBDriverComboBox* all = new KexiDBDriverComboBox(vbox, drvs);
    KexiDBDriverComboBox* srvOnly = new KexiDBDriverComboBox(vbox, drvs,
            KexiDBDriverComboBox::ShowServerDrivers);

    QPushButton* quit = new QPushButton("Quit", vbox);

    vbLayout->addWidget(all);     // Combobox listing all drivers
    vbLayout->addWidget(srvOnly); // Combobox only drivers for DB servers
    vbLayout->addWidget(quit);

    // Show the whole lot
    QObject::connect(quit, SIGNAL(clicked()), app, SLOT(quit()));
    vbox->show();
    app->exec();

    delete app;
}
TesterRulePage::TesterRulePage (QWidget *p) : QWidget (p)
{
    Q3VBoxLayout *vbox = new Q3VBoxLayout(this);
    vbox->setMargin(5);
    vbox->setSpacing(5);

    Q3GridLayout *grid = new Q3GridLayout(vbox, 2, 2);

    Q3VGroupBox *gbox = new Q3VGroupBox(tr("Enter Long"), this);
    grid->addWidget(gbox, 0, 0);

    enterLongEdit = new FormulaEdit(gbox, FormulaEdit::Logic);

    gbox = new Q3VGroupBox(tr("Exit Long"), this);
    grid->addWidget(gbox, 0, 1);

    exitLongEdit = new FormulaEdit(gbox, FormulaEdit::Logic);

    gbox = new Q3VGroupBox(tr("Enter Short"), this);
    grid->addWidget(gbox, 1, 0);

    enterShortEdit = new FormulaEdit(gbox, FormulaEdit::Logic);

    gbox = new Q3VGroupBox(tr("Exit Short"), this);
    grid->addWidget(gbox, 1, 1);

    exitShortEdit = new FormulaEdit(gbox, FormulaEdit::Logic);
}
Exemple #10
0
//===========================================================
//
void ImportWizard::setupIntro()
{
    m_introPage = new QWidget(this);
    Q3VBoxLayout *vbox = new Q3VBoxLayout(m_introPage, KDialog::marginHint());

    QLabel *lblIntro = new QLabel(m_introPage);
    lblIntro->setAlignment(Qt::AlignTop | Qt::AlignLeft);
    lblIntro->setWordWrap(true);
    QString msg;
    if (m_predefinedConnectionData) { //predefined import: server source
        msg = i18n("<qt>Database Importing wizard is about to import \"%1\" database "
                   "<nobr>(connection %2)</nobr> into a Kexi database.</qt>",
                   m_predefinedDatabaseName, m_predefinedConnectionData->serverInfoString());
    } else if (!m_predefinedDatabaseName.isEmpty()) { //predefined import: file source
//! @todo this message is currently ok for files only
        KMimeType::Ptr mimeTypePtr = KMimeType::mimeType(m_predefinedMimeType);
        if (mimeTypePtr.isNull())
            KexiDBWarn << QString("'%1' mimetype not installed!").arg(m_predefinedMimeType);
        msg = i18n(
                  "<qt>Database Importing wizard is about to import <nobr>\"%1\"</nobr> file "
                  "of type \"%2\" into a Kexi database.</qt>",
                  QDir::convertSeparators(m_predefinedDatabaseName), mimeTypePtr ? mimeTypePtr->comment() : "???");
    } else {
        msg = i18n("Database Importing wizard allows you to import an existing database "
                   "into a Kexi database.");
    }
    lblIntro->setText(msg + "\n\n"
                      + i18n("Click \"Next\" button to continue or \"Cancel\" button to exit this wizard."));
    vbox->addWidget(lblIntro);
    addPage(m_introPage, i18n("Welcome to the Database Importing Wizard"));
}
void StocksDialog::createDataPage ()
{
    QWidget *w = new QWidget(this);

    Q3VBoxLayout *vbox = new Q3VBoxLayout(w);
    vbox->setMargin(5);
    vbox->setSpacing(0);

    barEdit = new BarEdit(w);
    QString s = tr("Open");
    QString s2 = "Open";
    barEdit->createField(s, s2, FALSE);
    s = tr("High");
    s2 = "High";
    barEdit->createField(s, s2, FALSE);
    s = tr("Low");
    s2 = "Low";
    barEdit->createField(s, s2, FALSE);
    s = tr("Close");
    s2 = "Close";
    barEdit->createField(s, s2, FALSE);
    s = tr("Volume");
    s2 = "Volume";
    barEdit->createField(s, s2, FALSE);
    connect(barEdit, SIGNAL(signalDeleteRecord()), this, SLOT(deleteRecord()));
    connect(barEdit, SIGNAL(signalSaveRecord()), this, SLOT(saveRecord()));
    connect(barEdit, SIGNAL(signalSearch(QDateTime)), this, SLOT(slotDateSearch(QDateTime)));
    connect(barEdit, SIGNAL(signalFirstRecord()), this, SLOT(slotFirstRecord()));
    connect(barEdit, SIGNAL(signalLastRecord()), this, SLOT(slotLastRecord()));
    connect(barEdit, SIGNAL(signalPrevRecord()), this, SLOT(slotPrevRecord()));
    connect(barEdit, SIGNAL(signalNextRecord()), this, SLOT(slotNextRecord()));
    vbox->addWidget(barEdit);

    addTab(w, tr("Data"));
}
// -------------------------------------------------------------------------------------------------
TriggerWidget::TriggerWidget(QWidget* parent, const char* name)
throw ()
    : QWidget(parent, name)
{
    Q3VBoxLayout* boxLayout = new Q3VBoxLayout(this, 0, 0);

    Q3HBox* hbox = new Q3HBox(this);
    hbox->setSpacing(2);

    // create the checkboxes with their labels
    for (int i = 0; i < NUMBER_OF_BITS_PER_BYTE; i++) {
        Q3VBox* box = new Q3VBox(hbox);
        box->setSpacing(2);

        m_labels[i] = new QLabel(QString::number(i+1), box);
        m_labels[i]->setAlignment(Qt::AlignHCenter);

        m_checkboxes[i] = new QCheckBox(box);
        m_checkboxes[i]->setTristate(true);
        m_checkboxes[i]->setNoChange();


        connect(m_checkboxes[i], SIGNAL(stateChanged(int)), SLOT(valueChangedHandler()));
    }

    boxLayout->addWidget(hbox);
    boxLayout->addStretch(5);
}
Exemple #13
0
LCDRange::LCDRange( QWidget *parent, const char *name ): QWidget( parent, name )
{
	//QLCDNumber *lcd = new QLCDNumber( 2, this,  "lcd" );
	QLCDNumber *lcd = new QLCDNumber( 2 );
	lcd->setSegmentStyle(QLCDNumber::Filled);

	//slider = new QSlider( Horizontal, this, "slider" );
	slider = new QSlider( Horizontal);
	slider->setRange( 0, 99 );
	slider->setValue( 0 );

	//设置滑块为焦点代理。当想要给LCDRange一个键盘焦点,滑块就会注意到它。
	setFocusProxy( slider );

	//这里把slider的valueChanged信号分别连接到display和自定义的valueChanged上面
	connect( slider, SIGNAL(valueChanged(int)), lcd,
			SLOT(display(int)) );

	//这里两种方式实现信号的连接,利用标准信号发出自定义信号。
	//connect( slider, SIGNAL(valueChanged(int)),
	//		SIGNAL(valueChanged(int)) );
	connect( slider, SIGNAL(valueChanged(int)), this,
			SIGNAL(valueChanged(int)) );

	//这里利用另外的方式实现添加到VBox,而不用继承QVBox类
	Q3VBoxLayout *layout = new Q3VBoxLayout;
	layout->addWidget(lcd);
	layout->addWidget(slider);
	setLayout(layout);

}
Exemple #14
0
ConfigForm::ConfigForm(int aCurrentIntervalValue, QWidget *parent,
		       const char *name,
		       bool modal, Qt::WFlags f)
  : QDialog( parent, name, modal, f ),
    mApplyButton(kNULL), mCancelButton(kNULL)
{
  mMinVal_Sec = float(kMIN_POLLING_INT) / 1000.f;
  mMaxVal_Sec = float(kMAX_POLLING_INT) / 1000.f;

  REG_DBGMSG1("ARPDBG: min val = ", mMinVal_Sec);
  REG_DBGMSG1("ARPDBG: max val = ", mMaxVal_Sec);

  REG_DBGCON("ConfigForm");

  // note aCurrentIntervalValue is in milliseconds - convert to
  // seconds for GUI entry

  this->setCaption( "Configure Polling" );
  resize( 150, 150 );

  // create the layouts for the form
  Q3VBoxLayout *lFormLayout = new Q3VBoxLayout(this, 10, 10, "configformlayout");
  Q3HBoxLayout *lButtonLayout = new Q3HBoxLayout(6, "configbuttonlayout");

  lFormLayout->addWidget(new QLabel("Enter interval value (seconds) \n"
				    "Valid range: "
				    +QString::number(mMinVal_Sec)
				    +" - "+QString::number(mMaxVal_Sec)
				    +" (2 d.p.)", this));

  mLineEdit = new QLineEdit( this );

  double lVal = (double) aCurrentIntervalValue/1000;

  mLineEdit->setText(QString::number(lVal, 'g', 3));
  mLineEdit->setValidator( new QDoubleValidator(mLineEdit, "dbleavlidator" ) );

  lFormLayout->addWidget( mLineEdit);

  mApplyButton = new QPushButton("Apply", this, "Applybutton"); \
  mApplyButton->setAutoDefault(FALSE);
  QToolTip::add(mApplyButton, "Apply to steerer");
  connect(mApplyButton, SIGNAL(clicked()), this, SLOT(applySlot()));

  mCancelButton = new QPushButton("Cancel", this, "cancelbutton");
  mCancelButton->setAutoDefault(FALSE);
  connect(mCancelButton,  SIGNAL(clicked()), this, SLOT( reject()));

  mCancelButton->setMinimumSize(mCancelButton->sizeHint());
  mCancelButton->setMaximumSize(mCancelButton->sizeHint());
  mApplyButton->setMinimumSize(mCancelButton->sizeHint());
  mApplyButton->setMaximumSize(mApplyButton->sizeHint());

  lButtonLayout->addWidget(mApplyButton);
  lButtonLayout->addWidget(mCancelButton);

  lFormLayout->addLayout(lButtonLayout);

}
Exemple #15
0
KexiCSVInfoLabel::KexiCSVInfoLabel(const QString& labelText, QWidget* parent)
        : QWidget(parent)
{
    Q3VBoxLayout *vbox = new Q3VBoxLayout(this, 0, KDialog::spacingHint());
    Q3HBoxLayout *hbox = new Q3HBoxLayout(this);
    vbox->addLayout(hbox);
    m_leftLabel = new QLabel(labelText, this);
    m_leftLabel->setMinimumWidth(130);
    m_leftLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
    m_leftLabel->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
    m_leftLabel->setWordWrap(true);
    hbox->addWidget(m_leftLabel);
    m_iconLbl = new QLabel(this);
    m_iconLbl->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
    m_iconLbl->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
    m_fnameLbl = new QLabel(this);
    m_fnameLbl->setOpenExternalLinks(true);
    m_fnameLbl->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
    m_fnameLbl->setFocusPolicy(Qt::NoFocus);
    m_fnameLbl->setTextFormat(Qt::PlainText);
    m_fnameLbl->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding, 1, 0));
    m_fnameLbl->setLineWidth(1);
    m_fnameLbl->setFrameStyle(Q3Frame::Box);
    m_fnameLbl->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
    m_fnameLbl->setWordWrap(true);
    hbox->addSpacing(5);
    hbox->addWidget(m_iconLbl);
    hbox->addWidget(m_fnameLbl, 1, Qt::AlignVCenter | Qt::AlignLeft
#ifdef __GNUC__
#warning TODO | Qt::TextWordWrap
#else
#pragma WARNING( TODO | Qt::TextWordWrap )
#endif
                   );
    hbox->addSpacing(10);
    m_commentLbl = new QLabel(this);
    m_commentLbl->setOpenExternalLinks(true);
    m_commentLbl->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
    m_commentLbl->setFocusPolicy(Qt::NoFocus);
    m_commentLbl->setTextFormat(Qt::PlainText);
    m_commentLbl->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
    m_commentLbl->setLineWidth(1);
    m_commentLbl->setFrameStyle(QFrame::Box);
    m_commentLbl->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
    m_commentLbl->setWordWrap(true);
    hbox->addWidget(m_commentLbl, 0, Qt::AlignVCenter | Qt::AlignRight
#ifdef __GNUC__
#warning TODO | Qt::TextWordWrap
#else
#pragma WARNING( TODO | Qt::TextWordWrap )
#endif
                   );

    m_separator = new Q3Frame(this);
    m_separator->setFrameShape(Q3Frame::HLine);
    m_separator->setFrameShadow(Q3Frame::Sunken);
    vbox->addWidget(m_separator);
}
Exemple #16
0
AboutDialog::AboutDialog() : QDialog(0, "About DoUML", TRUE)
{
    setCaption(TR("About DoUML"));
    //move(p);

    Q3VBoxLayout * vbox = new Q3VBoxLayout(this);
    Q3HBoxLayout * hbox;

    vbox->setMargin(5);

    hbox = new Q3HBoxLayout(vbox);
    hbox->setMargin(5);

    QPixmap bp((const char **) bp_xpm);
    // QLabel * lbp = new QLabel(this);

    // lbp->setPixmap(bp);
    //  hbox->addWidget(lbp);
    hbox->addWidget(new QLabel("  ", this));
    // Replacing about to bouml-ng
    const char htmltext[] = "<p>DoUML</p>\n"
                            "<p>This project is a fork of\n"
                            "Bruno Pages's work, BoUML:\n"
                            "<i>http://sourceforge.net/projects/douml/</i></p>\n"
                            "<p>DoUML focus is to port BoUML to Qt4\n"
                            "and to maintain it as a community</p>\n"
                            "<p>Join us at:<br>\n"
                            "https://github.com/leonardo2d/douml/<br>\n"
                            "#[email protected]</p>\n\n\n";

    Q3TextView * tx =
        new Q3TextView(htmltext, QString(), this);
    QFont fnt = tx->font();

    fnt.setItalic(TRUE);

    QFontMetrics fm(fnt);

    tx->setVScrollBarMode(Q3ScrollView::AlwaysOff);
    tx->setHScrollBarMode(Q3ScrollView::AlwaysOff);
    tx->setMinimumSize(fm.size(0, htmltext));
    hbox->addWidget(tx);

    hbox = new Q3HBoxLayout(vbox);
    hbox->setMargin(5);
    QPushButton * ok = new QPushButton(TR("&OK"), this);

    ok->setDefault(TRUE);

    hbox->addWidget(new QLabel(this));
    hbox->addWidget(ok);
    hbox->addWidget(new QLabel(this));

    if (UmlDesktop::fixed())
        UmlDesktop::tocenter(this);

    connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
}
Exemple #17
0
Dialog::Dialog(BooL & rec, char & lang) : QDialog(0, 0, TRUE), _rec(rec), _lang(lang) {
  Q3VBoxLayout * vbox = new Q3VBoxLayout(this);
  Q3HBox * htab;
  
  vbox->setMargin(5);
  
  // recursive checkbox
  if (rec) {
    htab = new Q3HBox(this);
    htab->setMargin(5);
    vbox->addWidget(htab);
    
    rec_cb = new QCheckBox("Do recursively", htab);
  }
  else
    rec_cb = 0;

  // langs + cancel buttons
  
  htab = new Q3HBox(this);
  htab->setMargin(5);
  vbox->addWidget(htab);
  
  QPushButton * cpp = new QPushButton("&C++", htab);
  new QLabel(htab);
  QPushButton * java = new QPushButton("&Java", htab);
  new QLabel(htab);
  QPushButton * idl = new QPushButton("&Idl", htab);
  new QLabel(htab);
  QPushButton * php = new QPushButton("P&hp", htab);
  new QLabel(htab);
  QPushButton * python = new QPushButton("P&ython", htab);
  new QLabel(htab);
  QPushButton * cancel = new QPushButton("&Cancel", htab);
  new QLabel(htab);
  QSize bs(cancel->sizeHint());
  
  cpp->setFixedSize(bs);
  java->setFixedSize(bs);
  
  connect(cpp, SIGNAL(clicked()), this, SLOT(accept_cpp()));
  connect(java, SIGNAL(clicked()), this, SLOT(accept_java()));
  connect(idl, SIGNAL(clicked()), this, SLOT(accept_idl()));
  connect(php, SIGNAL(clicked()), this, SLOT(accept_php()));
  connect(python, SIGNAL(clicked()), this, SLOT(accept_python()));
  connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));

  // help
  
  htab = new Q3HBox(this);
  htab->setMargin(5);
  vbox->addWidget(htab);
  
  new QLabel(htab);
  new QLabel("Warning : reset the declarations/definitions to\n"
	     "their default value from the 'generation settings'", htab);
  new QLabel(htab);
}
Exemple #18
0
AboutDialog::AboutDialog() : QDialog(0, "About " PROJECT_NAME, TRUE) {
  setCaption(TR("About " PROJECT_NAME));
  //move(p);
  
  Q3VBoxLayout * vbox = new Q3VBoxLayout(this);  
  Q3HBoxLayout * hbox; 
  
  vbox->setMargin(5);
  
  hbox = new Q3HBoxLayout(vbox); 
  hbox->setMargin(5);

  QPixmap bp((const char **) bp_xpm);
  QLabel * lbp = new QLabel(this);
  
 // lbp->setPixmap(bp);
//  hbox->addWidget(lbp);
  hbox->addWidget(new QLabel("  ", this));

  QString htmltext;
  htmltext.sprintf("%s <b>%d.%d-%d</b> release <b>%s</b><br>\n"
                   "<br>\n"
                   "<i>%s</i><br>\n"
                   "<br>\n"
                   "%s (<i>%s</i>)",
    PROJECT_NAME, PROJECT_MAJOR, PROJECT_MINOR, PROJECT_REVISION, PROJECT_RELEASE,
    PROJECT_HOME, PROJECT_ADMIN, PROJECT_CONTACT);
                            
  Q3TextView * tx =
    new Q3TextView(htmltext, QString::null, this);
  QFont fnt = tx->font();
  
  fnt.setItalic(TRUE);
  
  QFontMetrics fm(fnt);
  
  tx->setVScrollBarMode(Q3ScrollView::AlwaysOff);
  tx->setHScrollBarMode(Q3ScrollView::AlwaysOff);
  tx->setMinimumSize(fm.size(0, htmltext));
  hbox->addWidget(tx);
  
  hbox = new Q3HBoxLayout(vbox); 
  hbox->setMargin(5);
  QPushButton * ok = new QPushButton(TR("&OK"), this);
  
  ok->setDefault( TRUE );
  
  hbox->addWidget(new QLabel(this));
  hbox->addWidget(ok);
  hbox->addWidget(new QLabel(this));
  
  if (UmlDesktop::fixed())
    UmlDesktop::tocenter(this);
  
  connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
}
FileListDialog::FileListDialog(QWidget* parent,
			       QString const& _dialogTitle,
			       QString const& _listTitle,
			       char const * _filters[]) :
  QDialog(parent, "FileListDialog", TRUE),       // TRUE = modal dialog
  list_(NULL),
  delButton_(NULL),
  fileDialog_(NULL),
  modified_(false)
{
  resize(300, 200);
  setCaption(_dialogTitle);

  Q3VBoxLayout * topBox = new Q3VBoxLayout(this, 0, -1, "boxLayout");

  Q3VGroupBox * fileBox = new Q3VGroupBox(this, "fileBox");
  list_ = new Q3ListBox(fileBox, "list");

  Q3HBox * fileButtonsBox = new Q3HBox(fileBox, "fileButtons");
  QPushButton * addButton = new QPushButton("Add...", fileButtonsBox);
  delButton_ = new QPushButton("Remove", fileButtonsBox);

  fileDialog_ = new Q3FileDialog(this, "config file dialog", TRUE);

  topBox->addSpacing(10);
  topBox->addWidget(fileBox);
  fileBox->setTitle(_listTitle);

  topBox->addSpacing(10);
  Q3HBoxLayout * dialogButtonsBox = new Q3HBoxLayout(topBox, -1, "hBoxLayout");
  QSpacerItem * dBSpace = new QSpacerItem(0, 0);
  QPushButton * okButton = new QPushButton("OK", this);
  QPushButton * cancelButton = new QPushButton("Cancel", this);
  
  topBox->addSpacing(5);
  dialogButtonsBox->addItem(dBSpace);
  dialogButtonsBox->addWidget(okButton);
  dialogButtonsBox->addSpacing(5);
  dialogButtonsBox->addWidget(cancelButton);
  dialogButtonsBox->addSpacing(5);
  
  okButton->setDefault(true);

  static const char * filters[3] = { "all files (*)", NULL };

  fileDialog_->setCaption("File open dialog");
  fileDialog_->setFilters((_filters == NULL)? filters : _filters);

  // connect the dialogs functionality  
  connect(okButton,     SIGNAL(clicked()), SLOT(accept()));
  connect(cancelButton, SIGNAL(clicked()), SLOT(reject()));
  connect(addButton,    SIGNAL(clicked()), SLOT(add()));
  connect(delButton_,   SIGNAL(clicked()), SLOT(del()));

  selectListItem();
}
Exemple #20
0
XListDialog::XListDialog( QWidget* parent, const char* name, bool modal, Qt::WFlags fl ) :
  QDialog( parent, name, modal, fl )
{
  if ( !name )
    setName( "XListDialog" );

  Q3VBoxLayout * XListDialogLayout = new Q3VBoxLayout( this, 11, 6, "XListDialogLayout"); 

  Q3HBoxLayout * layout13 = new Q3HBoxLayout( 0, 0, 6, "layout13"); 

  _altFrame = new Q3Frame( this, "_altFrame" );
  _altFrame->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)1, 0, 0, _altFrame->sizePolicy().hasHeightForWidth() ) );
  _altFrame->setFrameShape( Q3Frame::NoFrame );
  _altFrame->setFrameShadow( Q3Frame::Raised );
  layout13->addWidget( _altFrame );

  Q3VBoxLayout * layout12 = new Q3VBoxLayout( 0, 0, 6, "layout12"); 

  _close = new QPushButton( tr( "&Close" ), this, "_close" );
  _close->setAccel( QKeySequence( tr( "Alt+C" ) ) );
  layout12->addWidget( _close );

  _select = new QPushButton( tr( "&Select" ), this, "_select" );
  _select->setAccel( QKeySequence( tr( "Alt+S" ) ) );
  _select->setEnabled(FALSE);
  layout12->addWidget( _select );
  QSpacerItem* spacer = new QSpacerItem( 20, 0, QSizePolicy::Minimum, QSizePolicy::Minimum );
  layout12->addItem( spacer );
  layout13->addLayout( layout12 );
  XListDialogLayout->addLayout( layout13 );

  _listLabel = new QLabel( tr( "List:" ), this, "_listLabel" );
  XListDialogLayout->addWidget( _listLabel );

  _list = new XListView( this, "_list" );
  XListDialogLayout->addWidget( _list );

  setCaption( tr( "XListDialog" ) );
  resize( QSize(420, 380).expandedTo(minimumSizeHint()) );
  //clearWState( WState_Polished );

  setTabOrder(_list, _select);
  setTabOrder(_select, _close);
  setTabOrder(_close, _list);
  _select->setFocus();

  // signals and slots connections
  connect( _close,  SIGNAL( clicked() ), this, SLOT( sClose() ) );
  connect( _select, SIGNAL( clicked() ), this, SLOT( sSelect() ) );
  connect( _list,   SIGNAL( itemSelected(int) ), _select, SLOT( animateClick() ) );
  connect( _list,   SIGNAL( valid(bool) ), _select, SLOT( setEnabled(bool) ) );
}
Exemple #21
0
//===========================================================
//
void ImportWizard::setupImportType()
{
    m_importTypePage = new QWidget(this);
    Q3VBoxLayout *vbox = new Q3VBoxLayout(m_importTypePage, KDialog::marginHint());
    m_importTypeButtonGroup = new Q3VButtonGroup(m_importTypePage);
    m_importTypeButtonGroup->setLineWidth(0);
    vbox->addWidget(m_importTypeButtonGroup);

    (void)new QRadioButton(i18n("Structure and data"), m_importTypeButtonGroup);
    (void)new QRadioButton(i18n("Structure only"), m_importTypeButtonGroup);

    m_importTypeButtonGroup->setExclusive(true);
    m_importTypeButtonGroup->setButton(0);
    addPage(m_importTypePage, i18n("Select Type of Import"));
}
void Preferences::createColorPage()
{
  // colors parms page

  QWidget *w = new QWidget(this);
  Q3VBoxLayout *vbox = new Q3VBoxLayout(w);

  Q3GridLayout *grid = new Q3GridLayout(vbox, 1, 3);
  grid->setMargin(5);
  grid->setSpacing(5);
  grid->setColStretch(1, 1);
  grid->setColStretch(2, 2);

  vbox->insertStretch(-1, 1);

  // background color
  QLabel *label = new QLabel(tr("Chart Background"), w);
  grid->addWidget(label, 0, 0);

  backgroundColorButton = new ColorButton(w, backgroundColor);
  grid->addWidget(backgroundColorButton, 0, 1);
  backgroundColorButton->setColorButton();
  connect(backgroundColorButton, SIGNAL(valueChanged()), this, SLOT(slotModified()));

  // border color
  label = new QLabel(tr("Chart Border"), w);
  grid->addWidget(label, 1, 0);

  borderColorButton = new ColorButton(w, borderColor);
  grid->addWidget(borderColorButton, 1, 1);
  borderColorButton->setColorButton();
  connect(borderColorButton, SIGNAL(valueChanged()), this, SLOT(slotModified()));

  // grid color
  label = new QLabel(tr("Chart Grid"), w);
  grid->addWidget(label, 2, 0);

  gridColorButton = new ColorButton(w, gridColor);
  grid->addWidget(gridColorButton, 2, 1);
  gridColorButton->setColorButton();
  connect(gridColorButton, SIGNAL(valueChanged()), this, SLOT(slotModified()));

  //FIXME: add adjustment possibility for prefered CO-colors.
  // in this way to add a spinbox to set the amount of colors too

  addTab(w, tr("Colors"));
}
Exemple #23
0
ReferenceDialog::ReferenceDialog(BrowserNode * bn)
    : QDialog(0, "Referenced By dialog", FALSE, Qt::WDestructiveClose)
{
    the = this;
    target = bn;

    setCaption(TR("Referenced By dialog"));

    Q3VBoxLayout * vbox = new Q3VBoxLayout(this);

    vbox->setMargin(5);

    QString s = target->get_name();

    s += TR(" is referenced by :");

    vbox->addWidget(new QLabel(s, this));

    results = new Q3ComboBox(FALSE, this);
    vbox->addWidget(results);

    Q3HBoxLayout * hbox = new Q3HBoxLayout(vbox);
    QPushButton * search_b = new QPushButton(TR("Recompute"), this);
    QPushButton * close_b = new QPushButton(TR("Close"), this);

    hbox->setMargin(5);
    hbox->addWidget(search_b);
    hbox->addWidget(select_b = new QPushButton(TR("Select"), this));
    hbox->addWidget(mark_unmark_b = new QPushButton(TR("Unmark"), this));
    hbox->addWidget(mark_them_b = new QPushButton(TR("Mark them"), this));
    hbox->addWidget(unmark_all_b = new QPushButton(TR("Unmark all"), this));
    hbox->addWidget(close_b);

    search_b->setDefault(TRUE);

    connect(search_b, SIGNAL(clicked()), this, SLOT(compute()));
    connect(select_b, SIGNAL(clicked()), this, SLOT(select()));
    connect(close_b, SIGNAL(clicked()), this, SLOT(reject()));
    connect(mark_unmark_b, SIGNAL(clicked()), this, SLOT(mark_unmark()));
    connect(mark_them_b, SIGNAL(clicked()), this, SLOT(mark_them()));
    connect(unmark_all_b, SIGNAL(clicked()), this, SLOT(unmark_all()));
    connect(results, SIGNAL(activated(int)), this, SLOT(selected(int)));

    compute();

    open_dialog(this);
}
Exemple #24
0
BrowserSearchDialog::BrowserSearchDialog(const QPoint & p)
    : QDialog(0, "Browser search", TRUE) {
  setCaption("Browser search");
  move(p);
  
  Q3VBoxLayout * vbox = new Q3VBoxLayout(this);  
  
  vbox->setMargin(5);
  
  Q3GridLayout * gl = new Q3GridLayout(vbox, 4, 2, 5/*space*/);

  ed = new QLineEdit(this);
  ed->setText(saved_ed);
  gl->addWidget(new QLabel("Containing", this), 1, 0, Qt::AlignLeft);
  gl->addWidget(ed, 1, 1);
  
  Q3GroupBox * gb = new Q3GroupBox(2, Qt::Horizontal, this);

  case_sensitive = new QCheckBox("case sensitive", gb);
  case_sensitive->setChecked(saved_case_sensitive);
  
  gl->addWidget(gb, 2, 1);

  gl->addWidget(new QLabel("Result", this), 3, 0, Qt::AlignLeft);
  results = new Q3ComboBox(FALSE, this);
  gl->addWidget(results, 3, 1);

  Q3HBoxLayout * hbox = new Q3HBoxLayout(vbox); 
  hbox->setMargin(5);
  QPushButton * search_b = new QPushButton("Search", this);
  QPushButton * select_b = new QPushButton("Select", this);
  QPushButton * close_b = new QPushButton("Close", this);
  
  search_b->setDefault(TRUE);
  
  hbox->addWidget(search_b);
  hbox->addWidget(select_b);
  hbox->addWidget(close_b);
  
  connect(search_b, SIGNAL(clicked()), this, SLOT(search()));
  connect(select_b, SIGNAL(clicked()), this, SLOT(select()));
  connect(close_b, SIGNAL(clicked()), this, SLOT(reject()));
  
  setMaximumHeight(sizeHint().height());
}
Exemple #25
0
ClassSettingsDialog::ClassSettingsDialog(ClassSettings * se, bool nodefault)
    : QDialog(0, "Class Settings dialog", TRUE), settings(se) {
  setCaption(TR("Class Settings dialog"));
  
  Q3VBoxLayout * vbox = new Q3VBoxLayout(this);  
  Q3HBoxLayout * hbox;
  QString s;
  
  vbox->setMargin(5);
  
  hbox = new Q3HBoxLayout(vbox); 
  hbox->setMargin(5);
  hbox->addWidget(new QLabel(TR("default attributes visibility : "), this), 1000);
  cbattribute = new ComboVisibility(this, settings->attribute_visibility, nodefault);
  hbox->addWidget(cbattribute);

  hbox = new Q3HBoxLayout(vbox); 
  hbox->setMargin(5);
  hbox->addWidget(new QLabel(TR("default relations visibility : "), this), 1000);
  cbrelation = new ComboVisibility(this, settings->relation_visibility, nodefault);
  hbox->addWidget(cbrelation);

  hbox = new Q3HBoxLayout(vbox); 
  hbox->setMargin(5);
  hbox->addWidget(new QLabel(TR("default operations visibility : "), this), 1000);
  cboperation = new ComboVisibility(this, settings->operation_visibility, nodefault);
  hbox->addWidget(cboperation);

  hbox = new Q3HBoxLayout(vbox); 
  hbox->setMargin(5);
  QPushButton * accept = new QPushButton(TR("&OK"), this);
  QPushButton * cancel = new QPushButton(TR("&Cancel"), this);
  QSize bs(cancel->sizeHint());
  
  accept->setDefault(TRUE);  
  accept->setFixedSize(bs);
  cancel->setFixedSize(bs);
  
  hbox->addWidget(accept);
  hbox->addWidget(cancel);
    
  connect(accept, SIGNAL(clicked()), this, SLOT(accept()));
  connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));
}
ScannerPage::ScannerPage (QWidget *w, DBIndex *i) : QWidget (w)
{
  chartIndex = i;
  idir.setFilter(QDir::Files);

  Q3VBoxLayout *vbox = new Q3VBoxLayout(this);
  vbox->setMargin(0);
  vbox->setSpacing(5);

  search = new QLineEdit(this);
  search->setText("*");
  connect(search, SIGNAL(textChanged(const QString &)), this, SLOT(searchChanged(const QString &)));
  QToolTip::add(search, tr("List Filter, e.g. s* or sb*"));
  vbox->addWidget(search);

  list = new Q3ListBox(this);
  connect(list, SIGNAL(contextMenuRequested(Q3ListBoxItem *, const QPoint &)), this,
          SLOT(rightClick(Q3ListBoxItem *)));
  connect(list, SIGNAL(highlighted(const QString &)), this, SLOT(scannerSelected(const QString &)));
  connect(list, SIGNAL(doubleClicked(Q3ListBoxItem *)), this, SLOT(doubleClick(Q3ListBoxItem *)));
  vbox->addWidget(list);

  menu = new QMenu(this);
  menu->insertItem(QPixmap(newchart), tr("&New Scanner		Ctrl+N"), this, SLOT(newScanner()));
  menu->insertItem(QPixmap(openitem), tr("&Open Scanner		Ctrl+O"), this, SLOT(openScanner()));
  menu->insertItem(QPixmap(deleteitem), tr("&Delete Scanner	Ctrl+D"), this, SLOT(deleteScanner()));
  menu->insertItem(QPixmap(renameitem), tr("&Rename Scanner		Ctrl+R"), this, SLOT(renameScanner()));
  menu->insertItem(QPixmap(macro), tr("R&un Scanner		Ctrl+U"), this, SLOT(runScanner()));
  menu->insertSeparator(-1);
  menu->insertItem(QPixmap(help), tr("&Help		Ctrl+H"), this, SLOT(slotHelp()));

  Q3Accel *a = new Q3Accel(this);
  connect(a, SIGNAL(activated(int)), this, SLOT(slotAccel(int)));
  a->insertItem(Qt::CTRL+Qt::Key_N, NewScanner);
  a->insertItem(Qt::CTRL+Qt::Key_O, OpenScanner);
  a->insertItem(Qt::CTRL+Qt::Key_D, DeleteScanner);
  a->insertItem(Qt::CTRL+Qt::Key_R, RenameScanner);
  a->insertItem(Qt::CTRL+Qt::Key_U, RunScanner);
  a->insertItem(Qt::CTRL+Qt::Key_H, Help);

  refreshList();
  scannerSelected(QString());
}
Exemple #27
0
//===========================================================
//
void ImportWizard::setupFinish()
{
    m_finishPage = new QWidget(this);
    m_finishPage->hide();
    Q3VBoxLayout *vbox = new Q3VBoxLayout(m_finishPage, KDialog::marginHint());
    m_finishLbl = new QLabel(m_finishPage);
    m_finishLbl->setAlignment(Qt::AlignTop | Qt::AlignLeft);
    m_finishLbl->setWordWrap(true);

    vbox->addWidget(m_finishLbl);
    m_openImportedProjectCheckBox = new QCheckBox(i18n("Open imported project"),
            m_finishPage);
    m_openImportedProjectCheckBox->setChecked(true);
    vbox->addSpacing(KDialog::spacingHint());
    vbox->addWidget(m_openImportedProjectCheckBox);
    vbox->addStretch(1);

    addPage(m_finishPage, i18n("Success"));
}
Exemple #28
0
OperationListDialog::OperationListDialog(const char * m,
					 Q3PtrList<BrowserOperation> & l)
    : QDialog(0, m, TRUE) {
  setCaption(m);
  move(QCursor::pos());
 
  Q3VBoxLayout * vbox = new Q3VBoxLayout(this);
  Q3HBoxLayout * hbox;
 
  vbox->setMargin(5);
 
  cb = new Q3ComboBox(FALSE, this);
  vbox->addWidget(cb);
  
  for (BrowserOperation * oper = l.first(); oper; oper = l.next()) {
    QString s = ((BrowserNode *) oper->parent())->get_name() +
      QString("::") + oper->get_data()->definition(TRUE, FALSE);
    
    if (((OperationData *) oper->get_data())->get_is_abstract())
      cb->insertItem("[a] " + s);
    else
      cb->insertItem(s);
  }
  
  hbox = new Q3HBoxLayout(vbox); 
  hbox->setMargin(5);
  QPushButton * ok = new QPushButton(TR("&OK"), this);
  QPushButton * cancel = new QPushButton(TR("&Cancel"), this);
  QSize bs(cancel->sizeHint());
  
  ok->setDefault(TRUE);
  ok->setFixedSize(bs);
  cancel->setFixedSize(bs);
  
  hbox->addWidget(ok);
  hbox->addWidget(cancel);

  UmlDesktop::limitsize_center(this, previous_size, 0.8, 0.8);
  
  connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
  connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));
}
Exemple #29
0
void ImportWizard::arriveSrcDBPage()
{
    if (fileBasedSrcSelected()) {
        //! @todo Back button doesn't work after selecting a file to import
        //moved showPage(m_dstTypePage);
    } else if (!m_srcDBName) {
        m_srcDBPage->hide();
        kDebug() << "Looks like we need a project selector widget!";

        KexiDB::ConnectionData* condata = m_srcConn->selectedConnectionData();
        if (condata) {
            m_prjSet = new KexiProjectSet(*condata);
            Q3VBoxLayout *vbox = new Q3VBoxLayout(m_srcDBPage, KDialog::marginHint());
            m_srcDBName = new KexiProjectSelectorWidget(m_srcDBPage, m_prjSet);
            vbox->addWidget(m_srcDBName);
            m_srcDBName->label()->setText(i18n("Select source database you wish to import:"));
        }
        m_srcDBPage->show();
    }
}
Exemple #30
0
F4lmView::F4lmView (F4lmDoc * pDoc, QWidget * parent, const char *name, Qt::WindowFlags wflags)
    :QWidget (parent, name, wflags) {
    setName ("F4lmView");
    dad = (F4lmApp *) parentWidget ()->parent ()->parent ();
    doc = pDoc;
    resize (700, 600);
    setIcon (QPixmap ((const char **) main_doc_ico_xpm));
    layerNum = 1;
    defSceneHeight = 440;
    defSceneWidth = 550;
    defSceneRect = QRect (600, 600, defSceneWidth, defSceneHeight);
    Q3VBoxLayout * topLayout = new Q3VBoxLayout (this);
    
	CLayer * layer1 = new CLayer (this, "layer 1");
    mainCanvas = new CCanvas (this, "mc");
    CSceneRect * defrect = new CSceneRect (defSceneRect, mainCanvas);
    defrect->setBrush (QColor (255, 255, 255));
    defrect->setZ (1<<31);//smallest integer.....
	//qDebug("%d",1<<31);
    defrect->show ();
    mainCanvas->resize (defSceneWidth + defSceneWidth + 600,defSceneHeight + defSceneHeight + 600);
    mainCanvas->setBackgroundColor (QColor (208, 208, 208));
    
	doc->pLayerList->append (layer1);
    canvasViewer = new canview (mainCanvas, this, "Canvas viewer");
    
    canvasViewer->scrollBy (550, 550);
    topLayout->addWidget (canvasViewer);
    
    defObjID = 0;
    //this means first color for drawing is black
    defObjCOLOR = QColor (0, 0, 0);
    //qDebug(QString::number(defObjCOLOR.red()));
    /*boundaries=new QValueVector<canvasBoundaries>();
       canvasBoundaries tcanvb;
       tcanvb.canvasLimitsForTable[0][0]=layerNum;
       tcanvb.canvasLimitsForTable[0][1]=0;
       tcanvb.canvasLimitsForTable[0][2]=0;
       boundaries->push_back(tcanvb); */

}