您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ updateStakingIcon函数代码示例

51自学网 2021-06-03 09:14:28
  C++
这篇教程C++ updateStakingIcon函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中updateStakingIcon函数的典型用法代码示例。如果您正苦于以下问题:C++ updateStakingIcon函数的具体用法?C++ updateStakingIcon怎么用?C++ updateStakingIcon使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

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

示例1: QTimer

void ShadowGUI::pageLoaded(bool ok){    if (GetBoolArg("-staking", true))    {        QTimer *timerStakingIcon = new QTimer(this);        connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon()));        timerStakingIcon->start(15 * 1000);        updateStakingIcon();    }}
开发者ID:axelxod,项目名称:ZirkCoin,代码行数:10,


示例2: QMainWindow

BitcoinGUI::BitcoinGUI(QWidget *parent):    QMainWindow(parent),    clientModel(0),    walletModel(0),    encryptWalletAction(0),    changePassphraseAction(0),    unlockWalletAction(0),    lockWalletAction(0),    aboutQtAction(0),    trayIcon(0),    notificator(0),    rpcConsole(0){    resize(850, 550);    setWindowTitle(tr("Adderall") + " - " + tr("Wallet"));#ifndef Q_OS_MAC    qApp->setWindowIcon(QIcon(":icons/bitcoin"));    setWindowIcon(QIcon(":icons/bitcoin"));#else    setUnifiedTitleAndToolBarOnMac(true);    QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);#endif    // Accept D&D of URIs    setAcceptDrops(true);    // Create actions for the toolbar, menu bar and tray/dock icon    createActions();    // Create application menu bar    createMenuBar();    // Create the toolbars    createToolBars();    // Create the tray icon (or setup the dock icon)    createTrayIcon();    // Create tabs    overviewPage = new OverviewPage();    transactionsPage = new QWidget(this);    QVBoxLayout *vbox = new QVBoxLayout();    transactionView = new TransactionView(this);    vbox->addWidget(transactionView);    transactionsPage->setLayout(vbox);    addressBookPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab);    receiveCoinsPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab);    sendCoinsPage = new SendCoinsDialog(this);    signVerifyMessageDialog = new SignVerifyMessageDialog(this);    centralWidget = new QStackedWidget(this);    centralWidget->addWidget(overviewPage);    centralWidget->addWidget(transactionsPage);    centralWidget->addWidget(addressBookPage);    centralWidget->addWidget(receiveCoinsPage);    centralWidget->addWidget(sendCoinsPage);    setCentralWidget(centralWidget);    // Create status bar    statusBar();    // Status bar notification icons    QFrame *frameBlocks = new QFrame();    frameBlocks->setContentsMargins(0,0,0,0);    frameBlocks->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);    QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);    frameBlocksLayout->setContentsMargins(3,0,3,0);    frameBlocksLayout->setSpacing(3);    labelEncryptionIcon = new QLabel();    labelStakingIcon = new QLabel();    labelConnectionsIcon = new QLabel();    labelBlocksIcon = new QLabel();    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelEncryptionIcon);    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelStakingIcon);    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelConnectionsIcon);    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelBlocksIcon);    frameBlocksLayout->addStretch();    if (GetBoolArg("-staking", true))    {        QTimer *timerStakingIcon = new QTimer(labelStakingIcon);        connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon()));        timerStakingIcon->start(30 * 1000);        updateStakingIcon();    }    // Progress bar and label for blocks download    progressBarLabel = new QLabel();    progressBarLabel->setVisible(false);    progressBar = new QProgressBar();    progressBar->setAlignment(Qt::AlignCenter);    progressBar->setVisible(false);//.........这里部分代码省略.........
开发者ID:AdderallDev,项目名称:Adderall,代码行数:101,


示例3: QMainWindow

BitcoinGUI::BitcoinGUI(QWidget *parent):    QMainWindow(parent),    clientModel(0),    walletModel(0),    encryptWalletAction(0),    changePassphraseAction(0),    unlockWalletAction(0),    lockWalletAction(0),    aboutQtAction(0),    trayIcon(0),    notificator(0),    rpcConsole(0),    nWeight(0){    setFixedSize(970, 550);	QFontDatabase::addApplicationFont(":/fonts/Steps");    setWindowTitle(tr("Steps") + " - " + tr("Wallet"));	qApp->setStyleSheet("QMainWindow { background-image:url(:images/bkg);border:none; } #frame { } QToolBar QLabel { padding-top: 0px;padding-bottom: 0px;spacing: 10px;} QToolBar QLabel:item { padding-top: 0px;padding-bottom: 0px;spacing: 10px;} #spacer { background: transparent;border:none; } #toolbar2 { border:none;width:0px;hight:0px;padding-top:40px;padding-bottom:0px; background-color: transparent; } #labelMiningIcon { padding-left:5px;font-family:Steps;width:100%;font-size:10px;text-align:center;color:black; } QMenu { background-color: qlineargradient(spread:pad, x1:0.511, y1:1, x2:0.482909, y2:0, stop:0 rgba(232,232,232), stop:1 rgba(232,232,232)); color: black; padding-bottom:10px; } QMenu::item { color: black; background: transparent; } QMenu::item:selected { background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgba(99,99,99,45), stop: 1 rgba(99,99,99,45)); } QMenuBar { background-color: white; color: white; } QMenuBar::item { font-size:12px;padding-bottom:3px;padding-top:3px;padding-left:15px;padding-right:15px;color: black; background-color: white; } QMenuBar::item:selected { background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgba(99,99,99,45), stop: 1 rgba(99,99,99,45)); }");#ifndef Q_OS_MAC    qApp->setWindowIcon(QIcon(":icons/bitcoin"));    setWindowIcon(QIcon(":icons/bitcoin"));#else    setUnifiedTitleAndToolBarOnMac(true);    QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);#endif    // Accept D&D of URIs    setAcceptDrops(true);    // Create actions for the toolbar, menu bar and tray/dock icon    createActions();    // Create application menu bar    createMenuBar();    // Create the toolbars    createToolBars();    // Create the tray icon (or setup the dock icon)    createTrayIcon();    // Create tabs    overviewPage = new OverviewPage();    transactionsPage = new QWidget(this);    QVBoxLayout *vbox = new QVBoxLayout();    transactionView = new TransactionView(this);    vbox->addWidget(transactionView);    transactionsPage->setLayout(vbox);    addressBookPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab);    receiveCoinsPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab);    sendCoinsPage = new SendCoinsDialog(this);    signVerifyMessageDialog = new SignVerifyMessageDialog(this);    centralWidget = new QStackedWidget(this);    centralWidget->setContentsMargins(0, 0, 0, 0);    centralWidget->addWidget(overviewPage);    centralWidget->addWidget(transactionsPage);    centralWidget->addWidget(addressBookPage);    centralWidget->addWidget(receiveCoinsPage);    centralWidget->addWidget(sendCoinsPage);    setCentralWidget(centralWidget);    // Create status bar    // Status bar notification icons    labelEncryptionIcon = new QLabel();	labelStakingIcon = new QLabel();    labelConnectionsIcon = new QLabel();    labelBlocksIcon = new QLabel();		if (GetBoolArg("-staking", true))    {        QTimer *timerStakingIcon = new QTimer(labelStakingIcon);        connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon()));        timerStakingIcon->start(20 * 1000);        updateStakingIcon();    }    // Progress bar and label for blocks download    progressBarLabel = new QLabel();    progressBarLabel->setVisible(false);    progressBar = new QProgressBar();    addToolBarBreak(Qt::LeftToolBarArea);    QToolBar *toolbar2 = addToolBar(tr("Tabs toolbar"));    addToolBar(Qt::LeftToolBarArea,toolbar2);    toolbar2->setOrientation(Qt::Vertical);    toolbar2->setMovable( false );    toolbar2->setObjectName("toolbar2");    toolbar2->setFixedWidth(28);    toolbar2->setIconSize(QSize(28,54));	toolbar2->addWidget(labelEncryptionIcon);	toolbar2->addWidget(labelStakingIcon);    toolbar2->addWidget(labelConnectionsIcon);    toolbar2->addWidget(labelBlocksIcon);	toolbar2->setStyleSheet("#toolbar2 QToolButton { background: transparent;border:none;padding:0px;margin:0px;height:54px;width:28px; }");//.........这里部分代码省略.........
开发者ID:CandyCoinDev,项目名称:c1,代码行数:101,


示例4: QMainWindow

BitcoinGUI::BitcoinGUI(QWidget *parent) :    QMainWindow(parent),    clientModel(0),    encryptWalletAction(0),    changePassphraseAction(0),    unlockWalletAction(0),    lockWalletAction(0),    aboutQtAction(0),    trayIcon(0),    notificator(0),    rpcConsole(0),    prevBlocks(0),    nAverageWeight(0),    nTotalWeight(0){    restoreWindowGeometry();    setWindowTitle(tr("Reddcoin") + " - " + tr("Wallet"));#ifndef Q_OS_MAC    QApplication::setWindowIcon(QIcon(":icons/bitcoin"));    setWindowIcon(QIcon(":icons/bitcoin"));#else    setUnifiedTitleAndToolBarOnMac(true);    QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);#endif    // Create wallet frame and make it the central widget    walletFrame = new WalletFrame(this);    setCentralWidget(walletFrame);    // Accept D&D of URIs    setAcceptDrops(true);    // Create actions for the toolbar, menu bar and tray/dock icon    // Needs walletFrame to be initialized    createActions();    // Create application menu bar    createMenuBar();    // Create the toolbars    createToolBars();    // Create system tray icon and notification    createTrayIcon();    // Create status bar    statusBar();    // Status bar notification icons    QFrame *frameBlocks = new QFrame();    frameBlocks->setContentsMargins(0,0,0,0);//  frameBlocks->setMinimumWidth(56);//  frameBlocks->setMaximumWidth(56);    frameBlocks->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);    QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);    frameBlocksLayout->setContentsMargins(3,0,3,0);    frameBlocksLayout->setSpacing(3);    labelEncryptionIcon = new QLabel();    labelStakingIcon = new QLabel();    labelConnectionsIcon = new QLabel();    labelBlocksIcon = new QLabel();    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelEncryptionIcon);    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelStakingIcon);    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelConnectionsIcon);    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelBlocksIcon);    frameBlocksLayout->addStretch();    if (GetBoolArg("-staking", true))    {        QTimer *timerStakingIcon = new QTimer(labelStakingIcon);        connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon()));        timerStakingIcon->start(60 * 1000);        updateStakingIcon();    }    // Progress bar and label for blocks download    progressBarLabel = new QLabel();    progressBarLabel->setVisible(false);    progressBar = new QProgressBar();    progressBar->setAlignment(Qt::AlignCenter);    progressBar->setVisible(false);    // Override style sheet for progress bar for styles that have a segmented progress bar,    // as they make the text unreadable (workaround for issue #1071)    // See https://qt-project.org/doc/qt-4.8/gallery.html    QString curStyle = QApplication::style()->metaObject()->className();    if(curStyle == "QWindowsStyle" || curStyle == "QWindowsXPStyle")    {        progressBar->setStyleSheet("QProgressBar { background-color: #e8e8e8; border: 1px solid grey; border-radius: 7px; padding: 1px; text-align: center; } QProgressBar::chunk { background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #FF8000, stop: 1 orange); border-radius: 7px; margin: 0px; }");    }    statusBar()->addWidget(progressBarLabel);    statusBar()->addWidget(progressBar);    statusBar()->addPermanentWidget(frameBlocks);    syncIconMovie = new QMovie(":/movies/update_spinner", "mng", this);//.........这里部分代码省略.........
开发者ID:Andrey777Virus,项目名称:reddcoin,代码行数:101,


示例5: QMainWindow

BitcoinGUI::BitcoinGUI(QWidget *parent):    QMainWindow(parent),    clientModel(0),    walletModel(0),    encryptWalletAction(0),    changePassphraseAction(0),    unlockWalletAction(0),    lockWalletAction(0),    aboutQtAction(0),    trayIcon(0),    notificator(0),    rpcConsole(0){    resize(850, 550);    setWindowTitle(tr("10k Wallet"));#ifndef Q_WS_MAC    setWindowIcon(QIcon(":icons/toolbar"));#else    setUnifiedTitleAndToolBarOnMac(true);    QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);#endif    // Accept D&D of URIs    setAcceptDrops(true);    // Create actions for the toolbar, menu bar and tray/dock icon    createActions();    // Create application menu bar    createMenuBar();    // Create the toolbars    createToolBars();    // Create the tray icon (or setup the dock icon)    createTrayIcon();    // Create tabs    overviewPage = new OverviewPage();    transactionsPage = new QWidget(this);    QVBoxLayout *vbox = new QVBoxLayout();    transactionView = new TransactionView(this);    vbox->addWidget(transactionView);    transactionsPage->setLayout(vbox);    addressBookPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab);    receiveCoinsPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab);    sendCoinsPage = new SendCoinsDialog(this);    messagePage = new MessagePage(this);    centralWidget = new QStackedWidget(this);    centralWidget->addWidget(overviewPage);    centralWidget->addWidget(transactionsPage);    centralWidget->addWidget(addressBookPage);    centralWidget->addWidget(receiveCoinsPage);    centralWidget->addWidget(sendCoinsPage);#ifdef FIRST_CLASS_MESSAGING    centralWidget->addWidget(messagePage);#endif    setCentralWidget(centralWidget);    // Create status bar    statusBar();    // Status bar notification icons    QFrame *frameBlocks = new QFrame();    frameBlocks->setContentsMargins(0,0,0,0);    frameBlocks->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);    //frameBlocks->setMinimumWidth(56);    //frameBlocks->setMaximumWidth(56);    QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);    frameBlocksLayout->setContentsMargins(3,0,3,0);    frameBlocksLayout->setSpacing(3);    labelEncryptionIcon = new QLabel();    labelStakingIcon = new QLabel();    labelConnectionsIcon = new QLabel();    labelBlocksIcon = new QLabel();    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelEncryptionIcon);    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelStakingIcon);    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelConnectionsIcon);    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelBlocksIcon);    frameBlocksLayout->addStretch();    if (GetBoolArg("-staking", true))    {        QTimer *timerStakingIcon = new QTimer(labelStakingIcon);        connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon()));        timerStakingIcon->start(30 * 1000);        updateStakingIcon();    }    // Progress bar and label for blocks download    progressBarLabel = new QLabel();//.........这里部分代码省略.........
开发者ID:CoinTraderJoe,项目名称:10k---OBSOLETE-BLOCKCHAIN-,代码行数:101,


示例6: QMainWindow

BitcoinGUI::BitcoinGUI(QWidget *parent):    QMainWindow(parent),    clientModel(0),    walletModel(0),    encryptWalletAction(0),    changePassphraseAction(0),    aboutQtAction(0),    trayIcon(0),    notificator(0),    rpcConsole(0){    resize(850, 550);    setWindowTitle(tr("Coin2.1") + " - " + tr("Wallet"));    qApp->setStyleSheet("QMainWindow { background:rgb(200,200,200);font-family:'Open Sans,sans-serif'; } #frame { } QToolBar QLabel { padding-top:15px;padding-bottom:10px;margin:0px; } #spacer { background: rgb(35,35,35); border:none; } #toolbar2 { border:none;width:10px; background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgb(35,35,35), stop: 1 rgb(255,167,61), stop: 2 rgb(255,127,4)); } #toolbar { border:none;height:100%;padding-top:20px; background: rgb(35,35,35); text-align: left; color: white;min-width:200px;max-width:200px;} QToolBar QToolButton:hover {background-color:qlineargradient(x1: 0, y1: 0, x2: 2, y2: 2,stop: 0 rgb(35,35,35), stop: 1 rgb(255,167,61), stop: 2 rgb(255,127,4),stop: 3 rgb(35,35,35));} QToolBar QToolButton { font-family:Century Gothic;padding-left:20px;padding-right:200px;padding-top:10px;padding-bottom:10px; width:100%; color: white; text-align: left; background-color: rgb(35,35,35) } #labelMiningIcon { padding-left:5px;font-family:Century Gothic;width:100%;font-size:10px;text-align:center;color:white; } QMenu { background: rgb(35,35,35); color:white; padding-bottom:10px; } QMenu::item { color:white; background-color: transparent; } QMenu::item:selected { background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgb(35,35,35), stop: 0.5 rgb(255,167,61), stop: 1 rgb(255,127,4)); } QMenuBar { background: rgb(35,35,35); color:white; } QMenuBar::item { font-size:12px;padding-bottom:12px;padding-top:12px;padding-left:15px;padding-right:15px;color:white; background-color: transparent; } QMenuBar::item:selected { background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgb(35,35,35), stop: 1 rgb(255,167,61), stop: 2 rgb(255,127,4)); }");#ifndef Q_OS_MAC    qApp->setWindowIcon(QIcon(":icons/bitcoin"));    setWindowIcon(QIcon(":icons/bitcoin"));#else    setUnifiedTitleAndToolBarOnMac(true);    QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);#endif    // Accept D&D of URIs    setAcceptDrops(true);    // Create actions for the toolbar, menu bar and tray/dock icon    createActions();    // Create application menu bar    createMenuBar();    // Create the toolbars    createToolBars();    // Create the tray icon (or setup the dock icon)    createTrayIcon();    // Create tabs    overviewPage = new OverviewPage();    transactionsPage = new QWidget(this);    QVBoxLayout *vbox = new QVBoxLayout();    transactionView = new TransactionView(this);    vbox->addWidget(transactionView);    transactionsPage->setLayout(vbox);    addressBookPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab);    receiveCoinsPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab);    sendCoinsPage = new SendCoinsDialog(this);    signVerifyMessageDialog = new SignVerifyMessageDialog(this);    accessNxtInsideDialog = new AccessNxtInsideDialog(this);    centralWidget = new QStackedWidget(this);    centralWidget->addWidget(overviewPage);    centralWidget->addWidget(transactionsPage);    centralWidget->addWidget(addressBookPage);    centralWidget->addWidget(receiveCoinsPage);    centralWidget->addWidget(sendCoinsPage);    setCentralWidget(centralWidget);    //// Create status bar    //statusBar();    // Status bar notification icons    QFrame *frameBlocks = new QFrame();    frameBlocks->setStyleSheet("frameBlocks { background: rgb(35,35,35); QToolbar { background:white;height:40px; } }");    frameBlocks->setContentsMargins(0,0,0,0);    frameBlocks->setMinimumWidth(30);    frameBlocks->setMaximumWidth(30);    QVBoxLayout *frameBlocksLayout = new QVBoxLayout(frameBlocks);    frameBlocksLayout->setContentsMargins(1,0,1,0);    frameBlocksLayout->setSpacing(-1);    labelEncryptionIcon = new QLabel();    labelStakingIcon = new QLabel();    labelConnectionsIcon = new QLabel();    labelBlocksIcon = new QLabel();    //actionConvertIcon = new QAction(QIcon(":/icons/toolbar"), tr(""), this);    frameBlocksLayout->addWidget(labelEncryptionIcon);    frameBlocksLayout->addWidget(labelStakingIcon);    frameBlocksLayout->addWidget(labelConnectionsIcon);    frameBlocksLayout->addWidget(labelBlocksIcon);    frameBlocksLayout->addStretch();    //if (GetBoolArg("-staking", true))    //{        QTimer *timerStakingIcon = new QTimer(labelStakingIcon);        connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon()));        timerStakingIcon->start(30 * 1000);        updateStakingIcon();    //}    /*frameBlocks->setMinimumWidth(56);    frameBlocks->setMaximumWidth(56);    QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);//.........这里部分代码省略.........
开发者ID:UdjinM6,项目名称:Coin2.1,代码行数:101,


示例7: QMainWindow

spincoinGUI::spincoinGUI(QWidget *parent):    QMainWindow(parent),    clientModel(0),    walletModel(0),    encryptWalletAction(0),    changePassphraseAction(0),    unlockWalletAction(0),    lockWalletAction(0),    aboutQtAction(0),    trayIcon(0),    notificator(0),    rpcConsole(0){    setFixedSize(970, 550);    setWindowTitle(tr("SpinCoin") + " " + tr("Wallet"));    qApp->setStyleSheet("QMainWindow { background-image:url(:images/bkg);border:none;font-family:'Open Sans,sans-serif'; } #frame { } QToolBar QLabel { padding-top:15px;padding-bottom:10px;margin:0px; } #spacer { background:rgb(0,0,0);border:none; } #toolbar2 { border:none;width:10px; background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgb(128,130,131), stop: 1 rgb(232,237,241)); } #toolbar { border:none;height:100%;padding-top:20px; background: rgb(0,0,0); text-align: left; color: white;min-width:200px;max-width:200px;} QToolBar QToolButton:hover {background-color:qlineargradient(x1: 0, y1: 0, x2: 2, y2: 2,stop: 0 rgb(0,0,0), stop: 1 rgb(155,155,155),stop: 2 rgb(0,0,0));} QToolBar QToolButton { font-family:Century Gothic;padding-left:20px;padding-right:200px;padding-top:10px;padding-bottom:10px; width:100%; color: white; text-align: left; background-color: rgb(0,0,0) } #labelMiningIcon { padding-left:5px;font-family:Century Gothic;width:100%;font-size:10px;text-align:center;color:white; } QMenu { background: black; color: white; padding-bottom:10px; } QMenu::item { color:white; background-color: transparent; } QMenu::item:selected { background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgb(60,60,60), stop: 1 rgb(155,155,155)); } QMenuBar { background: rgb(0,0,0); color:white; } QMenuBar::item { font-size:12px;padding-bottom:8px;padding-top:8px;padding-left:15px;padding-right:15px;color:white; background-color: transparent; } QMenuBar::item:selected { background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgb(60,60,60), stop: 1 rgb(155,155,155)); }");#ifndef Q_OS_MAC    qApp->setWindowIcon(QIcon(":icons/spincoin"));    setWindowIcon(QIcon(":icons/spincoin"));#else    setUnifiedTitleAndToolBarOnMac(true);    QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);#endif    // Accept D&D of URIs    setAcceptDrops(true);    // Create actions for the toolbar, menu bar and tray/dock icon    createActions();    // Create application menu bar    createMenuBar();    // Create the toolbars    createToolBars();    // Create the tray icon (or setup the dock icon)    createTrayIcon();    // Create tabs    overviewPage = new OverviewPage();    statisticsPage = new StatisticsPage(this);	blockBrowser = new BlockBrowser(this);    transactionsPage = new QWidget(this);    QVBoxLayout *vbox = new QVBoxLayout();    transactionView = new TransactionView(this);    vbox->addWidget(transactionView);    transactionsPage->setLayout(vbox);    addressBookPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab);    receiveCoinsPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab);    sendCoinsPage = new SendCoinsDialog(this);    signVerifyMessageDialog = new SignVerifyMessageDialog(this);    centralWidget = new QStackedWidget(this);    centralWidget->addWidget(overviewPage);    centralWidget->addWidget(statisticsPage);	centralWidget->addWidget(blockBrowser);	centralWidget->addWidget(transactionsPage);    centralWidget->addWidget(addressBookPage);    centralWidget->addWidget(receiveCoinsPage);    centralWidget->addWidget(sendCoinsPage);    setCentralWidget(centralWidget);    // Status bar notification icons    QFrame *frameBlocks = new QFrame();    frameBlocks->setStyleSheet("frameBlocks { background: rgb(127,154,131); }");    frameBlocks->setContentsMargins(0,0,0,0);    frameBlocks->setMinimumWidth(30);    frameBlocks->setMaximumWidth(30);    QVBoxLayout *frameBlocksLayout = new QVBoxLayout(frameBlocks);    frameBlocksLayout->setContentsMargins(1,0,1,0);    frameBlocksLayout->setSpacing(-1);    labelEncryptionIcon = new QLabel();    labelStakingIcon = new QLabel();    labelConnectionsIcon = new QLabel();    labelBlocksIcon = new QLabel();    frameBlocksLayout->addWidget(labelEncryptionIcon);    frameBlocksLayout->addWidget(labelStakingIcon);    frameBlocksLayout->addWidget(labelConnectionsIcon);    frameBlocksLayout->addWidget(labelBlocksIcon);    frameBlocksLayout->addStretch();    if (GetBoolArg("-staking", true))    {        QTimer *timerStakingIcon = new QTimer(labelStakingIcon);        connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon()));        timerStakingIcon->start(30 * 1000);        updateStakingIcon();    }    // Progress bar and label for blocks download    progressBarLabel = new QLabel();    progressBarLabel->setVisible(false);//.........这里部分代码省略.........
开发者ID:magebane,项目名称:SpinCoin,代码行数:101,


示例8: QMainWindow

//.........这里部分代码省略.........    // Status bar notification icons    QWidget *frameBlocks = new QWidget();    frameBlocks->setContentsMargins(0,0,0,0);    frameBlocks->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);    frameBlocks->setStyleSheet("QWidget { background: none; margin-bottom: 5px; }");    QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);    frameBlocksLayout->setContentsMargins(3,0,3,0);    frameBlocksLayout->setSpacing(3);    frameBlocksLayout->setAlignment(Qt::AlignHCenter);#ifdef USE_NATIVE_I2P    labelI2PConnections = new QLabel();    labelI2POnly = new QLabel();    labelI2PGenerated = new QLabel();    labelI2PGenerated->setObjectName("labelI2PGenerated");    labelI2PGenerated->setStyleSheet("#labelI2PGenerated { color: #ffffff; }");    frameBlocksLayout->addWidget(labelI2PGenerated);    frameBlocksLayout->addWidget(labelI2POnly);    frameBlocksLayout->addWidget(labelI2PConnections);#endif    labelEncryptionIcon = new QLabel();    labelStakingIcon = new QLabel();    labelConnectionsIcon = new QLabel();    labelBlocksIcon = new QLabel();    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelEncryptionIcon);    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelStakingIcon);    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelConnectionsIcon);    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelBlocksIcon);    frameBlocksLayout->addStretch();    netLabel = new QLabel();    netLabel->setObjectName("netLabel");    netLabel->setStyleSheet("#netLabel { color: #ffffff; }");    frameBlocksLayout->addWidget(netLabel);    frameBlocksLayout->addStretch();        if (GetBoolArg("-staking", true))    {        QTimer *timerStakingIcon = new QTimer(labelStakingIcon);        connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon()));        timerStakingIcon->start(30 * 1000);        updateStakingIcon();    }    // Progress bar and label for blocks download    progressBarLabel = new QLabel();    progressBarLabel->setStyleSheet("#progressBarLabel { color: #ffffff; }");    progressBarLabel->setVisible(false);    progressBar = new QProgressBar();    progressBar->setAlignment(Qt::AlignCenter);    progressBar->setVisible(false);    if (!fUseBlackTheme)    {        // Override style sheet for progress bar for styles that have a segmented progress bar,        // as they make the text unreadable (workaround for issue #1071)        // See https://qt-project.org/doc/qt-4.8/gallery.html        QString curStyle = qApp->style()->metaObject()->className();        if(curStyle == "QWindowsStyle" || curStyle == "QWindowsXPStyle")        {            progressBar->setStyleSheet("QProgressBar { background-color: #e8e8e8; border: 1px solid grey; border-radius: 7px; padding: 1px; text-align: center; } QProgressBar::chunk { background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #FF8000, stop: 1 orange); border-radius: 7px; margin: 0px; }");        }    }    statusBar()->addWidget(progressBarLabel);    statusBar()->addWidget(progressBar);    statusBar()->addPermanentWidget(frameBlocks);    statusBar()->setObjectName("statusBar");    statusBar()->setStyleSheet("#statusBar { color: #ffffff; background-color: qradialgradient(cx: -0.8, cy: 0, fx: -0.8, fy: 0, radius: 0.6, stop: 0 #37c5db, stop: 1 #37c5db);  }");    syncIconMovie = new QMovie(fUseBlackTheme ? ":/movies/update_spinner_black" : ":/movies/update_spinner", "mng", this);    // Clicking on a transaction on the overview page simply sends you to transaction history page    connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), this, SLOT(gotoHistoryPage()));    connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), transactionView, SLOT(focusTransaction(QModelIndex)));    // Double-clicking on a transaction on the transaction history page shows details    connect(transactionView, SIGNAL(doubleClicked(QModelIndex)), transactionView, SLOT(showDetails()));    rpcConsole = new RPCConsole(this);    connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(show()));    // prevents an oben debug window from becoming stuck/unusable on client shutdown    connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide()));    // Clicking on "Verify Message" in the address book sends you to the verify message tab    connect(addressBookPage, SIGNAL(verifyMessage(QString)), this, SLOT(gotoVerifyMessageTab(QString)));    // Clicking on "Sign Message" in the receive coins page sends you to the sign message tab    connect(receiveCoinsPage, SIGNAL(signMessage(QString)), this, SLOT(gotoSignMessageTab(QString)));    gotoOverviewPage();}
开发者ID:nodexcoin,项目名称:nodex,代码行数:101,


示例9: QMainWindow

//.........这里部分代码省略.........    //centralWidget = new QStackedWidget(centralWidgetWrapper);    centralWidget = new QStackedWidget(this);    centralWidget->setStyleSheet("QStackedWidget{border:0px solid #000;}");    centralWidget->addWidget(overviewPage);    centralWidget->addWidget(statisticsPage);    centralWidget->addWidget(blockBrowser);    centralWidget->addWidget(poolBrowser);    centralWidget->addWidget(transactionsPage);    centralWidget->addWidget(addressBookPage);    centralWidget->addWidget(receiveCoinsPage);    centralWidget->addWidget(sendCoinsPage);    //vboxcentral->addWidget(centralWidget);    //centralWidgetWrapper->setLayout(vboxcentral);//    setCentralWidget(centralWidgetWrapper);    setCentralWidget(centralWidget);    // create status bar//    statusBar();    // Status bar notification icons    QFrame *frameBlocks = new QFrame();    frameBlocks->setStyleSheet("frameBlocks { background: rgb(255,255,255); }");    frameBlocks->setContentsMargins(0,0,0,0);    frameBlocks->setMinimumHeight(26);    frameBlocks->setMaximumHeight(26);    frameBlocks->setMaximumWidth(96);    QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);    frameBlocksLayout->setContentsMargins(0,1,0,1);    frameBlocksLayout->setSpacing(-1);    labelEncryptionIcon = new QLabel();    labelStakingIcon = new QLabel();    labelConnectionsIcon = new QLabel();    labelBlocksIcon = new QLabel();    frameBlocksLayout->addWidget(labelEncryptionIcon);    frameBlocksLayout->addWidget(labelStakingIcon);    frameBlocksLayout->addWidget(labelConnectionsIcon);    frameBlocksLayout->addWidget(labelBlocksIcon);    frameBlocksLayout->addStretch();    if (!GetBoolArg("-posmint", false))    {        QTimer *timerStakingIcon = new QTimer(labelStakingIcon);        connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon()));        timerStakingIcon->start(30 * 1000);        updateStakingIcon();    }    // Progress bar and label for blocks download    progressBarLabel = new QLabel();    progressBarLabel->setVisible(false);    progressBar = new QProgressBar();    progressBar->setAlignment(Qt::AlignCenter);    progressBar->setVisible(false);    progressBar->setOrientation(Qt::Horizontal);    progressBar->setObjectName("progress");    progressBar->setStyleSheet("QProgressBar { background-color: white; border: 0px solid grey; border-radius: 5px; padding: 1px; text-align: center;} "                               "QProgressBar::chunk { background: #0E69A2; border-radius: 5px; margin: 0px; }");    frameBlocks->setObjectName("frame");    // Override style sheet for progress bar for styles that have a segmented progress bar,    // as they make the text unreadable (workaround for issue #1071)    // See https://qt-project.org/doc/qt-4.8/gallery.html    QString curStyle = QApplication::style()->metaObject()->className();    if(curStyle == "QWindowsStyle" || curStyle == "QWindowsXPStyle")    {        progressBar->setStyleSheet("QProgressBar { background-color: white; border: 0px solid grey; border-radius: 5px; padding: 1px; text-align: center;} "                                   "QProgressBar::chunk { background: #0E69A2; border-radius: 5px; margin: 0px; }");    }    statusBar()->addWidget(progressBarLabel);    statusBar()->addWidget(progressBar);    statusBar()->addPermanentWidget(frameBlocks);    syncIconMovie = new QMovie(":/movies/update_spinner", "mng", this);    // Clicking on a transaction on the overview page simply sends you to transaction history page    connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), this, SLOT(gotoHistoryPage()));    connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), transactionView, SLOT(focusTransaction(QModelIndex)));    // Double-clicking on a transaction on the transaction history page shows details    connect(transactionView, SIGNAL(doubleClicked(QModelIndex)), transactionView, SLOT(showDetails()));    rpcConsole = new RPCConsole(this);    connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(show()));    // Clicking on "Verify Message" in the address book sends you to the verify message tab    connect(addressBookPage, SIGNAL(verifyMessage(QString)), this, SLOT(gotoVerifyMessageTab(QString)));    // Clicking on "Sign Message" in the receive coins page sends you to the sign message tab    connect(receiveCoinsPage, SIGNAL(signMessage(QString)), this, SLOT(gotoSignMessageTab(QString)));    gotoOverviewPage();}
开发者ID:coinkeeper,项目名称:2015-06-22_19-13_whitecoin,代码行数:101,


示例10: QMainWindow

//.........这里部分代码省略.........    centralStackedWidget->addWidget(overviewPage);    QWidget *centralWidget = new QWidget();    QVBoxLayout *centralLayout = new QVBoxLayout(centralWidget);    centralLayout->setContentsMargins(0, 0, 0, 0);    centralWidget->setContentsMargins(0, 0, 0, 0);    centralLayout->addWidget(centralStackedWidget);    setCentralWidget(centralWidget);    // Create status bar    statusBar();    // Disable size grip because it looks ugly and nobody needs it    statusBar()->setSizeGripEnabled(false);    // Status bar notification icons    QWidget *frameBlocks = new QWidget();    frameBlocks->setContentsMargins(0, 0, 0, 0);    frameBlocks->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);    frameBlocks->setStyleSheet("QWidget { background: none; margin-bottom: 5px; }");    QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);    frameBlocksLayout->setContentsMargins(3, 0, 3, 0);    frameBlocksLayout->setSpacing(3);    frameBlocksLayout->setAlignment(Qt::AlignHCenter);    labelEncryptionIcon = new GUIUtil::ClickableLabel();    labelStakingIcon = new QLabel();    labelConnectionsIcon = new QLabel();    labelBlocksIcon = new QLabel();#ifdef USE_NATIVE_I2P    labelI2PConnections = new QLabel();    labelI2POnly = new QLabel();    labelI2PGenerated = new QLabel();    frameBlocksLayout->addWidget(labelI2PGenerated);    frameBlocksLayout->addWidget(labelI2POnly);    frameBlocksLayout->addWidget(labelI2PConnections);#endif    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelEncryptionIcon);    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelStakingIcon);    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelConnectionsIcon);    frameBlocksLayout->addStretch();    frameBlocksLayout->addWidget(labelBlocksIcon);    frameBlocksLayout->addStretch();    if (GetBoolArg("-staking", true)) {        QTimer *timerStakingIcon = new QTimer(labelStakingIcon);        connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon()));        timerStakingIcon->start(30 * 1000);        updateStakingIcon();    }    // Progress bar and label for blocks download    progressBarLabel = new QLabel();    progressBarLabel->setVisible(false);    progressBar = new QProgressBar();    progressBar->setAlignment(Qt::AlignCenter);    progressBar->setVisible(false);    if (!fUseBlackTheme) {        // Override style sheet for progress bar for styles that have a segmented progress bar,        // as they make the text unreadable (workaround for issue #1071)        // See https://qt-project.org/doc/qt-4.8/gallery.html        QString curStyle = qApp->style()->metaObject()->className();        if(curStyle == "QWindowsStyle" || curStyle == "QWindowsXPStyle") {            progressBar->setStyleSheet("QProgressBar { background-color: rgb(0,0,0); border: 1px solid grey; border-radius: 7px; padding: 1px; text-align: center; } QProgressBar::chunk { background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #500078, stop: 1 #500078); border-radius: 7px; margin: 0px; }");            appMenuBar->setStyleSheet("QMenuBar { background-color: rgb(0,0,0); }");        }    }    statusBar()->addWidget(progressBarLabel);    statusBar()->addWidget(progressBar);    statusBar()->addPermanentWidget(frameBlocks);    statusBar()->setObjectName("statusBar");    statusBar()->setStyleSheet("#statusBar { background-color: qradialgradient(cx: -0.8, cy: 0, fx: -0.8, fy: 0, radius: 0.6, stop: 0 #000000, stop: 1 #000000);  }");    syncIconMovie = new QMovie(fUseBlackTheme ? ":/movies/update_spinner_black" : ":/movies/update_spinner", "mng", this);    // Clicking on a transaction on the overview page simply sends you to transaction history page    connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), this, SLOT(gotoHistoryPage()));    rpcConsole = new RPCConsole(this);    connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(show()));    connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide())); // prevents an oben debug window from becoming stuck/unusable on client shutdown    gotoOverviewPage();}
开发者ID:mbishop75,项目名称:DarkSilk,代码行数:101,


示例11: QMainWindow

BitcoinGUI::BitcoinGUI(QWidget *parent):    QMainWindow(parent),    clientModel(0),    walletModel(0),    encryptWalletAction(0),    changePassphraseAction(0),    unlockWalletAction(0),    lockWalletAction(0),    aboutQtAction(0),    trayIcon(0),    notificator(0),    rpcConsole(0){    resize(840, 550);    setWindowTitle(tr("Global ") + tr("Wallet"));#ifndef Q_OS_MAC    qApp->setWindowIcon(QIcon(":icons/bitcoin"));    setWindowIcon(QIcon(":icons/bitcoin"));#else    setUnifiedTitleAndToolBarOnMac(true);    QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);#endif	QApplication::setStyle(QStyleFactory::create("Fusion"));    // Accept D&D of URIs    setAcceptDrops(true);    // Create actions for the toolbar, menu bar and tray/dock icon    createActions();    // Create application menu bar    createMenuBar();    // Create the toolbars    createToolBars();    // Create the tray icon (or setup the dock icon)    createTrayIcon();//    QFile style(":/styles/styles");//    style.open(QFile::ReadOnly);//    qApp->setStyleSheet(QString::fromUtf8(style.readAll()));//    setStyleSheet("QMainWindow { background-image:url(:images/bkg);border:none;font-family:'Open Sans,sans-serif'; } #frame { } QToolBar QLabel { padding-top:15px;padding-bottom:10px;margin:0px; } #spacer { background:rgb(210,192,123);border:none; } #toolbar3 { border:none;width:1px; background-color: rgb(63,109,186); } #toolbar2 { border:none;width:28px; background-color:qlineargradient(x1: 0, y1: 0, x2: 2, y2: 2,stop: 0 rgb(210,192,123), stop: 1 rgb(227,213,195),stop: 2 rgb(59,62,65)); } #toolbar { border:none;height:100%;padding-top:20px; background: rgb(210,192,123); text-align: left; color: white;min-width:150px;max-width:150px;} QToolBar QToolButton:hover {background-color:qlineargradient(x1: 0, y1: 0, x2: 2, y2: 2,stop: 0 rgb(210,192,123), stop: 1 rgb(227,213,195),stop: 2 rgb(59,62,65));} QToolBar QToolButton { font-family:Century Gothic;padding-left:20px;padding-right:150px;padding-top:10px;padding-bottom:10px; width:100%; color: white; text-align: left; background-color: rgb(210,192,123) } #labelMiningIcon { padding-left:5px;font-family:Century Gothic;width:100%;font-size:10px;text-align:center;color:white; } QMenu { background: rgb(210,192,123); color:white; padding-bottom:10px; } QMenu::item { color:white; background-color: transparent; } QMenu::item:selected { background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgb(210,192,123), stop: 1 rgb(227,213,195)); } QMenuBar { background: rgb(210,192,123); color:white; } QMenuBar::item { font-size:12px;padding-bottom:8px;padding-top:8px;padding-left:15px;padding-right:15px;color:white; background-color: transparent; } QMenuBar::item:selected { background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgb(210,192,123), stop: 1 rgb(227,213,195)); }");    qApp->setStyleSheet("QMainWindow { background-image:url(:images/bkg);border:none;font-family:'Open Sans,sans-serif'; } #frame { } QToolBar QLabel { padding-top:15px;padding-bottom:10px;margin:0px; } #spacer { background:rgb(63,109,186);border:none; } #toolbar3 { border:none;width:1px; background-color: rgb(63,109,186); } #toolbar2 { border:none;width:28px; background-color:rgb(63,109,186); } #toolbar { border:none;height:100%;padding-top:20px; background: rgb(63,109,186); text-align: left; color: white;min-width:150px;max-width:150px;} QToolBar QToolButton:hover {background-color:qlineargradient(x1: 0, y1: 0, x2: 2, y2: 2,stop: 0 rgb(63,109,186), stop: 1 rgb(216,252,251),stop: 2 rgb(59,62,65));} QToolBar QToolButton { font-family:Century Gothic;padding-left:20px;padding-right:150px;padding-top:10px;padding-bottom:10px; width:100%; color: white; text-align: left; background-color: rgb(63,109,186) } #labelMiningIcon { padding-left:5px;font-family:Century Gothic;width:100%;font-size:10px;text-align:center;color:white; } QMenu { background: rgb(63,109,186); color:white; padding-bottom:10px; } QMenu::item { color:white; background-color: transparent; } QMenu::item:selected { background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgb(63,109,186), stop: 1 rgb(149,204,244)); } QMenuBar { background: rgb(63,109,186); color:white; } QMenuBar::item { font-size:12px;padding-bottom:8px;padding-top:8px;padding-left:15px;padding-right:15px;color:white; background-color: transparent; } QMenuBar::item:selected { background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgb(63,109,186), stop: 1 rgb(149,204,244)); }");//#ifdef Q_OS_MAC//    toolbar->setStyleSheet("QToolBar { background-color: transparent; border: 0px solid black; padding: 3px; }");//#endif    // Create tabs    overviewPage = new OverviewPage();    transactionsPage = new QWidget(this);    QVBoxLayout *vbox = new QVBoxLayout();    transactionView = new TransactionView(this);    vbox->addWidget(transactionView);    transactionsPage->setLayout(vbox);    addressBookPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab);    receiveCoinsPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab);    sendCoinsPage = new SendCoinsDialog(this);    signVerifyMessageDialog = new SignVerifyMessageDialog(this);    centralWidget = new QStackedWidget(this);    centralWidget->addWidget(overviewPage);    centralWidget->addWidget(transactionsPage);    centralWidget->addWidget(addressBookPage);    centralWidget->addWidget(receiveCoinsPage);    centralWidget->addWidget(sendCoinsPage);    setCentralWidget(centralWidget);    // Create status bar    statusBar();    // Status bar notification icons    labelEncryptionIcon = new QLabel();    labelStakingIcon = new QLabel();    labelConnectionsIcon = new QLabel();    labelBlocksIcon = new QLabel();    if (GetBoolArg("-staking", true))    {        QTimer *timerStakingIcon = new QTimer(labelStakingIcon);        connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon()));        timerStakingIcon->start(30 * 1000);        updateStakingIcon();    }    // Progress bar and label for blocks download    progressBarLabel = new QLabel();    progressBarLabel->setVisible(false);    progressBar = new QProgressBar();    progressBar->setAlignment(Qt::AlignCenter);//.........这里部分代码省略.........
开发者ID:crowetic,项目名称:global-master,代码行数:101,


示例12: QMainWindow

BitcoinGUI::BitcoinGUI(QWidget *parent):    QMainWindow(parent),    clientModel(0),    walletModel(0),    toolbar(0),    encryptWalletAction(0),    changePassphraseAction(0),    unlockWalletAction(0),    lockWalletAction(0),    aboutQtAction(0),    trayIcon(0),    notificator(0),    rpcConsole(0),    prevBlocks(0),    nWeight(0){    resize(970, 550);     setWindowTitle(tr("SatoshiChain") + " - " + tr("Wallet"));    qApp->setStyleSheet("QMainWindow { background-image: url(:images/bkg);border:none;font-family:'Open Sans,sans-serif'; } #frame { } QToolBar QLabel { padding-top: 0px;padding-bottom: 0px;spacing: 10px;} QToolBar QLabel:item { padding-top: 0px;padding-bottom: 0px;spacing: 10px;} #spacer { background:rgb(200,200,200);border:none; } #toolbar2 { border:none;width:0px;hight:0px;padding-top:0px;padding-bottom:0px; background: rgb(104,104,104); } #toolbar { border:1px;height:100%;padding-top:20px; background: rgb(200,200,200); text-align: left; color: black;min-width:150px;max-width:150px;} QToolBar QToolButton:hover {background-color:qlineargradient(x1: 0, y1: 0, x2: 2, y2: 2,stop: 0 rgb(200,200,200), stop: 1 rgb(104,104,104),stop: 2 rgb(104,104,104));}"#ifdef Q_OS_MAC"QToolBar QToolButton { font-family:sans-serif;font-size:12px;padding-left:20px;padding-right:45px;padding-top:5px;padding-bottom:5px; width:100%; color: rgb(104,104,104); text-align: left; background-color: rgb(200,200,200);  }"#else"QToolBar QToolButton { font-family:sans-serif;font-size:12px;padding-left:20px;padding-right:150px;padding-top:5px;padding-bottom:5px; width:100%; color: rgb(104,104,104); text-align: left; background-color: rgb(200,200,200);  }"#endif"#labelMiningIcon { padding-left:5px;font-family:sans-serif;width:100%;font-size:10px;text-align:center;color:black; } QMenu { background: rgb(200,200,200); color:black; padding-bottom:10px; } QMenu::item { color:black; background-color: transparent; } QMenu::item:selected { background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgb(200,200,200), stop: 1 rgb(200,200,200)); } QMenuBar { background: rgb(200,200,200); color:black; } QMenuBar::item { font-size:12px;padding-bottom:6px;padding-top:6px;padding-left:15px;padding-right:15px;color:black; background-color: transparent; } QMenuBar::item:selected { background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgb(200,200,200), stop: 1 rgb(200,200,200)); }");#ifndef Q_OS_MAC    qApp->setWindowIcon(QIcon(":icons/bitcoin"));    setWindowIcon(QIcon(":icons/bitcoin"));#else    setUnifiedTitleAndToolBarOnMac(true);    QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);#endif    // Accept D&D of URIs    setAcceptDrops(true);    // Create actions for the toolbar, menu bar and tray/dock icon    createActions();    // Create application menu bar    createMenuBar();    // Create the toolbars    createToolBars();    // Create the tray icon (or setup the dock icon)    createTrayIcon();    // Create tabs    overviewPage = new OverviewPage();    //transactionsPage = new QWidget(this);    //QVBoxLayout *vbox = new QVBoxLayout();    //transactionView = new TransactionView(this);    //vbox->addWidget(transactionView);    //transactionsPage->setLayout(vbox);    //addressBookPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab);    //receiveCoinsPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab);    //sendCoinsPage = new SendCoinsDialog(this);    signVerifyMessageDialog = new SignVerifyMessageDialog(this);    centralStackedWidget = new QStackedWidget(this);    centralStackedWidget->addWidget(overviewPage);    //centralStackedWidget->addWidget(transactionsPage);    //centralStackedWidget->addWidget(addressBookPage);    //centralStackedWidget->addWidget(receiveCoinsPage);    //centralStackedWidget->addWidget(sendCoinsPage);    QWidget *centralWidget = new QWidget();    QVBoxLayout *centralLayout = new QVBoxLayout(centralWidget);#ifndef Q_OS_MAC    centralLayout->addWidget(appMenuBar);#endif    centralLayout->addWidget(centralStackedWidget);    setCentralWidget(centralWidget);    // Status bar notification icons    labelEncryptionIcon = new QLabel();    labelStakingIcon = new QLabel();    labelConnectionsIcon = new QLabel();    labelBlocksIcon = new QLabel();    //actionConvertIcon = new QAction(QIcon(":/icons/statistics"), tr(""), this);    if (GetBoolArg("-staking", true))    {        QTimer *timerStakingIcon = new QTimer(labelStakingIcon);        connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon()));        timerStakingIcon->start(30 * 1000);        updateStakingIcon();    }	// Progress bar and label for blocks download    progressBarLabel = new QLabel();    progressBarLabel->setVisible(false);    progressBar = new QProgressBar();//.........这里部分代码省略.........
开发者ID:satoshichain,项目名称:satoshichain,代码行数:101,



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


C++ updateState函数代码示例
C++ updateSpeed函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。