Skip to content

Andrey Butov Posts

Obama

cwv4zf7uqainpjm

Comments closed

Song of the Open Road

Even though it’s a car commercial, it is the best reading of Walt Whitman’s “Song of the Open Road” I have ever heard. Beautiful.

Comments closed

Quintu

We recently released a new product at Antair. It’s called Quintu.

Quintu runs in your Windows system tray or your Mac menu bar, and allows you to see your Stripe sales, refunds, events, and subscription-related metrics, without the need to have your data go through a third-party service.

We wanted a simple way to see daily and monthly sale numbers at a glance, without having to log into a website and look through a mountain of metrics. We also didn’t want something that was attached to a monthly subscription. We designed Quintu with all of these things in mind.

Quintu runs quietly in the system tray or menu bar, and we can see sales, refunds, trials signups, and cancellations, at a glance, without stopping what we’re doing. We also added desktop notifications as a convenience feature, to be notified right away when someone buys something or signs up for a new trial. Finally, Quintu is priced as a one-time purchase, and doesn’t come with any monthly subscription fees.

You can download the latest version of Quintu from http://quintu.com

screenshot_5

Comments closed

How do I make my Qt app start automatically at login?

This solution is for Windows and Mac. It was tested with Qt 5.5.


void setAppToStartAutomatically ( bool startAutomatically )
{
#if defined ( Q_OS_MAC )

    // Remove any existing login entry for this app first, in case there was one
    // from a previous installation, that may be under a different launch path.
    {
        QStringList args;
        args << "-e tell application \"System Events\" to delete login item\"" 
            + macOSXAppBundleName() + "\"";
        
        QProcess::execute("osascript", args);
    }

    // Now install the login item, if needed.
    if ( startAutomatically )
    {
        QStringList args;
        args << "-e tell application \"System Events\" to make login item at end " + 
            "with properties {path:\"" + macOSXAppBundlePath() + "\", hidden:false}";
        
        QProcess::execute("osascript", args);
    }

#elif defined ( Q_OS_WIN )

    QString key = "YouApplicationName";

    QSettings registrySettings(
        "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", 
        QSettings::NativeFormat);
    
    registrySettings.remove(key);

    if ( startAutomatically ) {
        registrySettings.setValue(key, QString("\"" + windowsAppPath() + "\""));
    }

    registrySettings.sync();

#endif
}


QString macOSXAppBundlePath()
{
#ifdef Q_OS_MAC
    QDir dir = QDir ( QCoreApplication::applicationDirPath() );
    dir.cdUp();
    dir.cdUp();
    QString absolutePath = dir.absolutePath();
    // absolutePath will contain a "/" at the end,
    // but we want the clean path to the .app bundle
    if ( absolutePath.length() > 0 && absolutePath.right(1) == "/" ) {
        absolutePath.chop(1);
    }
    return absolutePath;
#else
    return "";
#endif
}


QString macOSXAppBundleName()
{
#ifdef Q_OS_MAC
    QString bundlePath = macOSXAppBundlePath();
    QFileInfo fileInfo(bundlePath);
    return fileInfo.baseName();
#else
    return "";
#endif
}


QString windowsAppPath()
{
#ifdef Q_OS_WIN
    return QDir::toNativeSeparators(QCoreApplication::applicationFilePath());
#else
    return "";
#endif
}

Comments closed

Speaking at Peers Conf

I will be giving a talk at Peers later this month. The topic is mobile development options for web developers. If you’re attending, come by and say hi!

UPDATE: If you missed the conference, the video of my talk is available below. Click here to download the presentation slides (pdf), or view them on Speaker Deck.

Andrey Butov – Mobile app development options for web developers – PEERS Conference 2015 from Peers Conference on Vimeo.

Comments closed

Android Draggable View

The standard approach to implementing a draggable/movable View in Android is to rely on DragShadowBuilder. For many situations, this would be the easiest approach. However, in some cases, where, for example, you need to modify the view as it is being dragged, DragShadowBuilder won’t do, as it’s just not flexible enough.

As part of a larger project, I created an alternate implementation of a draggable View, without the dependency on DragShadowBuilder. With this approach you have full access to the view being dragged (actually, the cached Bitmap image of the view), and, as such, the view can be modified while moving.

The code is available on GitHub.

Comments closed

Antair Headers is now open source

In 2010, I wrote a utility for Antair that allowed us to easily view the email headers of any email in the BlackBerry inbox.

The application integrated nicely with the BlackBerry inbox, making it really simple to view the headers of any incoming email message.

We released the application as a free app shortly thereafter. From what I heard, quite a few system administrators have found a use for it.

Today, I cleaned up the code a bit, and released the project as open source.

Comments closed

Product portfolio

We did some inventory over the weekend, and I managed to grab an interesting photo out of the process.

Each one of these sticky notes represents a product we built and released over the past 9 years, not including ports, or work done for clients.

Product portfolio

Comments closed