当前位置: 首页>>代码示例>>C++>>正文


C++ QLabel::setWhatsThis方法代码示例

本文整理汇总了C++中QLabel::setWhatsThis方法的典型用法代码示例。如果您正苦于以下问题:C++ QLabel::setWhatsThis方法的具体用法?C++ QLabel::setWhatsThis怎么用?C++ QLabel::setWhatsThis使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QLabel的用法示例。


在下文中一共展示了QLabel::setWhatsThis方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: QWidget

NHypersurfaceCreator::NHypersurfaceCreator() {
    // Set up the basic layout.
    ui = new QWidget();
    QBoxLayout* layout = new QVBoxLayout(ui);

    QBoxLayout* coordArea = new QHBoxLayout();
    layout->addLayout(coordArea);
    QString expln = ui->tr("Specifies the coordinate system in which the "
        "normal hypersurfaces will be enumerated.");
    QLabel* label = new QLabel(ui->tr("Coordinate system:"), ui);
    label->setWhatsThis(expln);
    coordArea->addWidget(label);
    coords = new HyperCoordinateChooser();
    coords->insertAllCreators();
    coords->setCurrentSystem(
        ReginaPrefSet::global().hypersurfacesCreationCoords);
    coords->setWhatsThis(expln);
    coordArea->addWidget(coords, 1);

    QBoxLayout* basisArea = new QHBoxLayout();
    layout->addLayout(basisArea);
    expln = ui->tr("<qt>Specifies whether to enumerate only "
        "vertex hypersurfaces (at extremal rays of the normal hypersurface "
        "solution cone), or all fundamental surfaces (which form a Hilbert "
        "basis for the solution cone).<p>Fundamental surfaces are "
        "more numerous, and can be significantly slower to enumerate.</qt>");
    label = new QLabel(ui->tr("Enumerate:"), ui);
    label->setWhatsThis(expln);
    basisArea->addWidget(label);
    basis = new QComboBox(ui);
    // These insertions MUST happen in the same order in which the
    // BASIS_... constants are defined at the top of this file.
    basis->insertItem(BASIS_VERTEX, ui->tr("Vertex hypersurfaces"));
    basis->insertItem(BASIS_FUND, ui->tr("Fundamental hypersurfaces"));
    basis->setCurrentIndex(
        ReginaPrefSet::global().hypersurfacesCreationList.has(
        regina::HS_FUNDAMENTAL) ? BASIS_FUND : BASIS_VERTEX);
    basis->setWhatsThis(expln);
    basisArea->addWidget(basis, 1);

    embedded = new QCheckBox(ui->tr("Embedded hypersurfaces only"), ui);
    embedded->setChecked(
        ! ReginaPrefSet::global().hypersurfacesCreationList.has(
        regina::HS_IMMERSED_SINGULAR));
    embedded->setWhatsThis(ui->tr("Specifies whether only embedded "
        "normal hypersurfaces should be enumerated, or whether all normal "
        "hypersurfaces (embedded, immersed and singular) should be "
        "enumerated."));
    layout->addWidget(embedded);
}
开发者ID:WPettersson,项目名称:regina,代码行数:50,代码来源:nhypersurfacecreator.cpp

示例2: UI

        explicit UI( DeleteCertificatesDialog * qq )
            : selectedLB( i18n( "These are the certificates you have selected for deletion:" ), qq ),
              selectedKTV( qq ),
              unselectedLB( i18n("These certificates will be deleted even though you did <emphasis>not</emphasis><nl/> "
                                 "explicitly select them (<a href=\"whatsthis://\">Why?</a>):"), qq ),
              unselectedKTV( qq ),
              buttonBox( QDialogButtonBox::Ok|QDialogButtonBox::Cancel ),
              vlay( qq )
        {
            KDAB_SET_OBJECT_NAME( selectedLB );
            KDAB_SET_OBJECT_NAME( selectedKTV );
            KDAB_SET_OBJECT_NAME( unselectedLB );
            KDAB_SET_OBJECT_NAME( unselectedKTV );
            KDAB_SET_OBJECT_NAME( buttonBox );
            KDAB_SET_OBJECT_NAME( vlay );

            vlay.addWidget( &selectedLB );
            vlay.addWidget( &selectedKTV, 1 );
            vlay.addWidget( &unselectedLB );
            vlay.addWidget( &unselectedKTV, 1 );
            vlay.addWidget( &buttonBox );

            const QString unselectedWhatsThis
                = i18nc( "@info:whatsthis",
                         "<title>Why do you want to delete more certificates than I selected?</title>"
                         "<para>When you delete CA certificates (both root CAs and intermediate CAs), "
                         "the certificates issued by them will also be deleted.</para>"
                         "<para>This can be nicely seen in <application>Kleopatra</application>'s "
                         "hierarchical view mode: In this mode, if you delete a certificate that has "
                         "children, those children will also be deleted. Think of CA certificates as "
                         "folders containing other certificates: When you delete the folder, you "
                         "delete its contents, too.</para>" );

            unselectedLB.setWhatsThis( unselectedWhatsThis );
            unselectedKTV.setWhatsThis( unselectedWhatsThis );

            buttonBox.button( QDialogButtonBox::Ok )->setText( i18nc("@action:button","Delete") );

            connect( &unselectedLB, SIGNAL(linkActivated(QString)), qq, SLOT(slotWhatsThisRequested()) );

            selectedKTV.setFlatModel( AbstractKeyListModel::createFlatKeyListModel( &selectedKTV ) );
            unselectedKTV.setFlatModel( AbstractKeyListModel::createFlatKeyListModel( &unselectedKTV ) );

            selectedKTV.setHierarchicalView( false );
            selectedKTV.view()->setSelectionMode( QAbstractItemView::NoSelection );
            unselectedKTV.setHierarchicalView( false );
            unselectedKTV.view()->setSelectionMode( QAbstractItemView::NoSelection );

            connect( &buttonBox, SIGNAL(accepted()), qq, SLOT(accept()) );
            connect( &buttonBox, SIGNAL(rejected()), qq, SLOT(reject()) );
        }
开发者ID:chusopr,项目名称:kdepim-ktimetracker-akonadi,代码行数:51,代码来源:deletecertificatesdialog.cpp

示例3: addFormatTab

void DiffPage::addFormatTab()
{
	QWidget* page   = new QWidget( this );
	QVBoxLayout* layout = new QVBoxLayout( page );
	layout->setSpacing( KDialog::spacingHint() );
	layout->setMargin( KDialog::marginHint() );

	// add diff modes
	m_modeButtonGroup = new QButtonGroup( page );
        QGroupBox *box = new QGroupBox( page );
	box->setWhatsThis( i18n( "Select the format of the output generated by diff. Unified is the one that is used most frequently because it is very readable. The KDE developers like this format the best so use it for sending patches." ) );
	layout->addWidget( box );
	QVBoxLayout* bgLayout = new QVBoxLayout( box );
	box->setTitle( i18n( "Output Format" ) );
	//m_modeButtonGroup->setMargin( KDialog::marginHint() );

        QRadioButton *radioButton = new QRadioButton( i18n( "Context" ), box );
        m_modeButtonGroup->addButton( radioButton, Kompare::Context);
	bgLayout->addWidget( radioButton );
        radioButton = new QRadioButton( i18n( "Normal" ),  box );
        m_modeButtonGroup->addButton( radioButton, Kompare::Normal);
        bgLayout->addWidget( radioButton );
        radioButton =  new QRadioButton( i18n( "Unified" ), box );
        m_modeButtonGroup->addButton( radioButton, Kompare::Unified);
        bgLayout->addWidget( radioButton );

	// #lines of context (loc)
	QGroupBox* groupBox = new QGroupBox( page );
        QHBoxLayout *groupLayout = new QHBoxLayout;
        groupBox->setLayout( groupLayout );
	layout->addWidget( groupBox );
	groupBox->setTitle( i18n( "Lines of Context" ) );
	groupBox->setWhatsThis( i18n( "The number of context lines is normally 2 or 3. This makes the diff readable and applicable in most cases. More than 3 lines will only bloat the diff unnecessarily." ) );
	//groupBox->setMargin( KDialog::marginHint() );

	QLabel* label = new QLabel( i18n( "Number of context lines:" ));
        groupLayout->addWidget( label );
	label->setWhatsThis( i18n( "The number of context lines is normally 2 or 3. This makes the diff readable and applicable in most cases. More than 3 lines will only bloat the diff unnecessarily." ) );
	m_locSpinBox = new QSpinBox( groupBox );
	m_locSpinBox->setRange( 0, 100 );
	groupLayout->addWidget( m_locSpinBox );
	m_locSpinBox->setWhatsThis( i18n( "The number of context lines is normally 2 or 3. This makes the diff readable and applicable in most cases. More than 3 lines will only bloat the diff unnecessarily." ) );
	label->setBuddy( m_locSpinBox );

	layout->addStretch( 1 );
	page->setMinimumSize( sizeHintForWidget( page ) );

	m_tabWidget->addTab( page, i18n( "Format" ) );
}
开发者ID:ShermanHuang,项目名称:kdesdk,代码行数:49,代码来源:diffpage.cpp

示例4: QWidget

Settings::FileVersionDetectionPage::FileVersionDetectionPage( QWidget* parent )
    : QWidget( parent )
{
    QVBoxLayout* topLayout = new QVBoxLayout( this );
    QString txt;

    // General file searching
    {
        QGroupBox* generalBox = new QGroupBox( i18n("New File Searches"), this );
        topLayout->addWidget( generalBox );
        QVBoxLayout* layout = new QVBoxLayout(generalBox);

        // Search for images on startup
        m_searchForImagesOnStart = new QCheckBox( i18n("Search for new images and videos on startup"), generalBox );
        layout->addWidget(m_searchForImagesOnStart);

        m_ignoreFileExtension = new QCheckBox( i18n("Ignore file extensions when searching for new images and videos"), generalBox);
        layout->addWidget(m_ignoreFileExtension);

        m_skipSymlinks = new QCheckBox( i18n("Skip symbolic links when searching for new images"), generalBox );
        layout->addWidget(m_skipSymlinks);

        m_skipRawIfOtherMatches = new QCheckBox( i18n("Do not read RAW files if a matching JPEG/TIFF file exists"), generalBox );
        layout->addWidget(m_skipRawIfOtherMatches);

        // Exclude directories from search
        QLabel* excludeDirectoriesLabel = new QLabel( i18n("Directories to exclude from new file search:" ), generalBox );
        layout->addWidget(excludeDirectoriesLabel);

        m_excludeDirectories = new QLineEdit( generalBox );
        layout->addWidget(m_excludeDirectories);
        excludeDirectoriesLabel->setBuddy( m_excludeDirectories );

        txt = i18n( "<p>KPhotoAlbum is capable of searching for new images and videos when started, this does, "
                    "however, take some time, so instead you may wish to manually tell KPhotoAlbum to search for new images "
                    "using <b>Maintenance->Rescan for new images</b></p>");
        m_searchForImagesOnStart->setWhatsThis( txt );

        txt = i18n( "<p>KPhotoAlbum will normally search new images and videos by their file extension. "
                    "If this option is set, <em>all</em> files neither in the database nor in the block list "
                    "will be checked by their Mime type, regardless of their extension. This will take "
                    "significantly longer than finding files by extension!</p>");
        m_ignoreFileExtension->setWhatsThis( txt );

        txt = i18n( "<p>KPhotoAlbum attempts to read all image files whether actual files or symbolic links. If you "
                    "wish to ignore symbolic links, check this option. This is useful if for some reason you have e.g. "
                    "both the original files and symbolic links to these files within your image directory.</p>");
        m_skipSymlinks->setWhatsThis( txt );

        txt = i18n( "<p>KPhotoAlbum is capable of reading certain kinds of RAW images. "
                    "Some cameras store both a RAW image and a matching JPEG or TIFF image. "
                    "This causes duplicate images to be stored in KPhotoAlbum, which may be undesirable. "
                    "If this option is checked, KPhotoAlbum will not read RAW files for which matching image files also exist.</p>");
        m_skipRawIfOtherMatches->setWhatsThis( txt );

        txt = i18n( "<p>Directories defined here (separated by comma <tt>,</tt>) are "
                    "skipped when searching for new photos. Thumbnail directories of different "
                    "tools should be configured here. E.g. <tt>xml,ThumbNails,.thumbs,.thumbnails</tt>.</p>" );
        excludeDirectoriesLabel->setWhatsThis( txt );

    }

    // Original/Modified File Support
    {
        QGroupBox* modifiedBox = new QGroupBox( i18n("File Version Detection Settings"), this );
        topLayout->addWidget( modifiedBox );
        QVBoxLayout* layout = new QVBoxLayout(modifiedBox);

        m_detectModifiedFiles = new QCheckBox(i18n("Try to detect multiple versions of files"), modifiedBox);
        layout->addWidget(m_detectModifiedFiles);

        QLabel* modifiedFileComponentLabel = new QLabel( i18n("File versions search regexp:" ), modifiedBox );
        layout->addWidget(modifiedFileComponentLabel);

        m_modifiedFileComponent = new QLineEdit(modifiedBox);
        layout->addWidget(m_modifiedFileComponent);

        QLabel* originalFileComponentLabel = new QLabel( i18n("Original file replacement text:" ), modifiedBox );
        layout->addWidget(originalFileComponentLabel);

        m_originalFileComponent = new QLineEdit(modifiedBox);
        layout->addWidget(m_originalFileComponent);

        m_moveOriginalContents = new QCheckBox(i18n("Move meta-data (i.e. delete tags from the original):"), modifiedBox);
        layout->addWidget(m_moveOriginalContents);

        m_autoStackNewFiles = new QCheckBox(i18n("Automatically stack new versions of images"), modifiedBox);
        layout->addWidget(m_autoStackNewFiles);

        txt = i18n( "<p>When KPhotoAlbum searches for new files and finds a file that matches the "
                    "<i>modified file search regexp</i> it is assumed that an original version of "
                    "the image may exist. The regexp pattern will be replaced with the <i>original "
                    "file replacement text</i> and if that file exists, all associated metadata (category "
                    "information, ratings, etc) will be copied or moved from the original file to the new one.</p>");
        m_detectModifiedFiles->setWhatsThis( txt );

        txt = i18n( "<p>A perl regular expression that should match a modified file. "
                    "<ul><li>A dot matches a single character (<tt>\\.</tt> matches a dot)</li> "
                    "  <li>You can use the quantifiers <tt>*</tt>,<tt>+</tt>,<tt>?</tt>, or you can "
                    "    match multiple occurrences of an expression by using curly brackets (e.g. "
//.........这里部分代码省略.........
开发者ID:KDE,项目名称:kphotoalbum,代码行数:101,代码来源:FileVersionDetectionPage.cpp

示例5: QWidget

Settings::ViewerPage::ViewerPage( QWidget* parent )
    : QWidget( parent )
{
    QVBoxLayout* lay1 = new QVBoxLayout( this );

    _slideShowSetup = new ViewerSizeConfig( i18n( "Running Slide Show From Thumbnail View" ), this );
    lay1->addWidget( _slideShowSetup );

    _viewImageSetup = new ViewerSizeConfig( i18n( "Viewing Images and Videos From Thumbnail View" ), this );
    lay1->addWidget( _viewImageSetup );

    QGridLayout* glay = new QGridLayout;
    lay1->addLayout( glay );

    QLabel* label = new QLabel( i18n("Slideshow interval:" ), this );
    glay->addWidget( label, 0, 0 );

    _slideShowInterval = new QSpinBox;
    _slideShowInterval->setRange( 1, INT_MAX );
    glay->addWidget( _slideShowInterval, 0, 1 );
    _slideShowInterval->setSuffix( i18n( " sec" ) );
    label->setBuddy( _slideShowInterval );

    label = new QLabel( i18n("Image cache:"), this );
    glay->addWidget( label, 1, 0 );

    _cacheSize = new QSpinBox;
    _cacheSize->setRange( 0, 4096 );
    _cacheSize->setSingleStep( 10 );
    _cacheSize->setSuffix( i18n(" Mbytes") );
    glay->addWidget( _cacheSize, 1, 1 );
    label->setBuddy( _cacheSize );

    QString txt;

    QLabel* standardSizeLabel = new QLabel( i18n("Standard size in viewer:"), this );
    _viewerStandardSize = new KComboBox( this );
    _viewerStandardSize->addItems( QStringList() << i18n("Full Viewer Size") << i18n("Natural Image Size") << i18n("Natural Image Size If Possible") );
    glay->addWidget( standardSizeLabel, 2, 0);
    glay->addWidget( _viewerStandardSize, 2, 1 );
    standardSizeLabel->setBuddy( _viewerStandardSize );

    txt = i18n("<p>Set the standard size for images to be displayed in the viewer.</p> "
           "<p><b>Full Viewer Size</b> indicates that the image will be stretched or shrunk to fill the viewer window.</p> "
           "<p><b>Natural Image Size</b> indicates that the image will be displayed pixel for pixel.</p> "
           "<p><b>Natural Image Size If Possible</b> indicates that the image will be displayed pixel for pixel if it would fit the window, "
           "otherwise it will be shrunk to fit the viewer.</p>");
    _viewerStandardSize->setWhatsThis( txt);

    QLabel* scalingLabel = new QLabel( i18n("Scaling Algorithm"), this );
    _smoothScale = new KComboBox( this );
    _smoothScale->addItems( QStringList() << i18n("Fastest" ) << i18n("Best")  );
    scalingLabel->setBuddy( _smoothScale );

    glay->addWidget( scalingLabel, 3, 0 );
    glay->addWidget( _smoothScale, 3, 1 );
    txt = i18n("<p>When displaying images, KPhotoAlbum normally performs smooth scaling of the image. "
               "If this option is not set, KPhotoAlbum will use a faster but less smooth scaling method.</p>");
    scalingLabel->setWhatsThis( txt );
    _smoothScale->setWhatsThis( txt );
}
开发者ID:Df458,项目名称:kphotoalbum-multitags-branch,代码行数:61,代码来源:ViewerPage.cpp

示例6: QWizardPage

startPage::startPage (QWidget *parent, QString parameter_file, PFM_GLOBAL *pfm_glb):
  QWizardPage (parent)
{
  pfm_global = pfm_glb;

  setPixmap (QWizard::WatermarkPixmap, QPixmap(":/icons/pfmLoadWatermark.png"));


  setTitle (tr ("Introduction"));

  setWhatsThis (tr ("See, it really works!"));

  QLabel *label = new QLabel (tr ("The pfmLoad program is used to create or append to PFM structures.  Context "
                                  "sensitive help is available by clicking on the Help button and then clicking, with the "
                                  "Question Arrow cursor, on the field of interest.  You can preload a previously saved "
                                  "parameters file (*.prm) by placing it on the command line.  Press <b>Next</b> to go to the "
                                  "first PFM definition page.<br><br>"
                                  "<b><i>IMPORTANT NOTE</i>: You may load up to 30 PFM structures in one run.  This only makes "
                                  "sense if all of the PFM areas contain data from the same set of input files.  "
                                  "Otherwise the program will be checking every data point against every PFM area "
                                  "bounds definition and you will be wasting lots of time.</b><br><br>"
                                  "<b><i>OTHER IMPORTANT NOTE</i>: You may save the parameters entered into this wizard to a "
                                  "new or preexisting parameter file.  There are two types of parameter files.  The normal "
                                  "parameter file (.prm) which can be used on the command line for pfmLoad or pfmLoader, "
                                  "or an <i>update</i> parameter file (.upr) that can only be used as a command line argument "
                                  "to pfmLoader.  The <i>update</i> parameter file (.upr) can only be created if you use the "
                                  "<i>Directories->Browse</i> button on the <i>Input Data Files</i> page.  For more information "
                                  "on why you would want to do this, use the <i>What's This</i> help on the <i>Save</i> button "
                                  "on the <i>Build PFM Structure(s)</i> page of this wizard."));

  label->setWordWrap(true);


  QVBoxLayout *vbox = new QVBoxLayout (this);
  vbox->addWidget (label);
  vbox->addStretch (10);


  QGroupBox *prmBox = new QGroupBox (this);
  prmBox->setWhatsThis (tr ("This box will show the name of the parameter file that was placed on the command line.  ") + 
                        tr ("If no command was placed on the command line it will say <b>No command line parameter file</b>"));
  prmBox->setToolTip (tr ("Parameter file from command line (if present)"));
  QHBoxLayout *prmBoxLayout = new QHBoxLayout;
  prmBoxLayout->setSpacing (5);
  prmBox->setLayout (prmBoxLayout);

  QLabel *prmlbl = new QLabel (this);
  prmlbl->setWhatsThis (tr ("This box will show the name of the parameter file that was placed on the command line.  ") + 
                        tr ("If no command was placed on the command line it will say <b>No command line parameter file</b>"));
  prmlbl->setToolTip (tr ("Parameter file from command line (if present)"));
  if (!parameter_file.isEmpty ())
    {
      prmlbl->setText (tr ("Command line parameter file: <b>") + parameter_file + "</b>");
    }
  else
    {
      prmlbl->setText (tr ("No command line parameter file"));
    }
  prmBoxLayout->addWidget (prmlbl);

  vbox->addWidget (prmBox);


  QGroupBox *memBox = new QGroupBox (tr ("Cache memory"), this);
  QHBoxLayout *memBoxLayout = new QHBoxLayout;
  memBox->setLayout (memBoxLayout);
  memBoxLayout->setSpacing (10);


  //  Had to do this as a QDoubleSpinBox because QSpinBox won't do no-wrap if the top end might exceed 
  //  a 32 bit signed integer max value.

  mem = new QDoubleSpinBox (memBox);
  mem->setRange (200000000.0, 2147483647.0);
  mem->setSingleStep (100000000.0);
  mem->setDecimals (0.0);
  mem->setValue ((NV_FLOAT64) pfm_global->cache_mem);
  mem->setWrapping (FALSE);
  mem->setToolTip (tr ("Set the amount of cache memory for each PFM to be loaded"));
  mem->setWhatsThis (tr ("Set the amount of cache memory used for each PFM file to be created or appended to.  ") +
                     tr ("The value is in bytes and ranges from a minimum of 200,000,000 up to 2,147,483,647.  The default is ") +
                     tr ("400,000,000.  If you set this to a large value (like 2,147,483,647) and you have a limited amount of ") +
                     tr ("memory and a large number of PFMs to be built you will end up using swap space and your ") +
                     tr ("build will be extremely slow ;-)"));
  memBoxLayout->addWidget (mem);

  vbox->addWidget (memBox);

  registerField ("mem", mem, "value");
}
开发者ID:dmagiccys,项目名称:pfmabe,代码行数:90,代码来源:startPage.cpp

示例7: PacketEditorTab

NSurfaceCoordinateUI::NSurfaceCoordinateUI(regina::NNormalSurfaceList* packet,
        PacketTabbedUI* useParentUI, bool readWrite) :
        PacketEditorTab(useParentUI), surfaces(packet), appliedFilter(0),
        isReadWrite(readWrite), currentlyResizing(false) {
    // Set up the UI.
    ui = new QWidget();
    QBoxLayout* uiLayout = new QVBoxLayout(ui);
    uiLayout->setContentsMargins(0, 0, 0, 0);
    uiLayout->addSpacing(5);

    QBoxLayout* hdrLayout = new QHBoxLayout();
    uiLayout->addLayout(hdrLayout);

    // Set up the coordinate selector.
    QLabel* label = new QLabel(tr("Display coordinates:"));
    hdrLayout->addWidget(label);
    coords = new CoordinateChooser();
    coords->insertAllViewers(surfaces);
    coords->setCurrentSystem(surfaces->coords());
    connect(coords, SIGNAL(activated(int)), this, SLOT(refresh()));
    hdrLayout->addWidget(coords);
    QString msg = tr("Allows you to view these normal surfaces in a "
        "different coordinate system.");
    label->setWhatsThis(msg);
    coords->setWhatsThis(msg);

    hdrLayout->addStretch(1);

    // Set up the filter selector.
    label = new QLabel(tr("Apply filter:"));
    hdrLayout->addWidget(label);
    filter = new PacketChooser(surfaces->root(),
        new SingleTypeFilter<regina::NSurfaceFilter>(),
        PacketChooser::ROOT_AS_PACKET, true, 0, ui);
    filter->setAutoUpdate(true);
    connect(filter, SIGNAL(activated(int)), this, SLOT(refresh()));
    hdrLayout->addWidget(filter);
    msg = tr("<qt>Allows you to filter this list so that only normal "
        "surfaces satisfying particular properties are displayed.<p>"
        "To use this feature you need a separate surface filter.  You "
        "can create new surface filters through the <i>Packet Tree</i> "
        "menu.</qt>");
    label->setWhatsThis(msg);
    filter->setWhatsThis(msg);

    // Set up the coordinate table.
    model = new SurfaceModel(surfaces, readWrite);

    table = new QTreeView();
    table->setItemsExpandable(false);
    table->setRootIsDecorated(false);
    table->setAlternatingRowColors(true);
    table->header()->setStretchLastSection(false);
    table->setSelectionMode(QTreeView::SingleSelection);
    table->setWhatsThis(tr("Displays details of the individual normal "
        "surfaces in this list.<p>"
        "Each row represents a single normal (or almost normal) surface.  "
        "As well as various properties of the surface, each row contains "
        "a detailed representation of the surface in the currently selected "
        "coordinate system.<p>"
        "For details on what each property means or what each coordinate "
        "represents, hover the mouse over the column header (or refer "
        "to the users' handbook).</qt>"));
    // Add grid lines:
    // For some reason, when we set cell borders, the selection
    // background changes to white (-> white on white, which is unreadable).
    // So reluctantly we also break the native system style and explicitly
    // set a background ourselves.  I would love a better way of dealing
    // with this. :/
    table->setStyleSheet("QTreeView::item:selected { "
                            "background: qlineargradient(x1: 0, y1: 0, "
                                "x2: 0, y2: 1, stop: 0 #6ea1f1, "
                                "stop: 1 #567dbc); "
                         "} "
                         "QTreeView::item { "
                            "border: 1px solid #d9d9d9; "
                            "border-top-color: transparent; "
                            "border-left-color: transparent; "
                         "}");
    table->setModel(model);
    table->header()->resizeSections(QHeaderView::ResizeToContents);
    uiLayout->addWidget(table, 1);

    connect(table->header(), SIGNAL(sectionResized(int, int, int)),
        this, SLOT(columnResized(int, int, int)));

    actCutAlong = new QAction(this);
    actCutAlong->setText(tr("Cu&t Along Surface"));
    actCutAlong->setToolTip(tr("Cut the triangulation along the "
        "selected surface"));
    actCutAlong->setEnabled(false);
    actCutAlong->setWhatsThis(tr("<qt>Cuts open the surround triangulation "
        "along the selected surface.  This triangulation will not "
        "be changed; instead a new cut-open triangulation will be created.<p>"
        "This operation will never change the topology of the underlying "
        "3-manifold beyond just cutting along the surface (as opposed to "
        "the related <i>crushing</i> operation, which might).  However, "
        "because the new surface boundaries are created from real "
        "boundary triangles, the resulting number of tetrahedra might be very "
        "large.</qt>"));
//.........这里部分代码省略.........
开发者ID:WPettersson,项目名称:regina,代码行数:101,代码来源:nsurfacecoordinateui.cpp

示例8: setupDirectoryPage

void KIGPDialog::setupDirectoryPage(const QString& path) {
    QFrame *page = new QFrame();
    KPageWidgetItem *pageItem = new KPageWidgetItem( page, i18n("Folders") );
    pageItem->setHeader(i18n("Folders"));
    pageItem->setIcon(KIcon(BarIcon("folder", KIconLoader::SizeMedium )) );
    addPage(pageItem);

    KConfigGroup group =  m_config->group("Directory");
    QVBoxLayout *dvlay = new QVBoxLayout( page );
    dvlay->setMargin( 0 );

    QLabel *label;
    label = new QLabel(i18n("&Save to HTML file:"), page);
    dvlay->addWidget( label );
    QString whatsThis;
    whatsThis = i18n("<p>The name of the HTML file this gallery will be saved to.</p>");
    label->setWhatsThis( whatsThis );

    m_imageNameReq = new KUrlRequester(QString(path + "images.html"), page);
    label->setBuddy( m_imageNameReq );
    dvlay->addWidget(m_imageNameReq);
    connect( m_imageNameReq, SIGNAL(textChanged(const QString&)),
             this, SLOT(imageUrlChanged(const QString&)) );
    m_imageNameReq->setWhatsThis( whatsThis );

    const bool recurseSubDir = group.readEntry("RecurseSubDirectories", false);
    m_recurseSubDir = new QCheckBox(i18n("&Recurse subfolders"), page);
    m_recurseSubDir->setChecked( recurseSubDir );
    whatsThis = i18n("<p>Whether subfolders should be included for the "
                     "image gallery creation or not.</p>");
    m_recurseSubDir->setWhatsThis( whatsThis );

    const int recursionLevel = group.readEntry("RecursionLevel", 0);
    m_recursionLevel = new KIntNumInput( recursionLevel, page );
    m_recursionLevel->setRange( 0, 99, 1);
    m_recursionLevel->setSliderEnabled(true);
    m_recursionLevel->setLabel( i18n("Rec&ursion depth:") );
    if ( recursionLevel == 0 )
      m_recursionLevel->setSpecialValueText( i18n("Endless"));
    m_recursionLevel->setEnabled(recurseSubDir);
    whatsThis = i18n("<p>You can limit the number of folders the "
                     "image gallery creator will traverse to by setting an "
                     "upper bound for the recursion depth.</p>");
    m_recursionLevel->setWhatsThis( whatsThis );


    connect(m_recurseSubDir, SIGNAL( toggled(bool) ),
            m_recursionLevel, SLOT( setEnabled(bool) ) );

    dvlay->addWidget(m_recurseSubDir);
    dvlay->addWidget(m_recursionLevel);

    m_copyOriginalFiles = new QCheckBox(i18n("Copy or&iginal files"), page);
    m_copyOriginalFiles->setChecked(group.readEntry("CopyOriginalFiles", false) );
    dvlay->addWidget(m_copyOriginalFiles);
    whatsThis = i18n("<p>This makes a copy of all images and the gallery will refer "
                     "to these copies instead of the original images.</p>");
    m_copyOriginalFiles->setWhatsThis( whatsThis );


    const bool useCommentFile = group.readEntry("UseCommentFile", false);
    m_useCommentFile = new QCheckBox(i18n("Use &comment file"), page);
    m_useCommentFile->setChecked(useCommentFile);
    dvlay->addWidget(m_useCommentFile);

    whatsThis = i18n("<p>If you enable this option you can specify "
                     "a comment file which will be used for generating "
                     "subtitles for the images.</p>"
                     "<p>For details about the file format please see "
                     "the \"What's This?\" help below.</p>");
    m_useCommentFile->setWhatsThis( whatsThis );

    label = new QLabel(i18n("Comments &file:"), page);
    label->setEnabled( useCommentFile );
    dvlay->addWidget( label );
    whatsThis = i18n("<p>You can specify the name of the comment file here. "
                     "The comment file contains the subtitles for the images. "
                     "The format of this file is:</p>"
                     "<p>FILENAME1:"
                     "<br />Description"
                     "<br />"
                     "<br />FILENAME2:"
                     "<br />Description"
                     "<br />"
                     "<br />and so on</p>");
    label->setWhatsThis( whatsThis );

    m_commentFileReq = new KUrlRequester(QString(path + "comments"), page);
    m_commentFileReq->setEnabled(useCommentFile);
    label->setBuddy( m_commentFileReq );
    dvlay->addWidget(m_commentFileReq);
    m_commentFileReq->setWhatsThis( whatsThis );

    connect(m_useCommentFile, SIGNAL(toggled(bool)),
            label, SLOT(setEnabled(bool)));
    connect(m_useCommentFile, SIGNAL(toggled(bool)),
            m_commentFileReq, SLOT(setEnabled(bool)));

    dvlay->addStretch(1);
}
开发者ID:vishesh,项目名称:kde-baseapps,代码行数:100,代码来源:imgallerydialog.cpp

示例9: QDialog

ExportDialog::ExportDialog(const QString& tableName, QWidget* parent, Qt::WFlags fl )
    : QDialog( parent, fl )
{
	setWindowTitle( tr( "QtiPlot - Export ASCII" ) );
	setSizeGripEnabled( true );

	ApplicationWindow *app = (ApplicationWindow *)parent;

	QGridLayout *gl1 = new QGridLayout();
    gl1->addWidget(new QLabel(tr("Table")), 0, 0);
	boxTable = new QComboBox();
	QStringList tables = app->tableNames() + app->matrixNames();
	boxTable->addItems(tables);
	boxTable->setCurrentIndex(0);

	boxTable->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
	gl1->addWidget(boxTable, 0, 1);

	boxAllTables = new QCheckBox(tr( "&All" ));
    boxAllTables->setChecked(false);
	gl1->addWidget(boxAllTables, 0, 2);

    QLabel *sepText = new QLabel( tr( "Separator" ) );
	gl1->addWidget(sepText, 1, 0);

    boxSeparator = new QComboBox();
	boxSeparator->addItem(tr("TAB"));
    boxSeparator->addItem(tr("SPACE"));
	boxSeparator->addItem(";" + tr("TAB"));
	boxSeparator->addItem("," + tr("TAB"));
	boxSeparator->addItem(";" + tr("SPACE"));
	boxSeparator->addItem("," + tr("SPACE"));
    boxSeparator->addItem(";");
    boxSeparator->addItem(",");
	boxSeparator->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
	boxSeparator->setEditable( true );
	gl1->addWidget(boxSeparator, 1, 1);
	setColumnSeparator(app->d_export_col_separator);

	QString help = tr("The column separator can be customized. The following special codes can be used:\n\\t for a TAB character \n\\s for a SPACE");
	help += "\n"+tr("The separator must not contain the following characters: 0-9eE.+-");

	boxSeparator->setWhatsThis(help);
	sepText->setWhatsThis(help);
	boxSeparator->setToolTip(help);
	sepText->setToolTip(help);

	boxNames = new QCheckBox(tr( "Include Column &Names" ));
    boxNames->setChecked( app->d_export_col_names );

	boxComments = new QCheckBox(tr( "Include Column Co&mments" ));
    boxComments->setChecked( app->d_export_col_comment );

    boxSelection = new QCheckBox(tr( "Export &Selection" ));
    boxSelection->setChecked( app->d_export_table_selection );

	QVBoxLayout *vl1 = new QVBoxLayout();
	vl1->addLayout( gl1 );
	vl1->addWidget( boxNames );
	vl1->addWidget( boxComments );
	vl1->addWidget( boxSelection );

	QHBoxLayout *hbox3 = new QHBoxLayout();
	buttonOk = new QPushButton(tr( "&OK" ));
    buttonOk->setDefault( true );
	hbox3->addWidget( buttonOk );
    buttonCancel = new QPushButton(tr( "&Cancel" ));
	hbox3->addWidget( buttonCancel );
	buttonHelp = new QPushButton(tr( "&Help" ));
	hbox3->addWidget( buttonHelp );
	hbox3->addStretch();

	QVBoxLayout *vl = new QVBoxLayout( this );
    vl->addLayout(vl1);
	vl->addStretch();
	vl->addLayout(hbox3);

    // signals and slots connections
    connect( boxTable, SIGNAL(activated(const QString &)), this, SLOT(updateOptions(const QString &)));
    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
	connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( close() ) );
    connect( buttonHelp, SIGNAL( clicked() ), this, SLOT( help() ) );
	connect( boxAllTables, SIGNAL( toggled(bool) ), this, SLOT( enableTableName(bool) ) );

    if (tables.contains(tableName)){
		boxTable->setCurrentIndex(boxTable->findText(tableName));
		updateOptions(tableName);
    }
}
开发者ID:BackupTheBerlios,项目名称:qtiplot-svn,代码行数:89,代码来源:ExportDialog.cpp

示例10: KonfiguratorPage

KgAdvanced::KgAdvanced(bool first, QWidget* parent) :
        KonfiguratorPage(first, parent)
{
    QWidget *innerWidget = new QFrame(this);
    setWidget(innerWidget);
    setWidgetResizable(true);
    QGridLayout *kgAdvancedLayout = new QGridLayout(innerWidget);
    kgAdvancedLayout->setSpacing(6);

    //  -------------------------- GENERAL GROUPBOX ----------------------------------

    QGroupBox *generalGrp = createFrame(i18n("General"), innerWidget);
    QGridLayout *generalGrid = createGridLayout(generalGrp);

    KONFIGURATOR_CHECKBOX_PARAM generalSettings[] =
        //   cfg_class  cfg_name             default              text                                                        restart tooltip
    {
//     {"Advanced", "PreserveAttributes", _PreserveAttributes, i18n("Preserve attributes for local copy/move (slower)"), false,  i18n("Krusader will try to preserve all attributes (time, owner, group) of the local files according to the source depending on your permissions:<ul><li>User preserving if you are root</li><li>Group preserving if you are root or member of the group</li><li>Preserving the timestamp</li></ul><b>Note</b>: This can slow down the copy process.") },
        {"Advanced", "AutoMount",          _AutoMount,          i18n("Automount filesystems"),                            false,  i18n("When stepping into a directory which is defined as a mount point in the <b>fstab</b>, try mounting it with the defined parameters.")}
    };

    KonfiguratorCheckBoxGroup *generals = createCheckBoxGroup(1, 0, generalSettings, 1, generalGrp);

    generalGrid->addWidget(generals, 1, 0);

    addLabel(generalGrid, 2, 0, i18n("MountMan will not (un)mount the following mount-points:"),
             generalGrp);
    KonfiguratorEditBox *nonMountPoints = createEditBox("Advanced", "Nonmount Points", _NonMountPoints, generalGrp, false);
    generalGrid->addWidget(nonMountPoints, 2, 1);


#ifdef BSD
    generals->find("AutoMount")->setEnabled(false);     /* disable AutoMount on BSD */
#endif

    kgAdvancedLayout->addWidget(generalGrp, 0 , 0);

    //  ----------------------- CONFIRMATIONS GROUPBOX -------------------------------

    QGroupBox *confirmGrp = createFrame(i18n("Confirmations"), innerWidget);
    QGridLayout *confirmGrid = createGridLayout(confirmGrp);

    addLabel(confirmGrid, 0, 0, i18n("\nRequest user confirmation for the following operations:\n"),
             confirmGrp);

    KONFIGURATOR_CHECKBOX_PARAM confirmations[] =
        //   cfg_class  cfg_name                default             text                                          restart ToolTip
    {{"Advanced", "Confirm Unempty Dir",   _ConfirmUnemptyDir, i18n("Deleting non-empty directories"),   false,  ""},
        {"Advanced", "Confirm Delete",        _ConfirmDelete,     i18n("Deleting files"),                   false,  ""},
        {"Advanced", "Confirm Copy",          _ConfirmCopy,       i18n("Copying files"),                    false,  ""},
        {"Advanced", "Confirm Move",          _ConfirmMove,       i18n("Moving files"),                     false,  ""},
        {"Advanced", "Confirm Feed to Listbox",  _ConfirmFeedToListbox, i18n("Confirm feed to listbox"), false, i18n("Ask for a result name when feeding items to the listbox. By default the standard value is used.")},
        {"Notification Messages", "Confirm Remove UserAction", true, i18n("Removing Useractions"), false,  ""}
    };

    KonfiguratorCheckBoxGroup *confWnd = createCheckBoxGroup(2, 0, confirmations, 6, confirmGrp);

    confirmGrid->addWidget(confWnd, 1, 0);

    kgAdvancedLayout->addWidget(confirmGrp, 1 , 0);


    //  ------------------------ FINE-TUNING GROUPBOX --------------------------------

    QGroupBox *fineTuneGrp = createFrame(i18n("Fine-Tuning"), innerWidget);
    QGridLayout *fineTuneGrid = createGridLayout(fineTuneGrp);
    fineTuneGrid->setAlignment(Qt::AlignLeft | Qt::AlignTop);

    QLabel *label = new QLabel(i18n("Icon cache size (KB):"), fineTuneGrp);
    label->setWhatsThis(i18n("The icon cache size influences how fast the contents of a panel can be displayed. However, too large a cache might consume your memory."));
    fineTuneGrid->addWidget(label, 0, 0);
    KonfiguratorSpinBox *spinBox = createSpinBox("Advanced", "Icon Cache Size", _IconCacheSize,
                                   1, 8192, fineTuneGrp, false);
    spinBox->setWhatsThis(i18n("The icon cache size influences how fast the contents of a panel can be displayed. However, too large a cache might consume your memory."));
    spinBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
    fineTuneGrid->addWidget(spinBox, 0, 1);

    addLabel(fineTuneGrid, 1, 0, i18n("Arguments of updatedb:"),
             fineTuneGrp);
    KonfiguratorEditBox *updatedbArgs = createEditBox("Locate", "UpdateDB Arguments", "", fineTuneGrp, false);
    fineTuneGrid->addWidget(updatedbArgs, 1, 1);

    kgAdvancedLayout->addWidget(fineTuneGrp, 2 , 0);
}
开发者ID:jorgeolivares,项目名称:krusader,代码行数:84,代码来源:kgadvanced.cpp

示例11: PacketEditorTab

NHyperCoordinateUI::NHyperCoordinateUI(regina::NNormalHypersurfaceList* packet,
        PacketTabbedUI* useParentUI, bool readWrite) :
        PacketEditorTab(useParentUI), surfaces(packet),
        isReadWrite(readWrite), currentlyResizing(false) {
    // Set up the UI.
    ui = new QWidget();
    QBoxLayout* uiLayout = new QVBoxLayout(ui);
    uiLayout->setContentsMargins(0, 0, 0, 0);
    uiLayout->addSpacing(5);

    QBoxLayout* hdrLayout = new QHBoxLayout();
    uiLayout->addLayout(hdrLayout);

    // Set up the coordinate selector.
    QLabel* label = new QLabel(tr("Display coordinates:"));
    hdrLayout->addWidget(label);
    coords = new HyperCoordinateChooser();
    coords->insertAllViewers(surfaces);
    coords->setCurrentSystem(surfaces->coords());
    connect(coords, SIGNAL(activated(int)), this, SLOT(refresh()));
    hdrLayout->addWidget(coords);
    QString msg = tr("Allows you to view these normal hypersurfaces in a "
        "different coordinate system.");
    label->setWhatsThis(msg);
    coords->setWhatsThis(msg);

    hdrLayout->addStretch(1);

    // Set up the coordinate table.
    model = new HyperModel(surfaces, readWrite);

    table = new QTreeView();
    table->setItemsExpandable(false);
    table->setRootIsDecorated(false);
    table->setAlternatingRowColors(true);
    table->header()->setStretchLastSection(false);
    table->setSelectionMode(QTreeView::SingleSelection);
    table->setWhatsThis(tr("Displays details of the individual normal "
        "hypersurfaces in this list.<p>"
        "Each row represents a single normal hypersurface.  "
        "As well as various properties of the hypersurface, each row contains "
        "a detailed representation of the hypersurface in the currently "
        "selected coordinate system.<p>"
        "For details on what each property means or what each coordinate "
        "represents, hover the mouse over the column header (or refer "
        "to the users' handbook).</qt>"));
    // Add grid lines:
    // For some reason, when we set cell borders, the selection
    // background changes to white (-> white on white, which is unreadable).
    // So reluctantly we also break the native system style and explicitly
    // set a background ourselves.  I would love a better way of dealing
    // with this. :/
    table->setStyleSheet("QTreeView::item:selected { "
                            "background: qlineargradient(x1: 0, y1: 0, "
                                "x2: 0, y2: 1, stop: 0 #6ea1f1, "
                                "stop: 1 #567dbc); "
                         "} "
                         "QTreeView::item { "
                            "border: 1px solid #d9d9d9; "
                            "border-top-color: transparent; "
                            "border-left-color: transparent; "
                         "}");
    table->setModel(model);
    table->header()->resizeSections(QHeaderView::ResizeToContents);
    uiLayout->addWidget(table, 1);

    connect(table->header(), SIGNAL(sectionResized(int, int, int)),
        this, SLOT(columnResized(int, int, int)));

    actTriangulate = new QAction(this);
    actTriangulate->setText(tr("&Triangulate Hypersurface"));
    actTriangulate->setToolTip(tr("Builds a 3-manifold triangulation "
        "of the selected hypersurface"));
    actTriangulate->setEnabled(false);
    actTriangulate->setWhatsThis(tr("<qt>Builds a 3-manifold triangulation "
        "of the selected hypersurface.<p>"
        "The new triangulation will have the same <i>topology</i> as the "
        "selected hypersurface.  However, it will be simplified, "
        "which means that information about the <i>combinatorics</i> "
        "of the hypersurface will be lost.</qt>"));
    connect(actTriangulate, SIGNAL(triggered()), this, SLOT(triangulate()));
    surfaceActionList.append(actTriangulate);

    connect(table->selectionModel(),
        SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)),
        this, SLOT(updateActionStates()));

    connect(&ReginaPrefSet::global(), SIGNAL(preferencesChanged()),
        this, SLOT(updatePreferences()));
}
开发者ID:WPettersson,项目名称:regina,代码行数:90,代码来源:nhypercoordinateui.cpp

示例12: QWidget


//.........这里部分代码省略.........
	QString whatsThisPrintsizePosterPage = i18n( " <qt> "
                        " <b>Paper Size</b> "
			" <p>This field indicates the paper size the poster tiles will be printed on. "
			" To select a different paper size for your poster tiles, go to the 'General' tab "
			" of this dialog and select one from the dropdown list. </p> "
			" Available sizes are most standard paper sizes supported by your printer. Your printer's "
			" supported paper sizes are read from the printer driver info (as laid down in the <em>'PPD'</em>, "
			" the printer description file). <em>Be aware that the 'Paper Size' selected may not be supported "
			" by 'poster' (example: 'HalfLetter') while it may well be supported by your printer.</em>  If "
			" you hit that obstacle, simply use another, supported Paper Size, like 'A4' or 'Letter'. "
			" <p><b>Notice</b>, how the little preview window below changes with your change of paper "
			" size. It indicates how many tiles need to be printed to make up the poster, "
			" given the selected paper and poster size.</p>  "
			" <p><b>Hint:</b> The little preview window below is not just a passive icon. You can click "
			" on its individual tiles to select them for printing. To select multiple tiles to be printed "
			" at once, you need to <em>'shift-click'</em> on the tiles ('shift-click' means: hold down the "
			" [SHIFT]-key on your keyboard and click with the mouse while [SHIFT]-key is held.) The order "
			" of your clicking is significant to the order of printing the different tiles. The order of "
			" your selection (and for the printed tiles) is indicated by the contents of the text field "
			" labelled as <em>'Tile pages (to be printed):'</em><p>"
			" <b>Note:</b> By default no tile is selected. Before you can print (a part "
			" of) your poster, you must select at least one tile. </p> "
			" </qt>" );

	QString whatsThisCutmarginPosterPage = i18n( " <qt> "
                        " <b>Cut Margin selection</b> "
			" <p>Slider and spinbox let you determine a <em>'cut margin'</em> which will be printed onto "
			" each tile of your poster to help you cut the pieces as needed. </p>"
			" <p><b>Notice</b>, how the little preview window above changes with your change of cut "
			" margins. It indicates to you how much space the cut margins will take away from each tile. "
			" <p><b>Be aware</b>, that your cut margins need to be equal to or greater than the margins your "
			" printer uses. The printer's capabilities are described in the <em>'ImageableArea'</em> "
			" keywords of its driver PPD file. </p> "
			" </qt>" );

	QString whatsThisTileOrderSelectionPosterPage = i18n( " <qt> "
                        " <b>Order and number of tile pages to be printed</b> "
			" <p>This field displays and sets the individual tiles to be printed, as well as the order "
			" for their printout. </p> "
			" You can file the field with 2 different methods: "
			" <ul> "
			" <li>Either use the interactive thumbnail preview above and '[SHIFT]-click' on the tiles. </li> "
			" <li>Or edit this text field accordingly. </li> "
			" </ul> "
			" <p>When editing the field, you can use a '3-7' syntax instead of a '3,4,5,6,7' one. </p> "
			" <p><b>Examples:</b></p> "
			" <pre> "
			"   \"2,3,7,9,3\" "
			" <br> "
			"   \"1-3,6,8-11\" "
			" </qt>" );

    setWindowTitle( i18n( "Poster" ) );

	m_postercheck = new QCheckBox( i18n( "&Print poster" ), this );
    m_postercheck->setWhatsThis(whatsThisEnablePosterPage);
	QWidget *dummy = new QWidget( this );
	m_preview = new PosterPreview( dummy );
    m_preview->setMediaSize(QPrinter::A4);
    m_preview->setWhatsThis(whatsThisTileSelectionPosterPage);
	m_postersize = new QComboBox( dummy );
    m_postersize->setWhatsThis(whatsThisPostersizePosterPage);
	m_printsize = new QComboBox( dummy );
    m_printsize->setWhatsThis(whatsThisPrintsizePosterPage);
	m_lockbtn = new KPushButton( dummy );
          //QWhatsThis::add(m_lockbtn, whatsThis5_PosterPage);           //FIXME ASK_MICHAEL: which pushbutton would that be?
	m_mediasize = new QLabel( dummy );
    m_mediasize->setWhatsThis(whatsThisPrintsizePosterPage);
	m_mediasize->setFrameStyle( QFrame::Panel|QFrame::Sunken );
	QLabel *posterlab = new QLabel( i18n( "Poste&r size:" ), dummy );
    posterlab->setWhatsThis(whatsThisPostersizePosterPage);
	QLabel *medialab = new QLabel( i18n( "Media size:" ), dummy );
    medialab->setWhatsThis(whatsThisPrintsizePosterPage);
	QLabel *printlab = new QLabel( i18n( "Pri&nt size:" ), dummy );
    printlab->setWhatsThis(whatsThisPrintsizePosterPage);
	posterlab->setBuddy( m_postersize );
	printlab->setBuddy( m_printsize );
	m_cutmargin = new KIntNumInput( 5, dummy );
    m_cutmargin->setWhatsThis(whatsThisCutmarginPosterPage);
	// xgettext:no-c-format
	m_cutmargin->setLabel( i18n( "C&ut margin (% of media):" ) );
    m_cutmargin->setRange( 0, 100, 2 );                     // step width was too big, changed from 10 to 2 (-kp-)
    m_cutmargin->setSliderEnabled(true);
	m_selection = new QLineEdit( dummy );
    m_selection->setWhatsThis(whatsThisTileOrderSelectionPosterPage);
	QLabel *selectionlab = new QLabel( i18n( "&Tile pages (to be printed):" ), dummy );
    selectionlab->setWhatsThis(whatsThisTileOrderSelectionPosterPage);
	selectionlab->setBuddy( m_selection );
    m_lockbtn->setCheckable( true );
    m_lockbtn->setIcon(QIcon::fromTheme("document-encrypt"));
    m_lockbtn->setChecked( true );
	m_lockbtn->setFixedSize( m_lockbtn->sizeHint() );
    m_lockbtn->setToolTip(i18n( "Link/unlink poster and print size" ));

    QList<QPrinter::PaperSize> paperSizeList = PaperSizeUtils::allPaperSizes();
    Q_FOREACH (QPrinter::PaperSize paperSize, paperSizeList)
	{
        m_postersize->addItem( PaperSizeUtils::paperSizeToString(paperSize), paperSize );
        m_printsize->addItem( PaperSizeUtils::paperSizeToString(paperSize), paperSize );
    }
开发者ID:KDE,项目名称:kprinter4,代码行数:101,代码来源:posterwidget.cpp

示例13: QGridLayout

JSPoliciesFrame::JSPoliciesFrame(JSPolicies *policies, const QString &title,
		QWidget* parent) :
	QGroupBox(title, parent),
	policies(policies) {

  bool is_per_domain = !policies->isGlobal();

  QGridLayout *this_layout = new QGridLayout();
  setLayout(this_layout);
  this_layout->setAlignment(Qt::AlignTop);

  QString wtstr;	// what's this description
  int colIdx;		// column index

  // === window.open ================================
  colIdx = 0;
  QLabel *label = new QLabel(i18n("Open new windows:"),this);
  this_layout->addWidget(label,0,colIdx++);

  js_popup = new QButtonGroup(this);
  js_popup->setExclusive(true);

  QRadioButton* policy_btn;
  if (is_per_domain) {
    policy_btn = new QRadioButton(i18n("Use global"), this);
    policy_btn->setWhatsThis(i18n("Use setting from global policy."));
    js_popup->addButton(policy_btn,INHERIT_POLICY);
    this_layout->addWidget(policy_btn,0,colIdx++);
    this_layout->addItem(new QSpacerItem(10,0),0,colIdx++);
  }/*end if*/

  policy_btn = new QRadioButton(i18n("Allow"), this);
  policy_btn->setWhatsThis(i18n("Accept all popup window requests."));
  js_popup->addButton(policy_btn,KParts::HtmlSettingsInterface::JSWindowOpenAllow);
  this_layout->addWidget(policy_btn,0,colIdx++);
  this_layout->addItem(new QSpacerItem(10,0),0,colIdx++);

  policy_btn = new QRadioButton(i18n("Ask"), this);
  policy_btn->setWhatsThis(i18n("Prompt every time a popup window is requested."));
  js_popup->addButton(policy_btn,KParts::HtmlSettingsInterface::JSWindowOpenAsk);
  this_layout->addWidget(policy_btn,0,colIdx++);
  this_layout->addItem(new QSpacerItem(10,0),0,colIdx++);

  policy_btn = new QRadioButton(i18n("Deny"), this);
  policy_btn->setWhatsThis(i18n("Reject all popup window requests."));
  js_popup->addButton(policy_btn,KParts::HtmlSettingsInterface::JSWindowOpenDeny);
  this_layout->addWidget(policy_btn,0,colIdx++);
  this_layout->addItem(new QSpacerItem(10,0),0,colIdx++);

  policy_btn = new QRadioButton(i18n("Smart"), this);
  policy_btn->setWhatsThis( i18n("Accept popup window requests only when "
                                   "links are activated through an explicit "
                                   "mouse click or keyboard operation."));
  js_popup->addButton(policy_btn,KParts::HtmlSettingsInterface::JSWindowOpenSmart);
  this_layout->addWidget(policy_btn,0,colIdx++);
  this_layout->addItem(new QSpacerItem(10,0),0,colIdx++);

  wtstr = i18n("If you disable this, Konqueror will stop "
               "interpreting the <i>window.open()</i> "
               "JavaScript command. This is useful if you "
               "regularly visit sites that make extensive use "
               "of this command to pop up ad banners.<br />"
               "<br /><b>Note:</b> Disabling this option might "
               "also break certain sites that require <i>"
               "window.open()</i> for proper operation. Use "
               "this feature carefully.");
  label->setWhatsThis( wtstr);
  connect(js_popup, SIGNAL(buttonClicked(int)), SLOT(setWindowOpenPolicy(int)));

  // === window.resizeBy/resizeTo ================================
  colIdx = 0;
  label = new QLabel(i18n("Resize window:"),this);
  this_layout->addWidget(label,1,colIdx++);

  js_resize = new QButtonGroup(this);
  js_resize->setExclusive(true);

  if (is_per_domain) {
    policy_btn = new QRadioButton(i18n("Use global"), this);
    policy_btn->setWhatsThis(i18n("Use setting from global policy."));
    js_resize->addButton(policy_btn,INHERIT_POLICY);
    this_layout->addWidget(policy_btn,1,colIdx++);
    this_layout->addItem(new QSpacerItem(10,0),0,colIdx++);
  }/*end if*/

  policy_btn = new QRadioButton(i18n("Allow"), this);
  policy_btn->setWhatsThis(i18n("Allow scripts to change the window size."));
  js_resize->addButton(policy_btn,KParts::HtmlSettingsInterface::JSWindowResizeAllow);
  this_layout->addWidget(policy_btn,1,colIdx++);
  this_layout->addItem(new QSpacerItem(10,0),0,colIdx++);

  policy_btn = new QRadioButton(i18n("Ignore"), this);
  policy_btn->setWhatsThis(i18n("Ignore attempts of scripts to change the window size. "
  				"The web page will <i>think</i> it changed the "
				"size but the actual window is not affected."));
  js_resize->addButton(policy_btn,KParts::HtmlSettingsInterface::JSWindowResizeIgnore);
  this_layout->addWidget(policy_btn,1,colIdx++);
  this_layout->addItem(new QSpacerItem(10,0),0,colIdx++);

  wtstr = i18n("Some websites change the window size on their own by using "
//.........这里部分代码省略.........
开发者ID:blue-shell,项目名称:folderview,代码行数:101,代码来源:jspolicies.cpp

示例14: KTabWidget

KfindTabWidget::KfindTabWidget(QWidget *parent)
  : KTabWidget( parent ), regExpDialog(0)
{
    // This validator will be used for all numeric edit fields
    //KDigitValidator *digitV = new KDigitValidator(this);

    // ************ Page One ************

    pages[0] = new QWidget;
    pages[0]->setObjectName( QLatin1String( "page1" ) );

    nameBox = new KComboBox(pages[0]);
    nameBox->setEditable( true );
    nameBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);  // allow smaller than widest entry
    QLabel * namedL = new QLabel(i18nc("this is the label for the name textfield","&Named:"), pages[0]);
    namedL->setBuddy( nameBox );
    namedL->setObjectName( QLatin1String( "named" ) );
    namedL->setToolTip( i18n("You can use wildcard matching and \";\" for separating multiple names") );
    dirBox  = new KUrlComboBox(KUrlComboBox::Directories, pages[0]);
    dirBox->setEditable( true );
    dirBox->setCompletionObject(new KUrlCompletion(KUrlCompletion::DirCompletion));
    dirBox->setAutoDeleteCompletionObject(true);
    dirBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);  // allow smaller than widest entry
    QLabel * lookinL = new QLabel(i18n("Look &in:"), pages[0]);
    lookinL->setBuddy( dirBox );
    lookinL->setObjectName( QLatin1String( "lookin" ) );
    subdirsCb  = new QCheckBox(i18n("Include &subfolders"), pages[0]);
    caseSensCb  = new QCheckBox(i18n("Case s&ensitive search"), pages[0]);
    browseB    = new QPushButton(i18n("&Browse..."), pages[0]);
    useLocateCb = new QCheckBox(i18n("&Use files index"), pages[0]);
    hiddenFilesCb = new QCheckBox(i18n("Show &hidden files"), pages[0]);
    // Setup

    subdirsCb->setChecked(true);
    caseSensCb->setChecked(false);
    useLocateCb->setChecked(false);
    hiddenFilesCb->setChecked(false);
    if(KStandardDirs::findExe(QLatin1String("locate")).isEmpty())
        useLocateCb->setEnabled(false);

    nameBox->setDuplicatesEnabled(false);
    nameBox->setFocus();
    dirBox->setDuplicatesEnabled(false);

    nameBox->setInsertPolicy(QComboBox::InsertAtTop);
    dirBox->setInsertPolicy(QComboBox::InsertAtTop);

    const QString nameWhatsThis
      = i18n("<qt>Enter the filename you are looking for. <br />"
	     "Alternatives may be separated by a semicolon \";\".<br />"
	     "<br />"
	     "The filename may contain the following special characters:"
	     "<ul>"
	     "<li><b>?</b> matches any single character</li>"
	     "<li><b>*</b> matches zero or more of any characters</li>"
	     "<li><b>[...]</b> matches any of the characters between the braces</li>"
	     "</ul>"
	     "<br />"
	     "Example searches:"
	     "<ul>"
	     "<li><b>*.kwd;*.txt</b> finds all files ending with .kwd or .txt</li>"
	     "<li><b>go[dt]</b> finds god and got</li>"
	     "<li><b>Hel?o</b> finds all files that start with \"Hel\" and end with \"o\", "
	     "having one character in between</li>"
	     "<li><b>My Document.kwd</b> finds a file of exactly that name</li>"
	     "</ul></qt>");
    nameBox->setWhatsThis(nameWhatsThis);
    namedL->setWhatsThis(nameWhatsThis);
    const QString whatsfileindex
        = i18n("<qt>This lets you use the files' index created by the <i>slocate</i> "
               "package to speed-up the search; remember to update the index from time to time "
               "(using <i>updatedb</i>)."
               "</qt>");
    useLocateCb->setWhatsThis(whatsfileindex);

    // Layout

    QGridLayout *grid = new QGridLayout( pages[0] );
    grid->setMargin( KDialog::marginHint() );
    grid->setSpacing( KDialog::spacingHint() );
    QVBoxLayout *subgrid = new QVBoxLayout();
    grid->addWidget( namedL, 0, 0 );
    grid->addWidget( nameBox, 0, 1, 1, 3 );
    grid->addWidget( lookinL, 1, 0 );
    grid->addWidget( dirBox, 1, 1 );
    grid->addWidget( browseB, 1, 2);
    grid->setColumnStretch(1,1);
    grid->addLayout( subgrid, 2, 1, 1, 2 );
    
    QHBoxLayout * layoutOne = new QHBoxLayout();
    layoutOne->addWidget( subdirsCb );
    layoutOne->addWidget( hiddenFilesCb );
    
    QHBoxLayout * layoutTwo = new QHBoxLayout();
    layoutTwo->addWidget( caseSensCb);
    layoutTwo->addWidget( useLocateCb );
    
    subgrid->addLayout( layoutOne );
    subgrid->addLayout( layoutTwo );
    
//.........这里部分代码省略.........
开发者ID:KDE,项目名称:kde-baseapps,代码行数:101,代码来源:kftabdlg.cpp

示例15: QWidget

/**
 * Constructor of the class
 * @param parent
 * @param name
 * @return
 */
NMGModuleToolBoxItem::NMGModuleToolBoxItem( QWidget *parent, QString modName, const QColor & backgroundColor )
		: QWidget( parent )
{
	setObjectName( modName );
	setMouseTracking( true );

	QPalette palette;
	palette.setColor( backgroundRole(), backgroundColor );
	setPalette( palette );

	moduleName = modName;

	QVBoxLayout * layoutVertical = new QVBoxLayout( this );
	layoutVertical->setMargin( 0 );
	layoutVertical->setSpacing( 0 );
	layoutVertical->setObjectName( moduleName + "LayoutVertical" );

	QHBoxLayout * layoutHoritzontal = new QHBoxLayout( 0 );
	layoutHoritzontal->setMargin( 0 );
	layoutHoritzontal->setSpacing( 0 );
	layoutHoritzontal->setObjectName( moduleName + "LayoutHoritzontal" );

	QSpacerItem * leftSpacer = new QSpacerItem( 1, 21, QSizePolicy::Maximum, QSizePolicy::Minimum );
	layoutHoritzontal->addItem( leftSpacer );

	QString toolTip = (( NMGModuleParent * ) NMGModuleManager::self()->getModule( moduleName ) )->getModuleToolTip().c_str();

	QLabel * pixmapLabel1 = new QLabel( this );
	pixmapLabel1->setMaximumSize( QSize( 64, 64 ) );
	pixmapLabel1->setAlignment( Qt::AlignHCenter );
	pixmapLabel1->setObjectName( moduleName + "Label" );

	if ( !toolTip.isEmpty() )
	{
		pixmapLabel1->setToolTip( toolTip );
		pixmapLabel1->setWhatsThis( toolTip );
	}

	QString iconFile = (( NMGModuleParent * ) NMGModuleManager::self()->getModule( moduleName ) )->getModuleIcon().c_str();
	if ( iconFile.isEmpty() ) iconFile = DEFAULT_ICON_NAME;
	pixmapLabel1->setPixmap( * ( NMGImageManager::loadPixmap( iconFile ) ) );
	pixmapLabel1->setScaledContents( TRUE );
	layoutHoritzontal->addWidget( pixmapLabel1 );
	pixmapLabel1->setMouseTracking( true );

	QSpacerItem * rightSpacer = new QSpacerItem( 1, 21, QSizePolicy::Maximum, QSizePolicy::Minimum );
	layoutHoritzontal->addItem( rightSpacer );
	layoutVertical->addLayout( layoutHoritzontal );


	QLabel * txtModuleLabel = new QLabel( "<p align=\"center\">" + moduleName + "</p>", this );
	txtModuleLabel->setObjectName( moduleName + "Label" );
	if ( !toolTip.isEmpty() )
	{
		txtModuleLabel->setToolTip( toolTip );
		txtModuleLabel->setWhatsThis( toolTip );
	}

	QSizePolicy policy1( QSizePolicy::Preferred, QSizePolicy::Preferred );
	policy1.setHorizontalStretch( 0 );
	policy1.setVerticalStretch( 0 );
	policy1.setHeightForWidth( txtModuleLabel->sizePolicy().hasHeightForWidth() );
	txtModuleLabel->setSizePolicy( policy1 );

	/** Size of the label for the plugin's name at toolbar **/
	txtModuleLabel->adjustSize(); //setMaximumSize( QSize( 100, 150 ) );
	QPalette palettelabel;
	palettelabel.setColor( txtModuleLabel->backgroundRole(), backgroundColor );
	txtModuleLabel->setPalette( palettelabel );
	txtModuleLabel->setAlignment( Qt::AlignVCenter ); //how to 'or' with Qt::TextWordWrap ??
	layoutVertical->addWidget( txtModuleLabel );
}
开发者ID:Shwe-123,项目名称:netmeter,代码行数:78,代码来源:nmgmoduletoolboxitem.cpp


注:本文中的QLabel::setWhatsThis方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。