minor changes

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4629 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2002-07-13 01:42:15 +00:00
parent 6a1e19245d
commit 0785d52b2b
5 changed files with 31 additions and 21 deletions

View File

@ -1,3 +1,11 @@
2002-07-13 John Levon <moz@compsoc.man.ac.uk>
* QtView.C: add a status bar
* Toolbar_pimpl.C: minor fixes
* lyx_gui.C: implement hexname()
2002-07-12 John Levon <moz@compsoc.man.ac.uk>
* lyx_gui.C: move init_graphics() to parse_init()

View File

@ -34,6 +34,7 @@
#include <qapplication.h>
#include <qpixmap.h>
#include <qmenubar.h>
#include <qstatusbar.h>
using std::endl;
@ -57,6 +58,8 @@ QtView::QtView(unsigned int width, unsigned int height)
toolbar_.reset(new Toolbar(this, *getDialogs(), 0, 0, toolbardefaults));
toolbar_->set(true);
statusBar()->setSizeGripEnabled(false);
minibuffer_.reset(new QMiniBuffer(this));
bufferview_.reset(new BufferView(this, 0, 0, width, height));

View File

@ -136,10 +136,9 @@ QtView
- add autosave timeout
Toolbar_pimpl (variously maybe *)
Toolbar_pimpl
- mathed symbols
- openLayoutList() (?)
- mathed symbols (*)
- openLayoutList() (remove ?)
- ::set() ???
- push() ??
- tooltips

View File

@ -43,7 +43,7 @@ extern LyXAction lyxaction;
namespace {
string const getPixmap(int action)
QPixmap getIconPixmap(int action)
{
string arg;
string xpm_name;
@ -60,23 +60,20 @@ string const getPixmap(int action)
if (!fullname.empty()) {
lyxerr[Debug::GUI] << "Full icon name is `"
<< fullname << "'" << endl;
return fullname;
return QPixmap(fullname.c_str());
}
#if 0 // FIXME
if (act == LFUN_INSERT_MATH && !arg.empty()) {
char const ** pixmap = get_pixmap_from_symbol(arg.c_str(),
buttonwidth,
height);
#if 0 // FIXME: GUII
char const ** pixmap =
get_pixmap_from_symbol(arg.c_str(), 30, 30);
if (pixmap) {
lyxerr[Debug::GUI] << "Using mathed-provided icon"
<< endl;
fl_set_pixmapbutton_data(obj,
const_cast<char **>(pixmap));
return;
return QPixmap(pixmap);
}
}
#endif
}
lyxerr << "Unable to find icon `" << xpm_name << "'" << endl;
fullname = LibFileSearch("images", "unknown", "xpm");
@ -84,7 +81,7 @@ string const getPixmap(int action)
lyxerr[Debug::GUI] << "Using default `unknown' icon"
<< endl;
}
return fullname;
return QPixmap(fullname.c_str());
}
} // namespace anon
@ -255,17 +252,20 @@ void Toolbar::Pimpl::add(int action, bool)
proxy_.get(), SLOT(layout_selected(const QString &)));
break;
}
default:
default: {
char const * tooltip = _(lyxaction.helpText(action)).c_str();
QToolButton * tb =
new QToolButton(QPixmap(getPixmap(action).c_str()),
"FIXME", "FIXME",
new QToolButton(getIconPixmap(action),
tooltip, tooltip,
proxy_.get(), SLOT(button_selected()), toolbars_.back());
map_[tb] = action;
QToolTip::add(tb, _(lyxaction.helpText(action)).c_str());
QToolTip::add(tb, tooltip);
break;
}
}
}

View File

@ -121,8 +121,8 @@ void lyx_gui::start(string const & batch, vector<string> files)
string const lyx_gui::hexname(LColor::color col)
{
// FIXME
return "";
QColor color(lcolor.getX11Name(col).c_str());
return color.name().latin1();
}