// ****************************************************************************************** // Create the widget // ****************************************************************************************** SelectModeWidget::SelectModeWidget( QWidget* parent ) : QFrame(parent) { // Set frame graphics setFrameShape(QFrame::StyledPanel); setFrameShadow(QFrame::Raised); setLineWidth(1); setMidLineWidth(0); // Basic widget container QVBoxLayout *layout = new QVBoxLayout(this); // Horizontal layout splitter QHBoxLayout *hlayout = new QHBoxLayout(); // Widget Title QLabel * widget_title = new QLabel(this); widget_title->setText( "Choose mode:" ); QFont widget_title_font( "Arial", 12, QFont::Bold ); widget_title->setFont(widget_title_font); layout->addWidget( widget_title); layout->setAlignment( widget_title, Qt::AlignTop); // Widget Instructions QLabel * widget_instructions = new QLabel(this); widget_instructions->setText( "All settings for MoveIt are stored in a Moveit configuration package. Here you have the option to create a new configuration package, or load an existing one. Note: any changes to a MoveIt configuration package outside this setup assistant will likely be overwritten by this tool." ); widget_instructions->setWordWrap(true); //widget_instructions->setMinimumWidth(1); widget_instructions->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ); layout->addWidget( widget_instructions); layout->setAlignment( widget_instructions, Qt::AlignTop); // New Button btn_new_ = new QPushButton(this); btn_new_->setText("Create &New MoveIt\nConfiguration Package"); hlayout->addWidget( btn_new_ ); // Exist Button btn_exist_ = new QPushButton(this); btn_exist_->setText("&Edit Existing MoveIt\nConfiguration Package"); hlayout->addWidget( btn_exist_ ); // Add horizontal layer to verticle layer layout->addLayout(hlayout); setLayout(layout); }
LuminanceRangeWidget::LuminanceRangeWidget( QWidget *parent ): QFrame( parent ), histogram( NULL ), histogramImage( NULL ), showVP( false ) { setFrameShape( QFrame::Box ); setMouseTracking( true ); minValue = -6; maxValue = 8; windowMin = 0; windowMax = 2; mouseDragStart = -1; dragShift = 0; }
AppView::AppView(App& app) : app_(app), toolbar_(*this), visibleAreaMode_(0), lineMode_(scene_), arrowMode_(scene_), rectMode_(scene_), currentMode_(visibleAreaMode_) { setFrameShape(QFrame::NoFrame); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); reinitVisibleArea(); setScene(&scene_); }
TimelineBar::TimelineBar(ICaptureContext &ctx, QWidget *parent) : QAbstractScrollArea(parent), m_Ctx(ctx) { m_Ctx.AddCaptureViewer(this); setMouseTracking(true); setFrameShape(NoFrame); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn); QObject::connect(horizontalScrollBar(), &QScrollBar::valueChanged, [this](int value) { m_pan = -value; }); setWindowTitle(tr("Timeline")); }
QIListView::QIListView (QWidget *aParent /* = 0 */) :QListView (aParent) { /* Track if the application lost the focus */ #if MAC_LEOPARD_STYLE connect (QCoreApplication::instance(), SIGNAL (focusChanged (QWidget *, QWidget *)), this, SLOT (focusChanged (QWidget *, QWidget *))); /* 1 pixel line frame */ setMidLineWidth (1); setLineWidth (0); setFrameShape (QFrame::Box); focusChanged (NULL, qApp->focusWidget()); /* Nesty hack to disable the focus rect on the list view. This interface * may change at any time! */ static_cast<QMacStyle *> (style())->setFocusRectPolicy (this, QMacStyle::FocusDisabled); #endif /* MAC_LEOPARD_STYLE */ }
DataMediaWidget::DataMediaWidget(IDataForms *ADataForms, const IDataMedia &AMedia, QWidget *AParent) : QLabel(AParent) { FMedia = AMedia; FDataForms = ADataForms; setTextFormat(Qt::PlainText); setFrameShape(QLabel::Panel); setFrameShadow(QLabel::Sunken); connect(FDataForms->instance(),SIGNAL(urlLoaded(const QUrl &, const QByteArray &)),SLOT(onUrlLoaded(const QUrl &, const QByteArray &))); connect(FDataForms->instance(),SIGNAL(urlLoadFailed(const QUrl &, const XmppError &)),SLOT(onUrlLoadFailed(const QUrl &, const XmppError &))); FUriIndex = 0; FLastError = XmppError(IERR_DATAFORMS_MEDIA_INVALID_TYPE); QTimer::singleShot(0,this,SLOT(loadUri())); }
SelectionListWidget::SelectionListWidget(QWidget *parent) : QListWidget(parent) { setAccessibleName(tr("Selection filter")); setAccessibleDescription(tr("Use Tab and Backtab to move through the check boxes")); setFrameShape(QFrame::NoFrame); setSelectionMode(QAbstractItemView::SingleSelection); setFocusPolicy(Qt::TabFocus); setTabKeyNavigation(true); for (int row = 0; row < numLabels; row++) { QListWidgetItem *listItem = new QListWidgetItem(qApp->translate("selectionfilter", labels[row]),this); listItem->setData(Qt::UserRole, QVariant(1 << row)); listItem->setData(Qt::AccessibleTextRole, qApp->translate("selectionfilter", labels[row])); listItem->setCheckState(Qt::Unchecked); addItem(listItem); } }
ClipboardBrowser::ClipboardBrowser(QWidget *parent, const ClipboardBrowserSharedPtr &sharedData) : QListView(parent) , m_itemLoader() , m_tabName() , m_lastFiltered(-1) , m(this) , d(this) , m_invalidateCache(false) , m_expireAfterEditing(false) , m_editor(NULL) , m_sharedData(sharedData ? sharedData : ClipboardBrowserSharedPtr(new ClipboardBrowserShared)) , m_loadButton(NULL) , m_searchProgress(NULL) , m_dragTargetRow(-1) , m_dragStartPosition() , m_spinLock(0) , m_scrollSaver() { setLayoutMode(QListView::Batched); setBatchSize(1); setFrameShape(QFrame::NoFrame); setTabKeyNavigation(false); setSelectionMode(QAbstractItemView::ExtendedSelection); setWrapping(false); setLayoutMode(QListView::SinglePass); setEditTriggers(QAbstractItemView::NoEditTriggers); setAlternatingRowColors(true); initSingleShotTimer( &m_timerSave, 30000, this, SLOT(saveItems()) ); initSingleShotTimer( &m_timerScroll, 50 ); initSingleShotTimer( &m_timerUpdate, 10, this, SLOT(doUpdateCurrentPage()) ); initSingleShotTimer( &m_timerFilter, 10, this, SLOT(filterItems()) ); initSingleShotTimer( &m_timerExpire, 0, this, SLOT(expire()) ); // ScrollPerItem doesn't work well with hidden items setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); connect( verticalScrollBar(), SIGNAL(valueChanged(int)), SLOT(updateCurrentPage()) ); setAttribute(Qt::WA_MacShowFocusRect, 0); setAcceptDrops(true); connectModelAndDelegate(); }
void SlotInspectorSection::on_layerModelRemoved(const Process::LayerModel& removed) { // OPTIMIZEME m_lmSection->removeAll(); auto frame = new QFrame{this}; m_lmGridLayout = new iscore::MarginLess<QGridLayout>{frame}; frame->setFrameShape(QFrame::StyledPanel); for (const auto& lm : m_model.layers) { if (lm.id() != removed.id()) { displayLayerModel(lm); } } }
QgsComposerView::QgsComposerView( QWidget* parent, const char* name, Qt::WFlags f ) : QGraphicsView( parent ) , mRubberBandItem( 0 ) , mRubberBandLineItem( 0 ) , mMoveContentItem( 0 ) , mPaintingEnabled( true ) , mHorizontalRuler( 0 ) , mVerticalRuler( 0 ) { Q_UNUSED( f ); Q_UNUSED( name ); setResizeAnchor( QGraphicsView::AnchorViewCenter ); setMouseTracking( true ); viewport()->setMouseTracking( true ); setFrameShape( QFrame::NoFrame ); }
QgsMessageBar::QgsMessageBar( QWidget *parent ) : QFrame( parent ), mCurrentItem( NULL ) { QPalette pal = palette(); pal.setBrush( backgroundRole(), pal.window() ); setPalette( pal ); setAutoFillBackground( true ); setFrameShape( QFrame::StyledPanel ); setFrameShadow( QFrame::Plain ); mLayout = new QGridLayout( this ); mLayout->setContentsMargins( 9, 1, 9, 1 ); setLayout( mLayout ); mItemCount = new QLabel( this ); mItemCount->setObjectName( "mItemCount" ); mItemCount->setToolTip( tr( "Remaining messages" ) ); mItemCount->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Preferred ); mLayout->addWidget( mItemCount, 0, 1, 1, 1 ); mCloseMenu = new QMenu( this ); mCloseMenu->setObjectName( "mCloseMenu" ); mActionCloseAll = new QAction( tr( "Close all" ), this ); mCloseMenu->addAction( mActionCloseAll ); connect( mActionCloseAll, SIGNAL( triggered() ), this, SLOT( clearWidgets() ) ); mCloseBtn = new QToolButton( this ); mCloseBtn->setToolTip( tr( "Close" ) ); mCloseBtn->setMinimumWidth( 36 ); mCloseBtn->setStyleSheet( "QToolButton { background-color: rgba(255, 255, 255, 0); } " "QToolButton::menu-indicator { subcontrol-position: right bottom; subcontrol-origin: padding; bottom: 6px; }" ); mCloseBtn->setCursor( Qt::PointingHandCursor ); mCloseBtn->setIcon( QgsApplication::getThemeIcon( "/mIconClose.png" ) ); mCloseBtn->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Preferred ); mCloseBtn->setMenu( mCloseMenu ); connect( mCloseBtn, SIGNAL( clicked() ), this, SLOT( popWidget() ) ); mLayout->addWidget( mCloseBtn, 0, 2, 1, 1 ); connect( this, SIGNAL( widgetAdded( QWidget* ) ), this, SLOT( updateItemCount() ) ); connect( this, SIGNAL( widgetRemoved( QWidget* ) ), this, SLOT( updateItemCount() ) ); // start hidden setVisible( false ); }
void LoopLibraryDialog::newItem( const AddToModelEnum & addToModelEnum, const QString & detailedText, const QPixmap & pixmap ) { auto itemView = new LoopItemView( addToModelEnum, detailedText, pixmap ); connect(itemView, &LoopItemView::addToModelClicked, this, &LoopLibraryDialog::onAddToModelClicked); m_scrollArea->widget()->layout()->addWidget(itemView); auto divider = new QFrame(); divider->setFrameShape(QFrame::HLine); divider->setFrameShadow(QFrame::Sunken); m_scrollArea->widget()->layout()->addWidget(divider); }
ClickLabel::ClickLabel(QWidget *parent) :QLabel(parent) { QFont fnt( font() ); fnt.setBold(true); setFont( fnt ); setFrameShape( QLabel::Panel ); setFrameShadow( QLabel::Sunken ); setAlignment( Qt::AlignCenter ); setToolTip( tr("Double click for details") ); setAutoFillBackground(true); QPalette pal = palette(); QColor col = QColor(0xff, 0xff, 0xff); pal.setColor(QPalette::Normal, QPalette::Window, col ); pal.setColor(QPalette::Inactive, QPalette::Window, col ); setPalette( pal ); }
InboxButtonView::InboxButtonView(QWidget* parent) : QGraphicsView(parent), m_usedWidth(0) { setMinimumHeight( 24 ); setMaximumHeight( minimumHeight() ); setFrameShape(QFrame::NoFrame); setFrameShadow(QFrame::Plain); setLineWidth(0); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setInteractive(true); setAttribute(Qt::WA_Hover, true); setAlignment(Qt::AlignLeft | Qt::AlignTop); m_scene = new QGraphicsScene(this); setScene( m_scene ); }
/* * The special controller with drag'n drop abilities. * We don't do this in the main controller, since we don't want the OverHead * to propagate there too */ DroppingController::DroppingController( intf_thread_t *_p_intf, const QString& line, QWidget *_parent ) : AbstractController( _p_intf, _parent ) { RTL_UNAFFECTED_WIDGET rubberband = NULL; b_draging = false; setAcceptDrops( true ); controlLayout = new QHBoxLayout( this ); controlLayout->setSpacing( 5 ); controlLayout->setMargin( 0 ); setFrameShape( QFrame::StyledPanel ); setFrameShadow( QFrame::Raised ); setMinimumHeight( 20 ); parseAndCreate( line, controlLayout ); }
FilterPortWidget::FilterPortWidget(int filterId, const PortInfo& info, QWidget *parent) : QFrame(parent), ui(new Ui::FilterPortWidget()), mFilterId(filterId), mInfo(info) { QString a = info.desc; ui->setupUi(this); ui->text->setToolTip(info.desc); setNewName(info.name); if(!info.icon.isNull()) ui->icon->setPixmap(QPixmap::fromImage(info.icon).scaled(16,16, Qt::KeepAspectRatio)); ui->icon->setToolTip(info.typeName); setFrameShadow(QFrame::Sunken); setFrameShape(QFrame::Box); setFixedSize(120,18); }
BasicContactViewer::BasicContactViewer(const LinQedInUser& us,QWidget* parent):QFrame(parent),user(us){ setFrameShape(QFrame::Box); setStyleSheet("QFrame, QFrame * {font:15px;background:"+GUIStyle::lightGold()+";font-weight:bold;}"+ GUIStyle::popupButtonStyle()); mainVerticalLayout=new QVBoxLayout; name=new QLabel(user.getProfile().getPersonalInformations().getName()+' '+ user.getProfile().getPersonalInformations().getSurname(),this); mainVerticalLayout->addWidget(name,0,Qt::AlignTop | Qt::AlignCenter); email=new QLabel(user.getLoginInfo().getEmailAddress(),this); mainVerticalLayout->addWidget(email,0,Qt::AlignTop | Qt::AlignCenter); try{ const Occupations& o=dynamic_cast<const Occupations&>(us.getProfile().getInformationsBySectionName(Occupations::getIDString())); actualJob=new QLabel(o.getActualJob().getCompany()+" come "+o.getActualJob().getEmployment(),this); }catch(const NoInfoException&){actualJob=new QLabel(tr("Nessuna informazione sul lavoro"),this);} mainVerticalLayout->addWidget(actualJob,0,Qt::AlignTop | Qt::AlignCenter); ClientProfileWidget* cpw=dynamic_cast<ClientProfileWidget*>(parent); buttonsLayout=new QHBoxLayout; viewProfile=new QPushButton("Visualizza profilo"); viewProfile->setCursor(QCursor(Qt::PointingHandCursor)); if(cpw && ((!cpw->equals && cpw->client->getPermits().getVisibleInfos()) || cpw->equals)) buttonsLayout->addWidget(viewProfile); removeContact=new QPushButton("Rimuovi contatto"); removeContact->setCursor(QCursor(Qt::PointingHandCursor)); addContact=new QPushButton("Aggiungi Contatto"); addContact->setCursor(QCursor(Qt::PointingHandCursor)); if(cpw->client->getLoginInfo().getEmailAddress()!=user.getLoginInfo().getEmailAddress()){ if(cpw && cpw->client->getContactsNetwork().findUser(user.getLoginInfo().getEmailAddress())){ buttonsLayout->addWidget(removeContact); addContact->setVisible(false); }//if else{ buttonsLayout->addWidget(addContact); removeContact->setVisible(false); }//else }//if mainVerticalLayout->addLayout(buttonsLayout); setLayout(mainVerticalLayout); connect(removeContact,SIGNAL(clicked()),this,SLOT(sendRemovalRequest())); connect(viewProfile,SIGNAL(clicked()),this,SLOT(sendViewRequest())); connect(addContact,SIGNAL(clicked()),this,SLOT(sendAddingRequest())); }//BasicContactViewer
int QFrame::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; #ifndef QT_NO_PROPERTIES if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< Shape*>(_v) = frameShape(); break; case 1: *reinterpret_cast< Shadow*>(_v) = frameShadow(); break; case 2: *reinterpret_cast< int*>(_v) = lineWidth(); break; case 3: *reinterpret_cast< int*>(_v) = midLineWidth(); break; case 4: *reinterpret_cast< int*>(_v) = frameWidth(); break; case 5: *reinterpret_cast< QRect*>(_v) = frameRect(); break; } _id -= 6; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setFrameShape(*reinterpret_cast< Shape*>(_v)); break; case 1: setFrameShadow(*reinterpret_cast< Shadow*>(_v)); break; case 2: setLineWidth(*reinterpret_cast< int*>(_v)); break; case 3: setMidLineWidth(*reinterpret_cast< int*>(_v)); break; case 5: setFrameRect(*reinterpret_cast< QRect*>(_v)); break; } _id -= 6; } else if (_c == QMetaObject::ResetProperty) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 6; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 6; } #endif // QT_NO_PROPERTIES return _id; }
//################################################################################################# //################### TsupportStandalone ############################################ //################################################################################################# TsupportStandalone::TsupportStandalone(QWidget* parent) : QDialog(parent) { #if defined (Q_OS_ANDROID) showMaximized(); #else setWindowTitle("Support Nootka"); auto leftLab = new QLabel(this); leftLab->setPixmap(QPixmap(Tpath::img("wizard-left"))); #endif QString dontWorry = QApplication::translate("TsupportNootka", "Don't worry. This window appears only once per Nootka release.<br>You can find it always in 'About Nootka' dialog"); auto supportArea = new TsupportNootka(this); supportArea->setFrameShape(QFrame::QFrame::StyledPanel); // auto neverLab = new TroundedLabel(dontWorry, this); // neverLab->setAlignment(Qt::AlignCenter); // neverLab->setBackroundColor(palette().base().color()); // neverLab->setStyleSheet("color: palette(highlightedText)"); // neverLab->setContentsMargins(5, 5, 5, 5); auto thanksButton = new QPushButton(QIcon(Tpath::img("support")), QLatin1String(" Thanks!"), this); #if defined (Q_OS_ANDROID) thanksButton->setIconSize(QSize(Tmtr::fingerPixels(), Tmtr::fingerPixels())); #else thanksButton->setIconSize(QSize(64, 64)); #endif // Layout auto lay = new QHBoxLayout; #if defined (Q_OS_ANDROID) lay->setContentsMargins(0, 0, 0, 0); #else lay->addWidget(leftLab); lay->setSizeConstraint(QLayout::SetFixedSize); #endif auto supportLay = new QVBoxLayout(); supportLay->addWidget(supportArea); auto bottomLay = new QHBoxLayout; // bottomLay->addWidget(neverLab); bottomLay->addWidget(thanksButton, 0, Qt::AlignCenter); supportLay->addLayout(bottomLay); lay->addLayout(supportLay); setLayout(lay); connect(thanksButton, SIGNAL(clicked(bool)), this, SLOT(accept())); }
HangoutViewCameraWidget::HangoutViewCameraWidget(QWidget *parent) : QFrame(parent), _minSize(160, 113), _widget(nullptr) { auto pal = palette(); pal.setColor(QPalette::Foreground, __frameColor); setPalette(pal); setMouseTracking(true); setAutoFillBackground(true); setFrameShape(QFrame::Box); setWindowFlags(Qt::SubWindow); setMinimumSize(_minSize); _sizeGrip = new QSizeGrip(this); addDropShadowEffect(this); }
KNNotificationView::KNNotificationView(QWidget *parent) : QListView(parent) { setObjectName("NotificationView"); //Set properties. setAutoFillBackground(true); setFrameShape(QFrame::NoFrame); setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); //Set delegate. setItemDelegate(new KNNotificationDelegate(this)); //Configure the scroll bar. KNSaoStyle::styleVerticalScrollBar(verticalScrollBar()); //Register the widget to theme manager. knTheme->registerWidget(this); //Link international translated. knI18n->link(this, &KNNotificationView::retranslate); retranslate(); }
MusicToolSetsWidget::MusicToolSetsWidget(QWidget *parent) : QListWidget(parent), m_musicSpectrumWidget(NULL), m_wallpaper(NULL), m_process(NULL) { setAttribute(Qt::WA_TranslucentBackground, true); setFrameShape(QFrame::NoFrame);//Set No Border setStyleSheet(MusicUIObject::MScrollBarStyle01); setIconSize(QSize(60, 60)); setViewMode(QListView::IconMode); setMovement(QListView::Static); setSpacing(20); setTransparent(50); connect(this, SIGNAL(itemClicked(QListWidgetItem*)), SLOT(itemHasClicked(QListWidgetItem*))); addListWidgetItem(); M_CONNECTION->setValue("MusicToolSetsWidget", this); M_CONNECTION->connect("MusicToolSetsWidget", "MusicApplication"); }
UIGDetailsView::UIGDetailsView(QWidget *pParent) : QGraphicsView(pParent) , m_iMinimumWidthHint(0) , m_iMinimumHeightHint(0) { /* Prepare palette: */ preparePalette(); /* Setup frame: */ setFrameShape(QFrame::NoFrame); setFrameShadow(QFrame::Plain); setAlignment(Qt::AlignLeft | Qt::AlignTop); /* Setup scroll-bars policy: */ setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); /* Update scene-rect: */ updateSceneRect(); }
IconView::IconView( QWidget* parent ) : QListView(parent),m_pixmap(0),m_actionCollection(this) { setViewMode( QListView::IconMode ); setFlow( QListView::TopToBottom ); setSelectionRectVisible( true ); setGridSize( QSize( 64, 64 ) ); setSpacing( 2 ); setUniformItemSizes( true ); setEditTriggers( QAbstractItemView::EditKeyPressed ); setSelectionMode( QAbstractItemView::ExtendedSelection ); setFrameShape( QFrame::NoFrame ); setAutoFillBackground( true ); // setAttribute(Qt::WA_PaintOutsidePaintEvent); // setStyleSheet( "background-color: transparent" ); setObjectName( "iconview" ); /// lazy initialization QTimer::singleShot( 0, this, SLOT(init()) ); }
CCharTip::CCharTip(CFontPreview *parent) : QFrame(0, Qt::ToolTip | Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint), itsParent(parent) { itsPixmapLabel = new QLabel(this); itsLabel = new QLabel(this); itsTimer = new QTimer(this); QBoxLayout* layout = new QBoxLayout(QBoxLayout::LeftToRight, this); layout->setMargin(8); layout->setSpacing(0); layout->addWidget(itsPixmapLabel); layout->addWidget(itsLabel); setPalette(QToolTip::palette()); setFrameShape(QFrame::Box); setFrameShadow(QFrame::Plain); hide(); }
//BEGIN class CVBEditor CVBEditor::CVBEditor(Canvas *canvas, ItemView *itemView, const char *name) : QCanvasView(canvas, itemView, name, WNoAutoErase | WStaticContents) { m_pCanvas = canvas; b_ignoreEvents = false; b_passEventsToView = true; p_itemView = itemView; setMouseTracking(true); viewport()->setMouseTracking(true); setAcceptDrops(true); setFrameShape(NoFrame); // setEraseColor( KTLConfig::bgColor() ); setEraseColor(Qt::white); setPaletteBackgroundColor(Qt::white); viewport()->setEraseColor(Qt::white); viewport()->setPaletteBackgroundColor(Qt::white); connect(canvas, SIGNAL(resized(const QRect&, const QRect&)), this, SLOT(canvasResized(const QRect&, const QRect&))); }
FormBase::FormBase(KLDatabase *db, QWidget *parent, const char *name) : QVBox(parent, name), m_type(Any) { setMargin(10); setFrameShape(QFrame::Box ); setFrameShadow(QFrame::Raised); m_labelTitle = new QLabel(this); m_labelExplanation = new QLabel(this); m_labelExplanation->setMargin (10); Q_CHECK_PTR(db); if ( db ) { connect(this, SIGNAL(sendQuery(KLQuery* )), db, SLOT(execQuery(KLQuery* ))); connect(this, SIGNAL(sendRawQuery(const QString& )), db, SLOT(execRawQuery(const QString& ))); connect(db, SIGNAL(executed(bool )), this, SLOT(wasExecuted(bool ))); } }
EditorListWidget::EditorListWidget(QWidget *pParent) : QListView(pParent), Core::CommonWidget(this), mModel(new QStandardItemModel(this)) { // Customise ourselves #ifdef Q_OS_MAC setAttribute(Qt::WA_MacShowFocusRect, false); #endif setEditTriggers(QAbstractItemView::NoEditTriggers); setFrameShape(QFrame::NoFrame); setModel(mModel); // Create our context menu mContextMenu = new QMenu(this); mClearAction = Core::newAction(this); mCopyToClipboardAction = Core::newAction(this); connect(mClearAction, &QAction::triggered, this, &EditorListWidget::clear); connect(mCopyToClipboardAction, &QAction::triggered, this, &EditorListWidget::copyToClipboard); mContextMenu->addAction(mClearAction); mContextMenu->addSeparator(); mContextMenu->addAction(mCopyToClipboardAction); // Make sure that we are properly initialised clear(); // A connection to handle a double click on a given item connect(this, &EditorListWidget::doubleClicked, this, &EditorListWidget::requestItem); // Retranslate ourselves, so that our actions are properly initialised retranslateUi(); }
DownloadAbstractTableWidget::DownloadAbstractTableWidget(QWidget *parent) : QTableWidget(parent) { setAttribute(Qt::WA_TranslucentBackground); setFont(QFont("Helvetica")); setColumnCount(3); setRowCount(0); setShowGrid(false);//Does not display the grid QHeaderView *headerview = horizontalHeader(); headerview->setVisible(false); headerview->resizeSection(0, 20); headerview->resizeSection(1, 247); headerview->resizeSection(2, 45); verticalHeader()->setVisible(false); setMouseTracking(true); //Open the capture mouse function setStyleSheet(DownloadUIObject::MTableWidgetStyle01 + \ DownloadUIObject::MScrollBarStyle03 + \ DownloadUIObject::MLineEditStyle01 ); QFont f = font(); f.setBold(false); setFont(f); //Set the color of selected row setFrameShape(QFrame::NoFrame);//Set No Border setEditTriggers(QTableWidget::NoEditTriggers);//No edit setSelectionBehavior(QTableWidget::SelectRows); //Multi-line election setSelectionMode(QAbstractItemView::SingleSelection); setFocusPolicy(Qt::NoFocus); DownloadUtils::Widget::setTransparent(this, 0); m_previousColorRow = -1; m_previousClickRow = -1; m_defaultBkColor = QColor(255, 255, 255, 0); connect(this, SIGNAL(cellEntered(int,int)), SLOT(listCellEntered(int,int))); connect(this, SIGNAL(cellClicked(int,int)), SLOT(listCellClicked(int,int))); }
IconView::IconView(QGraphicsScene * scene, const QString & configId, RazorSettings * config) : DesktopWidgetPlugin(scene, configId, config) { setObjectName("IconView"); m_config->beginGroup(configId); QString dir = QDesktopServices::storageLocation(QDesktopServices::DesktopLocation); dir = m_config->value("directory", dir).toString(); m_config->endGroup(); // Hack to ensure the fully transparent QGraphicsView background QPalette palette; palette.setBrush(QPalette::Base, Qt::NoBrush); setPalette(palette); // Required to display wallpaper setAttribute(Qt::WA_TranslucentBackground); // no border at all finally setFrameShape(QFrame::NoFrame); setAcceptDrops(true); m_scene = new IconScene(dir); setScene(m_scene); setRenderHint(QPainter::Antialiasing); setRenderHint(QPainter::TextAntialiasing); setRenderHint(QPainter::SmoothPixmapTransform); setRenderHint(QPainter::HighQualityAntialiasing); setDragMode(QGraphicsView::RubberBandDrag); setViewportUpdateMode(QGraphicsView::SmartViewportUpdate); setCacheMode(QGraphicsView::CacheBackground); setAlignment(Qt::AlignTop | Qt::AlignLeft); // "cool" display effect setWindowOpacity(0.0); }