本文整理汇总了C++中setFrameShadow函数的典型用法代码示例。如果您正苦于以下问题:C++ setFrameShadow函数的具体用法?C++ setFrameShadow怎么用?C++ setFrameShadow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setFrameShadow函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: switch
bool ShortcutWidget::event(QEvent * e)
{
switch (e->type()) {
case QEvent::FocusOut:
has_cursor_ = false;
setFrameShadow(QFrame::Raised);
break;
case QEvent::FocusIn:
has_cursor_ = true;
setFrameShadow(QFrame::Sunken);
break;
case QEvent::ShortcutOverride:
// accepting the ShortcutOverride event lets us override shortcuts
// and capture them as keypress events instead
e->accept();
return true;
case QEvent::KeyPress:
keyPressEvent(static_cast<QKeyEvent *>(e));
return true;
case QEvent::KeyRelease:
case QEvent::Shortcut:
return true;
default:
break;
}
return QLabel::event(e);
}
开发者ID:cburschka,项目名称:lyx,代码行数:27,代码来源:CustomizedWidgets.cpp
示例2: setFrameShape
void TSeparator::setOrientation(Qt::Orientation orientation)
{
if (orientation == Qt::Vertical) {
setFrameShape(QFrame::VLine);
setFrameShadow(QFrame::Sunken);
setMinimumSize(2, 0);
} else {
setFrameShape(QFrame::HLine);
setFrameShadow(QFrame::Sunken);
setMinimumSize(0, 2);
}
}
开发者ID:hpsaturn,项目名称:tupi,代码行数:12,代码来源:tseparator.cpp
示例3: QLCDNumber
DigitalClock::DigitalClock(QWidget *parent)
: QLCDNumber(parent)
{
setSegmentStyle(Filled);
// setSegmentStyle(Outline);
// setSegmentStyle(Flat);
setAutoFillBackground(true);
setStyle(QStyleFactory::create(tr("Windows")) );
QPalette palette;
QBrush brush(QColor(255, 0, 0, 255));
brush.setStyle(Qt::SolidPattern);
palette.setBrush(QPalette::Active, QPalette::WindowText, brush);
palette.setBrush(QPalette::Inactive, QPalette::WindowText, brush);
setPalette(palette);
setFrameShape(QFrame::NoFrame);
setFrameShadow(QFrame::Plain);
QTimer *timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(showTime()));
timer->start(1000);
showTime();
// setWindowTitle(tr("Digital Clock"));
// resize(150, 60);
}
开发者ID:Sangil-Lee,项目名称:RefCode,代码行数:33,代码来源:digitalclock.cpp
示例4: QFrame
GradientPreview::GradientPreview(QWidget *pa) : QFrame(pa)
{
setFrameShape( QFrame::Panel );
setFrameShadow( QFrame::Sunken );
setLineWidth( 2 );
setMinimumSize(QSize(200, 70));
setMaximumSize(QSize(3000, 70));
setMouseTracking(true);
setFocusPolicy(Qt::ClickFocus);
Mpressed = false;
outside = true;
onlyselect = true;
isEditable = true;
fill_gradient = VGradient(VGradient::linear);
fill_gradient.clearStops();
QColor color;
color = QColor(255,255,255);
fill_gradient.addStop( color, 0.0, 0.5, 1.0 );
color = QColor(0,0,0);
fill_gradient.addStop( color, 1.0, 0.5, 1.0 );
QList<VColorStop*> cstops = fill_gradient.colorStops();
StopM.clear();
ActStop = 0;
for (uint a = 0; a < fill_gradient.Stops(); ++a)
{
int center = qRound(cstops.at(a)->rampPoint * (width()-20))+10;
StopM.append(center);
}
}
开发者ID:andreas-vox,项目名称:ScribusCTL,代码行数:31,代码来源:gradientpreview.cpp
示例5: QLabel
CtrlRenders::CtrlRenders( QWidget * i_parent, ListRenders * i_renderslist):
QLabel("View Options", i_parent ),
m_list( i_renderslist)
{
setFrameShape(QFrame::StyledPanel);
setFrameShadow(QFrame::Raised);
}
开发者ID:CGRU,项目名称:cgru,代码行数:7,代码来源:ctrlrenders.cpp
示例6: setLineWidth
/** Slot appelé lors de click de case **/
void Case::deminage(){
if(!hasCase || black) return;
hasCase = false;
thirdMark = false;
setLineWidth(1);
setMidLineWidth(0);
setFrameShape(QFrame::Panel);
setFrameShadow(QFrame::Sunken);
label->setText(showValue(value));
if(flag && notMine()){
emit signalCaseFlag(false);
}
else{
emit signalDemine();
if(value >= 9){
label->setText(showValue(value, QString("red"), QString("black")));
emit signalGameOver(false);
}
else if(value == 0){
emit signalDemineAroundCase(x, y);
}
}
}
开发者ID:druiduz,项目名称:Qetamines,代码行数:28,代码来源:Case.cpp
示例7: QFrame
BtColorWidget::BtColorWidget(QWidget* parent)
: QFrame(parent) {
setFrameShadow(QFrame::Sunken);
setFrameShape(QFrame::StyledPanel);
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
setAutoFillBackground(true);
}
开发者ID:Gandh1PL,项目名称:bibletime,代码行数:7,代码来源:btcolorwidget.cpp
示例8: QListWidget
//-----------------------------------------------------------------------------
// Function: TextContentAssistWidget()
//-----------------------------------------------------------------------------
TextContentAssistWidget::TextContentAssistWidget(QPlainTextEdit* target, QWidget* parentWnd,
QSharedPointer<ITextContentMatcher> matcher)
: QListWidget(parentWnd),
target_(target),
matcher_(matcher),
maxVisibleItems_(DEFAULT_MAX_VISIBLE_ITEMS),
lastAssistStartPos_(-1),
contentFound_(false),
toolTipHintWidget_()
{
Q_ASSERT(target != 0);
Q_ASSERT(matcher != 0);
// Set widget settings.
//setWindowFlags(Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint);
setFrameShadow(QFrame::Raised);
setFocusPolicy(Qt::NoFocus);
setFont(QFont("Tahoma", 10));
// We want the widget to look active even though it is inactive.
QPalette pal = palette();
pal.setColor(QPalette::Inactive, QPalette::Highlight, Qt::darkBlue);
pal.setColor(QPalette::Inactive, QPalette::HighlightedText, Qt::white);
setPalette(pal);
hideAssist();
}
开发者ID:kammoh,项目名称:kactus2,代码行数:30,代码来源:TextContentAssistWidget.cpp
示例9: setFrameShape
/* normalize label */
void KbfxPixmapLabel::normalize ()
{
setFrameShape ( QLabel::NoFrame );
setFrameShadow ( QLabel::Plain );
setScaledContents ( FALSE );
setAlignment ( int ( QLabel::WordBreak | QLabel::AlignCenter ) );
}
开发者ID:plexydesk,项目名称:kbfxmenu,代码行数:8,代码来源:kbfxpixmaplabel.cpp
示例10: QLabel
DragLabel::DragLabel(const QString &text, QWidget *parent)
: QLabel(text, parent)
{
setAutoFillBackground(true);
setFrameShape(QFrame::Panel);
setFrameShadow(QFrame::Raised);
}
开发者ID:AlexSoehn,项目名称:qt-base-deb,代码行数:7,代码来源:draglabel.cpp
示例11: QFrame
CWizGroupAttributeForm::CWizGroupAttributeForm(CWizExplorerApp& app, QWidget* parent)
: QFrame(parent)
, m_app(app)
, m_web(new QWebView(parent))
{
setFrameShadow(QFrame::Raised);
setFrameShape(QFrame::StyledPanel);
setAutoFillBackground(true);
setAttribute(Qt::WA_MacShowFocusRect, true);
QVBoxLayout* layout = new QVBoxLayout(this);
setLayout(layout);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
layout->addWidget(m_web);
QPushButton* btnClose = new QPushButton(this);
btnClose->setDefault(true);
btnClose->setIcon(::WizLoadSkinIcon(app.userSettings().skin(), palette().window().color(), "sheetHide"));
btnClose->setFlat(true);
btnClose->setMaximumHeight(18);
btnClose->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
connect(btnClose, SIGNAL(clicked()), SLOT(on_btnClose_clicked()));
layout->addWidget(btnClose);
layout->setAlignment(btnClose, Qt::AlignHCenter);
connect(&m_api, SIGNAL(clientLoginDone()), SLOT(on_clientLoginDone()));
}
开发者ID:runforprogram,项目名称:WizQTClient,代码行数:32,代码来源:wizGroupAttributeForm.cpp
示例12: QFrame
//
// class ReportResizeBar
//
ReportResizeBar::ReportResizeBar(QWidget * parent, Qt::WFlags f)
: QFrame(parent, f) {
setMinimumHeight(5);
setMaximumHeight(5);
setCursor(QCursor(Qt::SizeVerCursor));
setFrameShape(QFrame::StyledPanel);
setFrameShadow(QFrame::Raised);
}
开发者ID:Wushaowei001,项目名称:xtuple,代码行数:11,代码来源:reportsection.cpp
示例13: QTextEdit
TextEditor::TextEditor(Graph *g): QTextEdit(g), d_target(NULL)
{
setAttribute(Qt::WA_DeleteOnClose);
setFrameShadow(QFrame::Plain);
setFrameShape(QFrame::Box);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
QPalette palette = this->palette();
palette.setColor(QPalette::Active, QPalette::WindowText, Qt::blue);
palette.setColor(QPalette::Active, QPalette::Base, Qt::white);
setPalette(palette);
QString text;
if (g->selectedText()){
d_target = g->selectedText();
setGeometry(d_target->geometry());
auto legend = dynamic_cast<LegendWidget*>(d_target);
text = legend ? legend->text() : "";
d_target->hide();
} else if (g->titleSelected()){
d_target = g->plotWidget()->titleLabel();
QwtText t = g->plotWidget()->title();
text = t.text();
setAlignment((Qt::Alignment)t.renderFlags());
setGeometry(d_target->geometry());
} else if (g->selectedScale()){
d_target = g->selectedScale();
QwtScaleWidget *scale = (QwtScaleWidget*)d_target;
QwtText t = scale->title();
text = t.text();
setAlignment((Qt::Alignment)t.renderFlags());
QRect rect = g->axisTitleRect(scale);
if (scale->alignment() == QwtScaleDraw::BottomScale ||
scale->alignment() == QwtScaleDraw::TopScale){
resize(rect.size());
move(QPoint(d_target->x() + rect.x(), d_target->y() + rect.y()));
} else {
resize(QSize(rect.height(), rect.width()));
if (scale->alignment() == QwtScaleDraw::LeftScale)
move(QPoint(d_target->x() + rect.x(), d_target->y() + rect.y() + rect.height()/2));
else if (scale->alignment() == QwtScaleDraw::RightScale)
move(QPoint(d_target->x() - rect.height(), d_target->y() + rect.y() + rect.height()/2));
t.setText(" ");
t.setBackgroundPen(QPen(Qt::NoPen));
scale->setTitle(t);
}
}
QTextCursor cursor = textCursor();
cursor.insertText(text);
d_initial_text = text;
show();
setFocus();
}
开发者ID:dezed,项目名称:mantid,代码行数:58,代码来源:TextEditor.cpp
示例14: setContactInfo
void ContactWidgetItem::showContactInfo()
{
if (!m_info) {
setContactInfo();
m_info = true;
}
if (m_show) {
setFrameShadow(Plasma::Frame::Raised);
if (!isEmpty()) {
m_mainLayout->removeItem(m_infoText);
m_infoText->hide();
}
m_mainLayout->removeItem(m_edit);
m_edit->hide();
m_show = false;
} else {
setFrameShadow(Plasma::Frame::Sunken);
if (!isEmpty()) {
m_mainLayout->addItem(m_infoText);
m_infoText->show();
}
m_mainLayout->addItem(m_edit);
m_edit->show();
m_show = true;
}
}
开发者ID:kyriakosbrastianos,项目名称:akonadi-google-plasmoids,代码行数:45,代码来源:contactwidgetitem.cpp
示例15: QFrame
Line::Line(Qt::Orientation orient, QWidget *parent)
: QFrame(parent)
{
setFrameShadow(Sunken);
if (orient == Qt::Horizontal)
setFrameShape(HLine);
else
setFrameShape(VLine);
}
开发者ID:crayonink,项目名称:calligra-2,代码行数:9,代码来源:stdwidgetfactory.cpp
示例16: QFrame
AWebViewWidget::AWebViewWidget (QWidget* parent) : QFrame (parent)
{
View = new AWebView(this);
View->setGeometry(2, 2, width() - 4, height() - 4);
View->setHtml(QString());
setFrameShape(QFrame::StyledPanel);
setFrameShadow(QFrame::Sunken);
}
开发者ID:kan-izh,项目名称:avalon,代码行数:9,代码来源:web_view.cpp
示例17: QVBox
FormBase::FormBase( QWidget *parent, const char *name) : QVBox(parent, name), m_accept(0), m_cancel(0)
{
setMargin(10);
setFrameShape(QFrame::Box );
setFrameShadow(QFrame::Raised);
m_labelTitle = new QLabel(this);
m_labelExplanation = new QLabel(this);
m_labelExplanation->setMargin (10);
}
开发者ID:BackupTheBerlios,项目名称:kludoteca-svn,代码行数:9,代码来源:formbase.cpp
示例18: QLabel
FDialogPreview::FDialogPreview(QWidget *pa) : QLabel(pa)
{
setAlignment(Qt::AlignLeft | Qt::AlignTop);
setFixedSize( QSize( 200, 200 ) );
setScaledContents( false );
setFrameShape( QLabel::WinPanel );
setFrameShadow( QLabel::Sunken );
updtPix();
}
开发者ID:moceap,项目名称:scribus,代码行数:9,代码来源:customfdialog.cpp
示例19: QFrame
TableSideSelector::TableSideSelector(QWidget* parent) : QFrame(parent)
{
setSelection(All);
setStyle(TableStyle);
setFrameShape(QFrame::StyledPanel);
setFrameShadow(QFrame::Sunken);
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
setMouseTracking(true);
}
开发者ID:Fahad-Alsaidi,项目名称:scribus-svn,代码行数:9,代码来源:tablesideselector.cpp
示例20: QFrame
qPBReaderSeparatorWidget::qPBReaderSeparatorWidget(bool bHorizontalBar,
QWidget * parent,
Qt::WindowFlags f,
const QString & isName) :
QFrame(parent, f)
{
setObjectName(isName);
setFrameShadow(QFrame::Plain);
setFrameShape(bHorizontalBar ? QFrame::HLine : QFrame::VLine);
}
开发者ID:m4mmon,项目名称:qPBReader,代码行数:10,代码来源:qPBReaderSeparatorWidget.cpp
注:本文中的setFrameShadow函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论