本文整理汇总了C++中createTrayIcon函数的典型用法代码示例。如果您正苦于以下问题:C++ createTrayIcon函数的具体用法?C++ createTrayIcon怎么用?C++ createTrayIcon使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了createTrayIcon函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: 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,代码来源:bitcoingui.cpp
示例2: QMainWindow
Tomatime::Tomatime(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::Tomatime)
{
QCoreApplication::setOrganizationName("Tomatime");
QCoreApplication::setOrganizationDomain("github.com");
QCoreApplication::setApplicationName("tomatime");
ui->setupUi(this);
// Don't forget to define this
timer = new QTimer(this);
timeValue = new QTime();
restoreAction = new QAction(this);
quitAction = new QAction(this);
trayIcon = new QSystemTrayIcon(this);
trayIconMenu = new QMenu(this);
// Init Child Dialog
settingDialog = new Settings(this);
aboutWidget = new About(this);
// Initialize value from setting
QSettings setting;
setWorkingTime( (setting.value("time/working").isNull() == true ) ? setting.value("time/break", 25).toInt() : setting.value("time/working").toInt() );
setBreakTime( (setting.value("time/break").isNull() == true ) ? setting.value("time/break", 5).toInt() : setting.value("time/break").toInt() );
setLongBreakTime( (setting.value("time/longbreak").isNull() ) ? setting.value("time/longbreak", 10).toInt() : setting.value("time/longbreak").toInt() );
connect(ui->start_button, SIGNAL(clicked()),this, SLOT(clickedStartButton()));
connect(ui->settings_button, SIGNAL(clicked()),this, SLOT(clickedSettingsButton()));
connect(ui->stop_button, SIGNAL(clicked()),this, SLOT(clickedStopButton()));
connect(ui->actionSettings, SIGNAL(triggered()),this,SLOT(settingsMenu()));
connect(ui->actionAbout, SIGNAL(triggered()),this,SLOT(aboutMenu()));
// Listen signal from setting
connect(settingDialog,SIGNAL(emitWorkingTimeValue(int)),this,SLOT(setWorkingTime(int)));
connect(settingDialog,SIGNAL(emitBreakTimeValue(int)),this,SLOT(setBreakTime(int)));
connect(settingDialog,SIGNAL(emitLongBreakTimeValue(int)),this,SLOT(setLongBreakTime(int)));
connect(settingDialog,SIGNAL(emitSetTimer(int,int)),this,SLOT(setTimer(int,int)));
// Recenter form
QRect position = frameGeometry();
position.moveCenter(QDesktopWidget().availableGeometry().center());
move(position.topLeft());
// Init LCD
ui->lcdNumber->display(QTime(0,getWorkingTime(),0).toString());
// Init working count
workingCount = 0;
// Init Timer mode
// 0 = Working
// 1 = Short Break
// 2 = Long Break
timerMode = 0;
// Init System tray
createActions();
createTrayIcon();
trayIcon->show();
}
开发者ID:aancw,项目名称:tomatime,代码行数:66,代码来源:tomatime.cpp
示例3: QMainWindow
BitcoinGUI::BitcoinGUI(QWidget *parent) :
QMainWindow(parent),
clientModel(0),
encryptWalletAction(0),
changePassphraseAction(0),
aboutQtAction(0),
trayIcon(0),
notificator(0),
rpcConsole(0),
prevBlocks(0)
{
restoreWindowGeometry();
setWindowTitle(tr("FUNSCAMCOIN") + " - " + 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);
QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);
frameBlocksLayout->setContentsMargins(3,0,3,0);
frameBlocksLayout->setSpacing(3);
labelEncryptionIcon = new QLabel();
labelConnectionsIcon = new QLabel();
labelBlocksIcon = new QLabel();
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(labelEncryptionIcon);
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(labelConnectionsIcon);
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(labelBlocksIcon);
frameBlocksLayout->addStretch();
// 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);
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()));
// Install event filter to be able to catch status tip events (QEvent::StatusTip)
this->installEventFilter(this);
// Initially wallet actions should be disabled
setWalletActionsEnabled(false);
}
开发者ID:FUNSCAMCOIN,项目名称:FUNSCAMCOIN,代码行数:95,代码来源:bitcoingui.cpp
示例4: QMainWindow
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
// open database connection
db = QSqlDatabase::addDatabase("QSQLITE");
db.setDatabaseName("/Users/jdoud/dev/brainstorm.sqlite");
if(!db.open())
{
qDebug() << db.lastError();
qFatal("Failed to connect.");
}
// setup UI
ui->setupUi(this);
ui->toolBar->addWidget(ui->comboFonts);
ui->toolBar->addWidget(ui->comboFontSizes);
ui->toolBar->addWidget(ui->comboColors);
// set text editor defaults
ui->textNote->document()->setIndentWidth(20);
ui->textNote->setTabStopWidth(20);
ui->textNote->setTabChangesFocus(false);
ui->actionIncrease_Indent->setShortcut(Qt::Key_Tab);
ui->actionDecrease_Indent->setShortcut(Qt::Key_Backtab);
// setup comboColors
QPixmap pix(16, 16);
pix.fill(Qt::white);
ui->comboColors->addItem(pix, "");
pix.fill(Qt::black);
ui->comboColors->addItem(pix, "");
pix.fill(Qt::red);
ui->comboColors->addItem(pix, "");
pix.fill(Qt::blue);
ui->comboColors->addItem(pix, "");
pix.fill(Qt::darkGreen);
ui->comboColors->addItem(pix, "");
pix.fill(Qt::gray);
ui->comboColors->addItem(pix, "");
// create system tray icon
createActions();
createTrayIcon();
// create models
categoriesModel = new QSqlTableModel();
categoriesModel->setTable("categories");
categoriesModel->setSort(1, Qt::AscendingOrder);
categoriesModel->select();
ui->listCategories->setModel(categoriesModel);
ui->listCategories->setModelColumn(1);
notesModel = new QSqlTableModel();
notesModel->setTable("notes");
ui->listNotes->setModel(notesModel);
ui->listNotes->setModelColumn(2);
// set splitter size
QList<int> sizes;
sizes << 230 << 150;
ui->splitterLists->setSizes(sizes);
sizes.clear();
sizes << 230 << 600;
ui->splitterNote->setSizes(sizes);
// connect File menu slots
connect(ui->actionNew_Category, SIGNAL(triggered()), this, SLOT(newCategory()));
connect(ui->actionRename_Category, SIGNAL(triggered()), this, SLOT(renameCategory()));
connect(ui->actionDelete_Category, SIGNAL(triggered()), this, SLOT(deleteCategory()));
connect(ui->actionNew_Note, SIGNAL(triggered()), this, SLOT(newNote()));
connect(ui->actionRename_Note, SIGNAL(triggered()), this, SLOT(renameNote()));
connect(ui->actionSave_Note, SIGNAL(triggered()), this, SLOT(saveNote()));
connect(ui->actionDelete_Note, SIGNAL(triggered()), this, SLOT(deleteNote()));
connect(ui->actionQuit, SIGNAL(triggered()), this, SLOT(quit()));
// connect Edit menu slots
connect(ui->actionFind_Replace, SIGNAL(triggered()), this, SLOT(findAndReplace()));
// connect Format menu slots
connect(ui->actionBold, SIGNAL(triggered()), this, SLOT(bold()));
connect(ui->actionItalic, SIGNAL(triggered()), this, SLOT(italic()));
connect(ui->actionUnderline, SIGNAL(triggered()), this, SLOT(underline()));
connect(ui->actionStrikethrough, SIGNAL(triggered()), this, SLOT(strikethrough()));
connect(ui->actionBullet_List, SIGNAL(triggered()), this, SLOT(bulletList()));
connect(ui->actionNumber_List, SIGNAL(triggered()), this, SLOT(numberList()));
connect(ui->actionIncrease_Indent, SIGNAL(triggered()), this, SLOT(increaseIndent()));
connect(ui->actionDecrease_Indent, SIGNAL(triggered()), this, SLOT(decreaseIndent()));
connect(ui->actionShow_Colors, SIGNAL(triggered()), this, SLOT(showColors()));
connect(ui->actionShow_Fonts, SIGNAL(triggered()), this, SLOT(showFonts()));
connect(ui->actionIncrease_Font, SIGNAL(triggered()), this, SLOT(increaseFont()));
connect(ui->actionDecrease_Font, SIGNAL(triggered()), this, SLOT(decreaseFont()));
connect(ui->actionReset_Font, SIGNAL(triggered()), this, SLOT(resetFont()));
connect(ui->actionAlign_Left, SIGNAL(triggered()), this, SLOT(alignLeft()));
connect(ui->actionAlign_Center, SIGNAL(triggered()), this, SLOT(alignCenter()));
connect(ui->actionAlign_Right, SIGNAL(triggered()), this, SLOT(alignRight()));
connect(ui->actionAlign_Justify, SIGNAL(triggered()), this, SLOT(alignJustify()));
// connect View menu slots
connect(ui->actionHide_Window, SIGNAL(triggered()), this, SLOT(hide()));
connect(ui->actionPrevious_Category, SIGNAL(triggered()), this, SLOT(previousCategory()));
connect(ui->actionNext_Category, SIGNAL(triggered()), this, SLOT(nextCategory()));
//.........这里部分代码省略.........
开发者ID:itinerant,项目名称:Brainstorm-qt,代码行数:101,代码来源:mainwindow.cpp
示例5: cancelledFlag
MainWindow::MainWindow()
: cancelledFlag(false),
isCcliveFlag(false),
trayIcon(0),
trayIconMenu(0),
restoreAction(0)
{
/*
The word "English" is not meant to be translated literally.
Instead, replace "English" with the target translation language,
e.g. "Suomi", "Deutch", etc. abby uses this word in the
preferences dialog to select current language.
*/
const QString lang = tr("English");
setupUi(this);
// Dialogs. Be extravagant about system memory.
prefs = new PreferencesDialog (this);
rss = new RSSDialog (this);
scan = new ScanDialog (this);
format = new FormatDialog (this);
// Settings.
readSettings();
setProxy();
// Process.
connect(&process, SIGNAL( started() ),
this, SLOT( onProcStarted() ));
connect(&process, SIGNAL( error(QProcess::ProcessError) ),
this, SLOT( onProcError(QProcess::ProcessError) ));
// NOTE: Merge stdout/stderr from c/clive
connect(&process, SIGNAL( readyReadStandardOutput() ),
this, SLOT( onProcStdoutReady() ));
connect(&process, SIGNAL( readyReadStandardError() ),
this, SLOT( onProcStdoutReady() ));
connect(&process, SIGNAL( finished(int, QProcess::ExitStatus) ),
this, SLOT( onProcFinished(int, QProcess::ExitStatus) ));
// Misc.
connect(linksList, SIGNAL( itemDoubleClicked(QListWidgetItem *) ),
this, SLOT( onItemDoubleClicked(QListWidgetItem *) ));
// Parse.
if (parseCcliveVersionOutput())
parseCcliveHostsOutput();
// Widget voodoo.
updateWidgets (true);
#ifdef WIN32
streamBox ->setHidden(true);
streamSpin->setHidden(true);
#endif
setAcceptDrops(true);
createTrayIcon();
}
开发者ID:mogaal,项目名称:abby,代码行数:63,代码来源:mainwnd.cpp
示例6: QMainWindow
BitcoinGUI::BitcoinGUI(QWidget *parent):
QMainWindow(parent),
clientModel(0),
walletModel(0),
encryptWalletAction(0),
changePassphraseAction(0),
lockWalletToggleAction(0),
aboutQtAction(0),
trayIcon(0),
notificator(0),
rpcConsole(0)
{
resize(850, 550);
this -> setWindowFlags ( this -> windowFlags () & ~ Qt :: WindowMaximizeButtonHint ); //disable Max window
this -> setFixedSize(this->width(), this->height()); //diaable draw window
setWindowTitle(tr("FundCoin") + " - " + 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);
setObjectName("FundCoinWallet");
setStyleSheet("#FundCoinWallet { background-image: url(:/images/bgsplatter) repeat-xy; } QToolTip { color: #8b12d0; background-color: #7412D0; border:0px;} ");
// 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();
labelMintingIcon = new QLabel();
labelConnectionsIcon = new QLabel();
labelBlocksIcon = new QLabel();
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(labelEncryptionIcon);
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(labelMintingIcon);
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(labelConnectionsIcon);
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(labelBlocksIcon);
frameBlocksLayout->addStretch();
labelEncryptionIcon->setObjectName("labelEncryptionIcon");
labelConnectionsIcon->setObjectName("labelConnectionsIcon");
labelBlocksIcon->setObjectName("labelBlocksIcon");
labelMintingIcon->setObjectName("labelMintingIcon");
labelEncryptionIcon->setStyleSheet("#labelEncryptionIcon QToolTip {color:#ffcc66;background-color:#333333;border:0px;}");
labelConnectionsIcon->setStyleSheet("#labelConnectionsIcon QToolTip {color:#ffcc66;background-color:#333333;border:0px;}");
labelBlocksIcon->setStyleSheet("#labelBlocksIcon QToolTip {color:#ffcc66;background-color:#333333;border:0px;}");
labelMintingIcon->setStyleSheet("#labelMintingIcon QToolTip {color:#ffcc66;background-color:#333333;border:0px;}");
//.........这里部分代码省略.........
开发者ID:FundCoin,项目名称:FundCoin,代码行数:101,代码来源:bitcoingui.cpp
示例7: 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)
{
setStyleSheet("font-weight:300; font-size:12px; font-family:'Roboto'");
QString ss("QMenuBar::item { background-color: transparent; color: #000000 }");
menuBar()->setStyleSheet(ss);
restoreWindowGeometry();
setWindowTitle(tr("Guarany") + " - " + tr("Wallet"));
qApp->setStyle(QStyleFactory::create("Fusion"));
QPalette palette;
palette.setColor(QPalette::Window, QColor(247,247,247));
palette.setColor(QPalette::WindowText, Qt::black);
palette.setColor(QPalette::Base, QColor(247,247,247));
palette.setColor(QPalette::AlternateBase, QColor(207,220,226));
palette.setColor(QPalette::ToolTipBase, Qt::white);
palette.setColor(QPalette::ToolTipText, Qt::white);
palette.setColor(QPalette::Text, Qt::black);
palette.setColor(QPalette::Button, QColor(13,80,111));
palette.setColor(QPalette::ButtonText, Qt::white);
palette.setColor(QPalette::BrightText, Qt::red);
palette.setColor(QPalette::Highlight, QColor(65,139,202).lighter());
palette.setColor(QPalette::HighlightedText, Qt::black);
qApp->setPalette(palette);
#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();
statusBar()->setStyleSheet("border: none; background-color: #0d506f; color: #FFFFFF;");
// 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);
frameBlocks->setStyleSheet("color: #FFFFFF;");
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();
}
//.........这里部分代码省略.........
开发者ID:guaranycryptocurrency,项目名称:Guarany,代码行数:101,代码来源:bitcoingui.cpp
示例8: QMainWindow
//.........这里部分代码省略.........
#endif
rpcConsole = new RPCConsole(enableWallet ? this : 0);
#ifdef ENABLE_WALLET
if(enableWallet)
{
/** Create wallet frame and make it the centralish widget */
walletFrame = new WalletFrame(this);
walletFrame->setMinimumWidth(650);
walletFrame->setMinimumHeight(500);
} else
#endif // ENABLE_WALLET
{
/* When compiled without wallet or -disablewallet is provided,
* the central widget is the rpc console.
*/
setCentralWidget(rpcConsole);
}
// Accept D&D of URIs
setAcceptDrops(true);
// Create actions for the toolbar, menu bar and tray/dock icon
// Needs walletFrame to be initialized
createActions(networkStyle);
// Create application menu bar
createMenuBar();
// Create the toolbars
createToolBars();
// Create system tray icon and notification
createTrayIcon(networkStyle);
// 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);
unitDisplayControl = new UnitDisplayStatusBarControl();
labelEncryptionIcon = new QLabel();
labelConnectionsIcon = new QPushButton();
labelConnectionsIcon->setFlat(true); // Make the button look like a label, but clickable
labelConnectionsIcon->setStyleSheet(".QPushButton { background-color: rgba(255, 255, 255, 0); border: none;}");
labelConnectionsIcon->setMaximumSize(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE);
labelBlocksIcon = new QLabel();
if(enableWallet)
{
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(unitDisplayControl);
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(labelEncryptionIcon);
}
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(labelConnectionsIcon);
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(labelBlocksIcon);
frameBlocksLayout->addStretch();
// Progress bar and label for blocks download
开发者ID:Crowndev,项目名称:crowncoin,代码行数:67,代码来源:bitcoingui.cpp
示例9: 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(1000, 520);
//setFixedSize(1040, 560);
setWindowTitle(tr("Roscoin") + " - " + tr("Wallet"));
qApp->setStyleSheet("QMainWindow { background:rgb(237,241,247);font-family:'Proxima Nova Rg'; }"
"#toolbar2 { border:none;width:28px;background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgb(35,35,35), stop: 1 rgb(0,232,204)) }"
"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: 1 rgb(0,232,204)); }"
"QMenuBar { background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgb(35,35,35), stop: 1 rgb(0,232,204)); 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(0,232,204)); }");
#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();
createToolBars2();
// Create the tray icon (or setup the dock icon)
createTrayIcon();
// Create tabs
overviewPage = new OverviewPage();
blockBrowser = new BlockBrowser(this);
statisticsPage = new StatisticsPage(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(transactionsPage);
centralWidget->addWidget(addressBookPage);
centralWidget->addWidget(receiveCoinsPage);
centralWidget->addWidget(sendCoinsPage);
centralWidget->addWidget(blockBrowser);
centralWidget->addWidget(statisticsPage);
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();
//.........这里部分代码省略.........
开发者ID:roscoin1,项目名称:roscoin,代码行数:101,代码来源:bitcoingui.cpp
示例10: QMainWindow
EclipseGUI::EclipseGUI(QWidget *parent):
QMainWindow(parent),
bridge(new EclipseBridge(this)),
clientModel(0),
walletModel(0),
messageModel(0),
encryptWalletAction(0),
changePassphraseAction(0),
unlockWalletAction(0),
lockWalletAction(0),
aboutQtAction(0),
trayIcon(0),
notificator(0),
rpcConsole(0),
nWeight(0)
{
webView = new QWebView();
webView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
webView->page()->action(QWebPage::Reload )->setVisible(false);
webView->page()->action(QWebPage::Back )->setVisible(false);
webView->page()->action(QWebPage::Forward)->setVisible(false);
connect(webView, SIGNAL(linkClicked(const QUrl&)), this, SLOT(urlClicked(const QUrl&)));
setCentralWidget(webView);
resize(1280, 720);
setWindowTitle(tr("Eclipse") + " - " + tr("Client"));
#ifndef Q_OS_MAC
qApp->setWindowIcon(QIcon(":icons/eclipse"));
setWindowIcon(QIcon(":icons/eclipse"));
#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 tray icon (or setup the dock icon)
createTrayIcon();
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()));
documentFrame = webView->page()->mainFrame();
QWebSettings::globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
//connect(webView->page()->action(QWebPage::Reload), SIGNAL(triggered()), SLOT(pageLoaded(bool)));
connect(webView, SIGNAL(loadFinished(bool)), SLOT(pageLoaded(bool)));
connect(documentFrame, SIGNAL(javaScriptWindowObjectCleared()), SLOT(addJavascriptObjects()));
connect(documentFrame, SIGNAL(urlChanged(QUrl)), SLOT(urlClicked(const QUrl&)));
#ifdef Q_OS_WIN
QFile html("C:/eclipse/index.html");
#else
QFile html("/opt/eclipse/index.html");
#endif
if(html.exists())
webView->setUrl(QUrl("file:///" + html.fileName()));
else
webView->setUrl(QUrl("qrc:///src/qt/res/index.html"));
}
开发者ID:EclipseCrypto,项目名称:eclipse,代码行数:78,代码来源:bitcoingui.cpp
示例11: 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("NobleCoin") + " - " + tr("Wallet"));
#ifndef Q_WS_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();
QPalette p;
p.setColor(QPalette::Window, QColor(0x22, 0x22, 0x22));
p.setColor(QPalette::Button, QColor(0x22, 0x22, 0x22));
p.setColor(QPalette::Mid, QColor(0x22, 0x22, 0x22));
p.setColor(QPalette::Base, QColor(0x22, 0x22, 0x22));
p.setColor(QPalette::AlternateBase, QColor(0x22, 0x22, 0x22));
setPalette(p);
QFile style(":/text/res/text/style.qss");
style.open(QFile::ReadOnly);
setStyleSheet(QString::fromUtf8(style.readAll()));
/* don't override the background color of the toolbar on mac os x due to
the whole component it resides on not being paintable
*/
#ifdef Q_OS_MAC
toolbar->setStyleSheet("QToolBar { background-color: transparent; border: 0px solid black; padding: 3px; }");
#endif
// Create tabs
overviewPage = new OverviewPage();
chatWindow = new ChatWindow(this); //Create Chat Window
blockExplorer = new BlockExplorer(this); //Include Block Explorer
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(chatWindow); //Add Chat Window
centralWidget->addWidget(blockExplorer); //Create Block Explorer
centralWidget->addWidget(overviewPage);
centralWidget->addWidget(transactionsPage);
centralWidget->addWidget(addressBookPage);
centralWidget->addWidget(receiveCoinsPage);
centralWidget->addWidget(sendCoinsPage);
#ifdef FIRST_CLASS_MESSAGING
centralWidget->addWidget(signVerifyMessageDialog);
#endif
setCentralWidget(centralWidget);
// Create status bar
statusBar();
// Status bar notification icons
QFrame *frameBlocks = new QFrame();
frameBlocks->setContentsMargins(0,0,0,0);
frameBlocks->setMinimumWidth(73);
frameBlocks->setMaximumWidth(73);
QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);
frameBlocksLayout->setContentsMargins(3,0,3,0);
frameBlocksLayout->setSpacing(3);
labelEncryptionIcon = new QLabel();
labelConnectionsIcon = new QLabel();
labelBlocksIcon = new QLabel();
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(labelEncryptionIcon);
frameBlocksLayout->addStretch();
//.........这里部分代码省略.........
开发者ID:jlcurby,项目名称:NobleCoin,代码行数:101,代码来源:bitcoingui.cpp
示例12: setupUi
DwarfClipboard::DwarfClipboard()
{
setupUi(this);
createActions();
createTrayIcon();
trayIcon->setIcon(QIcon(":/icons/images/DwarfClipboard.png"));
trayIcon->show();
setWindowTitle(tr("DwarfClipboard"));
inputDelay = 100;
thumbnailSize = 64;
prevCursor.x = -30000;
createShortcuts();
heartbeatTimer = new QTimer(this);
connectedLabel = new QLabel();
createConnections();
recentModel = new DwarfClipboardModel();
tableViewRecent->setModel(recentModel);
libraryModel = new DwarfClipboardModel();
treeViewLibrary->setModel(libraryModel);
DFMgr = NULL;
DF = NULL;
Pos = NULL;
connected = connectToDF();
loadConfig();
thumbnailSizeLineEdit->setText(QString("%1").arg(thumbnailSize));
inputDelayMsLineEdit->setText(QString("%1").arg(inputDelay));
tilesetPathButton->setText(DwarfClipboardPng::getTileSetPath());
colorPathButton->setText(DwarfClipboardPng::getColorPath());
copyShortcutButton->setText(copyShortcut->shortcut());
pasteDesignationShortcutButton->setText(pasteDesignationShortcut->shortcut());
pasteBuildingShortcutButton->setText(pasteBuildingShortcut->shortcut());
setCursorToPreviousPasteShortcutButton->setText(setCursorToPreviousPasteShortcut->shortcut());
heartbeatTimer->start(1000);
Ui_MainWindow::statusBar->addPermanentWidget(connectedLabel);
connectedIcon = QPixmap(":/icons/images/connect.png");
//This mess just converts the disconnected icon to look the same as a disabled one
//It is the same code used in the icon object
disconnectedIcon = QPixmap(":/icons/images/disconnect.png");
QStyleOption opt(0);
opt.palette = QApplication::palette();
QPixmap generated = QApplication::style()->generatedIconPixmap(QIcon::Disabled, disconnectedIcon, &opt);
disconnectedIcon = generated;
loadDirectory();
loadBuildCommands();
if(connected){
connected = false; //this is ugly, but just ensures everything will be set proprly
setConnected();
}
else{
connected = true;
setDisconnected();
}
setupViews();
}
开发者ID:jimhester,项目名称:Dwarf-Clipboard,代码行数:63,代码来源:DwarfClipboard.cpp
示例13: QMainWindow
NoirSharesGUI::NoirSharesGUI(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("NoirShares") + " - " + tr("Wallet"));
// QPalette pal = this->palette();
// pal.setColor(QPalette::Window, Qt::black);
// pal.setColor(QPalette::WindowText, Qt::white);
// this->setPalette(pal);
// this->setAutoFillBackground(true);
this->setStyleSheet("QMainWindow {background-color: black; color: white;} "
#ifndef Q_OS_MAC
"QToolButton {background-color: black; color: white;} "
"QToolButton:hover {background-color: black; color: #ffff77;} "
"QToolButton:pressed {background-color: #0000bb; color: white;} "
"QToolButton:checked {background-color: #000099; color: white;} "
"QToolButton:disabled {background-color: #333333; color: white;} "
#endif
"QComboBox {border:1px solid white; border-radius: 3px; min-width: 5em; "
" color:white; background-color:black;} "
"QComboBox::drop-down {border: 0px;} "
"QComboBox * {color: black;} "
"QComboBox:on {color: black} "
"QComboBox:on *:hover {background-color: blue} "
"QMessageBox QLabel {color: black;} "
"AddressBookPage {background-color: black; border-color: white;"
" color: white; border-width: 1px;} "
"TransactionView {background-color: black; color: white;} "
"transactionView {background-color: black; color: white;} "
"QLabel {color: white;} "
"QHeaderView::section{background-color: black; border-color:white;"
" color: white; font-weight:bold;"
" border-width: 1px; border-style: solid;} "
"QValidatedLineEdit {border-style: solid; border-width: 1px;"
" border-color: white;}"
"QDoubleSpinBox {color:white;background-color:#222222; "
" border-color:white;border-width:1px;font-weight:bold;} "
"QLineEdit {border-style: solid; border-width: 1px;"
" border-color: white;}"
// "SendCoinsEntry {background-color: black; color: white; "
// " border-color: white; border-width: 1px;} "
// "SendCoinsDialog {background-color: black; color: white; "
// " border-color: white; border-width: 1px;} "
// "QScrollArea {background-color: white; border-color: white; "
// " color: white; border-width: 1px;} "
// "scrollAreaWidgetContents {background-color: white; border-color: white; "
// " color: white; border-width: 1px;} "
);
#ifndef Q_OS_MAC
qApp->setWindowIcon(QIcon(":icons/NoirShares"));
setWindowIcon(QIcon(":icons/NoirShares"));
#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);
|
请发表评论