Thursday, December 29, 2011

Introducing QMLIrc (yeah, it's a rubbish name...)

Behold. The first screenshot of QMLIrc, my IRC client for Symbian Anna and Belle smartphones. You'll see elements of Windows 7 in the background. This is because it's a screen capture of the program running un the Qt Simulator, as I haven't yet downloaded a screen capture program for my N8.


You'll notice the Belle-based user interface, mostly built on QT Quick Components. So what can it do right now? Well, it can connect to an IRC server, and join one or more channels. It can send output to the server, and receive input, which it can direct to the proper tab. And, thanks to the Communi library, it has pretty colours, too! If fact as it stands it's a usable, if extremely basic IRC client.

Here's the GitHub repository if you want to play...



Sunday, December 04, 2011

Belle will go to the IRC ball!

My previous post requires some explanation

I've been hanging around in the chatrooms on UKChatterbox a lot recently. Mainly using the Java IRC (Internet Relay Chat) client on the website, but occasionally on my Nokia N8. There are a few IRC clients out there for Symbian phones, but all of them so far have one major failing: they can't use the split screen keyboard introduced in Symbian Anna. So you miss what people are saying as you're typing your reply. Therefore I'm writing my own.

I'm using QT Quick, which makes it easy to write code which conforms to the Symbian Belle look and feel. Belle isn't out yet on my N8, but the component set will run in Anna, and by the time it's ready, I may well be running Belle. Much of the heavy lifting - the posting and translation of IRC messages to the server - is being done by the excellent Communi library, written by JP Nurmi et al.

My plan, such as it is (I've never bothered with any Detailed Design Documents or any of the other overheads of software engineering as I work on my own: it's all in my head), is in three stages:

  1. IRCBoilerplate. This is a simple Windows IRC client whose function is to allow me to get to grips with using the Communi library in a relatively comfortable environment. At the time of writing, it is perfectly usable as an IRC, client, if a little rough and ready. But then, it is boilerplate code. The GitHub repo for IRCBoilerplate is here. It's not the latest version, though.  It is. Why? See below...
  2. SessionWrapper. This is two of the classes from IRCBoilerplate placed in a separate QT Library project, so that they can be shared between IRCBoilerplate and QMLIrc (the working name for the Symbian IRC client. Horrible, isn't it?). Their function is to further decouple the UI (written in QTQuick QML) from the Communi-based backend code. I'm planning to limit the interaction between the two to using Qt signals and slots. I haven't set up a repo for this yet. I have, but SessionWrapper as a separate library is defunct. The reason is that it's too difficult to set up multiple static libraries in Qt. As SessionWrapper is two files, it's easier just to put it in the main project. I've had to adapt it for QMLIrc anyway.
  3. QMLIrc. This is the Qt Quick based IRC client for phones running Symbian Anna and later. All I've done so far is prototyped the UI. See above...
So there you have it. When it's finished, I'll probably end up putting it in the Nokia Store. It'll be free, though. I'm doing it for fun, not profit. 


Saturday, November 19, 2011

Version numbering in Qt isn't such a git.

Warning: This is techy stuff. Those of a delicate persuasion (or those who have a life) should look away now...

Still there? No? I'll carry on anyway. In Qt, there's no out-of-the-box way of automatically identifying the version of a project. This could be useful for debugging purposes, for example. However, if you use source code control, you can achieve it easily.

I use Git as my SCCS, and I have adapted the solution I found on Qt Centre, which uses SVN. My version uses git describe, which outputs a string in the following format:


latest tag-number of commits since tagging-unique identifier of latest commit


The code goes in the .pro file of your Qt project, and is as follows:


# Create a macro from the Git describe command, to use in about boxes.BUILDSTR = '\\"$$system(git describe)\\"'
DEFINES += BUILD=\"$${BUILDSTR}\"

This code inserts the git describe string in a #DEFINE macro called build. Here I've used it in a function to display an about box:


void MainWindow::on_aboutButton_clicked()
{
// Display an About box. This uses the BUILD macro created from the // Git describe string in IRCBoilerplate.pro QString versionString = BUILD;
QString aboutString = "IRC BoilerPlate " + versionString + "\n ©2011 Mark Johnson.\nUses the Communi IRC library by J-P Nurmi et al.";
QMessageBox::about(this, tr("About IRCBoilerplate"), aboutString);
}



What's IRCBoilerplate? I'm writing an IRC client for my phone. IRCBoilerplate is a simple Windows IRC client I'm using to learn the nuances of the IRC protocol.

Thursday, November 17, 2011

I'm not married anymore!

I kinda lost interest in this here blog. I mean, no one was reading it. And I'm lazy.

Anyhow, in the two years since I last posted, I've:


  • Got a job as a Trainee Accountant at a small local firm. I like the work, they like me, and as soon as they're sure I'm free of the wobblies they'll pay to further my training. Wobblies? read on...
  • Passed my AAT.
  • Got separated, and moved back in with Mum and Dad. Hence the wobblies. I'm not talking about it - it's water under the bridge, and this blog's about me now. Besides, I have a lovely girlfriend now, who inspires me. I still see the girls regularly.
  • Not done all that much to the TR7, but I've recently restarted, now that my ex has cleared the garage in her new home where she's kindly allowing me to keep it.
So I'll try again to keep this blog up to date. I'll use it to document the TR7 work as normal, and also my attempts at writing apps for my Nokia smartphone using Qt.