Пример #1
0
void GUI::_setWindowTitle(const QString& title)
{
    if (title.isEmpty())
        getMainWidget()->setWindowTitle("qTox");
    else
        getMainWidget()->setWindowTitle("qTox - " +title);
}
Пример #2
0
bool GUI::_askQuestion(const QString& title, const QString& msg,
                       bool defaultAns, bool warning,
                       bool yesno)
{
    QMessageBox::StandardButton positiveButton = yesno ? QMessageBox::Yes : QMessageBox::Ok;
    QMessageBox::StandardButton negativeButton = yesno ? QMessageBox::No : QMessageBox::Cancel;

    QMessageBox::StandardButton defButton = defaultAns ? positiveButton : negativeButton;

    if (warning)
        return QMessageBox::warning(getMainWidget(), title, msg, positiveButton | negativeButton, defButton) == positiveButton;
    else
        return QMessageBox::question(getMainWidget(), title, msg, positiveButton | negativeButton, defButton) == positiveButton;
}
Пример #3
0
DBNewAlbum::DBNewAlbum(QWidget* const parent, const QString& pluginName)
    : KPNewAlbumDialog(parent,pluginName)
{
        hideDateTime();
        hideDesc();
        hideLocation();
        getMainWidget()->setMinimumSize(300,0);
}
Пример #4
0
ImageShackNewAlbumDlg::ImageShackNewAlbumDlg(QWidget* const parent, const QString& toolName)
    : WSNewAlbumDialog(parent, toolName)
{
    hideDateTime();
    hideDesc();
    hideLocation();
    getMainWidget()->setMinimumSize(300, 0);
}
Пример #5
0
void GUI::_setWindowTitle(const QString& title)
{
    QWidget* w = getMainWidget();
    if (!w)
        return;
    if (title.isEmpty())
        w->setWindowTitle("qTox");
    else
        w->setWindowTitle("qTox - " + title);
}
Пример #6
0
bool GUI::_askQuestion(const QString& title, const QString& msg, const QString& button1,
                       const QString& button2, bool defaultAns, bool warning)
{
    QMessageBox::Icon icon = warning ? QMessageBox::Warning : QMessageBox::Question;
    QMessageBox box(icon, title, msg, QMessageBox::NoButton, getMainWidget());
    QPushButton* pushButton1 = box.addButton(button1, QMessageBox::AcceptRole);
    QPushButton* pushButton2 = box.addButton(button2, QMessageBox::RejectRole);
    box.setDefaultButton(defaultAns ? pushButton1 : pushButton2);
    box.setEscapeButton(pushButton2);

    box.exec();
    return box.clickedButton() == pushButton1;
}
Пример #7
0
	//--------------------------------------------------------------------------	
	void BaseFileDialog::frameStarted(const FrameEvent& _evt)
	{
		if(!ResourceGroupManager::getSingleton().resourceGroupExists(mResourceGroup)
			|| !getNumFilters() || !getMainWidget())
			return;

		if(mNeedUpdateCaption)
		{
			if(updateCaption())
				mNeedUpdateCaption = false;
		}
		if(mNeedUpdateOkText)
		{
			if(updateOkText())
				mNeedUpdateOkText = false;
		}
		if(mNeedUpdateCancelText)
		{
			if(updateCancelText())
				mNeedUpdateCancelText = false;
		}
		if(mNeedUpdateFilters)
		{
			if(updateFilters())
				mNeedUpdateFilters = false;
		}
		if(mNeedUpdateCurrentFilter)
		{
			if(updateCurrentFilter())
				mNeedUpdateCurrentFilter = false;
		}
		if(mNeedUpdateAlphabeticList)
		{
			if(updateAlphabeticList())
				mNeedUpdateAlphabeticList = false;
		}
		if(mNeedUpdateFolders)
		{
			if(updateFolders())
				mNeedUpdateFolders = false;
		}
		if(mNeedUpdateCurrentFolder)
		{
			if(updateCurrentFolder())
				mNeedUpdateCurrentFolder = false;
		}
		if(mNeedUpdateCurrentPath)
		{
			if(updateCurrentPath())
				mNeedUpdateCurrentPath = false;
		}
		if(mNeedUpdateFilesInFolder)
		{
			if(updateFilesInFolder())
				mNeedUpdateFilesInFolder = false;
		}
		if(mNeedUpdateBasenameInAlphabeticList)
		{
			if(updateBasenameInAlphabeticList())
				mNeedUpdateBasenameInAlphabeticList = false;
		}
		if(mNeedUpdateBasenameInFilesInFolder)
		{
			if(updateBasenameInFilesInFolder())
				mNeedUpdateBasenameInFilesInFolder = false;
		}
		if(mNeedUpdateBasenameInEdit)
		{
			if(updateBasenameInEdit())
				mNeedUpdateBasenameInEdit = false;
		}
		if(mNeedUpdateFoldersAndFilesCoord)
		{
			if(updateFoldersAndFilesCoord())
				mNeedUpdateFoldersAndFilesCoord = false;
		}
		if(mNeedUpdateAlphabeticListCoord)
		{
			if(updateAlphabeticListCoord())
				mNeedUpdateAlphabeticListCoord = false;
		}
		unregisterFrameListener();
	}
		//----------------------------------------------------------------------------
		void ParamView::setCoord(const MyGUI::IntCoord& _coord)
		{
			getMainWidget()->setCoord(_coord);
		}
		//----------------------------------------------------------------------------
		const MyGUI::IntCoord& ParamView::getCoord() const
		{
			return getMainWidget()->getCoord();
		}
Пример #10
0
void GUI::_showError(const QString& title, const QString& msg)
{
    QMessageBox messageBox(QMessageBox::Critical, title, msg, QMessageBox::Ok, getMainWidget());
    messageBox.setButtonText(QMessageBox::Ok, QApplication::tr("Ok"));
    messageBox.exec();
}
Пример #11
0
void GUI::_showError(const QString& title, const QString& msg)
{
    QMessageBox::critical(getMainWidget(), title, msg);
}
Пример #12
0
void GUI::_showWarning(const QString& title, const QString& msg)
{
    QMessageBox::warning(getMainWidget(), title, msg);
}
Пример #13
0
void GUI::_showInfo(const QString& title, const QString& msg)
{
    QMessageBox::information(getMainWidget(), title, msg);
}
	//-----------------------------------------------------------------------------
	void BaseFrameStatsWindow::initialise2(BaseFrameStatsWindow* _owner, MyGUI::Widget* _parent)
	{
		BaseLayout::initialiseByAttributes( _owner, _parent);
		getMainWidget()->setAlign(MyGUI::Align::Default);
		registerFrameListener();
	}